Exports a box using the options to decrease STEP file size and then imports that STEP to validate it.
(tmpdir)
| 59 | |
| 60 | |
| 61 | def test_step_options(tmpdir): |
| 62 | """ |
| 63 | Exports a box using the options to decrease STEP file size and |
| 64 | then imports that STEP to validate it. |
| 65 | """ |
| 66 | # Use a temporary directory |
| 67 | box_path = os.path.join(tmpdir, "out1.step") |
| 68 | |
| 69 | # Simple object to export |
| 70 | box = Workplane().box(1, 1, 1) |
| 71 | |
| 72 | # Export the STEP with the size-saving options and then import it back in |
| 73 | box.val().exportStep(box_path, write_pcurves=False, precision_mode=0) |
| 74 | w = importers.importStep(box_path) |
| 75 | |
| 76 | # Make sure there was a valid box in the exported file |
| 77 | assert w.solids().size() == 1 |
| 78 | assert w.faces().size() == 6 |
| 79 | |
| 80 | |
| 81 | def test_fused_assembly(tmpdir): |
nothing calls this directly
no test coverage detected