Skip to main content
14-Alexandrite
February 15, 2022
Solved

Measuring the Distance between two surfaces using ProGeomitemDistanceEval?

  • February 15, 2022
  • 1 reply
  • 2093 views

Hi,

 

I am trying to measure the distance between two surfaces using ProGeomitemDistanceEval method which gives output distance as 0 always.

 

lErr = ProSelect("surface,point,axis", 1, NULL, NULL, NULL, NULL, &lpSelectionEdge, &lSelCount);
lErr = ProSelect("surface,point,axis", 1, NULL, NULL, NULL, NULL, &lpSelectionSurface, &lSelCount);
lErrCode=ProGeomitemDistanceEval(*lpSelectionEdge, *lpSelectionSurface, &distance);

 

Can you help what's the wrong in this code?

 

Thanks in advance.

Best answer by syalagudri

Not sure. Can you please check API "ProSelectionWithOptionsDistanceEval"

 

Thanks,

Suresh 

1 reply

14-Alexandrite
February 15, 2022

Looks like you are passing the entire array instead of its element.

 

Check sample code:

 status = ProGeomitemDistanceEval(p_sel_arr[0], p_sel_arr[1], &dist);

 Should be 

ProGeomitemDistanceEval(lpSelectionEdge[0], lpSelectionSurface[0], &distance)

 ?

Navku14-AlexandriteAuthor
14-Alexandrite
February 16, 2022

Hi,

 

Thanks for the help.

 

Is there possible to measure the distance between surfaces without Use as plane option?

Navku_0-1644992199592.png

 

14-Alexandrite
February 16, 2022

Not sure. Can you please check API "ProSelectionWithOptionsDistanceEval"

 

Thanks,

Suresh