Algorithms for solid modeling, i.e., Computer-Aided Design (CAD) and computer graphics, are often specified on real numbers and then implemented with finite-precision arithmetic, such as floating-point. The result is that these implementations do not soundly compute the results that are expected from their specifications.
We present a new library, StoneWorks, that provides sound and robust solid modeling primitives. We have implemented this library in MarshallB, a language we have developed as an extension of Marshall. Marshall is a language for exact real arithmetic in which types denote topological spaces and functions denote continuous maps, ensuring that all programs are sound and robust.
We also define a new shape representation, compact representation (K-rep), that enables a user of our library to perform constructions such as Minkowski sum and analyses such as Hausdorff distance that are not possible with traditional representations.
With our library, language, and representation together, we show that short StoneWorks programs can specify and execute sound and robust solid modeling algorithms and tasks.