renamed simplify
to clean
This commit is contained in:
parent
8c719067c7
commit
29ef1937ab
|
@ -1989,7 +1989,7 @@ class Workplane(CQ):
|
||||||
r = baseSolid.fuse(obj)
|
r = baseSolid.fuse(obj)
|
||||||
baseSolid.wrapped = r.wrapped
|
baseSolid.wrapped = r.wrapped
|
||||||
|
|
||||||
if clean: r = r.simplify()
|
if clean: r = r.clean()
|
||||||
|
|
||||||
return self.newObject([r])
|
return self.newObject([r])
|
||||||
|
|
||||||
|
@ -2006,7 +2006,7 @@ class Workplane(CQ):
|
||||||
for ss in items:
|
for ss in items:
|
||||||
s = s.fuse(ss)
|
s = s.fuse(ss)
|
||||||
|
|
||||||
if clean: s = s.simplify()
|
if clean: s = s.clean()
|
||||||
|
|
||||||
return self.newObject([s])
|
return self.newObject([s])
|
||||||
|
|
||||||
|
@ -2045,7 +2045,7 @@ class Workplane(CQ):
|
||||||
else:
|
else:
|
||||||
r = newS
|
r = newS
|
||||||
|
|
||||||
if clean: r = r.simplify()
|
if clean: r = r.clean()
|
||||||
|
|
||||||
return self.newObject([r])
|
return self.newObject([r])
|
||||||
|
|
||||||
|
@ -2077,7 +2077,7 @@ class Workplane(CQ):
|
||||||
|
|
||||||
newS = solidRef.cut(solidToCut)
|
newS = solidRef.cut(solidToCut)
|
||||||
|
|
||||||
if clean: newS = newS.simplify()
|
if clean: newS = newS.clean()
|
||||||
|
|
||||||
if combine:
|
if combine:
|
||||||
solidRef.wrapped = newS.wrapped
|
solidRef.wrapped = newS.wrapped
|
||||||
|
@ -2111,7 +2111,7 @@ class Workplane(CQ):
|
||||||
|
|
||||||
s = solidRef.cut(toCut)
|
s = solidRef.cut(toCut)
|
||||||
|
|
||||||
if clean: s = s.simplify()
|
if clean: s = s.clean()
|
||||||
|
|
||||||
solidRef.wrapped = s.wrapped
|
solidRef.wrapped = s.wrapped
|
||||||
return self.newObject([s])
|
return self.newObject([s])
|
||||||
|
@ -2369,26 +2369,26 @@ class Workplane(CQ):
|
||||||
else:
|
else:
|
||||||
return self.union(spheres)
|
return self.union(spheres)
|
||||||
|
|
||||||
def simplify(self):
|
def clean(self):
|
||||||
"""
|
"""
|
||||||
Simplifies the current solid by removing unwanted edges from the
|
Cleans the current solid by removing unwanted edges from the
|
||||||
faces.
|
faces.
|
||||||
|
|
||||||
Normally you don't have to call this function. It is
|
Normally you don't have to call this function. It is
|
||||||
automatically called after each related operation. You can
|
automatically called after each related operation. You can
|
||||||
disable this behavior with `autoSimplify(False)`. In some
|
disable this behavior with `clean=False` parameter if method
|
||||||
cases this can improve performance drastically but is
|
has any. In some cases this can improve performance
|
||||||
generally dis-advised since it may break some operations such
|
drastically but is generally dis-advised since it may break
|
||||||
as fillet.
|
some operations such as fillet.
|
||||||
|
|
||||||
Note that in some cases where lots of solid operations are
|
Note that in some cases where lots of solid operations are
|
||||||
chained `simplify()` may actually improve performance since
|
chained `clean()` may actually improve performance since
|
||||||
the shape is 'simplified' at each step and thus next operation
|
the shape is 'simplified' at each step and thus next operation
|
||||||
is easier.
|
is easier.
|
||||||
"""
|
"""
|
||||||
solidRef = self.findSolid(searchStack=True, searchParents=True)
|
solidRef = self.findSolid(searchStack=True, searchParents=True)
|
||||||
if solidRef:
|
if solidRef:
|
||||||
t = solidRef.simplify()
|
t = solidRef.clean()
|
||||||
return self.newObject([t])
|
return self.newObject([t])
|
||||||
else:
|
else:
|
||||||
raise ValueError("There is no solid to simplify!")
|
raise ValueError("There is no solid to clean!")
|
||||||
|
|
|
@ -802,7 +802,7 @@ class Solid(Shape):
|
||||||
def fuse(self, solidToJoin):
|
def fuse(self, solidToJoin):
|
||||||
return Shape.cast(self.wrapped.fuse(solidToJoin.wrapped))
|
return Shape.cast(self.wrapped.fuse(solidToJoin.wrapped))
|
||||||
|
|
||||||
def simplify(self):
|
def clean(self):
|
||||||
return Shape.cast(self.wrapped.removeSplitter())
|
return Shape.cast(self.wrapped.removeSplitter())
|
||||||
|
|
||||||
def fillet(self, radius, edgeList):
|
def fillet(self, radius, edgeList):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user