Grasshopper

algorithmic modeling for Rhino

Hello, How can we know if a curve belong to a surface?

 

Thanks to help

Views: 301

Replies to This Discussion

Hi RG,

 

a curve never belongs to a surface. What do you mean exactly?

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Private Sub RunScript(ByVal courbe As Curve, ByVal surface As Surface, ByRef A As Object)

    Dim L_1 As New list (Of interval)
    Dim x As Intersect.CurveIntersections = Intersect.Intersection.CurveSurface(courbe, surface, 0.0001, 0.0001)

    If x.count > 0  Then
      For i As Integer = 0 To x.Count() - 1
        If (x(i).IsOverlap) Then
          L_1.add(x.item(i).OverlapA)
        End If
      Next
    End If

    If L_1.count() = 0 Then
      A = False
    Else
      A = L_1
    End If

You want to know whether a curve does not deviate from a given surface (or brep?) more than X units?

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

yes if it's possible!

Thanks to help!

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service