Exports and re-imports a STEP file with the default unit (MM) and verifies the shape geometry is unchanged.
(self)
| 177 | self.assertEqual(2, len(objs.all())) |
| 178 | |
| 179 | def testSTEPImportUnitDefault(self): |
| 180 | """ |
| 181 | Exports and re-imports a STEP file with the default unit (MM) and |
| 182 | verifies the shape geometry is unchanged. |
| 183 | """ |
| 184 | |
| 185 | fileName = os.path.join(OUTDIR, "unit_default_import.step") |
| 186 | shape = Workplane("XY").box(1, 2, 3).val() |
| 187 | shape.exportStep(fileName) |
| 188 | |
| 189 | imported = importers.importStep(fileName, unit="MM") |
| 190 | self.assertTrue(imported.val().isValid()) |
| 191 | self.assertAlmostEqual(imported.findSolid().Volume(), 6) |
| 192 | |
| 193 | def testSTEPImportUnitOverride(self): |
| 194 | """ |
nothing calls this directly
no test coverage detected