Arch: Turned jreinhardt's fix to webGL into an option
This commit is contained in:
@@ -38,6 +38,9 @@ else:
|
||||
def translate(ctxt,txt):
|
||||
return txt
|
||||
|
||||
p = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Arch")
|
||||
DISCRETIZE = p.GetBool("webGlDiscretizeCurves",False)
|
||||
|
||||
tab = " " # the tab size
|
||||
wireframeStyle = "faceloop" # this can be "faceloop", "multimaterial" or None
|
||||
cameraPosition = None # set this to a tuple to change, for ex. (0,0,0)
|
||||
@@ -172,7 +175,14 @@ def getObjectData(obj,wireframeMode=wireframeStyle):
|
||||
for f in obj.Shape.Faces:
|
||||
for w in f.Wires:
|
||||
wo = Part.Wire(DraftGeomUtils.sortEdges(w.Edges))
|
||||
wires.append(wo.discretize(0.1))
|
||||
if DISCRETIZE:
|
||||
wires.append(wo.discretize(0.1))
|
||||
else:
|
||||
p = []
|
||||
for v in wo.Vertexes:
|
||||
p.append(v.Point)
|
||||
p.append(wo.Vertexes[0].Point)
|
||||
wires.append(p)
|
||||
|
||||
elif obj.isDerivedFrom("Mesh::Feature"):
|
||||
mesh = obj.Mesh
|
||||
|
||||
Reference in New Issue
Block a user