You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm creating windings using polyline arcs, but I'm missing the possibility to control the number of segments of the polyline arc in pyaedt. Could you please add that? See IronPython below, no. of segments is ca. in the middle. Alternatively / additionally I would happy to know how I could change the number of segments after creating the polyline.
The thing is that I'm creating foil windings, i.e. very thin conductor layers very close to each other, and if I don't have a way to control the no. of segments, solvers throws "mesh leak to the air" or similar error even when I control the mesh appropriately.
If I understood correctly you'd like to draw your geometry by providing different polylines.
If this is your intention you can achieve it through the create_polyline method because in the segment_type argument you can provide a list of PolylineSegment objects.
In the following example I provide different polylines of different types by giving a list of points as a reference:
A small comment with this approach in case you have some angular arc, you should provide only the initial point of your arc because the method automatically computes the other two points that define the arc. The second point that you provide is the second point of the next polyline (in my case is the second point of my line).
The other option could be drawing line by line you geometry with the create_polyline method and at the end unite and cover the polylines to get a unique geometry:
Description of the feature
Dear pyaedt team,
I'm creating windings using polyline arcs, but I'm missing the possibility to control the number of segments of the polyline arc in pyaedt. Could you please add that? See IronPython below, no. of segments is ca. in the middle. Alternatively / additionally I would happy to know how I could change the number of segments after creating the polyline.
The thing is that I'm creating foil windings, i.e. very thin conductor layers very close to each other, and if I don't have a way to control the no. of segments, solvers throws "mesh leak to the air" or similar error even when I control the mesh appropriately.
Many thanks in advance!
Cheers
Irene
Steps for implementing the feature
oEditor.CreatePolyline(
[
"NAME:PolylineParameters",
"IsPolylineCovered:=" , True,
"IsPolylineClosed:=" , False,
[
"NAME:PolylinePoints",
[
"NAME:PLPoint",
"X:=" , "160mm",
"Y:=" , "-300mm",
"Z:=" , "0mm"
],
[
"NAME:PLPoint",
"X:=" , "243.5580551423mm",
"Y:=" , "-237.232952549388mm",
"Z:=" , "0mm"
],
[
"NAME:PLPoint",
"X:=" , "304.105244939971mm",
"Y:=" , "-152.052622469986mm",
"Z:=" , "0mm"
]
],
[
"NAME:PolylineSegments",
[
"NAME:PLSegment",
"SegmentType:=" , "AngularArc",
"StartIndex:=" , 0,
"NoOfPoints:=" , 3,
"NoOfSegments:=" , "0",
"ArcAngle:=" , "35.3624618870691deg",
"ArcCenterX:=" , "0mm",
"ArcCenterY:=" , "0mm",
"ArcCenterZ:=" , "0mm",
"ArcPlane:=" , "XY"
]
],
[
"NAME:PolylineXSection",
"XSectionType:=" , "None",
"XSectionOrient:=" , "Auto",
"XSectionWidth:=" , "0mm",
"XSectionTopWidth:=" , "0mm",
"XSectionHeight:=" , "0mm",
"XSectionNumSegments:=" , "0",
"XSectionBendType:=" , "Corner"
]
],
[
"NAME:Attributes",
"Name:=" , "Polyline1",
"Flags:=" , "",
"Color:=" , "(143 175 143)",
"Transparency:=" , 0,
"PartCoordinateSystem:=", "Global",
"UDMId:=" , "",
"MaterialValue:=" , ""vacuum"",
"SurfaceMaterialValue:=", """",
"SolveInside:=" , True,
"ShellElement:=" , False,
"ShellElementThickness:=", "0mm",
"ReferenceTemperature:=", "20cel",
"IsMaterialEditable:=" , True,
"IsSurfaceMaterialEditable:=", True,
"UseMaterialAppearance:=", False,
"IsLightweight:=" , False
])
Useful links and references
No response
The text was updated successfully, but these errors were encountered: