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

Bounding box calculation error

any idea why the values in abs are not updated?

 

double abs[6] = { 10,10,10, 10,10,10};

BodyCollection* temp = workPart->Bodies();
Body *body;
//search
BodyCollection::iterator it = temp->begin();
body = (*it);
UF_MODL_ask_bounding_box(body->Tag(), abs);

 

I checked that the Tag is not Null, but values in abs are not updated after the UF_MODL_ask_bounding_box call.

 

thank you!

5 REPLIES

Re: Bounding box calculation error

Must it not be &abs to send the address of the abs array?

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

Re: Bounding box calculation error

Assuming this is C/C++ (OP didn't say), arrays are passed by address, so you don't need "&abs".

You're missing a "}" on the "double abs..." line (but I assume that's just a cut & paste error or HTML gobbled it up) - note there is an "insert code" button in the web interface that you may want to use in the future.

 

You might want to check the object type/subtype of "body->Tag()", to make sure it is what you think it is (and it is something that UF_MODL_ask_bounding_box can use)

 

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: Bounding box calculation error

As I tried to say (I think HTML is eating it)

Your missing a "}" on the "double..." line
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: Bounding box calculation error

I guess you can't have a "close brace" in this interface...

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


Solution
Solution
Accepted by topic author Erhan
‎04-05-2016 10:26 AM

Re: Bounding box calculation error

Actually, everything is correct. The problem was missing UF_initialize() and UF_terminate() Smiley Happy Problem solved!