I’ve hit a bit of a wall with trying to clean up the result of an offset.
The majority of the offset is completing successfully but, there are a few places in which extra pieces of line result.
I’ve tried to use “multiple curves (MCX)” to isolate the points at which these extra lines are, and from that try and trim them out, but I’m not getting anywhere.
__author__ = "Seghier Mohamed Abdelaziz"
__version__ = "2021.01.26"
import Rhino as rh
import Rhino.Geometry as rg
from System.Collections.Generic import List
crvs = List[rg.Curve]()
for c in curves:
crvs.Add(c)
if not plane:
plane = rg.Plane.WorldXY
tol = rh.RhinoDoc.ActiveDoc.ModelAbsoluteTolerance
rc = rg.Curve.CreateBooleanRegions(crvs, plane, points, combineRegions, tol)
if rc:
regions = List[rg.Curve]()
for i in range(rc.RegionCount):
regions.AddRange(rc.RegionCurves(i))
regions = regions.ToArray()
I am not the author of the python component from which your error is resulting.
I has been working super well, however, when offsetting the result of the “region find”, I have found these extra curve segments - which I’m trying to get rid of.
Could it be the version of Rhino you are using @ajarindia? I’m using Rhino 7
After a bit more experimenting, I found something that works.
I used the Clipper polyline offset, this is giving a clean result. However, the offset lines have become a little less smooth than the originals…