I am trying to generate boundary surface of solid objects in NX, using API. So, if there is a cube, the API will generate a boundary along cube's boundary, but below the cube.
Since it is generated using API, I want to be sure that the boundary is a closed surface and not having minor gaps because of floating point errors or data conversion issues.
So, my question is : "is there a way to check if a surface is watertight?" Or rather is this question more meaningful: "is there a way to check if a surface is watertight within the defined tolerance of the CAD environment ? "
I am concerned about this because it is something that ensures that surfacing algo is debugged and tested, as I guess I cannot rely on the fact that if the boundary surface "looks" (visually) closed, then it is actually closed.
I think you might be able to do this with Examine Geometry -> Face Intersections (interactively).
Actions for this dialog do record Journal code, so that would be a good start. You can specify the body you want to examine, and one or more checks to perform, so for this one you get something like this - I am omitting some of the recorded code here:
Dim examineGeometry1 As NXOpen.GeometricAnalysis.ExamineGeometry
examineGeometry1 = workPart.AnalysisManager.CreateExamineGeometryObje
. . .
. . .
Dim added1 As Boolean
added1 = examineGeometry1.ObjectsToExamine.Add(body1)