jscad / OpenJSCAD.org

JSCAD is an open source set of modular, browser and command line tools for creating parametric 2D and 3D designs with JavaScript code. It provides a quick, precise and reproducible method for generating 3D models, and is especially useful for 3D printing applications.
https://openjscad.xyz/
MIT License
2.63k stars 512 forks source link

tests with dev release #240

Closed Ognian closed 7 years ago

Ognian commented 7 years ago

Hello, I've loaded your great lib with

"openjscad": "https://github.com/Spiritdude/OpenJSCAD.org/tarball/dev"

in the package.json dependencies section. npm installworks. Very simple test1.jscad:

function main() {
    var cube = CSG.cube();
    return cube;
}

works via node_modules/.bin/openjscad -v test1.jscad also.

BUT then I tried to

include("node_modules/jscad-utils/jscad-utils.jscad");

into the test1.jscad file and use util which is defined in the included file I've got an error that util is not defined

I tried a lot of things but somehow it looks like include doesn't work... Any ideas on this? Thanks a lot Ognian

kaosat-dev commented 7 years ago

Hi @Ognian ! Thanks for the feedback ! I'll try this out as well, could you please just confirm that jscad-utils is this one : https://www.npmjs.com/package/jscad-utils

Ognian commented 7 years ago

@kaosat-dev yes it is this one.

kaosat-dev commented 7 years ago

@Ognian ok I can reproduce I will see how hard it is to fix

kaosat-dev commented 7 years ago

@Ognian I fixed it in #241 and added some tests, I am still doing some cleanup work, but it will be merged soon

Ognian commented 7 years ago

WOW thanks a lot! 2 additional suggestions I had when I was looking into the project (just in case you didn't have the same ideas too):

kaosat-dev commented 7 years ago

Hi @Ognian thanks for the feedback !

Btw I also found an additional issue with relative paths when using the CLI, so I added one more test and fixed it in #244

Ognian commented 7 years ago

tested with #244 in place --> IT WORKS. Thanks a lot.