Showing results for 
Search instead for 
Do you mean 
Reply
Solved! Go to solution

Obtain hole's center (Measure Point)

Hi,

 

I'm developing on NX Open - JAVA.

How can I get the center of a hole feature?

On the UI I can do this with the "Measure Point" tool (the Journaling didn't helped me here).

 

cover.jpg

 

Thanks,

Tom.

 

5 REPLIES

Re: Obtain hole's center (Measure Point)

A hole feature has a .Location property that should get you this information.

Re: Obtain hole's center (Measure Point)

I tried to derive the information fron the X/Y/Z_POSITION attributes, but there is something odd:

 

The values I get from the messures are:

X = 1530 mm

Y = 1593 mm

Z = -6 mm

cover.jpg

 

But on the feature attributes I got different values:

X = -1530 mm

Y = -6 mm

Z = 1593 mm

 

cover.jpg

 

Can you please explain to me what I misunderstood.

 

Thanks.

Re: Obtain hole's center (Measure Point)

Is this a native NX file, or has it been imported/converted from another CAD system? I ask because the native NX modeling "hole" command doesn't add attributes to the hole feature (at least not in NX 9). Is the last screenshot from the part navigator? The text "STEP2HOLE_THREAD_432" and "Recognized" leads me to believe that some other processing has happened to this file.

 

Also, are you working in the context of the piece part file or an assembly? If you are working in the context of an assembly, the measured point location won't match the attribute values if the component has been repositioned in the assembly.

Re: Obtain hole's center (Measure Point)

[ Edited ]

We are not speaking about modeling features, but about manufacturing features here, so these are no design features, but FBM features.

The position attributes of the FBM feature are always in relation to the start coordinate system of the feature.

I think you need to use the coordinates of the feature CSYS, which should be related to the WCS or ACS, but I haven't tested this hypothesis.

Stefan Pendl, Systemmanager CAx, HAIDLMAIR GmbH
Production: NX10.0.3, VERICUT 8.0, FBM, MRL 3.1.4 | TcUA 10.1 MP7 Patch 0 (10.1.7.0) | TcVis 10.1
Development: VB.NET, Tcl/Tk    Testing: NX11.0 EAP, NX12.0 EAP

How to Get the Most from Your Signature in the Community
Solution
Solution
Accepted by topic author TomLeon
‎02-22-2017 12:44 AM

Re: Obtain hole's center (Measure Point)

I got it:

 

private void gotIT(Face aFeatureFace)

{

   AskFaceData data = UFSession.modeling().askFaceData(aFeatureFace.tag());
   double x = data.point[0];
   double y = data.point[1];

   double z = data.point[2];

   .

   .

   .

}