I want to find circle edges in mechanical model
Lukas
Member Posts: 13
**
I wrote following code to get ID´s of circle edges :
g = ExtAPI.DataModel.Project.Model.Geometry allbodies = g.GetChildren[Ansys.ACT.Automation.Mechanical.Body](True) geo_bodies = [x.GetGeoBody() for x in allbodies if x.Suppressed == False] circles=[] for geo in geo_bodies: for edge in geo.Edges: if edge.Type == EdgeType.Circle: circles.append(edge.Id) print(circles)
However I get empty list. Any idea what is wrong? Thank you
Tagged:
0
Best Answer
-
Edges have two properties, one for its type (which is edge) and one for curve type.
edge.CurveType == GeoCurveTypeEnum.GeoCurveCircle
If you replace Type with CurveType and EdgeType with the GeoCurveTypeEnum you should be able to filter different edge properties
2