Open-source CAD, was: [DIYbio] Re: non-glamorous bioreactor restroom project

72 views
Skip to first unread message

Nathan McCorkle

unread,
Jan 25, 2015, 12:38:58 PM1/25/15
to diybio


>>
>> Also I need open source CAD software that handles plumbing.
>

> [something about freecad] and it's OK, but I'm studying BRL CAD again also now.
> It's gotten some work in the last ten years -- Nathan said
> it is usable, so I'm going to try too.  It's one of my projects today even.

I've been playing with python-brlcad this past week and while it is usable, it is also broken (crashes but still produces geometry, unless you have a typo then it silently fails) and seems like no one wants to maintain it.

I spent an hour or two writing a small backend using python-brlcad's syntax that instead of interacting with brlcad directly, it emits a script file the brlcad can then load and produce geometry with. It has the advantage of not crashing and giving a user useful error messages if they make a python coding mistake. It isn't complete, but I will add some more primitive shapes today maybe (i've got potentiometry homework to do which is more important for now).

So far other than relative lack of community around brlcad (it seems the don't have people interested in helping beginners, or the active folks forgot what being a beginner is like) I am pretty happy. I still need to learn about how to make models look pretty, but that is just for aesthetics (it would be adding a shader then raytracing your geometry file). So far I've been able to easily export to PNG and STL, and crank up the quality on the STL output with the -r option to the g-stl command.

If I get dissuaded with brlcad, I'm buying the $138 copy of rhino3d which while being Windows only (it supposedly runs in WINE too) allows for commercial projects with the student license. Also rhino released opennurbs which brlcad uses, so it seems like if i should support any closed-source CAD tool, rhino is the 'friendliest' company out there. Rhino also has Python bindings for doing parametric modelling.

Nathan McCorkle

unread,
Jan 25, 2015, 12:39:27 PM1/25/15
to diybio

John Griessen

unread,
Jan 25, 2015, 4:09:20 PM1/25/15
to diy...@googlegroups.com
On 01/25/2015 11:38 AM, Nathan McCorkle wrote:
> I spent an hour or two writing a small backend using python-brlcad's syntax that instead of interacting with brlcad directly,

I've just been reading so far, and handing brlcad commands to do in order is supposed to be faster and recommended.
Interacting with it directly seems frowned on even by their docs:-)

Tom Hodder

unread,
Jan 25, 2015, 4:21:45 PM1/25/15
to diy...@googlegroups.com
While learning something about brlcad has been on my todo list for several years now :-( I think there is an argument about getting behind the project that seems to have the most potential.

At the moment that project seems to be freeCAD. 

I've been able to do some interesting stuff with it, and use it for a bunch of 3d printing designs. (I am no expert, maybe 15 weeks ago I'd never used cad for anything not totally trivial ever before)



 

Nathan McCorkle

unread,
Jan 25, 2015, 4:30:19 PM1/25/15
to diybio
On Sun, Jan 25, 2015 at 1:21 PM, Tom Hodder <t...@limepepper.co.uk> wrote:
> While learning something about brlcad has been on my todo list for several
> years now :-( I think there is an argument about getting behind the project
> that seems to have the most potential.
>
> At the moment that project seems to be freeCAD.

Except that everyone says it crashes often, and that fixing those
crashes is very hard to maintain and fix bugs for.

As far as 'most potential' the U.S. military began BRLCAD and pumped
lots of money into and, and probably still does (though I can't tell
which of the active developers are paid). It is also 'industry proven'
in that the military here has been using it for 20+ years, and still
does. I think the main problem is simply that they don't have a 'for
dummies' guide (they even acknowledge this in a section of their
wiki).

I'll try to change that if I can, so far I'm pretty happy with it. I
just finished a model of the outside of a small geared stepper motor.
This week I'll be working on adding it to another model, and probably
work on converting my other microfludics-cad examples to use my
brlcad-python-tcl backend too.

For slicing, I'll either export a nice quality STL, then use an
existing slicer application... or write up a slicer using a thin rpp
(rectangular parallel epiped, a.k.a. a rectangular box) and a boolean
intersection (I think this might work) then exporting the result as
something for doing lithograph with (either G-code or a top-view PNG
image, I think).

John Griessen

unread,
Jan 25, 2015, 4:32:10 PM1/25/15
to diy...@googlegroups.com
On 01/25/2015 03:21 PM, Tom Hodder wrote:
> I think there is an argument about getting behind the project that seems to have the most potential.
>
> At the moment that project seems to be freeCAD.


I'll be testing using it for my designs also and report findings. BRLCAD has a lot of translation capabilities,
so could be the power tool and some folks use FreeCAD as the beginner tool.

In electronics, gEDA tools have a few more capabilities and a scriptable style
than KiCAD, so it falls out the same -- experienced
sometimes use both, mostly use gEDA tools, and translators
are coming soon, so KiCAD can benefit from
existing designs and libraries of parts, and vice versa.

Nathan McCorkle

unread,
Jan 25, 2015, 4:42:10 PM1/25/15
to diybio
On Sun, Jan 25, 2015 at 1:35 PM, John Griessen <jo...@industromatic.com> wrote:
> BRLCAD
> has a lot of translation capabilities,
> so could be the power tool and some folks use FreeCAD as the beginner tool.

Yeah it's pretty cool how many formats they handle, it can even import
the commercial Rhino3D files, so there's that for beginners with some
$ in their pocket but who want the ability to export to formats that
are open. Of course they would lose parametricity (is that a word?) I
think, at least if they were using scripts to generate their models.

> In electronics, gEDA tools have a few more capabilities and a scriptable
> style
> than KiCAD, so it falls out the same -- experienced
> sometimes use both, mostly use gEDA tools, and translators
> are coming soon, so KiCAD can benefit from
> existing designs and libraries of parts, and vice versa.

Hmm, I can't remember why exactly I chose KiCad over gEDA, I remember
reading about them both and I guess KiCad came out to have a path of
less resistance. Since I've been doing electronics design automagic
generation at work, I've been realizing KiCad has some things that I
would like (Python scripting interface for all facets of the
application) but don't exist and are not terribly easy or fast to
learn how to debug/add... but that is really just because I've become
less comfortable with C++ with all the Python I've been writing. I
also don't think (but don't know) if electronics CAD needs the
performance of lower-level languages, higher-level languages allow
engineers to get closer to the code even if they aren't the main
developers, it's easier to read and easier to give feedback on.

John Griessen

unread,
Jan 26, 2015, 2:40:47 PM1/26/15
to diy...@googlegroups.com
On 01/25/2015 03:41 PM, Nathan McCorkle wrote:
> On Sun, Jan 25, 2015 at 1:35 PM, John Griessen<jo...@industromatic.com> wrote:
>> >BRLCAD
>> >has a lot of translation capabilities,
>> >so could be the power tool and some folks use FreeCAD as the beginner tool.
> Yeah it's pretty cool how many formats they handle, it can even import
> the commercial Rhino3D files, so there's that for beginners with some
> $ in their pocket but who want the ability to export to formats that
> are open. Of course they would lose parametricity (is that a word?) I
> think, at least if they were using scripts to generate their models.

Just stumbled across this GPL CAD parametric 3D program:

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

John Griessen

unread,
Jan 26, 2015, 5:36:19 PM1/26/15
to diy...@googlegroups.com
" tcl scripts that mged can directly process into database (.g) files."

suggests it is stand alone not needing python-brlcad.

JG

Nathan McCorkle

unread,
Jan 26, 2015, 6:21:00 PM1/26/15
to diybio
On Mon, Jan 26, 2015 at 2:39 PM, John Griessen <jo...@industromatic.com> wrote:
> " tcl scripts that mged can directly process into database (.g) files."
>
> suggests it is stand alone not needing python-brlcad.

Yep! Only depends on Python and brlcad being installed. I mention
Bryan B's python-brlcad because I'd been trying to use that, and
figured I'd use his syntax so I could switch between his 'backend' and
mine... in case someone comes along and wants to work out the current
bugs with me.

You should be able to just clone the python-brlcad-tcl repo, then run
the instructions in the README.

I've only got the rpp and rcc primitives working right now, in
addition to union, subtract and intersect. Adding more primitives is
just a matter doing the string formatting based on the parameters each
primitive expects.

http://brlcad.org/wiki/BRL-CAD_Primitives

In mged you can get it to interactively ask you for each parameter...
so if you wanted to add a sphere you'd type (after opening/creating a
new database from the file menu, or by passing that filename as an
argument to mged on the command-line):
in mysphere.s sph (now press enter)

and you should see:
Enter X, Y, Z of vertex:

So once you know the order it expects it's args in, you can just add
that to the primitive definition in the python-brlcad-tcl repo.
Reply all
Reply to author
Forward
0 new messages