Locate New Point On Curve

locateNewPointOnCurve

Op­tion Ex­pli­cit
’Sc­ript writ­ten by Ma­xime Mo­reau
’Sc­ript copy­righ­ted by Open Form Archi­tec­ture
’This sc­ript lo­cate a new point on a curve ac­cor­ding to its dis­tance from either the CurveDomain(0), the Cur­ve­Sart­Point or the CurveDomain(1), the Cur­veEnd­Point.
’Sc­ript ver­sion Tues­day, No­vem­ber 24, 2009 11:26:07 PM

Call Main()
Sub Main()

Dim ob­ject, do­main, crvNewLength

” dis­tance of the new point
crv­New­Length = 50

ob­ject = Rhino.getObject(“select cur­ves”, 4)
do­main = Rhino.CurveDomain (object)

” new point from the CurveDomain(0) or the Cur­veS­tart­Point
If crv­New­Length > do­main (1) Then
Rhino.MessageBox “Curve new length > Cur­ve­Do­main: ” & CStr(domain(1))
Else
Rhino.AddPoint Rhino.EvaluateCurve (ob­ject, (domain(0) + crv­New­Length))
End If

” new point from the CurveDomain(0) or Cur­veEnd­Point
’ If crv­New­Length > do­main (1) Then
’ Rhino.MessageBox “Curve new length > Cur­ve­Do­main: ” & CStr(domain(1))
’ Else
’ Rhino.AddPoint Rhino.EvaluateCurve (ob­ject, (domain(1) — crv­New­Length))
’ End If

End Sub

0 Responses to “Locate New Point On Curve”


  1. No Comments

Leave a Reply