Csg.js: Constructive Solid Geometry, with rotatable 3D models
evanw.github.com
evanw.github.com
Check out http://TinkerCAD.com or http://ShapeSmith.net to see server-side WebGL renders CAD operations. This could make such programs a lot faster for sure.
The only issue is that CSG style CAD on meshes is pretty basic compared to the now standard "Boundary Representation" of a STEP file - which is like the style SolidWorks uses. I don't know how easy it would be to make BREP.js, but I'm still loving that this was actually made.
http://research.cs.tamu.edu/keyser/geom/esolid/index.htm
http://gamma.cs.unc.edu/ESOLID/
http://research.cs.tamu.edu/keyser/geom/esolid/releases/vers...
http://diyhpl.us/cgit/lolcad/plain/esolid/esolid.py
Except for the licensing issues- nobody has been able to get John Keyser to respond about what the license is. It was written under an NSF grant, so it's probably public domain? I wrote a partial cython wrapper around esolid in lolcad.git if anyone wants to look at that.
OpenCASCADE would be another option, except the code base is awful and sprawling and huge. It's hard to separate out the important libraries, like BRepAlgoTool versus BRepAlgoAPI versus BRepApplePie, it's endless.
Unfortunately, you can't assume that in general. There are a few specific NSF programs that require open-source licensing of any software produced (e.g. http://nsf.gov/funding/pgm_summ.jsp?pims_id=5174), but it's not a usual requirement. In fact lots of NSF-funded stuff eventually ends up in spinoff companies selling proprietary software, and the NSF even dedicates a smallish portion of its budget specifically to funding those kinds of spinoff efforts (via http://www.nsf.gov/eng/iip/sbir/).
I have just finished wrapping this for use server-side within node.js. It will be interesting to see how it fares against csg.js.
See http://code.google.com/p/carve/source/browse/src/intersect.c...
EDIT: I was dissing openCASCADE before, didn't mean to.
I like it, just wish you could define the dimensions of a square or should I say a rectangle.