Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
WCrihfield
in reply to: WCrihfield

Also, I believe @ynapeu's posted code was in C#, and I believe this would be the iLogic equivalent of it:

(minus the Sub Main ... End Sub portion)

Sub Main
	Dim oBody As SurfaceBody = tempTest(ThisApplication)
End Sub

Public Function tempTest(oApp As Inventor.Application) As SurfaceBody
	Dim oTransGeom As TransientGeometry = oApp.TransientGeometry
	Dim oTransientBRep As TransientBRep = oApp.TransientBRep
	Dim box1 As Box = oApp.TransientGeometry.CreateBox()
	box1.MinPoint = (oApp.TransientGeometry.CreatePoint(0, 0, 0))
	box1.MaxPoint = (oApp.TransientGeometry.CreatePoint(30, 30, 40))
	Dim oBodybox As SurfaceBody = oTransientBRep.CreateSolidBlock(box1)
	Dim count1 As Integer = 0
	Dim facecount1 As Integer = 0
	Dim Vertex1() As Double = { }
	Dim Normalvect1() As Double = { }
	Dim vertexindeces1() As Integer = { }
	Try
		oBodybox.CalculateFacets(0.001, count1, facecount1, Vertex1, Normalvect1, vertexindeces1)
	Catch E As Exception
		MessageBox.Show(E.ToString())
	End Try
	Return oBodybox
End Function

 

 

Wesley Crihfield

EESignature

(Not an Autodesk Employee)