
Csg.js: Constructive Solid Geometry, with rotatable 3D models  - danso
http://evanw.github.com/csg.js/
======
nickpinkston
It's very interesting to see the mesh operations able to be done client side
now, and this is pretty lean. One of the biggest problems with doing CAD on
the internet is the mesh pipeline issue where you're constantly throwing a ton
of polys back and forth to the server.

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.

~~~
kanzure
I think ESOLID is an OK candidate for conversion to "BREP.js" at this point:

<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://research.cs.tamu.edu/keyser/geom/esolid/releases/version_0.3/ESOLID-0.3.tar.gz)

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

~~~
nickpinkston
Hey Brian! So you think ESOLID would be good for general BREP operations tool,
or are you saying it could replace OpenCASCADE. I really want to see more
resources for this stuff - who are working these problems?

~~~
kanzure
Nope, it's not a replacement for OpenCASCADE. It solves "only" one problem:
boolean operations on BREPs and NURBs. OpenCASCADE will be replaced over time.
At this point, the FOSS community desperately needs this and it would be
hugely disruptive. I would love to get more hands on deck for working on this
sort of BREP library, any takers?

~~~
iamwil
Curious, why does the FOSS need this, and why would it be hugely disruptive?

~~~
willyt
Because openCASCADE is the only open source solid modelling kernel approaching
the same league as the Parasolid / ACIS / Inventor / Rhino kernels. Imagine
the possibilities if more people had easy access to this level of reliable
geometry manipulation. You could use it on the web, for REPRAP type stuff, all
kinds of things. Innovation in CAD and therefore in construction and
manufacturing could happen a lot faster if you could code agile languages
against a good clean and •simple• API for very little start-up cost. Simple is
the key word here, I don't see why there can't be a high level API which
requires the same level of understanding of solid modelling as using the
software through the UI.

EDIT: I was dissing openCASCADE before, didn't mean to.

------
nrmn
Heres what I managed to put together in about half an hour (paste it into the
last example): <http://pastebin.com/raw.php?i=gaEKT6Z2>

I like it, just wish you could define the dimensions of a square or should I
say a rectangle.

------
gliese1337
Now I wanna go port POV-Ray to javascript! It looks like it'd be pretty simple
to add a few more basic shapes (cones, toruses), and then you'd just need a
parser for the POV-Ray language. Still need code to handle textures and
transmission media effects, though.

------
devongovett
Submitted this yesterday but no one cared.
[http://badassjs.com/post/13788484076/csg-js-constructive-
sol...](http://badassjs.com/post/13788484076/csg-js-constructive-solid-
geometry-3d-modeling-in)

~~~
navyrain
Read the guidelines: "Please submit the original source. If a blog post
reports on something they found on another site, submit the latter."

~~~
devongovett
Blogs often provide perspective and analysis on projects not gained from
direct links.

~~~
scott_s
Sometimes, but in this case, your blog post didn't say much that wasn't
already a part of the original.

