Hi,
I’m running into an issue with brep.MergeCoplanarFaces
The attached black polysurface is slightly kinked, but apparently enough to allow for the 2 faces to be regarded coplanar.
However after merging the faces the trimming edges are out of tolerance:
If I brep.Repair the merged brep I do get correct trimming edges, however there is a deviation of the initial surface of 0.459 which exceeds the file tolerance.
However , the Command _MergeFace will correctly state :
“Unable to move edges within face tolerance, nothing done”
How do I go about making sure the merger was within tolerance?
Should I check edge deviations myself or am I missing some additional RhinoCommon functionality?
What coplanarity tolerance is used?
Thanks
-Willem
below example file and script
merge_coplanar.3dm (48.2 KB)
import rhinoscriptsyntax as rs
import scriptcontext as sc
obj = rs.GetObject('select brep ro merge coplanars')
if obj:
brep = rs.coercebrep(obj)
tolerance = sc.doc.ModelAbsoluteTolerance
brep.MergeCoplanarFaces(tolerance)
id = sc.doc.Objects.AddBrep(brep)
rs.ObjectColor(id , [255,0,0] )
brep.Repair(tolerance)#make sure the edges are correct
id = sc.doc.Objects.AddBrep(brep)
rs.ObjectColor(id , [20,255,0] )