Brep
Brep
-----------------------------------------
-- Introduction --
-- BREP Description --
One can use many types of surface and curve geometry, but generally a
small subset are used by any particular implementation: e.g. having
converted a few pieces of Pro/E through IGES to the new BRL-CAD BREP
primitive, I've seen the following curve and surface types used:
* Line
* Arc
* NURBS curve
* Surface of revolution
* NURBS surface
The simple IGES converter used to import and test new geometry handles
those types already. Other limitations of the converter are described
later in the document.
-- Primitive Implementation --
-- Raytracing BREPs --
See Abert et al. (raytracing 06 paper: Direct and Fast Ray Tracing of NURBS
Surfaces).
Since it's possible to miss a surface but *need* a hit (i.e. it hit an
edge but passed between surfaces that did not mate up or overlap), we
need to do edge checks: at some point, we find out how far an
intersection point or a ray is from some set of edges
Issues:
See all instances of "XXX" in the code (some may be out of date, but
if something was fishy or I was being stupid/lazy/ignorant or some
other bit of code was causing a problem, I tried to mark it with XXX.
-- Conceptual/Implementation Issues --
Optimize for small objects (there are some fixed size adjustments in
the bounding box/subsurface code).
-- IGES converter --
A significant bit of time was spent writing the skeleton for a new
IGES converter in order to get non-trivial BREP geometry from an
external package into BRL-CAD for testing purposes (have been using
the piston head part from one of the Pro/E tutorial models).
* tolerances when converting are still flaky (fix it) (cause BREP
validity problems). Trims endpoint are not within zero tolerance
(1e-12), so they "don't match" but they are very very close
(1e-11)... so need to go through and call ON_Brep::CloseTrimGap() on
each pair of trims in a loop.