01-18-2021
06:50 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
01-18-2021
06:50 AM
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
(Not an Autodesk Employee)