I am trying to sweep 2 profiles along one planar polyline rail - using native Rhino Sweep1, checking “untrimmed miters” gives a good result (file below).
However, I have tried various ways to reproduce this behavior in a script using RhinoCommon, but it always fails either to trim or extend… I have tried 3 different sweep methods:
Haven’t got any of them to work correctly so far - what am I missing?
Sweep1PL.3dm (120.6 KB)
SweepPolylineTest1.py (1.1 KB)
SweepPolylineTest2.py (786 Bytes)
SweepPolylineTest3.py (795 Bytes)
Apparently, Rhino needs a looser tolerance to extend/trim-miter this particular sweep.
By increasing the model tolerance, or just modifying it for Brep.CreateFromSweep, to at least about 0.08, miters will be created at all the kinks.
At the increased tolerance, _Sweep1 is also able to create all miters with Untrimmed miters disabled. (Notice how the vertices do not match those of the Untrimmed miters version.)
Rhino.Geometry.SweepOneRail seems to still have mitering problems:
Hmm, that’s too bad… 80x the file tolerance. So I guess the fact that the native Rhino command succeeds in this case is because it has some sort of adaptive tolerance loosening?
RH-56247 is fixed in the latest WIP