Skip to content
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

Merged
merged 24 commits into from
Jan 9, 2017
Merged

Conversation

kaosat-dev
Copy link
Contributor

@kaosat-dev kaosat-dev commented Jan 1, 2017

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.

  • 2d primitives
  • 3d primitives
  • extrusion ops
  • boolean ops
  • transformation ops
  • colors
  • maths
  • text

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:

  • unexpected behaviour
  • weird api issues
  • this PR is not meant to fix issues, just to add the tests highlighting them :)
    unless I got something really wrong :)

@z3dev
Copy link
Member

z3dev commented Jan 2, 2017

Are there some fixes in these changes? I see some rewrites of the parameter handling.

@kaosat-dev
Copy link
Contributor Author

@z3dev just some minor cleanups, not changing anything about the way the parameters are actually handled

@dav-m85
Copy link

dav-m85 commented Jan 6, 2017

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 ?

@kaosat-dev
Copy link
Contributor Author

kaosat-dev commented Jan 6, 2017

@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 ;)

@kaosat-dev kaosat-dev changed the title Modeling tests Modeling tests & superficial code cleanu Jan 6, 2017
@kaosat-dev kaosat-dev changed the title Modeling tests & superficial code cleanu Modeling tests & superficial code cleanup Jan 6, 2017
@dav-m85
Copy link

dav-m85 commented Jan 6, 2017

Oops so sorry, I was reading this code too fast I guess :)

@kaosat-dev
Copy link
Contributor Author

kaosat-dev commented Jan 6, 2017

@dav-m85 no worries :)
Btw , perhaps not the best place to discuss it, but we need to find a new home for an updated cgs.js since the original is not maintained any more, so we might / will be moving /creating some repositories in a Github organization soonish so that it can be more community maintained (ping @z3dev )

@dav-m85
Copy link

dav-m85 commented Jan 6, 2017

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...

@kaosat-dev
Copy link
Contributor Author

@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 :)

@dav-m85
Copy link

dav-m85 commented Jan 6, 2017

@kaosat-dev absolutely. Shall we start a gitter ?

@dav-m85
Copy link

dav-m85 commented Jan 6, 2017

Gitter started: https://gitter.im/OpenJSCAD-org/Lobby

This was referenced Jan 8, 2017
@z3dev
Copy link
Member

z3dev commented Jan 9, 2017

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.

@z3dev z3dev merged commit 4a9f456 into jscad:dev Jan 9, 2017
@dav-m85
Copy link

dav-m85 commented Jan 9, 2017

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 :)

@z3dev
Copy link
Member

z3dev commented Jan 10, 2017

If not then i'll adjust. But I won't have time until this weekend. Cheers

@bhouston
Copy link

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.

@kaosat-dev
Copy link
Contributor Author

@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 ?

@bhouston
Copy link

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.

@kaosat-dev
Copy link
Contributor Author

@bhouston no actually you are completely right, the idea is to move all related projects (csg.js, openjscad, openscad-openjscad translator to a single org, the one you pointed to)
The discussion was/is here :
#213

I added you to the Org btw :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants