ImplicitCAD icon indicating copy to clipboard operation
ImplicitCAD copied to clipboard

[OpenSCAD compat] Include relative paths are evaluated differently

Open depau opened this issue 5 years ago • 2 comments

Hi,

I was trying to rebuild this project (not the best code, I admit) with extopenscad with --fopenscad-compat and I noticed that relative imports are evaluated differently.

Specifically, OpenSCAD evaluates relative paths starting from the location of the SCAD file.

To reproduce: https://github.com/Depau/aegis-mini-skin; run make SCAD='./path/to/extopenscad -O':

$ make SCADC='/usr/bin/extopenscad -O'
/usr/bin/extopenscad -O -o stl/stubs/decoration_side.stl stubs/decoration_side.scad
Loading File.
Processing File.
extopenscad: /tmp/aegis-mini-skin/../config.scad: openFile: does not exist (No such file or directory)

⇒ OpenSCAD would load config.scad from /tmp/aegis-mini-skin/stubs/../config.scad


Side note: someone made an Arch Linux AUR package for ImplicitCAD, if you wanna mention it in the website :) https://aur.archlinux.org/packages/implicitcad/

depau avatar Aug 18 '20 14:08 depau

I believe it's fair to call this broken. :)

julialongtin avatar Aug 24 '20 11:08 julialongtin