-
-
September 24, 2025 at 7:34 pm
angmyto
SubscriberMy geometry has four layers and i only want to select the outer, exposed faces of one layer and apply a thermal condition to it. The area is wouldn't be a consistent value so I want it to be able to choose all faces of this layer that is exposed, but I wasn't sure how to do that. Right now I have all the faces of that specific component selected as an IFaceSelection
-
September 25, 2025 at 9:28 am
NickFL
SubscriberIt sounds like you already have these in a selection (I have assumed this selection is called sel). From there you could do something like this:
span = [] # Creates empty List
for face in sel.Faces:
# finds the outer diameter of each face and adds to span
span.append(face.Shape.BoxUV.RangeU.Span)# Use zip to combine together into one
zippy = zip(sel.Faces, span)
# Reorders based on size of D (largest first)
sorted(zippy, key=lambda x: x[1])# Now go thru zippy
for i in range(len(zippy)):
face = FaceSelection.Create(zippy[i][0])
# Create a Named Selection based on the face
NamedSelection.Create(face, Selection.Empty())
NamedSelection.Rename(“Gruppe1”, “ring_{0}”.format(i))-
September 30, 2025 at 12:51 pm
angmyto
SubscriberWhen I try this it'll create multiple named selections and doesn't group them by similar faces. Possibly because there are different shapes and some faces are also curved?
-
October 1, 2025 at 6:12 am
NickFL
SubscriberThis script takes the selection, assumed to be the four circle/annular faces you have in the picture. It then puts each of them in a named selection with ring_0 being the outermost one, ring_1 being the one with the second largest diameter, etc.
I guess I am confused by what you mean by similar faces. How do you want them grouped if not by diameter? (You said the outer one, so ring_0).
Note I am using the German version, so on the last line Gruppe1 might be Group1 in the English version. Other languages would also likely be different.
-
-
-
- You must be logged in to reply to this topic.
- Project lines/edges into a face with the direction normal to the face
- Script for subtracting models
- No preview in explorer with scdox file
- Multiple Instances of SpaceClaim taking multiple licenses
- Issues after installing new service pack 2024R1 (sp5)
- Spaceclaim file reference error
- Add-in Error Excel
- Problems with loading my Discovery Mesh into Fluent
- Missing SubDivWrapper.dll
- Fileformats
-
4007
-
1461
-
1287
-
1124
-
1021
© 2025 Copyright ANSYS, Inc. All rights reserved.