MCPcopy Index your code
hub / github.com/CadQuery/cadquery / clean

Method clean

cadquery/cq.py:4211–4237  ·  view source on GitHub ↗

Cleans the current solid by removing unwanted edges from the faces. Normally you don't have to call this function. It is automatically called after each related operation. You can disable this behavior with `clean=False` parameter if method has any.

(self: T)

Source from the content-addressed store, hash-verified

4209 return self.eachpoint(lambda loc: w.moved(loc), True, combine, clean)
4210
4211 def clean(self: T) -> T:
4212 """
4213 Cleans the current solid by removing unwanted edges from the
4214 faces.
4215
4216 Normally you don't have to call this function. It is
4217 automatically called after each related operation. You can
4218 disable this behavior with `clean=False` parameter if method
4219 has any. In some cases this can improve performance
4220 drastically but is generally dis-advised since it may break
4221 some operations such as fillet.
4222
4223 Note that in some cases where lots of solid operations are
4224 chained, `clean()` may actually improve performance since
4225 the shape is 'simplified' at each step and thus next operation
4226 is easier.
4227
4228 Also note that, due to limitation of the underlying engine,
4229 `clean` may fail to produce a clean output in some cases such as
4230 spherical faces.
4231 """
4232
4233 cleanObjects = [
4234 obj.clean() if isinstance(obj, Shape) else obj for obj in self.objects
4235 ]
4236
4237 return self.newObject(cleanObjects)
4238
4239 def text(
4240 self: T,

Callers 12

filletMethod · 0.45
cutEachMethod · 0.45
_combineWithBaseMethod · 0.45
combineMethod · 0.45
unionMethod · 0.45
cutMethod · 0.45
intersectMethod · 0.45
cutBlindMethod · 0.45
cutThruAllMethod · 0.45
test_modifiersFunction · 0.45
testExplicitCleanMethod · 0.45
testSketchMethod · 0.45

Calls 1

newObjectMethod · 0.95

Tested by 3

test_modifiersFunction · 0.36
testExplicitCleanMethod · 0.36
testSketchMethod · 0.36