Grasshopper

algorithmic modeling for Rhino


Hi, i have some problems using this function in a VB component, eg:
Dim TestCrv As Curve
Dim TestSrf As Surface
New Intersection.CurveSurface(TestCrv, TestSrf, doc.
ModelAbsoluteTolerance, doc.ModelAbsoluteTolerance)

The SDK says:

Public
Shared Function CurveSurface ( _
curve As Curve, _
surface As Surface, _
tolerance As Double, _
overlapTolerance As Double _
) As CurveIntersections

Return Value A list of intersection events.

1 - What kind of intersection events? I need to test a boolean value about intersection True/False, but I don't fully understand how to use this list of value
2 - what is the overlap tolerance?
Thanks
Paolo

Views: 409

Replies to This Discussion

Hi Paolo,

 

CurveSurface() is a function and as such you cannot say New Intersection.CurveSurface(). Functions can only be called, not constructed.

 

Intersection.CurveSurface() returns an instance of the CurveIntersections class. So to use this function you need to type:

 

Dim csx As CurveIntersections = Intersection.CurveSurface(crv, srf, 0.01, 0.05)

Dim pts As New List(Of Point3d)

For i As Int32 = 0 To csx.Count-1

  pts.Add(csx(i).PointA)

Next

 

This collects all the start-points of all intersection events.

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Thanks David, I will try.P

construct a function...

This time I went totally out of mind.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service