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

Obtaining tool path destination

Hi,

 

NXOpen - JAVA

 

I got Point to Point operations and I'm trying to get/calculate the following:

 

140-256.png

 

How can I do that please?

 

Thanks,

Tom.

11 REPLIES

Re: Obtaining tool path destination

Is there a way to get the point location (From the "Specify Holes") ?

Maybe via the UF_Session?

40996-200.png

 

Re: Obtaining tool path destination

Legacy PTP drill operations have (almost) NO API support - you have to use GRIP to do most stuff.

(Holemaking operations are supported much better)

 

You can get SOME info from operation parameters, but you have to figure out which parameters.

In one of the replies to this thread:

https://community.plm.automation.siemens.com/t5/Discussion-Forum-NX/Need-help-using-a-journal-to-edi...

you will find an attachment "GetNCObjectParam.txt" - download it, change to .VB, and run as a journal on your operation to see if the required data is available as a parameter.  (I'm suspecting not, as there may be multiple holes selected in one operation)

Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP5 + patch/TC11.2
I'd rather be e-steemed than e-diseaseled


Re: Obtaining tool path destination

[ Edited ]

The only way to directly get the points in the API is to use GRIP. I think it would be much easier to output a CLSF of the operation, which you can do in .net, and parse the output file.

In this list, the "Specify Holes" would be everthing between the two CYCLE statements.

  • RAPID
  • GOTO/ x,y,z,i,j,k     <-- Postion at a safe clearance location
  • CYCLE/...   <-- This has the cleareance above and depth below the hole position.
  • GOTO/x,y,z,i,j,k  <-- This is the position of the top of the first hole, from where distances are measured.
  • GOTO/x,y,z,i,j,k  for each hole
  • CYCLE/OFF
  • GOTO/x,y,z,i,j,k   <-- Position to clearance location 

Of course there are exceptions, but this is the general idea.

I do not understand that the red ball in your picture is the point you have. This is not a hole location - it looks like the clearance before the CYCLE is turned on. 

Mark Rief
Retired Siemens

Re: Obtaining tool path destination

Hi Mark,

Thank you for the answer.

 

I did it and I got the CSLF information, but I don't sure I understand how to get the specifed holes from here.

 

Thanks,

Tom.

Re: Obtaining tool path destination


TomLeon wrote:

Hi Mark,

Thank you for the answer.

 

I did it and I got the CSLF information, but I don't sure I understand how to get the specifed holes from here.

 

Thanks,

Tom.


The only way to get the "holes" specified directly in a point to point operation is with GRIP. I suggested an alternate way to get the hole coordinates and axes that are output.

Mark Rief
Retired Siemens

Re: Obtaining tool path destination

I don’t sure how to convert the GOTO coordinate to the one I’m looking for.

 

Let’s say I will user GRIP. Is there a documentation of how to use it, how to get the points and how to make it a utility so I’ll be able to call it from my JAVA code?

 

Thanks.

Re: Obtaining tool path destination

The GOTO coordinates are the MCS coordinates at the top or the hole. I'm not sure what else you are looking for. You will need to compare these to your hole locations and look for a match. If you need them in a different CSYS, then either map them or move the MCS before outputing the CLS.

In GRIP, I think all you will get with &CURPNT is an array of coordinates (no geometry), which is what you can get out of the CLS. 

Mark Rief
Retired Siemens

Re: Obtaining tool path destination

Ok, I got what I'm looking for in the UI.

Now, the big question is this:  Is there an API for extracting the data?

 

In the UI, I press right click on the operation, go to Tool Path - > Edit. On the form I double click on the wanted GOTO instruction and then I get the needed XYZ coordinate.

 

 

 

a1.pngb1.pngc1.png

Solution
Solution
Accepted by topic author TomLeon
‎03-19-2017 01:18 AM

Re: Obtaining tool path destination

The dialog shows the MCS coordinates, and the little bos on the screen is showing absolute. I think you are asking for the absolute coordinates at the GOTO point - right? When you list the path or output a CLS, there is an MSYS statement, which defines the coordinate system of the GOTO points (MCS) realtive to absolute. If you do a reverse of this matrix on the GOTO points, you should get back to the absolute coordinates.

Another option is to read the tool path motions directly, since they are in absolute. The issue here is to identify the CYCLE and CYCLE/OFF events, since they are only labeled as system events.

Mark Rief
Retired Siemens