Forum Message

 

 

We have moved the forum to https://forum.ngsolve.org . This is an archived version of the topics until 05/05/23. All the topics were moved to the new forum and conversations can be continued there. This forum is just kept as legacy to not invalidate old links. If you want to continue a conversation just look for the topic in the new forum.

Notice

The forum is in read only mode.

Easier way to aggregate segments to a 2D Mesh in Netgen API

More
4 years 1 month ago #2471 by Diolante
I created the following structure with the Python API of NETGEN:
Code:
geo = geom2d.SplineGeometry() p1,p2,p3,p4, p5 ,p6, p7,p8,p9,p10= [ geo.AppendPoint(x,y) for x,y in [(0,0), (1,0), (1.5,1), (1.5,1.1), (1.5,1.2), (0,3), (-1,3), (0.5,1.2), (0.5,1.1), (0.5,1)] ] #c #c geo.Append(["line", p1,p2]) geo.Append(["line", p2,p3]) geo.Append(["spline3", p3,p4,p5]) geo.Append(["line", p5,p6]) geo.Append(["line", p6,p7]) geo.Append(["spline3", p7,p8, p9]) geo.Append(["line", p9,p10]) geo.Append(["line", p10, p1]) mesh = geo.GenerateMesh(maxh = 0.1)

That generates the following mesh:



However, i need to aggregate a rectangle segment after a spline (spline is used to soft the corners), in the example image, there is only 2 rectangles and a spline, so, there is a way to do it in an easier way ?

Also, there is another way to change the angle of inclination?
Time to create page: 0.135 seconds