openscad / openscad-playground

OpenSCAD Web Playground
https://ochafik.com/openscad2
Other
76 stars 17 forks source link

Relative paths in libraries don't work. #32

Closed nophead closed 3 days ago

nophead commented 1 week ago

I see NopSCADlib is included in the libraries but it doesn't work because it uses relative paths and these aren't resolved properly. Oddly the example projects in NopSCADlib work but none of the library tests work. So it seems relative paths work when the library is use by a project but not by when used by tests inside the library itself.

ochafik commented 1 week ago

Hi @nophead

Thanks for reporting! Quick thoughts:

(btw, big fan of your libs here!)

nophead commented 1 week ago

I test the whole library by opening libtest.scad and that includes all the tests using relative paths and they all fail. It would be good if they worked so I can check everything else is working.

Also in an example project that has two scad files that also doesn't work because it uses the second file with a relative path.

ochafik commented 3 days ago

It should now work.

And with colors & customizer

https://ochafik.com/openscad2

image
nophead commented 3 days ago

Most tests now do work but why are the colours so milky? The example above should look like this:

image

Some tests don't complete but there is no log output to say why. The main.scad in that example fails in that way as well.

I think imported STL still have a problem with relative paths. There is a microview.scad test that imports STLs.

ochafik commented 3 days ago

thanks for giving it a spin!

Oh, importing STLs (and supporting attachments), high on my list!

Milky Colors are a bug in how I output the colors, feel free to file this (and the forever hang) separately to track.