While Rhinoscript method would offset the curve and extend it to the edges, python rs method would NOT.
Ok, fine, let me just run rs.ExtendCurve(crv, 2, 2, [srf]) with the surface as a border. Nope, some random curves would only extend to the border of the surface on one random end. So I have to literally run rs.ExtendCurve(crv, 2, 2, [srf]) again. Why is it so bad with python methods?..
test0.3dm (48.2 KB)
test.3dm (131.6 KB)
Hi @dale and @Asterisk,
Is this really a desirable behaviour for OffsetCurveOnSurface? Why the extension?
It would probably be better to control the extension with additional parameter.
OffsetCrvOnSrf have the same behavior?
Not entirely @dale. Here is another video.
First half of the video demonstrates OffsetCrvOnSurface and second half is rs.OffsetCurveOnSurface().
In case of closed curve rs.OffsetCurveOnSurface() does the extensions while OffsetCrvOnSurface does not.
I am not sure that having this extension at all is consistent with other offset commands and methods in Rhino. Shouldn’t this be an optional parameter? Or maybe extending should be done with rs.ExtendCurveOnSurface().
OffsetCurveOnSurface.3dm (75.7 KB)
Here is the source to rs.OffsetCurveOnSurface if you are curious. I can see the code does not check to see if the results create a closed curve. Only open curves should be extended - this is how the Rhino command operates. I’ll open an issue for this.