Hello, everyone:
After finishing a long running project, now I have some time to begin work on cadquery again. It is important to establish the roadmap for CQ, so that any contributors we can attract know the direction we want to go.
I will call the future version CQ2.0, since I know already it will be a major re-write.
There are two main decisions:
(1)
What kernel will CQ be based on? The reasonable choices are OCE and FreeCAD. VerbNurbs, unfortunately, doesnt appear to be a viable candidate. We have been waiting for a while to see if verbnurbs could become a viable kernel, but after a year that has not materialized. It still lacks the features we would need for current CQ functionality, and our development capacity is not enough to pull verbnurbs along.
We have been running into issues withe FreeCAD. Using FreeCAD as a basis was a good way to get started quickly. We get higher level, more useful functions, an already packaged installer for most platforms, and a nice GUI for free. But we also get a bunch of limitations with that as well. If we move to OCE, we will have a lot more flexibility, but we will have a lot more work to do as well.
(2)
What language should CQ use? The candidates are python and javascript,
or using Haxe to get both.
Obviously, today we use python. pythonOCC provides bindings to OCE, and FreeCAD supports python already, so python was the natural choice. JavaScript has some advantages too. One nice one is that it is much easier to sandbox, another is that it is much more popular, with the rise of node.js. CQ's syntax is inspired by Javascript, in fact.
Previously, the amount of work to build JS->OCE bindings made this out of the question with our resources. However, now, there is a project that we could extend:
https://github.com/erossignon/node-occ it is not very active, but we could get some help, and his project at least has a basis.
Moving to javascript for CQ 2.0, however, would come with some concerns too. For one, all existing code would obviously break. The consequence, i'm sure, is that we'd effectively support two versions: a JS one and a CQ one. The other issue is that python has some VERY powerful scientific packages for python that are super-fast, well tested, and popular to mash up with CQ. The most notable example is numpy. JS ( correct me if i'm wrong ) does not have a numpy equivalent. I think that's a pretty big deal.
I'm quite worried about the resource implications of doing both of these. It may be possible to create a language specification, so that it if both versions evolve, they can share very similar approaches and code.
Another option might be to use
http://haxe.org, that cross-compiles to both python and javascript.
This _could_ work, but i think it has a high probability of making both the Javascipt and the Python version suck. I've never used it so i have no idea. A CQ + Haxe + OCE combo might be cool, but its the ONE language that i'm pretty sure NOBODY reading this already knows. So that's kind of annoying.
I'm going to tentatively propose a two week conversation period for this discussion ( 2/27/16). At the end of that time, I'll just make a call if I have to, because at some point any decision is better than no decision.
Thanks for your thoughts!