import_step supports colors and labels

This commit is contained in:
gumyr 2024-05-22 10:12:57 -04:00
parent 70ca2a30ad
commit 7a1cfc1f8b
5 changed files with 223 additions and 38 deletions

View file

@ -131,13 +131,16 @@ class TestExportStep(DirectApiTestCase):
double_compound.color = Color("blue")
with self.assertWarns(UserWarning):
export_step(double_compound, "double_compound.step")
os.chmod("double_compound.step", 0o444) # Make the file read only
with self.assertRaises(RuntimeError):
export_step(double_compound, "double_compound.step")
os.chmod("double_compound.step", 0o777) # Make the file read/write
os.remove("double_compound.step")
box = Box(1, 1, 1)
self.assertTrue(export_step(box, "box_read_only.step"))
os.chmod("box_read_only.step", 0o444) # Make the file read only
with self.assertRaises(RuntimeError):
export_step(box, "box_read_only.step")
os.chmod("box_read_only.step", 0o777) # Make the file read/write
os.remove("box_read_only.step")
class TestExportGltf(DirectApiTestCase):
def test_export_gltf(self):