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

Function test_extrude

tests/test_free_functions.py:966–985  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

964
965
966def test_extrude():
967
968 v = vertex(0, 0, 0)
969 e = segment((0, 0), (0, 1))
970 w = rect(1, 1)
971 f = fill(w)
972
973 d = (0, 0, 1)
974
975 r1 = extrude(v, d)
976 r2 = extrude(e, d)
977 r3 = extrude(w, d)
978 r4 = extrude(f, d)
979 r5 = extrude(f, d, both=True)
980
981 assert r1.Length() == approx(1)
982 assert r2.Area() == approx(1)
983 assert r3.Area() == approx(4)
984 assert r4.Volume() == approx(1)
985 assert r5.Volume() == approx(2)
986
987
988def test_revolve():

Callers

nothing calls this directly

Calls 8

vertexFunction · 0.85
segmentFunction · 0.85
rectFunction · 0.85
fillFunction · 0.85
extrudeFunction · 0.85
VolumeMethod · 0.80
LengthMethod · 0.45
AreaMethod · 0.45

Tested by

no test coverage detected