Cancel
Showing results for 
Search instead for 
Did you mean: 

Moving bodies to positive quadrants of x,y,z graph

Pioneer
Pioneer

Hey guys,

 

I've been working on this project at work that i'm having some trouble with. Basically, for the project, I have to move all the bodies in the work part to be in the positive quadrant of x, y, and z - that the point with the most negative x value, (-50, 10 , 10) , is now moved to, for example, (0, 10, 10), so that there are no bodies with any part/point being negative.

I tried recording the move body function and messing around with it to not much avail.

 

I would really appreciate any tips or ideas.

11 REPLIES

Re: Moving bodies to positive quadrants of x,y,z graph

Esteemed Contributor
Esteemed Contributor

Why is this important?

 

Can't you just move the WCS so that the condition is satisfied?

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: Moving bodies to positive quadrants of x,y,z graph

Pioneer
Pioneer
So, that does work for the most part, but the problem is in the scenari where the body isnt "complete" and then you have to do measurements and etc to be able to find the desired start point of the body, which in of itself isnt hard, but when we work on a part file with many "parts", it takes forever for the part file to update to what we do.
Is there any way for me to do this in nx open?

Re: Moving bodies to positive quadrants of x,y,z graph

Siemens Phenom Siemens Phenom
Siemens Phenom

See the NXOpen.UF.UFModl.AskBoundingBox() methods:

 

NXOpen.UF.UFModl.AskBoundingBox()

NXOpen.UF.UFModl.AskBoundingBoxAligned()

NXOpen.UF.UFModl.AskBoundingBoxExact()

 

These could be used to find out what the "most negative" point of the model is and thus how large the offset needs to be,

Re: Moving bodies to positive quadrants of x,y,z graph

Pioneer
Pioneer
Thank you so much! I'll give this a try.

Re: Moving bodies to positive quadrants of x,y,z graph

Siemens Phenom Siemens Phenom
Siemens Phenom

If you are working with an assembly, you might also look at UF_FLTR_ask_box_of_assy(), which "Returns the bounding box information for an assembly and all of the components in it, or for a particular component. The edges of the box are parallel to the axis of the absolute coordinate system. "

Re: Moving bodies to positive quadrants of x,y,z graph

Pioneer
Pioneer
This Do you by any chance have an example on hand of an implementation of, NXOpen.UF.UFModl.AskBoundingBoxAligned() ? because i'm not sure how to get the parameters it's expecting and i'm not sure how to apply this to a situation where the user doesnt know or provide the minimum point and etc. but rather is able to get that information on its own.

Re: Moving bodies to positive quadrants of x,y,z graph

Honored Contributor
Honored Contributor

The .AskBoundingBoxExact function is very similar and you can find an example here:

http://solutions.industrysoftware.automation.siemens.com/view.php?si=nx_api4316

Re: Moving bodies to positive quadrants of x,y,z graph

Siemens Phenom Siemens Phenom
Siemens Phenom

 

One important thing to be aware of - the minimum corner, directions, and distances are all outputs.  The method is going to figure out what numbers those contain, you just have to be sure that you declare the right kind of variable to hold the numbers.

 

It is always a good idea to take a look at the Open C Reference Guide when you are trying to use one of the wrapper functions, so you can get the complete data on how the function/method works, and what the various parameters are.

Re: Moving bodies to positive quadrants of x,y,z graph

Pioneer
Pioneer
I unfortunately don't have access to the GTAC due to missing information in the company. Is there any other way to see this example?