News for hackers. Stuff that matters.
Re:Automated CAD by sedachv on Wednesday November 19, 2014 @04:23PM (#8632696)
If you're interested in parametric CAD, Genworks open-sourced most of their system (except for the third-party commercial SMLib library) under the AGPL: https://github.com/genworks/gendl
Re:Automated CAD by Crito on Wednesday November 19, 2014 @05:46PM (#8633193)
Do you know if gendl includes geometric constraint solving?

I've been playing around with using geometric constraint solving with FreeCAD's "sketcher" mode, but the GUI interface on that is awful, I'd love to experiment with it using a proper GDL of some sort.

Edit: Nevermind, it sounds like it does. I should have read the whole discussion.

Re:Automated CAD by sedachv on Wednesday November 19, 2014 @09:51PM (#8634164)
Genworks doesn't come with a constraint solver, but you can use the Screamer constraint solving library with it:

http://weitz.de/eclm2008/Selvaag%20Bluethink%20House%20Desig...

https://www.youtube.com/watch?v=usoKR80tWzw

https://github.com/nikodemus/screamer

Re:Automated CAD by colomon on Wednesday November 19, 2014 @05:05PM (#8632953)
Oh, I didn't know Dave had put Genworks on Github. Interesting.
Re:Automated CAD by sedachv on Wednesday November 19, 2014 @10:07PM (#8634220)
Dave started considering the idea of dual-licensing Genworks in 2010, we corresponded about it for a while (I pretend to know things about Free Software licenses on my blog and was advocating for AGPL dual-licensing around that time: http://carcaddar.blogspot.com/2010/11/free-software-license-...), and Dave released the AGPL version at the European Common Lisp Meeting in 2011. Dave Cooper does a lot of great work in the Free Software Common Lisp community.
Re:Automated CAD by amk_ on Wednesday November 19, 2014 @08:00PM (#8633797)
As much as I like OpenSCAD for its scriptability, the OP is really pushing the limits of what you can do with it. I'm hoping FreeCAD takes off eventually in this space (hobbyist parts design).

Of possible interest to those reading this, I worked on a project in college that did a similar thing with AutoCAD for full-size water treatment plants. A web interface[1] accepts input which is sent to design scripts, where equations of fluid dynamics and other physical constraints are used to scale components appropriately for the size requested. From there, the AutoCAD command prompt is accessed to generate a 3D model and various construction-oriented section views.

[1] http://aguaclara.cornell.edu/implementation/design/

Re:Automated CAD by DIVx0 on Wednesday November 19, 2014 @03:03PM (#8632269)
I've been messing around with OpenSCAD for a little. I am working on some 'art' projects that would make heavy use of geometric shapes and I love the idea of generating these things in code.

Another alternative that I've found, and like a lot, is OpenJSCAD. Very similiar to OpenSCAD but with javascript:

http://openjscad.org/

Re:Automated CAD by amk_ on Wednesday November 19, 2014 @08:01PM (#8633800)
There's also ImplicitCAD, which is Haskell and actually more powerful in some ways. Unmaintained as of this summer, though.

http://www.implicitcad.org/

Re:Automated CAD by codygman on Wednesday November 19, 2014 @09:43PM (#8634144)
After looking at that site I'm baffled as to why it's not more popular.
Re:Automated CAD by amk_ on Thursday November 20, 2014 @12:31AM (#8634548)
It isn't quite done: https://github.com/colah/ImplicitCAD/issues

I found that it works for most thing but can produce broken STLs occasionally.

Re:Automated CAD by tonyarkles on Wednesday November 19, 2014 @08:46PM (#8633954)
I've played around some with OpenSCAD and I do find it super super cool. I've also played around with Autodesk Inventor (got a student copy for free) and if the code portion of OpenSCAD is causing you trouble, you can do a huge amount of the parametric type stuff in Inventor too. It seemed pretty unapproachable at first, but it's really as easy as adding a dimension like "WALL_HEIGHT=5cm" the first time, and reusing "WALL_HEIGHT" as your dimension everywhere else. Change one, badda bing, the constraint solver goes through and updates your model everywhere.

I'm so glad to see this stuff all taking off. For the longest time, I was shocked at how hard it was to do, and now that I'm back into it, it has gotten much much easier!

Re:Automated CAD by ansible on Wednesday November 19, 2014 @02:32PM (#8632105)
That's awesome. I've futzed around with OpenSCAD a bit, and the OP is talking about a workflow similar to what I had in mind for my projects.

What's neat is that you can generate a set of parts once (in code). You then assemble those parts (functions, really) into 3D shapes for visualization. And you lay out those same parts in a plane for 2D fabrication.

The main difficulty I had was that it seems to be necessary to calculate everything. As a simple example, suppose I've got a triangle-shaped part, and stick the flat side of it on a square part. What's the distance from the tip of triangle to the opposite flat side of the square? OpenSCAD knows, in some sense, because it drew it. But inside my OpenSCAD script, I don't, and I have to calculate the geometry in my code.

If there was some way to specify and capture the position of that point (or whatever), then it would be much easier to connect parts together.

Re:Automated CAD by ltta on Wednesday November 19, 2014 @03:31PM (#8632426)
I tried to get into various CAD applications at various points in time and never managed to "get it". It was mostly about the interface, you just have to invest a lot of time (more than I was willing to spend) to get even remotely useful results.

OpenSCAD on the other hand immediately clicked - at least for me as a programmer. I just had to look up the available primitives and combine them to my liking. This totally jibes with my mental model of the thing I want to build and parametrizing your models is pretty easy.

My main gripe with OpenSCAD is that it is missing good features to generate more "organic" shapes, i.e. beveled edges and rounded corners require a lot of work. They are possible (i.e. with Minkowski sums) but the resulting complex shapes quickly bring the engine to its knees.

Re:Automated CAD by bhouston on Wednesday November 19, 2014 @03:04PM (#8632277)
> If there was some way to specify and capture the position of that point (or whatever), then it would be much easier to connect parts together.

This is usually done by a constraint solver. The most popular one in the industry is D-Cubed 3D DCM by Seimens: http://www.plm.automation.siemens.com/en_us/products/open/d-...

I do not know any open source equivalents for 3D constraint solving. There is a few 2D ones that are open source I understand.

Re:Automated CAD by sedachv on Wednesday November 19, 2014 @04:31PM (#8632737)
https://github.com/genworks/gendl does this by having you describe parts and sub-assemblies as objects, and then generating geometry commands from the object graph.
Re:Automated CAD by anjowo on Wednesday November 19, 2014 @02:58PM (#8632241)
That is one of the difficulties. In a few of the more difficult calculations, I did what I could on the python side of things, and emitted a statement or function in the generated openscad files.
Re:Automated CAD by pauldw on Wednesday November 19, 2014 @03:33PM (#8632438)
An easy way to play around with parametric or specification based custom manufacturing is by making custom food (like sandwiches) for people, but only accept orders in a standard computer readable format.

Interesting questions are raised. Is there a limit to topping counts? Is there an implied order to toppings? If toppings have a cost, do you calculate that as the supplier or leave that to the consumer? How do you make sure an order is vegetarian? What do you do if you can't fulfill an order due to topping shortage?

Also, if it's that kind of party, people will start making their own food order generators, raising another set of interesting questions.

Re:Automated CAD by bhouston on Wednesday November 19, 2014 @02:52PM (#8632207)
Very interesting. I heard that OpenSCAD isn't fully reliable for production use though.

We've love to integrate this into https://Clara.io in some way.

Re:Automated CAD by anjowo on Wednesday November 19, 2014 @03:04PM (#8632276)
The stable version of OpenSCAD has seemed to work well enough. I ran into some problems when I tried to use a nightly version to get some of the latest features. I don't think anything about the overall process really ties to it OpenSCAD itself, there are many other parametric script-based modelers. It just happened to be the one I used. It would mean reworking some things, but I could switch to a different one if I needed to.
Re:Automated CAD by ltta on Wednesday November 19, 2014 @03:24PM (#8632387)
OpenSCAD is decently reliable up to a certain amount of objects/vertices. Once I reach a limit rendering becomes too slow and sometimes makes OpenSCAD crash. What I ended up doing is to model individual parts (which is a good idea anyway, and OpenSCAD parametric modules work great for that) that I render to STLs individually, then import the STLs for everything but the part I am working on.
Re:Automated CAD by fudged71 on Wednesday November 19, 2014 @07:31PM (#8633705)
Would love to see a 3D print button on your site sometime as well! printtopeer.io/api

Disclosure: found of P2P

Re:Automated CAD by twelvechairs on Wednesday November 19, 2014 @03:53PM (#8632552)
Interesting but silly title both as noted in the opening paragraph and as the 'd' in 'CAD' means design already (computer aided design design)
Re:Automated CAD by anjowo on Wednesday November 19, 2014 @04:52PM (#8632848)
Oh man, I should have known better. You are right.

I wasn't thinking of it in that way, when I wrote the title, I was thinking of the second "design" as "the thing", and the "CAD" part of it as the name of the technology area. The more I think about it, the more I think it is a little awkwardly titled.