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

Function box

cadquery/occ_impl/shapes.py:6409–6419  ·  view source on GitHub ↗

Construct a solid box.

(w: float, l: float, h: float)

Source from the content-addressed store, hash-verified

6407
6408
6409def box(w: float, l: float, h: float) -> Solid:
6410 """
6411 Construct a solid box.
6412 """
6413
6414 return _shape(
6415 BRepPrimAPI_MakeBox(
6416 gp_Ax2(Vector(-w / 2, -l / 2, 0).toPnt(), Vector(0, 0, 1).toDir()), w, l, h
6417 ).Shape(),
6418 Solid,
6419 )
6420
6421
6422def cylinder(d: float, h: float) -> Solid:

Callers 15

simple_boxFunction · 0.90
test_isSolidFunction · 0.90
test_shellsFunction · 0.90
test_bin_import_exportFunction · 0.90
test_removeFunction · 0.90
test_addCavityFunction · 0.90
test_replaceFunction · 0.90
test_single_ent_selectorFunction · 0.90
test_specialFunction · 0.90
test_reverseFunction · 0.90
showablesFunction · 0.85
test_shapeFunction · 0.85

Calls 4

_shapeFunction · 0.85
VectorClass · 0.85
toPntMethod · 0.80
toDirMethod · 0.80

Tested by 15

simple_boxFunction · 0.72
test_isSolidFunction · 0.72
test_shellsFunction · 0.72
test_bin_import_exportFunction · 0.72
test_removeFunction · 0.72
test_addCavityFunction · 0.72
test_replaceFunction · 0.72
test_single_ent_selectorFunction · 0.72
test_specialFunction · 0.72
test_reverseFunction · 0.72
showablesFunction · 0.68
test_shapeFunction · 0.68