Showing results for 
Search instead for 
Do you mean 
Reply

Projected Distance NXOpen

Hello,

 

I'm trying to measure projected distence in NXOpen. I created a simple test case (Attachement) I need to know distance from each of the points to the surface and save the distance to a variable in NXOpen. When I record this measurement to a journal, I can see an object of the MeasureDistanceBuilder class, but I can't find the value anywhere.

 

I guess it should be in some other object of MeasureDistance class. This class does have  the "Value" property, which should contain a measurement result. Help of the MeasureDistance Class also says:

"To create or edit an instance of this class, use MeasureDistanceBuilder"...

 

I also found another way to create object of the MeasureDistance class:

 

workPart.MeasureManager.NewDistance()

this method has an overload, which accepts a point and direction.. looks promissing, but I can only get max. distance which is distance to the top of the spherical surface (100 mm).Or min. distance which is distance to the base of the surface (50 mm).

 

 measureDistance1 = _workPart.MeasureManager.NewDistance(nullUnit,point1, (DisplayableObject)theObject,direction ,MeasureManager.ProjectionType.Maximum);

 

Thank you for any ideas.

 

1 REPLY

Re: Projected Distance NXOpen

Project the start point up to the surface along the desired vector then measure the distance between the start point and the projected point.