diff --git a/src/Mod/Arch/ArchCommands.py b/src/Mod/Arch/ArchCommands.py index 1ddf46495..83ceb4a96 100644 --- a/src/Mod/Arch/ArchCommands.py +++ b/src/Mod/Arch/ArchCommands.py @@ -162,7 +162,7 @@ def makeFace(wires,method=2,cleanup=False): raise return Part.Face(wires) elif len(wires) == 1: - import Draft;Draft.printShape(wires[0]) + #import Draft;Draft.printShape(wires[0]) if len(wires[0].Vertexes) < 3: raise return Part.Face(wires[0]) diff --git a/src/Mod/Arch/ArchVRM.py b/src/Mod/Arch/ArchVRM.py index 0fe897aa1..91edfed56 100644 --- a/src/Mod/Arch/ArchVRM.py +++ b/src/Mod/Arch/ArchVRM.py @@ -273,7 +273,9 @@ class Renderer: shapes.append([c]+sh[1:]) for f in c.Faces: faces.append([f]+sh[1:]) + print "iscoplanar:",f.Vertexes[0].Point,f.normalAt(0,0),cutface.Vertexes[0].Point,cutface.normalAt(0,0) if DraftGeomUtils.isCoplanar([f,cutface]): + print "COPLANAR" sections.append([f,fill]) self.shapes = shapes self.faces = faces @@ -614,7 +616,7 @@ class Renderer: def getSectionSVG(self,linewidth=0.02): "Returns a SVG fragment from cut faces" - if DEBUG: print "Printing ", len(self.sections), " cutfaces" + if DEBUG: print "Printing ", len(self.sections), " sections" if not self.oriented: self.reorient() svg = '' diff --git a/src/Mod/Draft/DraftGeomUtils.py b/src/Mod/Draft/DraftGeomUtils.py index 30cba202a..f47ae0f09 100755 --- a/src/Mod/Draft/DraftGeomUtils.py +++ b/src/Mod/Draft/DraftGeomUtils.py @@ -1011,7 +1011,7 @@ def isCoplanar(faces): for v in faces[i].Vertexes: chord = v.Point.sub(faces[0].Vertexes[0].Point) dist = DraftVecUtils.project(chord,base) - if dist.Length > 0: + if round(dist.Length,DraftVecUtils.precision()) > 0: return False return True