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

Method _get

cadquery/occ_impl/shapes.py:5567–5581  ·  view source on GitHub ↗
(self, d: dict[Shape, Shape], k: Shape)

Source from the content-addressed store, hash-verified

5565 self._last_shape = compound()
5566
5567 def _get(self, d: dict[Shape, Shape], k: Shape) -> Shape:
5568
5569 if k.ShapeType() == "Compound":
5570 tmp: list[Shape] = []
5571
5572 for el in k:
5573 val = d[el]
5574 if val.ShapeType() == "Compound":
5575 tmp.extend(val)
5576 else:
5577 tmp.append(val)
5578
5579 return _normalize(compound(tmp))
5580 else:
5581 return _normalize(d[k])
5582
5583 def modified(self, s: Shape | None = None) -> Shape:
5584 """

Callers 5

modifiedMethod · 0.95
generatedMethod · 0.95
imagesMethod · 0.95
firstMethod · 0.95
lastMethod · 0.95

Calls 5

_normalizeFunction · 0.85
compoundFunction · 0.85
extendMethod · 0.80
appendMethod · 0.80
ShapeTypeMethod · 0.45

Tested by

no test coverage detected