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

Function test_history_extrude

tests/test_free_functions.py:1258–1283  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1256
1257
1258def test_history_extrude():
1259
1260 hist = History()
1261 f = plane(1, 1)
1262 res = extrude(f, (0, 0, 1), history=hist)
1263
1264 op = hist[-1]
1265
1266 sides = op.generated(f.edges())
1267 top = op.last()
1268 bot = op.first()
1269
1270 assert isSubshape(top, res)
1271 assert isSubshape(bot, res)
1272
1273 assert top == res.face(">Z")
1274 assert bot == res.face("<Z")
1275
1276 for s in sides:
1277 assert isSubshape(s, res)
1278
1279 assert top not in sides
1280 assert bot not in sides
1281
1282 assert top == op.last(f)
1283 assert bot == op.first(f)
1284
1285
1286def test_history_sweep():

Callers

nothing calls this directly

Calls 9

HistoryClass · 0.90
planeFunction · 0.85
extrudeFunction · 0.85
isSubshapeFunction · 0.85
generatedMethod · 0.80
edgesMethod · 0.45
lastMethod · 0.45
firstMethod · 0.45
faceMethod · 0.45

Tested by

no test coverage detected