Ansys Learning Forum Forums Discuss Simulation 3D Design Getting Mesh Faces With Specified Normal Via SpaceClaim Scripting (V241) Reply To: Getting Mesh Faces With Specified Normal Via SpaceClaim Scripting (V241)

jacob.lurvey
Subscriber

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.