OpenSCAD Module: bugfixes and improvements

if more than 14 digits are given don round in general,
but test for <eps only.
refine before extrusion
support polyhedron faces which replaces polyhedron faces
importCSG round rotations
don't call Draft.makecircle and makeprism as they trigger a recompute
use group placholder for objects with no children
move removesubtree to OpenSCADUtils
add resize and offset keywords
add OpenSCAD_ExplodeGroup command
add OpenSCAD_IncreaseToleranceFeature
change refine shape logo
This commit is contained in:
Sebastian Hoogen
2014-02-21 16:24:14 +01:00
parent 040c19b1c1
commit b58d1caea7
13 changed files with 1288 additions and 522 deletions

View File

@@ -292,6 +292,31 @@ class RefineShape:
sh=fp.Base.Shape.removeSplitter()
fp.Shape=sh
class IncreaseTolerance:
'''increase the tolerance of every vertex
in the current implementation its' placement is linked'''
def __init__(self,obj,child,tolerance=0):
obj.addProperty("App::PropertyLink","Base","Base",
"The base object that wire must be extracted")
obj.addProperty("App::PropertyDistance","Tolerance","Base","Tolerance")
obj.Base = child
obj.Tolerance = tolerance
obj.Proxy = self
def onChanged(self, fp, prop):
if prop in ["Tolerance"]:
self.createGeometry(fp)
def execute(self, fp):
self.createGeometry(fp)
def createGeometry(self,fp):
if fp.Base:
sh=fp.Base.Shape.copy()
for vertex in sh.Vertexes:
vertex.Tolerance = max(vertex.Tolerance,fp.Tolerance.Value)
fp.Shape = sh
fp.Placement = sh.Placement
class GetWire:
'''return the first wire from a given shape'''
def __init__(self, obj,child=None):