Problemadvanced
Solid offsetting
Also called offset solid, solid growing and shrinking.
Grow or shrink a solid by a distance r, the Minkowski sum or difference with a ball, as used for tolerances, tool clearance and thin walls.
Solid offsetting is the problem of growing a solid by a distance , the set of points within distance of , or shrinking it by , the set of points whose ball of radius lies in . Growing is the Minkowski sum of with a ball and shrinking is the Minkowski difference. The faces of the result are trimmed offset surfaces of the faces of , joined by pieces of cylinders around the convex edges and of spheres around the convex vertices, and finding where these pieces cut each other is the hard part. Rossignac and Requicha defined the two operations for solid modeling in 1986 and showed how tolerance zones, clearance checks, cutter paths and rounded edges all reduce to them.
In plain words
Take a solid object and coat it with a layer of paint of constant thickness. The painted object is the solid grown by the thickness. Now do the opposite: scrape a layer of constant thickness off every face. That is the solid shrunk.
The new skin is not just each face moved out. At a sharp outer edge, the moved faces leave a gap that must be filled with a rounded strip, and at a sharp inner corner, the moved faces run into each other and must be cut back. When the layer is thick, parts can merge, holes can close, and thin walls can vanish.
Shrinking and then growing back by the same amount rounds off the outer edges. Growing and then shrinking fills in the inner corners.
Definition
Input. A solid , an r-set given as a boundary representation or a CSG tree, a distance , and an operation, grow or shrink.
Output. A valid representation of one of the sets
where is the closed ball of radius at the origin. The shrunk set can have parts without volume, such as the segment that remains of a slab of thickness exactly , so the output of shrinking is its regularization , as for the regularized set operations.
Constraints. The output is a solid in the same scheme, or a B-rep whose faces are exact or approximate within a stated tolerance. The topology of the output must be that of the exact set: components that merge, holes that close and walls that vanish are part of the answer. Degenerate input is part of the problem, for example two faces at distance exactly , where growing makes them touch.
Size. The number of faces, edges and vertices of , and the size of the output.
Model. The real RAM with exact operations on the algebraic numbers that occur (square roots already for a disk), or floating point with a tolerance.
What it is not. This page states the task. The Rossignac and Requicha method is one algorithm for it, for CSG input, which builds the grown solid from offsets of the primitives and of their faces, edges and vertices.
Variants
- Grow and shrink. In morphology, dilation and erosion by a ball. They are dual: up to regularization, is the closure of the complement of .
- Rounding and filleting. Rossignac and Requicha define rounding as , which rounds the convex edges with radius , and filleting as , which fills the concave edges. In morphology these are the opening and the closing.
- Shelling. A hollow part with walls of thickness is , used for molded and printed parts.
- General offsets. The Minkowski sum with a convex body other than a ball, for example the shape of a flat-end cutter, or a distance that varies over the surface.
- The plane. Offsetting a polygon by a disk. Its mitred version, with sharp corners instead of arcs, is the straight skeleton offset, and its repeated use gives contour-parallel tool paths.
- Approximate offsets. The level set of a sampled signed distance function, extracted as a mesh.
Examples
- A ball. The ball of radius grows to the ball of radius and shrinks to the ball of radius , or to the empty set when . At the shrink is a single point, which regularization removes.
- A box. The box grown by is a rounded box: face rectangles moved out by , quarter cylinders of radius along the edges and eighths of a sphere at the corners. Its volume is , by Steiner's formula. Shrunk by , it is the box with sharp edges.
- Rounding a square. In the plane, take the square and . Then , and growing that by gives the square with each corner replaced by a quarter circle of radius . Each corner loses , so the area drops by . Filleting gives itself, since has no concave corner.
- Filleting an L shape. For the L shape and , growing and then shrinking fills the concave corner at with the region between the two edges and a quarter circle of radius that touches both, of area . The convex corners stay sharp.
- Merging. Two unit cubes at distance grow into two components for and into one component, touching at a single segment or face, for .
Known algorithms
- Rossignac and Requicha offsetting. For CSG input. The grown solid of a union is the union of the grown operands, so growing a CSG tree reduces to growing primitives where the tree has only unions. For other nodes, the method expresses the grown solid as the union of the solid with the offsets of its faces, edges and vertices, each a simple swept primitive, and evaluates the result by point membership classification.
- B-rep offsetting. Offset each face to a trimmed offset surface, add cylinders or more general pipe pieces at the convex edges and spheres at the convex vertices, intersect the pieces with surface surface intersection, and remove the parts that are closer than to the solid. This is the method of most commercial modelers, and the removal of self-intersections is its weak point.
- Distance fields. Sample the signed distance to on a grid or an adaptive tree and extract the level set. It is robust and simple, and its output is a mesh with a sampling error.
- The plane. Offsets of polygons and of regions with circular arcs from the medial axis or the Voronoi diagram of the edges, which give the exact offset for every at once.
- Minkowski sums of polyhedra. Approximate the ball by a convex polytope and compute the Minkowski sum by convex decomposition, as on the Minkowski sum page.
| Algorithm | Time | Space | Properties | Code |
|---|---|---|---|---|
| Rossignac-Requicha offsetting | O(m^3) worst | O(m^2) extra | deterministicexactiterative | 1 language |
Bounds
The following facts are proved, most of them in the paper of Rossignac and Requicha or by short arguments from the definitions.
- Unions and intersections. and , exactly. But , and the inclusion is strict in general: for two unit squares at distance , the left side is empty and the right side is not when . So growing commutes with union only, which is why a CSG method cannot push the growth to the leaves in general.
- Regularity. is a union of closed balls of radius , so it is closed and regular. need not be regular, which is why it is regularized.
- Rounding and filleting. , and both operations are idempotent, as in mathematical morphology.
- Discontinuity. The topology of changes when passes half the distance between two parts, as in the merging example. A decision about this is a sign of a distance minus , which needs exact or certified arithmetic near the critical value, for the same reason as the orientation test of polyhedral Booleans: a rounded difference of nearly equal numbers can have the wrong sign (catastrophic cancellation).
- Size in the plane. The offset curve of a simple polygon with vertices has segments and arcs. Each piece lies in one cell of the Voronoi diagram of the edges and vertices, and the distance to the sites along a Voronoi edge is unimodal, so the offset crosses each of the Voronoi edges at most twice.
The running times and the failure rates of B-rep offsetting codes on industrial models are measured, not proved. No general bound on the size of the offset of a curved B-rep is stated here.
Reductions
- To Minkowski sums. Growing is the Minkowski sum with , and shrinking is the complement of growing the complement.
- Clearance and interference. Two solids are at distance at least exactly when . So a clearance check is one grow and one interference test, which is a solid Boolean operation.
- Motion planning for a ball. The free space of a ball robot of radius among obstacles is the complement of , and the robot reduces to a point.
- Cutter paths. The center of a ball-end cutter of radius that touches but does not cut the part moves on the boundary of the part grown by ; see inverse tool offset.
Applications
- Tolerance zones. The set of acceptable shapes of a face within a tolerance is bounded by its grown and shrunk versions; see tolerance stack-up.
- Rounds and fillets. Constant-radius rounding and filleting of whole solids by the compositions above.
- Thin walls. Shelling a part for injection molding, casting or 3D printing.
- Machining and robotics. Tool clearance, cutter location surfaces and the free space of a robot.
- VLSI design rules. Rossignac and Requicha name design-rule checking as an application: the shapes on a chip must keep minimum distances, which is a clearance test.
References
- Jaroslaw R. Rossignac and Aristides A. G. Requicha, Offsetting operations in solid modelling, Computer Aided Geometric Design 3(2), 129 to 148, 1986, the whole paper (the definition of growing and shrinking, their properties, the regularized shrink, the use for tolerances, clearance, cutter paths and rounding, and the method for CSG solids)
- Nicholas M. Patrikalakis and Takashi Maekawa, Shape Interrogation for Computer Aided Design and Manufacturing, Springer, 2002, Chapter 11, Offset curves and surfaces, Section 11.3, Offset surfaces, and Section 11.5, General offsets
- Takashi Maekawa, An overview of offset curves and surfaces, Computer-Aided Design 31(3), 165 to 173, 1999, the sections on offsets of surfaces and of solids and on the removal of self-intersections
- Aristides A. G. Requicha, Representations for rigid solids, theory, methods, and systems, ACM Computing Surveys 12(4), 437 to 464, 1980, the r-sets and the regularized operations that the offset operations must preserve
Where this leads
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W2 basic |
|
Tag 41PNBY Edit this page History Report an error Markdown