cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Measuring the Distance between two surfaces using ProGeomitemDistanceEval?

Navku
14-Alexandrite

Measuring the Distance between two surfaces using ProGeomitemDistanceEval?

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.

ACCEPTED SOLUTION

Accepted Solutions
syalagudri
14-Alexandrite
(To:Navku)

Not sure. Can you please check API "ProSelectionWithOptionsDistanceEval"

 

Thanks,

Suresh 

View solution in original post

3 REPLIES 3
syalagudri
14-Alexandrite
(To:Navku)

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)

 ?

Navku
14-Alexandrite
(To:syalagudri)

Hi,

 

Thanks for the help.

 

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

Navku_0-1644992199592.png

 

syalagudri
14-Alexandrite
(To:Navku)

Not sure. Can you please check API "ProSelectionWithOptionsDistanceEval"

 

Thanks,

Suresh 

Announcements


Top Tags