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

Function test_history_offset

tests/test_free_functions.py:1374–1397  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1372
1373
1374def test_history_offset():
1375
1376 h = History()
1377 f = plane(1, 1)
1378
1379 offset(f, 0.1, both=True, history=h)
1380
1381 op = h[-1]
1382
1383 fs_offset = op.generated(f)
1384 sides = op.generated(f.edges())
1385
1386 assert fs_offset.faces().size() == 2
1387 assert sides.edges().size() == 2 * 4
1388
1389 offset(f, 0.1, both=False, history=h)
1390
1391 op = h[-1]
1392
1393 fs_offset = op.generated(f)
1394 sides = op.generated(f.edges())
1395
1396 assert fs_offset.faces().size() == 1
1397 assert sides.edges().size() == 4
1398
1399
1400def test_comibine_hist_dict():

Callers

nothing calls this directly

Calls 7

HistoryClass · 0.90
planeFunction · 0.85
offsetFunction · 0.85
generatedMethod · 0.80
edgesMethod · 0.45
sizeMethod · 0.45
facesMethod · 0.45

Tested by

no test coverage detected