What is the reasoning behind allowing a tolerance of
ModelAbsoluteTolerance * 2.1 in pythons JoinSurfaces method? Is this the tolerance for the Join command as well?
I ask because I’m scripting the
Brep.MergeCoplanarFaces(tolerance) method and want to set a tolerance in order for it to work as expected based on tolerance settings.
Do I best set a tolerance multiplied by 2.1 as well?
Brep.MergeCoplanarFaces (ModelAbsoluteTolerance * 2.1)
def JoinSurfaces(object_ids, delete_input=False): """Joins two or more surface or polysurface objects together to form one polysurface object Parameters: object_ids = list of object identifiers Returns: identifier of newly created object on success None on failure """ breps = [rhutil.coercebrep(id, True) for id in object_ids] if len(breps)<2: return scriptcontext.errorhandler() tol = scriptcontext.doc.ModelAbsoluteTolerance * 2.1 joinedbreps = Rhino.Geometry.Brep.JoinBreps(breps, tol) if joinedbreps is None or len(joinedbreps)!=1: return scriptcontext.errorhandler() rc = scriptcontext.doc.Objects.AddBrep(joinedbreps) if rc==System.Guid.Empty: return scriptcontext.errorhandler() if delete_input: for id in object_ids: id = rhutil.coerceguid(id) scriptcontext.doc.Objects.Delete(id, True) scriptcontext.doc.Views.Redraw() return rc