-
-
October 2, 2024 at 6:58 pmjacob.lurveySubscriber
Hi All,
I'm struggling with performing what I think should be a relatively simple task. I have an .STL geometry that I import into SpaceClaim as facets, and I want to keep it that way for eventual import into Fluent Mesher as an .scdoc. It is imported already clipped at both ends, so I know the location of the inlet and outlet. I've attached a picture of the geometry.
What I want to do is to get all the faces on the inlet and outlet (shown highlighted in orange here) and put them in a named selection. Ideally, I would select all faces with the correct normal vector, but any method that will allow me to automate named selections for the inlet and outlet will work.
 The reason I need to automate this is because I want to process a whole load of similar geometries, all of which have known normals for the inlet and outlet facets. However, since I have to call GetRootPart.Meshes[0] instead of GetRootPart.Bodies[0], lots of the methods in the documentation don't seem to work. Is there any way to do this in SpaceClaim scripting?
Â
Thanks for any help you can provide
-
October 14, 2024 at 6:45 amAtharv JoshiForum ModeratorHi Jacob,ÂÂThanks for sharing the details about your problem.ÂLet me check this and get back to you.ÂÂRegardsAtharv
-
October 16, 2024 at 3:19 pmjacob.lurveySubscriber
I managed to solve the problem using the following code:
inlet_selection = Selection.Create(
  RayFire.Fire(
    inlet_rayfire_origin,
    inlet_rayfire_direction,
    pixel_size,
    hit_radius
  )[1].GetConnection(0))inlet = NamedSelection.Create(inlet_selection, empty_selection, "mass-flow-inlet")
where inlet_rayfire_origin and inlet_rayfire_direction are a Point and Direction, respectively. Not sure why I have to call RayFire.Fire()[1] instead of [0], but it throws an error otherwise. Any ideas on why? It would be interesting to know. The call to .GetConnection(0) allows me to select all the coplanar facets.
-
- You must be logged in to reply to this topic.
- Data Center Simulation
- Unable to attach geometry 2024 R2
- Getting Mesh Faces With Specified Normal Via SpaceClaim Scripting (V241)
- How to provide blade angles in bladegen.
- DXF file loaded incorrectly
- plugin error failed to import assembly from spaceclaim
- Crash by using Script Editor
- Overlapping contact face
- Temperature’s Distribution not available in Refine Mode ?
- Thermoelectric Cooler Model
-
1191
-
518
-
488
-
225
-
209
© 2024 Copyright ANSYS, Inc. All rights reserved.