nophead / NopSCADlib

Library of parts modelled in OpenSCAD and a framework for making projects
GNU General Public License v3.0
1.2k stars 156 forks source link

make_all is now not generating anything #196

Closed niclash closed 3 years ago

niclash commented 3 years ago
niclas@d1:~/dev/3D/DreamPlacer$ make_all.py 
openscad-nightly -D $bom=2 -D $preview=true -o openscad.echo -d bom/bom.deps scad/bom.scad --hardwarnings 
WARNING: Ignoring unknown variable '$_bom' in file ../../NopSCADlib/utils/core/bom.scad, line 45

niclas@d1:~/dev/3D/DreamPlacer$ ls dxfs -l
total 0
nophead commented 3 years ago

The latest version of openscad is broken.

nophead commented 3 years ago

See https://github.com/openscad/openscad/issues/3781

nophead commented 3 years ago

It doesn't look like they are going to fix $variables to work like they have for the last 10 years, so I have botched around it. Basically when you use a file then any $variables defined at file level within it are ignored. Only $variables on the call stack are visible.

I also came across a new bug exporting files, which I have also botched around, although I expect it to be fixed. See https://github.com/openscad/openscad/issues/3879

Please can you give it a try.

nophead commented 3 years ago

Actually although the work arounds stop errors the change to $variables means if you set them at file scope anywhere it will create a bug. Any bespoke ones will become undefined when the framework instantiates STLs and assembly views. Any overrides of $fa, $layer_height, etc will be ignored.

niclash commented 3 years ago

I looked at it for 15 minutes just now, and realize it will take me a few hours to make the changes to your (better) structure/naming, and don't really have time until coming weekend. Will do it then...

niclash commented 3 years ago

$job$ stalled yesterday, so I put in the time on it. And after fixing my own issues, it make_all works as expected.

niclash commented 3 years ago

Generated output is in https://github.com/niclash/DreamPlacer

nophead commented 3 years ago

Nice.

You might want to add a .gitignore to prevent some of the generated files being added to Github. E.g. the .deps and .echo files.

See https://github.com/nophead/NopSCADlib/blob/master/.gitignore