GH3D links: http://www.grasshopper3d.com/forum/topics/suggestion-contour-component
Private Sub RunScript(ByVal S As OnGeometry, ByVal G As Double, ByVal D As OnLine, ByVal L As Boolean, ByRef C As Object, ByRef P As Object)
If S IsNot Nothing AndAlso G > 0 Then
Dim continp As New MRhinoContourInput
Dim GeoArr(0) As OnGeometry
GeoArr(0) = S
continp.m_geom = GeoArr
continp.m_interval = G
If D IsNot Nothing Then
continp.m_basept = D.from
continp.m_endpt = D.To
Else
continp.m_basept = New On3dPoint(0, 0, 0)
continp.m_endpt = New On3dPoint(0, 0, 1)
End If
continp.m_limit_range = L
continp.m_JoinCurves = 1
Dim Crvs() As OnCurve = Nothing
Dim pline() As OnPolyline = Nothing
Dim pts As ArrayOn3dPoint = Nothing
Dim check As New Boolean
check = RhUtil.MakeRhinoContours(continp, pline, Crvs, pts)
If check Then
C = Crvs
P = pline
Else print("Contour Failed. SDK function returned an Error.")
End If
Else print("Invalid/Null Input(s)")
End If
End Sub
No comments:
Post a Comment