-
Notifications
You must be signed in to change notification settings - Fork 521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modeling tests & superficial code cleanup #211
Conversation
started tests for 3d primitives
- also cleaned up maths module
Are there some fixes in these changes? I see some rewrites of the parameter handling. |
@z3dev just some minor cleanups, not changing anything about the way the parameters are actually handled |
…modeling: - extrusions - transformations - primitives
In my mind, CSG was a entirely different library, it is weird to have tests here instead of in https://evanw.github.io/csg.js/ where the csg file is originaly coming from. What about putting these tests in a PR to the source repository ? |
@dav-m85 these are not tests for the CSG.js module/lib : these are specifically for the 'openscad style' functional wrappers/tools :) So they do not belong to the CSG.js repo , otherwise yes you would have been right ;) |
Oops so sorry, I was reading this code too fast I guess :) |
@dav-m85 no worries :) |
There's already https://github.com/csg-js, created by @bhouston in this thread: evanw/csg.js#13. He was even offering writing tests. There's also the npm package https://www.npmjs.com/package/csg pointing to a fork, already used as a dependency in a few other packages. No luck either for the moment evanw/csg.js#18 I think these two places could be a good starting point to merge all the csg copies across all projects... |
@dav-m85 perhaps we can open a discussion for the points above , we are going off track for this PR , which is done as far as I am concerned :) |
@kaosat-dev absolutely. Shall we start a gitter ? |
Gitter started: https://gitter.im/OpenJSCAD-org/Lobby |
FYI, I have started a set of tests for CSG and CAG, but haven't decided on WHERE this should live. If we come to a conclusion on where then I'd be glad to post what I have. |
Oh that's great @z3dev. Could you open a PR to https://github.com/jscad/csg.js ? I already have a few very naive tests WIP jscad/csg.js#2, maybe our works are complementary :) |
If not then i'll adjust. But I won't have time until this weekend. Cheers |
I support moving this to the https://github.com/jscad ORganization, especially if I am a member. We use this stuff at Clara.io but it isn't very stable at all. |
@bhouston I will gladly add you as a member ! By 'moving this' : what is the this refering to ? The csg.js library , the openjscad one ? |
I thought someone was trying to centralize this under the jscad project. I may have been wrong. Sorry. Sort of came into this discussion late. But it would be cool to see this stuff working well if that was possible. I'm not a CAD kernel expert myself, more of a glsl/shader and polygon geometry guy -- e.g. Clara.io stuff. |
Ready for MERGE !
This PR adds unit tests for all the functional modeling helpers, so that we have a good , tested baseline to expand things from.
To run all the test (including the already passing ones for the CLI & module) type
npm test
or
npm t
Non passing tests are there for a reason:
unless I got something really wrong :)