AnsweredAssumed Answered

How works SelectByRay?

Question asked by Maciej Mazik on Feb 11, 2019
Latest reply on Feb 12, 2019 by Maciej Mazik

Hello everybody

I have question about SelectByRay function. This function takes x,y,z point to start and vector x,y,z to show direct.

Now, I have 2 squareness, I added 2 points3D (green points) to show location.


Now, Im trying to choose orange face.

With this code:

startPointX = 1.5

startPointY = 1
startPointZ = 1.1
rayVecX = 0
rayVecY = 0
rayVecZ = -1
radius = 0.01
status = model.Extension.SelectByRay(startPointX, startPointY, startPointZ, rayVecX, rayVecY, rayVecZ, radius, 2, False, 1, 0)



In my opinion Im trying to make something like this:

I choose point and vector which is close face and direct to orange face.

Could somebody explained me how it work? And how choose this face if I got co-ordinates of her. Before this method I used SelectByID2, but Its sometimes select wrong faces.