Algorithm Search⌘K

Definitioncore

Trimmed surface

Also called trimmed NURBS surface, trimmed patch.

A parametric surface restricted to a region of its parameter domain bounded by trimming curves, the usual way a B-rep stores the face of a curved solid.

A trimmed surface is a parametric surface S(u,v)S(u, v), usually a NURBS patch, that is kept only over a region Ω\Omega of its parameter rectangle. The region is bounded by closed trimming curves drawn in the (u,v)(u, v) plane: one outer loop, and one inner loop for each hole. A boundary representation of a curved solid stores each face this way, because a Boolean operation or a fillet cuts a face along a curve that is not a parameter line, and the patch itself cannot be cut along such a curve. The trimming curves of two neighbor faces describe the same edge in two parameter planes, and in general they do not give the same curve in space, so a trimmed model has small gaps along its edges, and these gaps are a common source of invalid models when a model moves between two systems.

Definition

Let S:D→R3S : D \to \mathbb{R}^3 be a regular parametric surface on the rectangle D=[a,b]×[c,d]D = [a, b] \times [c, d], for example a NURBS tensor-product surface whose two directions use B-splines. A trimming loop is a closed curve γ:[0,1]→D\gamma : [0, 1] \to D with γ(0)=γ(1)\gamma(0) = \gamma(1) and no self-intersection, usually a 2D B-spline or NURBS curve or a chain of such curves.

A trimmed surface is a pair (S,Ω)(S, \Omega) where Ω⊆D\Omega \subseteq D is a closed region bounded by a finite set of pairwise disjoint trimming loops γ0,γ1,…,γk\gamma_0, \gamma_1, \ldots, \gamma_k, such that:

  • γ0\gamma_0 is the outer loop and runs counterclockwise in the (u,v)(u, v) plane. The rectangle boundary ∂D\partial D is a valid outer loop.
  • γ1,…,γk\gamma_1, \ldots, \gamma_k are inner loops. They lie inside γ0\gamma_0, outside each other, and run clockwise.
  • Ω\Omega is the set of points of DD on the left of every loop, with the loops included. So Ω\Omega is the closed disk of γ0\gamma_0 minus the open disks of the inner loops.

The point set of the face is S(Ω)S(\Omega). Its normal is Su×SvS_u \times S_v, or the opposite vector when the face stores a reversed flag. This page uses the convention of the B-rep pages: the normal of a face points out of the solid, and each loop runs counterclockwise around that normal (the right-hand rule). With the normal Su×SvS_u \times S_v, a loop that is counterclockwise in the (u,v)(u, v) plane maps to a loop that is counterclockwise around the normal in space, so the two orientation rules agree.

Each edge of the B-rep where two trimmed faces (S1,Ω1)(S_1, \Omega_1) and (S2,Ω2)(S_2, \Omega_2) meet has two parameter curves (often called pcurves), a part β1\beta_1 of a loop of Ω1\Omega_1 and a part β2\beta_2 of a loop of Ω2\Omega_2. Many systems also store a third curve EE in space. In exact arithmetic the three curves describe one curve: S1∘β1=S2∘β2=ES_1 \circ \beta_1 = S_2 \circ \beta_2 = E. In a real model they are approximations of the intersection curve of the two surfaces, computed by surface surface intersection, and they agree only within a tolerance τ\tau:

max⁡t∣S1(β1(t))−S2(β2(ϕ(t)))∣≤τ\max_t \left| S_1(\beta_1(t)) - S_2(\beta_2(\phi(t))) \right| \le \tau

for some monotone reparametrization ϕ\phi. The model is watertight within τ\tau when every edge meets this bound. The exact intersection curve of two polynomial patches has a very high algebraic degree, while the stored trimming curves have a low fixed degree, so τ>0\tau > 0 in general. Sederberg and coauthors call these gaps a long-standing problem of trimmed NURBS models and give a conversion to T-splines that has none.

Point membership in a trimmed surface is a 2D question. A point S(u,v)S(u, v) of the patch is on the face exactly when (u,v)∈Ω(u, v) \in \Omega, which a winding number or ray test against the loops decides, as in point in polygon with curved edges. A ray test meets each loop in the roots of one polynomial per curve piece, which is curve intersection of the ray with a B-spline curve, for example by Bézier clipping. Degenerate input is part of the definition: a point on a loop is on the face, the test must return "on" for it, and a ray through a vertex of a loop must be counted once, as in the polygon case.

Examples and non-examples

  • A plate with a round hole. Let S(u,v)=(u,v,0)S(u, v) = (u, v, 0) on D=[0,1]2D = [0, 1]^2, with outer loop ∂D\partial D and one inner loop, the circle of center (1/2,1/2)(1/2, 1/2) and radius 1/41/4 run clockwise. A NURBS curve represents this circle exactly. The face is the unit square minus an open disk. Its area is ∬Ω∣Su×Sv∣ du dv=1−π/16\iint_\Omega |S_u \times S_v| \, du \, dv = 1 - \pi / 16.
  • A cylinder cut by a cylinder. Take the cylinder S(θ,z)=(cos⁡θ,sin⁡θ,z)S(\theta, z) = (\cos \theta, \sin \theta, z) on [0,2π]×[−2,2][0, 2\pi] \times [-2, 2] and a second cylinder x2+z2=(1/2)2x^2 + z^2 = (1/2)^2 that crosses it, as in a T-joint of two pipes. The face of the union on the big cylinder has an inner loop on each side, cos⁡2θ+z2=1/4\cos^2 \theta + z^2 = 1/4 near θ=π/2\theta = \pi / 2 and near θ=3π/2\theta = 3\pi / 2, where the second cylinder enters and leaves. These are closed curves in the (θ,z)(\theta, z) plane that no parameter line can follow.
  • An untrimmed patch. A Bézier or B-spline patch with Ω=D\Omega = D is the case k=0k = 0 with outer loop ∂D\partial D.
  • A periodic surface. On a full cylinder, a loop that goes once around the axis is not a closed curve in the rectangle DD; it runs from θ=0\theta = 0 to θ=2π\theta = 2\pi. Systems treat this by a seam edge on the line θ=0\theta = 0, which makes the loop closed in DD, or by a domain that is a cylinder. Without one of the two, the definition above does not apply.

Non-examples:

  • Crossing loops. If an inner loop crosses the outer loop, or two inner loops cross, the "left of every loop" rule gives no consistent region, and the face is invalid.
  • A loop with the wrong orientation. An inner loop that runs counterclockwise defines, by the left rule, the region inside it. Together with the outer loop the region is then only the inner disk, which is not the intended face with a hole.
  • A loop outside DD. A trimming curve that leaves the rectangle asks for points where SS is not defined. Such curves come from an intersection curve that was computed past the end of a patch.
  • A NURBS surface or a tensor-product surface is the base surface SS. Its parameter rectangle is DD.
  • A boundary representation stores faces as trimmed surfaces, edges as curves with their parameter curves, and the adjacency of faces, edges and loops.
  • Surface surface intersection computes the curves along which a Boolean operation trims two faces. Its output becomes two parameter curves and one space curve.
  • Surface tessellation of a trimmed surface must triangulate Ω\Omega, not DD, and must use the same points on the edge for both neighbor faces, or the mesh has cracks along the gaps.
  • An offset surface of a trimmed face is trimmed by the image of the same loops, as long as the offset has no self-intersection.
  • The gaps are an instance of the geometric robustness problem: the model is consistent only within a tolerance, and algorithms that need exact incidence must treat edges as tolerance zones.

References

  1. Thomas W. Sederberg, G. Thomas Finnigan, Xin Li, Hongwei Lin and Heather Ipson, Watertight trimmed NURBS, ACM Transactions on Graphics 27(3), Article 79, 2008, the introduction (the gaps between neighbor trimmed NURBS faces and why they cannot be removed in general) and the conversion of a trimmed NURBS model into a gap-free T-spline model
  2. Nicholas M. Patrikalakis and Takashi Maekawa, Shape Interrogation for Computer Aided Design and Manufacturing, Springer, 2002, Chapter 1, Representation of curves and surfaces, and Chapter 5, Intersection problems (the intersection curves that become trimming curves)
  3. Christoph M. Hoffmann, Geometric and Solid Modeling, An Introduction, Morgan Kaufmann, 1989, the chapters on curved edges and faces and on surface intersections (general locator, the chapter titles are not confirmed)

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.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW4 complete
  • a review of the text: no review record reviews/W5MMTQ/text.yaml