1
0
mirror of https://github.com/nophead/NopSCADlib.git synced 2025-08-05 23:17:26 +02:00

Views.py and plateup.py now define $cwd and $target.

This commit is contained in:
Chris Palmer
2021-02-06 15:12:21 +00:00
parent cb30f0c63d
commit 079168142b
2 changed files with 6 additions and 2 deletions

View File

@@ -72,7 +72,9 @@ def plateup(target, part_type, usage = None):
changed = check_deps(part_file, dname)
if changed:
print(changed)
openscad.run("-D$bom=1", "-d", dname, "-o", part_file, src_file)
target_def = ['-D$target="%s"' % target] if target else []
cwd_def = ['-D$cwd="%s"' % os.getcwd().replace('\\', '/')]
openscad.run_list(["-D$bom=1"] + target_def + cwd_def + ["-d", dname, "-o", part_file, src_file])
if part_type == 'stl':
c14n_stl.canonicalise(part_file)
log_name = 'openscad.log'