While processing many curves every now and than I kept having a hard crash no crash report nothing. Finally I’ve tracked down a reproducible example.
I know the curve is far from origin, I know it has stacked controlpoints and is rather odd.
What I do not know is how to prevent Rhino from hard crashing like this.
Is there any testing I can do before passing the curve to CreatePipe?
Run the below python script on the attached file.
pipecrashtest.3dm (22.6 KB)
import rhinoscriptsyntax as rs import math import Rhino #get curve in doc that causes crash id = rs.ObjectsByName('test_curve') rail_curve = rs.coercecurve(id) radius = 9.0 localblending = False cap = Rhino.Geometry.PipeCapMode.None fitrail = True abstol = 0.1 angtol = math.radians(15) pipes = list( Rhino.Geometry.Brep.CreatePipe(rail_curve,radius,localblending,cap,fitrail,abstol,angtol) ) for pipe in pipes: print 'valid : ',pipe.IsValid