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

Function test_step_export_loc

tests/test_assembly.py:1385–1393  ·  view source on GitHub ↗
(assy_fixture, expected, request, tmpdir)

Source from the content-addressed store, hash-verified

1383 ],
1384)
1385def test_step_export_loc(assy_fixture, expected, request, tmpdir):
1386 stepfile = (Path(tmpdir) / assy_fixture).with_suffix(".step")
1387 if not stepfile.exists():
1388 assy = request.getfixturevalue(assy_fixture)
1389 assy.save(str(stepfile))
1390 o = cq.importers.importStep(str(stepfile))
1391 assert o.solids().size() == expected["nsolids"]
1392 c = cq.Compound.makeCompound(o.solids().vals()).Center()
1393 assert pytest.approx(c.toTuple()) == expected["center"]
1394
1395
1396def test_native_export(simple_assy, tmpdir):

Callers

nothing calls this directly

Calls 8

saveMethod · 0.80
importStepMethod · 0.80
makeCompoundMethod · 0.80
sizeMethod · 0.45
solidsMethod · 0.45
CenterMethod · 0.45
valsMethod · 0.45
toTupleMethod · 0.45

Tested by

no test coverage detected