I’m extracting isocurves from piped surfaces that I know should be exactly or well approximated to round in at least 1 direction and it’s not working well at all. Could there quirks to the nature of the surfaces, not sure how they were made or how many times they were round-tripped through DWG file, that might cause it to fail to find what I think are obvious arcs? It’s probably some other sort of bug in my code but just wondering…
I dont think you get arcs from piped surface.
Make a arc , than a pipe from it to extract a isocurve and see what happen.
Can you post an example?
I’m thinking it’s just my logic…
Dunno, this seems to work with a couple of perpendicular sections through pipes:
import rhinoscriptsyntax as rs
import scriptcontext as sc
import Rhino
obj_id=rs.GetObject("Select section curve",4,preselect=True)
if obj_id:
tol=sc.doc.ModelAbsoluteTolerance
crv=rs.coercegeometry(obj_id)
print type(crv)
rc,result=crv.TryGetArc(tol)
print type(result)
Returns:
<type 'NurbsCurve'>
<type 'Arc'>
Even if I don’t supply the optional tolerance argument it seems to succeed.
Thanks Mitch!