VB Rhino.SurfaceNormal() fails with extrusion as input


#1

…as the title says. @dale Methinks this should work without having to force a conversion to a surface.

Edit : Python rhinoscriptsyntax equivalent seems to work OK with extrusions.

–Mitch


#2

@dale Rhino.ExtendCurve is also failing with an extrusion object as a target - try the following scriptlet with the attached file - extend the red curve to the extrusion. It fails. Uncomment the line with the conversion of the extrusion to a surface and it will succeed.

@stevebaer The rhinoscriptsyntax method in Python is also failing in this case with an extrusion.

Option Explicit
Call TestExtendCrvToExtrusion()
Sub TestExtendCrvToExtrusion()
    Dim crv,srf, result
    crv = Rhino.GetObject("Select curve to extend", 4, True)
    srf = Rhino.GetObject("Select extrusion to extend to", 1073741824)
    'srf = Rhino.ConvertExtrusion(srf, True)'
    result = Rhino.ExtendCurve(crv, 0, 0, Array(srf))
    If IsNull(result) Then Call Rhino.Print("Extension failed!")
End Sub

Thanks, --Mitch

ExtendCrvToExtrusion-Fail.3dm (266.0 KB)


(Dale Fugier) #3

Got 'em, thanks!

– Dale