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

Function test_fill

tests/test_free_functions.py:911–929  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

909
910
911def test_fill():
912
913 w1 = rect(1, 1)
914 w2 = rect(0.5, 0.5).moved(Location(0, 0, 1))
915
916 f1 = fill(w1)
917 f2 = fill(w1, [(0, 0, 1)])
918 f3 = fill(w1, [w2])
919
920 assert f1.isValid()
921 assert f1.Area() == approx(1)
922
923 assert f2.isValid()
924 assert f2.Area() > 1
925
926 assert f3.isValid()
927 assert f3.Area() > 1
928 assert len(f3.Edges()) == 4
929 assert len(f3.Wires()) == 1
930
931
932def test_cap():

Callers

nothing calls this directly

Calls 8

rectFunction · 0.85
LocationClass · 0.85
fillFunction · 0.85
isValidMethod · 0.80
EdgesMethod · 0.80
WiresMethod · 0.80
movedMethod · 0.45
AreaMethod · 0.45

Tested by

no test coverage detected