Pangram verdict · v3.3
We believe that this text is a mix of AI and human-written content.
AI likelihood · overall
MixedArticle text · 1,538 words · 40 segments analyzed
Abstract Gradient-based design needs the derivative of an objective with respect to the parameters a designer edits, such as a hole radius or a fillet radius. In a boundary-representation (BRep) kernel those parameters pass through Boolean operations, filleting and tessellation, which make discrete choices. We freeze the tessellation’s topology at the current parameters and differentiate its node positions: surface nodes by evaluating the kernel’s analytic surfaces on dual numbers, vertices and trim nodes by implicit differentiation of the surface equations, with tangency rows for fillet blends. The result is exact for the frozen mesh, extends to directional second derivatives and to a transposed (reverse) pass, and feeds mass properties and a rigid-body adjoint with penalty contact. A change of topology is reported as an error. We validate against finite differences of the frozen plan and of fresh rebuilds that share no tessellation with the seam, and state where the method falls short: the derivative of the frozen mesh differs from the continuum by the polygonization error (6.7% for a fillet at 16 segments per circle, 0.11% at 128), a plan stays valid for parameter steps of at least mm, and the same-plan checks found two errors in the seam on filleted, drilled parts, which we describe and have fixed. 1 Introduction A mechanical designer works in parameters: the depth of a pocket, the radius of a bore, the radius of a fillet. An optimizer that serves that designer needs , the derivative of an objective (a mass, an inertia, the outcome of a simulation) with respect to those parameters. Between and anything measurable sit Boolean operations, fillet construction and tessellation, each of which makes discrete decisions: which faces survive a Boolean, in which order they are sewn, how many segments approximate a circle. Commercial kernels do not generally expose parameter derivatives to the user, so designers typically fall back on finite differences of full rebuilds, at two rebuilds per parameter. This is not a new problem, and our approach is not new in outline.
Engineering Sketch Pad computes tessellation sensitivities on a parametric BRep: the motion of every grid point with respect to every design parameter, on a tessellation whose topology is kept consistent between the base and perturbed models, with sensitivities found on Nodes, then Edges, then Faces 1,2. Those sensitivities are analytic for most construction operations and fall back to finite differences for others, filleting among them 1. Banović et al.
differentiate the Open CASCADE kernel itself by operator overloading 3,4; algorithmic differentiation of that kind reaches every operation the kernel performs, fillets included, and can be nested for second derivatives, at the cost of differentiating the kernel’s combinatorial code and taping its execution. We describe the same idea, which we call the seam, in vcad, our open-source Rust BRep kernel, and extend it in four directions.
None is new to differentiation in general.
What is new is having them in a frozen-tessellation method that leaves the kernel’s code undifferentiated.
Analytic fillet sensitivities without AD or FD.
Where Engineering Sketch Pad falls back to finite differences for fillets, a fillet radius moves every blend’s radius and axis at once, and its blends meet their support faces tangentially, which makes the implicit system at their corner vertices rank-deficient. We add tangency rows that complete it (Section 3.3), so one fillet parameter, moving 20 surfaces, is differentiated without finite differences.
Second order on the frozen plan.
Directional second derivatives of mass properties, with the node accelerations of cones and tori (Section 4).
A transposed pass.
Node velocities are linear in per-surface seed values; transposing those maps gives the derivative for every parameter from one pass (Section 5).
Rigid-body dynamics.
Mass-property and contact cotangents from a discrete trajectory adjoint pulled back through the seam (Section 7). We validate the derivatives against central finite differences of the frozen plan and, wherever a rebuild keeps its topology, of rebuilds tessellated from scratch, which share nothing with the seam’s code (Section 8); the exceptions are listed there.
We describe the two cases where the checks found errors in the seam.
A script regenerates every measured value in this paper from a fresh clone (Section 10). 1.1 Scope and limits The derivative is that of the frozen mesh. The seam differentiates the mesh the kernel produces at , with segment counts and triangulation held fixed. It differs from the continuum shape derivative by the polygonization error, which falls as in the number of segments: for a filleted cube at 16 segments per full circle (four per quarter-blend) the fillet-radius derivative is 6.7% larger in magnitude than the continuum one, and 0.11% at 128 (Figure 8). A plan is valid only near where it was captured. Re-evaluating a plan matches every node to its capture-time position within mm. On the five-parameter box of Section 8.4, every parameter can move by at least mm, the largest step of our logarithmic grid that kept correspondence; the next grid point, mm, lost it.
The optimizer therefore captures a fresh plan at every iterate. Segment counts can change between iterates.
vcad’s Boolean rims are sag-adaptive: their arc count depends on the radius. Sweeping the box’s hole radius from 1.6 to 2.4 mm changes the node count 20 times, and each change moves the volume by up to of its value. Across iterates is therefore piecewise smooth with small jumps. The optimizer does not reject a step because its node count differs from the last iterate’s, because each iterate’s gradient is taken on its own plan; the jumps show up as noise in the line search.
No derivatives across topology changes.
When a perturbation would change the topology (a blind hole breaking through, a fillet consuming a face), the seam detects it with a topology signature and per-node correspondence checks and returns an error, and the optimizer shrinks the step (Figure 1).
Seedings synthesized from the build function are not exact.
They are central differences of surface fields, accurate to , and they cost two rebuilds per parameter (Section 6). Contact is phyz’s differentiable penalty model, a per-vertex spring–damper against a ground plane without friction, not a GJK/EPA collision pipeline 5. The trajectory adjoint supports single-degree-of-freedom joints, open-loop control and objectives on the final state only.
Everything runs on CPU in double precision. Fig 1 What the gradient is a gradient of.
Within one topology class the frozen plan’s volume is smooth in the parameter and the seam returns its derivative (red tangent). When a blind hole breaks through, the plan’s topology signature changes and the seam returns an error; an optimizer treats that as a failed step and shrinks it.
Schematic. 2 Background and related work Parametric CAD sensitivities.
Structural shape optimization has long used design velocities, the sensitivity of boundary points to design variables 6,7. For CAD models these come from three routes.
Finite differences of rebuilds with point correspondence are the most general and the most expensive; Robinson et al.
and Agarwal et al. compute parametric design velocities this way for use with adjoint solvers 8,9.
Differentiating the kernel by operator overloading gives exact derivatives of the kernel’s operations: Banović et al.
and Mykhaskiv et al. differentiate Open CASCADE and couple it to a discrete adjoint CFD solver 3,4, and Xu et al. differentiate a NURBS-based design chain 10.
Engineering Sketch Pad differentiates its own constructive solid geometry process analytically where it can and uses finite differences elsewhere, and maps the result onto a consistent tessellation 1,2.
Our seam is closest to Engineering Sketch Pad: we leave the kernel’s combinatorial code undifferentiated and differentiate the map from parameters to a tessellation of fixed topology. Within that frozen-tessellation approach we add analytic fillet sensitivities, second derivatives, a transposed pass, and the coupling to rigid-body dynamics with contact; operator-overloading AD of a kernel can supply fillet and second derivatives too, by differentiating the kernel’s own code.
Isogeometric analysis avoids the tessellation by computing on the CAD basis 11.
Differentiable CAD programs. Cascaval et al.
write CAD programs in an automatically differentiable language for bidirectional editing, and do not optimize across changes of topology 12. Michel and Boubekeur compute parameter updates for direct manipulation of procedural shapes 13.
Schulz et al. precompute a design space of CAD parameters for interactive optimization 14. Differentiable rendering and other representations. Differentiable rasterizers 15,16 and path tracers 17 compute derivatives of images with respect to the vertices of a mesh of fixed connectivity, as ours is.
Worchel and Alexa extract a mesh from parametric curves and surfaces for a differentiable mesh renderer and report that naive differentiable tessellation is fragile 18. Signed distance fields, learned 19 or analytic, are differentiable almost everywhere and can be rendered differentiably 20, and program synthesis recovers CSG trees from shapes 21,22.
These representations give up the BRep’s exact faces, trims and fillets. Differentiable physics and co-design. Differentiable simulators include rigid-body formulations with contact 23–25 and differentiable programming systems 26.
Robot co-design work optimizes morphology and control jointly 27,28, usually over parametric primitives rather than CAD models.
Placing a solver or a simulation inside a differentiable program as one step with a known adjoint is standard 29; our rollout coupling is such a step written by hand.
3 The differentiable seam Fig 2 Where the chain is cut.