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

Function _sanitize_for_bool

cadquery/sketch.py:65–73  ·  view source on GitHub ↗

Make sure that a Shape is selected

(obj: SketchVal)

Source from the content-addressed store, hash-verified

63
64
65def _sanitize_for_bool(obj: SketchVal) -> Shape:
66 """
67 Make sure that a Shape is selected
68 """
69
70 if isinstance(obj, Location):
71 raise ValueError("Location was provided, Shape is required.")
72
73 return obj
74
75
76def _to_compound(obj: Shape) -> Compound:

Callers 4

__add__Method · 0.85
__sub__Method · 0.85
__mul__Method · 0.85
__truediv__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected