cancel
Showing results for 
Search instead for 
Did you mean: 

Obtain bodies of thicken and pattern feature

Solution Partner Genius Solution Partner Genius
Solution Partner Genius

Hello everyone!

 

I need an advice. I have a Thicken feature that is then patterned by using Pattern Feature operation. I need to obtain bodies created by these operations. I have discovered that Thicken feature can be cast into Body Feature type and .GetBodies() can be used to obtain body created by it. However it doens't work with Pattern Feature. Meanwhile in the Feature class do exist commands for working with bodies - Hide body for example. But I can't find explicit commands to obtain bodies. Where is the trick? I tried GetEntities, it returns nothing from Thicken. It does return a number of objects from Pattern Feature but I am not quite sure what do to with them. Can you plese help?

7 REPLIES

Re: Obtain bodies of thicken and pattern feature

Solution Partner Genius Solution Partner Genius
Solution Partner Genius
Am I getting it right that I will have to cast feature into Pattern Feature type to get access to the methods for obtaining bodies?

Re: Obtain bodies of thicken and pattern feature

Phenom
Phenom

If you have a reference to a pattern feature, you can use its .GetAssociatedBodies method to get the bodies that it created. You can then use the .Parents property to find the feature that was patterened and get its body if so desired.

Re: Obtain bodies of thicken and pattern feature

Solution Partner Genius Solution Partner Genius
Solution Partner Genius

I have managed to obtain needed bodies, but I now face another unexpected obstacle: the bodies are not picked up in order. I have steady pattern of bodies, but NX Open puts them in list in random order. But order is important for me, because I need to do unite operations. At the momemnt I am not quite sure how to sort bodies properly. Any ideas?

Re: Obtain bodies of thicken and pattern feature

Solution Partner Genius Solution Partner Genius
Solution Partner Genius

I seem to have found a solution. Apparently, the best way is to obtain pattern feature, THEN obtain its instance features, and only then obtain bodies from them. Some further testing is required, but first results are encouraging.

Re: Obtain bodies of thicken and pattern feature

Esteemed Contributor
Esteemed Contributor

Scaffold wrote:

At the momemnt I am not quite sure how to sort bodies properly. Any ideas?


You could check for intersections of the bodies and if they intersect or touch, you can unite them.

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: Obtain bodies of thicken and pattern feature

Solution Partner Genius Solution Partner Genius
Solution Partner Genius
I have found my way already, but the idea is interesting. How do I check bodies for that?

Re: Obtain bodies of thicken and pattern feature

Esteemed Contributor
Esteemed Contributor

Search the solution center for "sample intersection nx_api" and check Sample Open C API program : create intersection geometry between selected objects, function UF_MODL_intersect_objects might be of interest.

I don't know if there is a new method, but the wrapper should work in the meantime.

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