MCPcopy
hub / github.com/CadQuery/cadquery / _fuseWithBase

Method _fuseWithBase

cadquery/cq.py:3248–3262  ·  view source on GitHub ↗

Fuse the provided object with the base solid, if one can be found. :param obj: :return: a new object that represents the result of combining the base object with obj, or obj if one could not be found

(self: T, obj: Shape)

Source from the content-addressed store, hash-verified

3246 return newS
3247
3248 def _fuseWithBase(self: T, obj: Shape) -> T:
3249 """
3250 Fuse the provided object with the base solid, if one can be found.
3251
3252 :param obj:
3253 :return: a new object that represents the result of combining the base object with obj,
3254 or obj if one could not be found
3255 """
3256 baseSolid = self._findType((Solid,), searchStack=True, searchParents=True)
3257 r = obj
3258 if baseSolid is not None:
3259 r = baseSolid.fuse(obj)
3260 elif isinstance(obj, Compound):
3261 r = obj.fuse()
3262 return self.newObject([r])
3263
3264 def _cutFromBase(self: T, obj: Shape) -> T:
3265 """

Callers 1

_combineWithBaseMethod · 0.95

Calls 3

_findTypeMethod · 0.95
newObjectMethod · 0.95
fuseMethod · 0.45

Tested by

no test coverage detected