DeviationGauge tool - NX Open
DeviationGauge tool - NX Open
(OP)
Hi, i am trying to call/use the deviation gauge analysis tool in NX Open to measure the distance between a set of surfaces and a set of facets (STL) imported in Siemens NX.
Is there a way to have access to have access to a numerical value describing the distances between the couples of points considered by the tool? In other words: whenever i use the DeviationGauge directly from Siemens NX i see the distance values visualized on the screen. Using it in OpenNX, i need something like it. This is for me the analysis result, and it's what i need to use in my code.
Is there a way to have access to have access to a numerical value describing the distances between the couples of points considered by the tool? In other words: whenever i use the DeviationGauge directly from Siemens NX i see the distance values visualized on the screen. Using it in OpenNX, i need something like it. This is for me the analysis result, and it's what i need to use in my code.





RE: DeviationGauge tool - NX Open
The most ideal condition would be to have access to all the values of the STL points, but MAX and MIN values could do.
RE: DeviationGauge tool - NX Open
RE: DeviationGauge tool - NX Open
Or, you could cycle through the vertices of the facetted body and measure distance from each one to your surface.
Or, sometimes you can persuade an NX measurement function to send its output to a text file, instead of the listing window. Then your code has to hunt through the text file to get the info you need.
RE: DeviationGauge tool - NX Open
I tried Snap.compute.DeviationInfo, but in my experience it does not work on facetted bodies.
The second option is the solution that i am trying to pospone as my final possibility.
The third thing is actually what i am trying to do. That would be perfect, but i think that my lack of knowledge in programming and VBA is what is slowing me. I cannot find the output of the measurement function anywhere, i don't know where it is stored. It seems impossible that it is only visualized in the software environment but not accessible in code, isn't it?
Thanks again, i am really stuck with this problem!
RE: DeviationGauge tool - NX Open
NXOpen.ListingWindow.ListingWindow.SelectDevice(NXOpen.ListingWindow.DeviceType.File, filePathString)
RE: DeviationGauge tool - NX Open
maybe i need to clarify my problem:
I do have a couple of ideas to get a file output with OPEN, but i can not locate where the data that i need is stored (the results of DeviationGauge, correctly visualized in the NX environment, see figure)!
RE: DeviationGauge tool - NX Open
NXOpen.ListingWindow.ListingWindow.SelectDevice(NXOpen.ListingWindow.DeviceType.File, filePathString)
you are *telling* NX where to put the results. That's what the filePathString argument is -- it's the pathname of the file where you want the output to be written (instead of being written to the listing window).
RE: DeviationGauge tool - NX Open
I used your suggestion, but the file comes out empty. Is this possible? Am i doing something wrong? (highly possible ;) )
RE: DeviationGauge tool - NX Open
CODE --> VB.net
Dim lw1 As ListingWindow lw1 = theSession.ListingWindow Dim myDocs As String myDocs = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) Dim outputFile2 As String = IO.Path.Combine(myDocs, "testlog.txt") lw1.Open() lw1.SelectDevice(ListingWindow.DeviceType.FileAndWindow, outputFile2) lw1.Close()This is what i get:
============================================================
Information listing created by : Francesco
Date : 03/03/2016 12:51:00
Current work part : C:\Users\Freng\Desktop\NX\flangia_finale2.prt
Node name : desktop-a5qleao
============================================================
Filename: C:\Users\Freng\Desktop\NX\flangia_errore_segmentata\flangia_errore_segmentata_2.stl
Number of topologies 1
Topology 0 contains 22264 facets
Total number of facets used 22264
Total degenerate facets 0
RE: DeviationGauge tool - NX Open
RE: DeviationGauge tool - NX Open
This is the data that i need, but i can only see/read it in the 3D view of the software. Every evaluated distance is reported on the corresponding point of the STL.
RE: DeviationGauge tool - NX Open
RE: DeviationGauge tool - NX Open
Regards,
Tomas
RE: DeviationGauge tool - NX Open
Is there a way to do it from code also?
Thanks again
RE: DeviationGauge tool - NX Open
RE: DeviationGauge tool - NX Open