Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Okay, I'm a CAD software developer instead of an actual CAD engineer, so my perspective may be a bit biased. But this CSG (constructive solid geometry) idea is not in any way new. The reason it's kind of obscure now is that spline-based boundary representation systems (B-reps) took over the market decades ago. If you think about, say, the latest car designs, those free-flowing shapes are pretty easy to do in B-rep, and quite hard in CSG. [1]

I've worked in CAD translators for the last two decades. Though both the IGES and STEP file formats include CSG modeling features, I have never implemented them. To the best of my recollection, I've never even had a request from a customer to do so. A pity, I think they'd be fun to try to implement... and most of the thorny bugs would officially be the B-rep geometry kernel's, not mine. :)

[1] http://en.wikipedia.org/wiki/Boundary_representation



And Auto-CAD had a Lisp engine in the '80s ... You could automate almost any function of the drawing system, build "macros" as well as patterns and even alter the DXF generation.


AutoCad got AutoLisp as an update to R6 in January 1986. AutoCad got solid modelling in R11 with the "Advanced Modelling Extension" add-on in 1990.

The whole history of AutoCad's feature evolution is that of a successful startup. There's an overview on AutoDesk's website:

http://autodesk.blogs.com/between_the_lines/autocad-release-...


I think it was release 2.18, retroactively named R6 maybe. John Walker and I hacked up a p.d. thing called xlisp by David Betz, removing some of the best bits (the 'X' parts) and fitting it into its own 64k 'small model' (x86) segment. I was a bit of a lisp nut, but even I (product manager at the time too) thought lisp as a 'macro language' for AutoCAD was a tinge crackers. Glad we did it though!


Yes, according to the timeline, it was 2.18, but it lists 2.1 as R6, so despite it's huge impact in allowing the creation of tools like AEC-Architectural it apparently doesn't get its own integer. As a scripting language it seemed to me a pretty good choice, because sat reasonably well with the command-line based interface in that it somewhat reflected its <command> <argument>* format.

And of course in the 1980's Lisps were tech's "the sharing economy". One of the reasons I went to vocational school to study drafting was to get my hands on AutoCad to get my hands on AutoLisp to get my hands on a Lisp. In 1991, I was doing timed Cad competitions using R10. My secret weapon was twenty minutes writing my own "PGP" command aliases in AutoLisp with edlin before I started drawing. That's how I won my copy of R11.

So I'm glad you did it too. Thanks.


> And of course in the 1980's Lisps were tech's "the sharing economy". One of the reasons I went to vocational school to study drafting was to get my hands on AutoCad to get my hands on AutoLisp to get my hands on a Lisp. In 1991, I was doing timed Cad competitions using R10. My secret weapon was twenty minutes writing my own "PGP" command aliases in AutoLisp with edlin before I started drawing. That's how I won my copy of R11.

That sounds like a great story. Would you consider sharing it?


John Walker's The Autodesk File has his original strategy paper on this topic:

https://www.fourmilab.ch/autofile/www/chapter2_35.html

"Lisp?!?! Why the Hell did you pick the most arcane, obscure, and hopelessly-rooted-in-the-computer-science-department language in the world for an AutoCAD programming language? Over the next six months, all of us will have the opportunity to answer this question."

That was in 1985. Not so much has changed in 30 years :P


The AutoDesk File is a great resource for understanding startups and business.


You can still run Lisp commands on the commandline interface in AutoCAD. Or even as you type out command inputs. So for example, if you know that you just put in 187 for length, but the next line needs to be double that, you can type (* 2 187) when it's time to put in the length and AutoCAD calculates it.


I thought they turned it into a license feature (so LT doesn't have it, only the full version does)?

But yes, I found AutoLisp to be very useful for automating things. The place I used to work for had to have the CNC machines cut out differently sized shapes from a library of shapes, so I created functions to draw each library shape for me quickly.

This is a lot easier than trying to form four mutually tangent circular arcs into an oval by constructing everything by hand.


LT is the follow on to AutoSketch and marketed to those who don't find value from working in 3d. AutoDesk upbranded the product and raised the price point when they renamed it, and a lot of people who say they use AutoCad are using LT "instead". In fairness, there are a lot of people using AutoCad with color based plotting (style based was introduced with Acad2000 in 1999) and who don't use those "new features" like Paper Space and Xrefs (introduced in r11 in 1990). Making things is very much bound by traditions.


To be honest, when I used it, AutoLisp was really the only feature I cared about other than drawing basic 2D shapes. You could have left me with only points, lines, arcs and dimension text, as long as I had lisp to automate it all.


You are correct. I describe AutoCad LT as either "Fisher Price" AutoCAD, or AutoCAD without the useful stuff. Most people that use AutoCAD might as well be using Etch-A-Sketch...


I know... I had a hard time once trying to explain that the newer LT version was completely worthless to me because I needed the AutoLisp from the real version and that the "upgrade" gave me no useful features and merely made it impossible to automate anything.

Sure, I could construct everything by hand, but that's pretty unreasonable when I'm redoing the same basic shapes all day.


Yes, LISP is only present in Autocad Professional.


Antimony does general implicit surfaces, not just CSG with Platonic primitives. So it has operations like "morph" https://github.com/mkeeter/antimony/blob/develop/py/fab/shap..., "blend" (for fillets!), and "shell", and it seems like it would be pretty easy to add metaballs, although Matt doesn't seem to have done them.


Well, those shapes are hard to accomplish with a CSG of primitive shapes at least. This isn't really "plain CSG" though. I think it uses distance fields (a tree of distance functions), which can be of any kind. The simples ones are just primitives, but anything that has a defined distance could be used, including parametric surfaces, fractals... (If you are using it for actual CAD and not just visualization, you probably want to be able to triangulate though). These distance fields have some neat features when rendering, such as blending, which is hard to do with classical CSG: http://iquilezles.org/www/articles/distfunctions/gfx18.png (from http://iquilezles.org/www/articles/distfunctions/distfunctio...).


Yeah, but how difficult is it to make a distance field with the same versatility as a spline which lets you drag its surface, explicitly add seams of lower continuity (which are important out past the second derivative for reflections), shell a surface to uniform thickness, etc?

Blending shapes is neat trick but the market cares most about fundamental operations and it seems to me that the fundamentals are harder to implement with CSG.


Yes, it's definitely a tradeoff. I wouldn't think distance field modeling will ever be mainstream in design for manufacturing, just like CSG won't be. They are mainly useful in direct visualization. There may be lost of niches such as content creation for gaming etc where other representations can be useful.


I remember writing basically this CSG-based CAD software at university, and that was 20+ years ago.

(And it was written in Miranda!)


> the latest car designs

Is that a history joke you snuck in there?

http://en.wikipedia.org/wiki/Pierre_B%C3%A9zier#B.C3.A9zier_...


I think you missed his/her point... OP wasn't saying that Bézier curves in car models were something new. What OP said is that (as an example) latest car desings are hard to do with constructive solid geometry but easy to do with B-rep


Haha! Smiles from the town of Béziers, Hérault, France... apparently no direct relation to the curve. From the AMS:

Bézier curves are ubiquitous in computer graphics. They were introduced implicitly into theoretical mathematics long before computers, primarily by the French mathematician Charles Hermite and the Russian mathematician Sergei Bernstein. But it was only the work of Pierre Bézier, an employee of the automobile maker Renault, and of Paul de Casteljau, of Citroen, that made these curves familiar to graphics specialists. Recently, the polynomials defined by Bernstein have become again of interest to mathematicians. http://www.ams.org/samplings/feature-column/fcarc-bezier

Wikipedia expands:

Bézier curves were adopted as the standard curve of the PostScript language and subsequently were adopted by vector programs such as Adobe Illustrator, CorelDRAW and Inkscape. Most outline fonts, including TrueType and PostScript Type 1, are defined with Bézier curves. http://en.wikipedia.org/wiki/Pierre_B%C3%A9zier#B.C3.A9zier_...

... though almost certainly CorelDraw (and Quark xPress?) came before Illustrator, and PostScript's popularization came through the rather embrace-and-extend PDF format it spawned.

FWIW, I have fond memories of doing CSG with Povray - http://povray.org/ - as an 11 year old. When the supply of new DOS games ran out, it sure beat writing batch file viruses, the other primary form of entertainment.


Illustrator was released in 1986, CorelDraw in 1989. I'm not sure why QuarkXPress is included (it is a page layout/desktop publishing tool, not an illustration tool), but it was released in 1987.

Postscript became popular[1] well before any version of the PDF format existed. It was popularized by the Apple Laserwriter, the first printer to natively support it.

[1] Well, I suppose it depends on what one means by 'popular'. I think creating the desktop publishing industry counts; YMMV.


From a marketing standpoint where everyone dreams of out Frank Ghery'ing Frank Ghery splines rule, but CSG is probably well suited from a practical standpoint for representing the walls and windows of the architecture that typically gets built.

The problem of course, is that once there's a column with acanthus leaves, splines are the way to model its details and a WYSIWG needs them. For architecture, splines are in the aesthetic details, but constructive solids are a good tool for representing the important part of the constructed solids that are buildings.


Is it only CSG? The page says it's using FRep instead of BRep. Is FRep limited to CSG operations only?


Btw any advices for those who are interested in CAD/CAM software development? (refs/books/lectures/(remote)jobs)


I think the major problem in CAD/CAM software is the creation of technical drawings.

I enjoy every new CAD program (solvespace, implicitCAD, nanoCAD, ...) when they come but each time it lacks this vital function. Even fat dinausors like CATIA, Pro/E, Inventor & co have a very poor ux at that level.

So I will recommend to master the rules of technical drawings and geometric dimensionning and tolerancing before going to deep in 3D. Likewise, BRep, CSG, constraints solvers, code/GUI will be just straightforward "plugins". It's safer and more useable in real life.

By the way, the Purdue University have some good innovative lectures, ie. Erep [1]

Computer Aided Engineering Design by Anupam Saxena & Birendra Sahay is cool and informative.

In general, the Indian Institute of Technology of Kampur [2] has some pretty intense books on the subject.

Finally, Knowledge-based engineering [127] will extend a lot your future awesome opensource haskell CAD package!

[1] https://www.cs.purdue.edu/homes/cmh/distribution/papers/Erep...

[2] http://www.iitk.ac.in/cad/

[127] https://en.wikipedia.org/wiki/Knowledge-based_engineering




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: