How can I create Groups inside SC from selected faces that are obtained by the small faces tool
Erik Kostson
Member, Employee Posts: 233
✭✭✭✭
How can I create a Group/Named Selection inside SC from selected faces that are obtained by the small faces tool?
0
Best Answer
-
Below is a script that does that (SC small faces tool is not used but the below code does the same):
allfaces=[] allBodies = GetRootPart().GetAllBodies() for body in allBodies: faces=body.Faces for face in faces: if face.Area<=0.0002: # max face size in m2 edges = face.Edges for edge in edges: if edge.Shape.Length<=0.007: # max edge length in m allfaces.append((face)) primarySelection = FaceSelection.Create(allfaces) secondarySelection = Selection.Empty() resultns = NamedSelection.Create(primarySelection, secondarySelection)
0