TAGGED: #python-#ironpython, script, spaceclaim
-
-
June 5, 2024 at 7:36 pm
Nicole Pan Tavares
SubscriberHello! I'm having trouble creating NamedSelection via SpaceClaim Script, but I'll leave my question in parts.

This is a slice of my geometry, in which you can see an entrance and an exit. The problem is that I need to name them before moving on to meshing, which will also be done via code.
The first problem is that I don't know how to select these regions. I can't use “FilterByArea” because the input and output areas are the same. I'm trying to do it via “FilterByBoundingBox” and it didn't work, and “FIlterByBoundingSphere” even works, but it's selecting the whole solid. How could I select only that surface from the input and output it in a generalized way in the code?
This is because my geometry is scalable, so everything has to be parameterized, so I want a form of selection that depends either on the region or on the geometric parameters. -
June 5, 2024 at 7:41 pm
Nicole Pan Tavares
SubscriberThis is the current code for creating this selection, but in this case, it is selecting the entire solid, which is not wanted.
''
center_point = Point.Create(MM(0), MM(3), MM(0))
r_test = MM(1)#BoundingBox = Box.Create(min_point, max_point)
comp = Selection.Create(GetRootPart())#filtered_faces = faces.FilterByBoundingBox(BoundingBox)
faces = comp.ConvertToFaces()
filtered_faces = faces.FilterByBoundingSphere(center_point, r_inlet)filtered_faces.CreateAGroup('Inlet_Test')
"
-
- The topic ‘NamedSelection in SpaceClaim Script’ is closed to new replies.
- Project lines/edges into a face with the direction normal to the face
- No preview in explorer with scdox file
- Add-in Error Excel
- Fileformats
- Spaceclaim problem
- Using SpaceClaim scripts vs recorded blocks for parametric optimization workflow
- Different Body Naming and Extra Surfaces after Importing Solid Edge Part
- racing royals
- New Computer
- Inconsistent Script
-
4607
-
1510
-
1386
-
1209
-
1021
© 2025 Copyright ANSYS, Inc. All rights reserved.