Hacker News new | ask | show | jobs
by CmdrLoskene 1399 days ago
I once worked as a developer for Pro/Engineer, and sometime after that, I was on the user side using BRL-CAD. I can't speak to the quality of the product these days, but at the time, BRL-CAD was achingly slow and riddled with bugs. Using it for my day-to-day work made me want to quit my job, and I left as soon as I had something more promising lined up. I am sorry to sound like I'm unfairly judging BRL-CAD. Perhaps we were using it for something it was not intended to do, or not the way it was meant to be used. I knew my way around the Pro/E interface and it was miles ahead of BRL-CAD. But even CADDS-IV was better than BRL-CAD. I can only speculate that being government-funded, the dev team for BRL-CAD had to make brutal decisions regarding when the feature set was "good enough," because they were working with a very limited budget tied to specific program goals. I don't know. I do know that using BRL-CAD was hellish back in the day.
4 comments

Isn't Pro/E a b-rep cad?

BRL-CAD is one of the few "full-fledged" CAD systems that I know of which is explicitly CSG, while most (all?) commercial CAD programs are B-REP in nature.

CSG and B-REP are two worlds apart. I'm not sure why in the comments we're suggesting alternatives in the two categories interchangeably. They're not [*].

An alternative to BRL-CAD would be OpenSCAD or libfive studio + other tools (since BRL-CAD does a ton more) and more recently CadQuery. Maaaaybe Tinkercad could be classified as CSG?

CSG makes some operations easy at the expense of other things that become incredibly hard. The same is true for B-REP. Doing gears, highly procedural or FEM-directed models via CSG? Easy-peasy. But try to add a filled between two edges. Step it up 50 notches to fillet one edge and do the equivalent of "tangent propagation". Now the same, but also try projecting a structure on that round face.

CSG's speed is also wildly overblown. While B-REP is not exactly lightweight, computation complexity scales with the complexity of the model but can be sped up by caching intermediate representations.

In CSG this is not always true, since caching the intermediate representation can destroy the accuracy of the final mesh in ways which are very difficult to compute. So even for apparently easy models, times spend walking the space to remesh your model can grow _very_ quickly, hampering the ability to iterate quickly and experiment.

Not to mention, "measuring things" in CSG is hard. This is never mentioned, but none of the tools I've worked with so far offers convenient ways to examine and measure the objects you're working on. For a parametric model this is vital!

[*] Not saying there's no overlap. I'm using both systems. B-REP generally wins on a model which is feature-directed, which is why it's more popular. But I can relate to people that think that BRL-CAD is "hard".

Just a point of clarity, BRL-CAD now also supports BREP and is technically a hybrid modeling system.

CSG and hierarchical relationships still underpin, but a lot of effort was invested in BREP support over many years. There was already extensive support for polygonal BREP, but NURBS BREP was added to support seamless conversion of commercial CAD. BREP NURBS can be imported, ray traced, and facetized. BRL-CAD still needs direct surface editing, but you can mix implicit geometry with NURBS (e.g., subtract a hole) without issue. CSG entities can also be converted to BREP and work is ongoing to improve Boolean evaluation of BREP-on-BREP entities.

As for performance, implicit geometry with Booleans (i.e., "CSG") is typically an order of magnitude faster to evaluate (and an order of magnitude less memory than BREP/NURBS which is in turn an order of magnitude less memory than BREP/Poly). BREP/NURBS easily offer the most editing flexibility. CSG offers the most compression and programmability. BREP/Poly offers the most interop at the expense of representation fidelity, memory, and (sometimes) validity. All three can be "fast enough", but evaluation performance is still an important consideration on real/big models, e.g., fully detailed vehicles.

Note that generating an intermediate representation off CSG is not intrinsically necessary. When you have really fast+good solid ray tracing and analytic routines (and measuring tools) built around it, you don't need an intermediate rep. You just directly evaluate shotlines and get mathematically precise answers. That can be used for real-time geometry display, for measuring things, for identifying interferences, for computing properties, etc. That's BRL-CAD's primary niche specialty.

Thanks for the very detailed reply. Evaluating NURBS is useful, but you piqued my interested in the reverse operation. For a moment I almost had the impression we could specify CSG operations based on features extracted from the BREP reconstruction (that would be a game-changer!).

I was looking up at the current docs for the csg->brep conversion, but I don't really see much. Does brlcad actually allow to fit/reconstruct NURBS over the constructed geometry? The export docs still mention IGES export is just faceted.

I'm mostly using openscad and cgal directly, and my experience with both is that model regeneration takes a nosedive for anything non trivial. openscad for example doesn't offer any tool to shoot/analyze rays. The realtime preview also suffers for coplanar z-fighting issues, often making exact CSG operation really hard to debug. However the ergonomics are pretty decent when iterating and constructing geometry on the fly.

Can I ask your role in brl-cad? All your posts are extremely detailed. Are you a contributor? I wonder if I should reinvest time in brl-cad once again.

Did you have many different problems with BRL-CAD or was it connected to specific features?

While I can't speak for BRL-CAD my experience with FreeCad which uses OpenCascade has been mixed. The chamfer/fillet tool there is just broken. If you use that and change some dimension it is likely to randomly crash. So, overall my experience has been ranging from rock solid to total trash depending on which features you use and what kind of models you create with it. The key question is "what do the developers use it for?" which should give you a hint for what kind of problem it is made.

Since FreeCad 0.19 I didn't have any crashes, previously I couldn't even finish simple objects without it crashing. I'm now a happy user, previously I didn't even want to touch it.
Yeah, I have the feeling that it's gaining momentum.
> Using it for my day-to-day work made me want to quit my job

Funny that. Working with Creo on a day-to-day basis makes me want to quit my job.

This comment would increase tremendously in value if you said something about which version of BRL-CAD you used.
Unfortunately I have forgotten the version. This was in the early 90s.