py3: Arch: print fixes
This commit is contained in:
parent
1a21a4bc96
commit
2bc1162193
|
@ -122,7 +122,7 @@ def createMeshView(obj,direction=FreeCAD.Vector(0,0,-1),outeronly=False,largesto
|
||||||
# 3. Getting the bigger mesh from the planar segments
|
# 3. Getting the bigger mesh from the planar segments
|
||||||
if largestonly:
|
if largestonly:
|
||||||
c = cleanmesh.getSeparateComponents()
|
c = cleanmesh.getSeparateComponents()
|
||||||
#print c
|
#print(c)
|
||||||
cleanmesh = c[0]
|
cleanmesh = c[0]
|
||||||
segs = cleanmesh.getPlanarSegments(1)
|
segs = cleanmesh.getPlanarSegments(1)
|
||||||
meshes = []
|
meshes = []
|
||||||
|
@ -142,7 +142,7 @@ def createMeshView(obj,direction=FreeCAD.Vector(0,0,-1),outeronly=False,largesto
|
||||||
shape = None
|
shape = None
|
||||||
for f in cleanmesh.Facets:
|
for f in cleanmesh.Facets:
|
||||||
p = Part.makePolygon(f.Points+[f.Points[0]])
|
p = Part.makePolygon(f.Points+[f.Points[0]])
|
||||||
#print p,len(p.Vertexes),p.isClosed()
|
#print(p,len(p.Vertexes),p.isClosed())
|
||||||
try:
|
try:
|
||||||
p = Part.Face(p)
|
p = Part.Face(p)
|
||||||
if shape:
|
if shape:
|
||||||
|
|
|
@ -97,7 +97,7 @@ def getCutShapes(objs,section,showHidden):
|
||||||
if o.Shape.isValid():
|
if o.Shape.isValid():
|
||||||
shapes.extend(o.Shape.Solids)
|
shapes.extend(o.Shape.Solids)
|
||||||
else:
|
else:
|
||||||
print section.Label,": Skipping invalid object:",o.Label
|
print(section.Label,": Skipping invalid object:",o.Label)
|
||||||
else:
|
else:
|
||||||
shapes.append(o.Shape)
|
shapes.append(o.Shape)
|
||||||
cutface,cutvolume,invcutvolume = ArchCommands.getCutVolume(section.Shape.copy(),shapes)
|
cutface,cutvolume,invcutvolume = ArchCommands.getCutVolume(section.Shape.copy(),shapes)
|
||||||
|
@ -188,7 +188,7 @@ def getSVG(section,allOn=False,renderMode="Wireframe",showHidden=False,showFill=
|
||||||
if showHidden:
|
if showHidden:
|
||||||
svg += render.getHiddenSVG(linewidth="LWPlaceholder")
|
svg += render.getHiddenSVG(linewidth="LWPlaceholder")
|
||||||
svg += '</g>\n'
|
svg += '</g>\n'
|
||||||
# print render.info()
|
# print(render.info())
|
||||||
|
|
||||||
else:
|
else:
|
||||||
# render using the Drawing module
|
# render using the Drawing module
|
||||||
|
|
|
@ -99,7 +99,7 @@ def getIndices(shape,offset):
|
||||||
else:
|
else:
|
||||||
fi = ""
|
fi = ""
|
||||||
for e in f.OuterWire.OrderedEdges:
|
for e in f.OuterWire.OrderedEdges:
|
||||||
#print e.Vertexes[0].Point,e.Vertexes[1].Point
|
#print(e.Vertexes[0].Point,e.Vertexes[1].Point)
|
||||||
v = e.Vertexes[0]
|
v = e.Vertexes[0]
|
||||||
ind = findVert(v,shape.Vertexes)
|
ind = findVert(v,shape.Vertexes)
|
||||||
if ind == None:
|
if ind == None:
|
||||||
|
|
|
@ -155,7 +155,7 @@ def getCameraData():
|
||||||
else:
|
else:
|
||||||
result += "camera.position.set(0,0,1000);\n"
|
result += "camera.position.set(0,0,1000);\n"
|
||||||
result += tab+"camera.lookAt( scene.position );\n"+tab
|
result += tab+"camera.lookAt( scene.position );\n"+tab
|
||||||
# print result
|
# print(result)
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def getObjectData(obj,wireframeMode=wireframeStyle):
|
def getObjectData(obj,wireframeMode=wireframeStyle):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user