Grasshopper

algorithmic modeling for Rhino

Hi Sir,

     I wish to split the curve by specific percentage. Percentage input will taken by panel.

But finding it difficult to split the curve at correct position, Plz if u cound help me with the same. I want to make VB Component for the same.

Views: 592

Replies to This Discussion

By specific percentage you mean a percentage of the length?

Dim curve As Curve = Nothing
Dim length As Double = curve.GetLength()
Dim t As Double
If (curve.LengthParameter(length * 0.65, t)) Then
  Dim fragments As Curve() = curve.Split(t)
End If

The above code splits a curve at 65% along the length.

--

David Rutten

david@mcneel.com

Hi, is there a way to do this with components instead of code?

If you reparameterize the curve, you can use the shatter command with parameter 0.65.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service