Wishlist rs.ExtendCurveOnSurface()


#1

Hey,
It would be great if we could get the ExtendCurveOnSurface function implemented in rhinoscriptsyntax library.

I have worked up an example using Rhino.Geometry and it seems to work fine for me. The rs.coercecurve would need to be changed to rhutil.coercecurve and some if/elifs for selecting which end to extend but the core functions all seem to be present for this to be added.

import rhinoscriptsyntax as rs
import Rhino
from scriptcontext import doc 

def ExtendCurveOnSurface(Crv,Srf):
    Surface=rs.coercesurface(Srf)
    Curve=rs.coercecurve(Crv)
    Extended=Curve.ExtendOnSurface(Rhino.Geometry.CurveEnd.Both,Surface)
    if Extended!=None:
        doc.Objects.Replace(Crv,Extended)
        doc.Views.Redraw()

Thanks,
5chmidt


(Dale Fugier) #2

Hi Peter,

I’ve added this to the wish list for V6.