Hacker News new | ask | show | jobs
by brlcad 1397 days ago
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.

1 comments

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.