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

Function test_check

tests/test_free_functions.py:1206–1220  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1204
1205# %% diagnostics
1206def test_check():
1207
1208 # correct shape
1209 s1 = box(1, 1, 1)
1210
1211 assert check(s1)
1212
1213 s2 = sweep(rect(1, 1), segment((0, 0), (1, 1)))
1214
1215 assert not check(s2, tol=1e-5)
1216
1217 res = []
1218
1219 assert not check(s2, res)
1220 assert res[0][1] == BOPAlgo_CheckStatus.BOPAlgo_SelfIntersect
1221
1222
1223# %% properties

Callers

nothing calls this directly

Calls 5

boxFunction · 0.85
checkFunction · 0.85
sweepFunction · 0.85
rectFunction · 0.85
segmentFunction · 0.85

Tested by

no test coverage detected