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

Function downcast

cadquery/occ_impl/shapes.py:404–412  ·  view source on GitHub ↗

Downcasts a TopoDS object to suitable specialized type

(obj: TopoDS_Shape)

Source from the content-addressed store, hash-verified

402
403
404def downcast(obj: TopoDS_Shape) -> TopoDS_Shape:
405 """
406 Downcasts a TopoDS object to suitable specialized type
407 """
408
409 f_downcast: Any = downcast_LUT[shapetype(obj)]
410 rv = f_downcast(obj)
411
412 return rv
413
414
415def fix(obj: TopoDS_Shape) -> TopoDS_Shape:

Callers 5

fixFunction · 0.85
__init__Method · 0.85
castMethod · 0.85
centerOfMassMethod · 0.85
offset2DMethod · 0.85

Calls 1

shapetypeFunction · 0.85

Tested by

no test coverage detected