Cancel
Showing results for 
Search instead for 
Did you mean: 

SNAP Application - NX10 - Deviation of model/faceted model

Pioneer
Pioneer

Hello everyone, 

 

I am a beginner user of NX10, i started using it to create a tool to test a new method to reverse engineer a part, to create a CAD model of an STL file with a semi-automatic process.

I was thinking of using SNAP to build a prototype, but i need to be sure that SNAP has all the functionalities that i need. 

 

Shortly, i need to access to all the commands/functions of the "Reverse Engineering" tab, and in particular to the deviation analysis tool (to be performed between a faceted model and a cad model). Is SNAP able to handle faceted models? 

 

Thanks, 

Francesco

3 REPLIES

Re: SNAP Application - NX10 - Deviation of model/faceted model

Valued Contributor
Valued Contributor

I am not exactly sure whether or not the SNAP API includes the functionality you are looking for. My guess is there is a way to do what you are looking for. In any case, on top of utilizing these forums for help and information, it will benefit you to have a look at the documention and the SNAP reference guide.

 

https://docs.plm.automation.siemens.com/tdoc/nx/10/nx_api/#uid:index_snap_ref_guide

 

As well as the SNAP introductory PDF:

 

https://docs.plm.automation.siemens.com/data_services/resources/nx/10/nx_api/en_US/graphics/fileLibr...
    

Also, here is some code to help you get started. This is a For loop that will process each Faceted body in the assembly.


       

Dim theFacetedBodies() As FacetedBody = p.FacetedBodies.ToArray()


        Echo("Faceted Bodies in part: " & theFacetedBodies.GetLength(0).ToString())

       

       For Each thisFacetedBody As FacetedBody In theFacetedBodies
            Echo("FACETED BODIES")
            Echo("==============")

            If thisFacetedBody.HasLightWeightAnalytics().Equals(True) Then
                Echo("Has lightweight analytics")




                '==========================


                'Any desired processing include here


                '==========================


            Else
                Echo("NO lightweight analytics")
            End If

        Next

 

 

 

 

Hopefully somebody more knowledgable than me can provide you with some more information.

 

Also, consider posting any programming questions in the

"NX Customization and Programming" forum for any other programming questions.

Re: SNAP Application - NX10 - Deviation of model/faceted model

Siemens Phenom Siemens Phenom
Siemens Phenom

SNAP doesn't have any functions for reverse engineering.

 

But, in a reverse engineering application, you will need basic functions for creating points, lines, vectors, and so on, and I'd recommend using the SNAP functions for doing this. In fact, my advice is to use SNAP functions whenever possible, and NX/Open functions where there are no SNAP ones available. Mixing SNAP and NX/Open functions is easy. There's a section in chapter 16 of the SNAP Getting Started Guide that explains how it works:

 

A SNAP object is just a simple wrapper around a corresponding NX Open object — for example, a Snap.NX.Spline object is just a wrapper that encloses an NXOpen.Spline, and a Snap.NX.Sphere is a wrapper around an NXOpen.Features.Sphere object, and so on. So, if you have an NXOpen object, you can “wrap” it to create a Snap.NX object. In the other direction, if you have a Snap.NX object, you can “unwrap” it to get the NXOpen object that it encloses. There are hidden “implicit” conversions that do this wrapping and unwrapping for you, so often things just work without any extra effort.

 

山田
yamada

Re: SNAP Application - NX10 - Deviation of model/faceted model

Pioneer
Pioneer

I was trying to use part of your code recently. 

 

What language is this? 


@junfan wrote:

I am not exactly sure whether or not the SNAP API includes the functionality you are looking for. My guess is there is a way to do what you are looking for. In any case, on top of utilizing these forums for help and information, it will benefit you to have a look at the documention and the SNAP reference guide.

 

https://docs.plm.automation.siemens.com/tdoc/nx/10/nx_api/#uid:index_snap_ref_guide

 

As well as the SNAP introductory PDF:

 

https://docs.plm.automation.siemens.com/data_services/resources/nx/10/nx_api/en_US/graphics/fileLibr...
    

Also, here is some code to help you get started. This is a For loop that will process each Faceted body in the assembly.


       

Dim theFacetedBodies() As FacetedBody = p.FacetedBodies.ToArray()


        Echo("Faceted Bodies in part: " & theFacetedBodies.GetLength(0).ToString())

       

       For Each thisFacetedBody As FacetedBody In theFacetedBodies
            Echo("FACETED BODIES")
            Echo("==============")

            If thisFacetedBody.HasLightWeightAnalytics().Equals(True) Then
                Echo("Has lightweight analytics")




                '==========================


                'Any desired processing include here


                '==========================


            Else
                Echo("NO lightweight analytics")
            End If

        Next

 

 

 

 

Hopefully somebody more knowledgable than me can provide you with some more information.

 

Also, consider posting any programming questions in the

"NX Customization and Programming" forum for any other programming questions.