Arch: Mode bugfixes

This commit is contained in:
Yorik van Havre 2012-07-03 22:41:29 -03:00
parent 5b7643eff0
commit c7a2488da8
3 changed files with 5 additions and 3 deletions

View File

@ -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])

View File

@ -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 = ''

View File

@ -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