ufs.Modl.UniteBodies
ufs.Modl.UniteBodies
(OP)
I want to programmatically subtract a collection of solid bodies from a block. I am looking at using ufs.Modl.UniteBodies which an example is found on the GTAC solution center (https://solutions.industrysoftware.automation.siem...)
However, this only gives the boolean operation of two bodies. I need to cycle through a collection of bodies and perform a boolean operation.
Any ideas?
However, this only gives the boolean operation of two bodies. I need to cycle through a collection of bodies and perform a boolean operation.
Any ideas?





RE: ufs.Modl.UniteBodies
www.nxjournaling.com
RE: ufs.Modl.UniteBodies
Or you can call NXOpen.UF.UFModl.SubtractBodies several times.
Or, if you have a SNAP license, just call Snap.Create.Subtract -- it allows you to input several tool bodies. Here's some example code:
CODE --> vb
Imports Snap, Snap.Create Public Class MyProgram Public Shared Sub Main() Dim d As Double = 10 Dim ball As NX.Body = Sphere(0, 0 ,0, d) Dim left As NX.Body = Sphere(-d/2, 0, 0, 9) Dim right As NX.Body = Sphere( d/2, 0, 0, 9) ' Subtract the two smaller spheres from the larger one Dim cut As NX.Boolean = Subtract(ball, left, right) End Sub End Class