Grasshopper

algorithmic modeling for Rhino

hi,

I think it would be great to have a contour component that would support path inputs, as giulio piacentino´s (great) contour component for 0.6 version doesn´t.

just making a wish ...
:-)

Views: 478

Replies to This Discussion

By Path Inputs, do you imply the paths that determine the direction of contouring, or the 'paths' in data trees? If it's the former you wish for, here's the code for it:

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
thanks a lot!

thanks to your website

WhatsApp PC

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service