How to select a face by location?
def locfindface(xx,yy,zz): searchPoint = Point.Create(MM(xx), MM(yy),MM(zz)) direction = Direction.DirX rayOrigin = searchPoint + (direction.UnitVector * -.001) list = RayFire.Fire(rayOrigin, direction, 1E-10, 1E-5) for item in list: if isinstance(item, IDesignFace): Selection.Create(item).CreateAGroup("my_face") break; locfindface(5.54,10,14.45)
Hello, thank you for submitting this routine. I manage to make it work on my own usecase.
But, it seems that the Faces that I manage to select and name are not attached/part of the volumes. They look like duplicates of the desired faces. So I loose the Named Selection when meshing.
Any clues for solving it ?
Thank you in advance.
Pierre Carrere