Grasshopper

algorithmic modeling for Rhino

I am trying to get all of the C0 Discontinuities of a curve using a custom component written in VB.net. I have been trying to use FindNextDiscontinuity but have been unable to make anything work. Does anybody have any suggestions? What should I be using as my T0 and T1 if I want to check the entire curve for all discontinuities? Do I need to step through the curve using a loop? Any help would be appreciated. Thanks!

Views: 558

Replies to This Discussion

I've now been able to find a single discontinuity by searching the entire domain of the curve I'm checking, but how do I get all the discontinuities? Is there a way to step through the curve using a loop and get each and every discontinuity?

alright

Give this a try. It would be nice if you could post some geometry for us on the other end of the grasshopper-verse to work with but generally speaking this is the code you want to try. 

Dim c As curve = x.duplicate
Dim t As New Double

Dim start As Double = c.Domain.Min

Dim disL As New List(Of Double)

While c.GetNextDiscontinuity(continuity.C0_continuous, start, c.Domain.Max, t)
start = t
disL.add(t)
End While

a = disL

Just to let you know, I cant get results with this code using C0 though... I use "continuity.C1_continuous" to get 'kinks'

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