mirror of
https://github.com/gumyr/build123d.git
synced 2025-12-15 15:20:37 -08:00
import_step supports colors and labels
This commit is contained in:
parent
70ca2a30ad
commit
7a1cfc1f8b
5 changed files with 223 additions and 38 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue