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

Function cylinder

cadquery/occ_impl/shapes.py:6422–6432  ·  view source on GitHub ↗

Construct a solid cylinder.

(d: float, h: float)

Source from the content-addressed store, hash-verified

6420
6421
6422def cylinder(d: float, h: float) -> Solid:
6423 """
6424 Construct a solid cylinder.
6425 """
6426
6427 return _shape(
6428 BRepPrimAPI_MakeCylinder(
6429 gp_Ax2(Vector(0, 0, 0).toPnt(), Vector(0, 0, 1).toDir()), d / 2, h, 2 * pi
6430 ).Shape(),
6431 Solid,
6432 )
6433
6434
6435def sphere(d: float) -> Solid:

Callers 4

test_isolinesFunction · 0.90
test_cylinderFunction · 0.85
test_textFunction · 0.85
test_projectFunction · 0.85

Calls 4

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

Tested by 4

test_isolinesFunction · 0.72
test_cylinderFunction · 0.68
test_textFunction · 0.68
test_projectFunction · 0.68