Skip to content

ADR-0022: Boundary derivatives for bounded contact-volume experiments

Status

Accepted for experimental scalar and one-sided directional evaluators with reproducible benchmarks.

Context

Method C samples a hard indicator for its value and uses a smoothed intersecting backward rule. Small overlaps can escape sampled detection. The bounded editing API in ADR-0021 deliberately stays away from contact; its fixed mesh cannot establish derivatives of topology-changing geometry.

A perpendicular circular through-cut in a rectangular plate is a bounded case with curved boundaries, an actual hole-to-open-notch transition, and independent volume references. Its volume is C1 at ordinary edge and corner contacts. Positive-area planar contact has a different derivative contract, addressed by the bounded extension below. Arbitrary STEP reconstruction and surface-area derivatives remain outside this decision.

Decision

Circular cut with a continuous first derivative

Add brepax.experimental.contact for disk/rectangle intersection area and the remaining extruded plate volume. Integrate the analytic circular arcs and straight boundary segments using Green's theorem. Use a local gauge and a small-segment series to resolve small overlap areas without subtracting large boundary integrals. Factor axis-aligned chord expressions to avoid the cancellation of a generic quadratic discriminant.

Supply a custom JVP derived from boundary velocity for the same continuous measure. For the exposed circular arcs Gamma, center and radius variations give dA = integral_Gamma (dc dot n + dr) ds. Rectangle-size variations also include the clipped straight-edge lengths. Plate height differentiates the extrusion directly. All parameters remain differentiable, including rectangle dimensions; no future-event correction is added.

This rule avoids singular endpoint intermediates and arbitrary AD choices when sorted endpoints coincide. Ordinary AD of the same safe primal is a required comparator: it agrees in regular configurations but can select incorrect derivatives at representation ties even when the area is smooth. That observation is specific to this representation, not an impossibility result for ordinary AD. Only first derivatives are supported by the contract.

Keep host OCCT rebuilding and measurement in the benchmark. Compare with independent cross-section integration, analytic contact formulas, fresh CAD volumes and finite differences, and fresh meshes after actual CAD transforms. Use a two-dimensional grid times extrusion height for sampled plate baselines; retain temperature choices, failures, setup costs, and synchronized timings.

Isolated opposing planar contact

Add brepax.experimental.planar_contact for a known convex planar contact polygon and a supplied rigid-motion direction. Return the positive one-sided intersection-volume response, integrating the positive normal approach speed over the polygon. A triangle fan reduces the affine integrand to closed-form triangle integrals. Normalize speeds and use positive factored expressions; subtracting a nearly equal negative cap loses small positive regions.

This response is nonlinear in direction. Opposite tilts of a contacting square can both create overlap, so no single gradient or ordinary JVP can represent all directions. Do not install a custom JVP or revive the TOI stub for this contract. The stratification explanation states the isolated-contact assumptions and local overlap-layer derivation.

Keep B-Rep preparation in experimental.planar_contact_cad. Require explicit face IDs, convex polyhedral solids, unique opposing support faces, and a positive-area polygon intersection. Return a nominal support-polygon model with source residuals. Require callers to choose computed-zero residuals or explicit roundoff-scale projection. Neither mode certifies exact contact of the source CAD or modifies its solids. OCCT tolerances are not a physical contact criterion; a positive gap has a different derivative.

Compare with independent cross-section integration, existing sampled Method C, sigmoid and smoothed-composition estimators, same-forward finite differences, and fresh finite CAD edits. Keep calibration and heldout geometry groups separate across five fixed splits. Select directions using the same candidate sets and compare actual CAD volume at the same finite step, including a panel where ordinary normal approach can remove any advantage. Report host setup, compilation, synchronized execution, finite-step errors, and tolerance failures.

Multiple contacts and finite cutter edits

Extend the experimental response to a collection of convex planar patches, packed into static-capacity triangle arrays with a mask. Preserve the existing single-patch API. Sum the same affine integrals; an empty collection has zero response for finite motion. The numerical collection does not itself establish that physical contacts exist, are complete, or are counted once.

The bounded CAD model consists of two rigid bodies supplied as finite lists of convex polyhedral cells. Require disjoint cell interiors within each body and no initial intersection volume between the bodies. Enumerate every cell pair. This gives an exact measure partition into component-pair intersections, so all positive-area face-contact responses add, including patches sharing edges. Retain gapped and lower-dimensional contacts in the inventory even though their first-order response is zero. Reject duplicate or overlapping cells. Keep source uncertainty and nominal geometry distinct; exact predicates on extracted coordinates do not certify the original CAD surfaces. Bind each source face to the exact represented support features before projecting its polygon. If that association or the true contact patch cannot be resolved, reject the pair; a small residual to another face is insufficient.

Use the response to select among supplied rigid cutter directions and finite step sizes in a bounded socket example. Normalize candidate motions by a physical displacement scale, not a Euclidean norm mixing translations with radians. Compare target-removal error and fixed-step material removal with single-patch ablations, sampled estimators, actual directional CAD differences, and a complete scan of the same finite candidates. Count preparation and Boolean calls separately from independent reference measurements. A selected action must execute a real Cut, with shape validity and Common/Cut volume balance checked. No generic optimizer or collision-free motion certificate is introduced.

For resolution studies, retain raw external-coordinate CAD failures alongside explicit reconstruction from trusted design dimensions in a fixed CadFrame. Changing coordinates of an already-built B-Rep retains its tolerance semantics; it is a separate comparator, not equivalent to fresh dimension-driven construction. The construction frame must not depend on the finite-difference step. Resolving an explicit design does not resolve uncertainty in imported CAD.

Finite translation profiles and preserved placement

Extend the bounded experiment with host preparation of finite overlap profiles for a supplied translation of explicit convex vertex-cell collections. Retain disjoint same-body interiors and no initial cross-body overlap. Derive bounded cell halfspaces from their represented hulls; do not accept unchecked unbounded halfspace systems. Exact rational affine vertex paths delimit intervals of constant combinatorial structure. Oriented facet determinants give cubic volume polynomials without CAD sampling or fitted coefficients. All cell pairs remain relevant, including initially separated, edge, and point contacts.

Separate the exact host computation from the JAX profile evaluator. Keep the geometry and direction fixed during traced step queries; support explicit one-sided slopes at events and ordinary AD inside open intervals. Reject unrepresentable interval packing instead of silently merging distinct events. Before packing, coalesce adjacent knots whose neighboring pieces already carry an exactly identical total polynomial: such a knot is combinatorial only for one contributing cell pair and is not an event of the reported total volume, including one a same-body cell decomposition introduces at a shared internal face. This never merges two knots with a genuinely distinct total polynomial, so it does not relax the rejection above; a redundant knot can still remain when the total volume genuinely changes there for a different reason. Reject coefficient underflow as well as overflow; an unsupported unit scale must not turn a positive exact volume into an all-zero numerical profile. The rational reference does not make floating evaluation exact or certify source CAD. Preparation enumerates plane triples and can be expensive; this is a bounded small-polyhedron method, not a general fast Boolean kernel.

Preserve supplied local CAD cells and their shared placement when available. Prepare their contact inventory locally, transform the supplied world motion into that frame, and apply dimensional scaling to the response. Retain local source residuals and the absence of source-contact certification. An explicit adapter may remove a genuinely common proper-rigid top-level CAD Location; it must preserve child geometry and reject mismatched or scaled Locations. Numerical unit scaling is separate metadata. Never infer a lost placement from baked vertices or repair their overlaps by enlarging a tolerance.

Keep finite-action search in the benchmark: analytical candidate ordering, budgeted CAD confirmation, and bounded amount-refinement heuristics are compared with CAD-only adaptive search on the same inputs and attempted-call budgets. Every selected edit must have been observed and must pass an actual Cut check. Keep action-grid error separate from ranking excess; off-grid refinement can have negative excess relative to that grid. Missing brackets, failed probes, and targets exceeding known total material are explicit outcomes, not omitted cases. This introduces no generic optimizer or global reachability guarantee.

The rotation benchmark separately verifies that equal initial velocity fields can have different higher-order volume terms. The full path, not just its initial twist, defines a finite comparison. A translation profile cannot substitute for a rotating path.

Target inversion and bounded design sensitivities

Retain the exact represented translation polynomials for host-side target queries. Find isolated roots, constant solution intervals, and volume-range enclosures over the complete supplied path. Use exact polynomial root counts to distinguish absent roots from unresolved floating candidates; sampling or a missing sign bracket cannot certify unreachability. State step and volume tolerances in their respective units. Reachability applies to the represented model and specified path, not to arbitrary source CAD or other directions.

Add a bounded parameter-family experiment for one or two dimensionless design controls. Inputs remain explicit bounded convex vertex cells, with affine vertex displacements that preserve facet normals. Translation velocity is fixed. Host preparation derives a local parameter region, affine moving event positions, and volume polynomials. Retain cell validity, same-body interior disjointness, and absence of initial cross-body overlap throughout that region. Do not accept unchecked halfspace systems or infer deformation provenance from separately imported CAD.

Separate exact host preparation and specialization from traced evaluation. JAX differentiation concerns the volume inside an admissible open event interval. Use a first-order custom JVP from exact-derived physical derivative polynomials to avoid cancellation introduced by differentiating rounded moving normalization anchors. Validate this rule independently and keep prepared model coefficients outside the differentiation contract. Numerical uncertainty near parameter boundaries or moving knots, unresolved cancellation, and unrepresentable intended derivatives must remain explicit. Valid exact models can have rejected numerical queries, including some smooth stationary points. Persistent identical event functions may be represented together. This strict parameter chart rejects conflicting event-order changes at its reference; that rejection does not establish that the physical volume is nondifferentiable.

Compute local target-position sensitivity only under its nonzero-slope, stable-branch conditions, including any supplied target derivative. Independent target verification remains necessary. Do not turn event sensitivities into a static TOI correction, or expose a general optimizer through this extension.

Validate parameter derivatives with analytic references and independently rebuilt CAD differences, and target positions with actual Common/Cut operations. Compare finite-profile proposals, first-order proposals and CAD-only search on identical translation paths and ranges. Count preparation, compilation, attempted observations and final validation; separate repeated-target reuse from cold cost. Mathematical correctness, model-scoped reachability and practical speed are separate claims.

One supplied event-order boundary

Add a host evaluator for one dimensionless affine design parameter with fixed facet normals and translation velocity. The caller supplies an event-order exchange at theta=0 and a positive parameter_radius to seed regular charts at its negative and positive values. This radius is neither a tolerance nor the returned validity radius. Require the same affine event inventory, exactly one pair meeting inside the translation interval, and preservation of all non-event validity conditions. Reject other simultaneous exchanges, endpoint collisions and geometry changes outside these conditions.

The certified parameter interval has open outer endpoints and includes zero. Check both exact polynomial closures against the fixed-parameter geometry. Preserve the two labeled affine events; their order changes across zero. Return exact host values, joint one-sided directional responses, and signed left/right parameter derivatives. Equal scalar derivatives establish only the ordinary parameter derivative at fixed step. A generally nonlinear direction map is not a JVP. Existing strict JAX charts and local target-position sensitivities retain their contracts.

Host specialization on either side and at zero reuses the finite-profile and target-set APIs, including their numerical packing limits. This does not discover boundaries, build a parameter atlas, differentiate target selection, or certify separately imported CAD. Validate any applied edit independently.

Within that supplied boundary model, add a host query on a compact closed parameter interval strictly inside the open certificate. Minimize absolute change from an initial parameter while choosing a translation step whose represented overlap volume lies in a declared target band. This is a bounded experimental design task, not automatic event discovery or a generic optimizer.

Use exact polynomial bounds over every affine event strip to exclude parameter intervals. Combine a tensor Bernstein bound with a fixed-parameter maximum upper enclosure plus a bound on the physical parameter derivative. The latter avoids relying on translation bounds becoming tight under parameter-only subdivision. No monotonicity or ordinary derivative of the maximum is assumed.

Return an independently checked binary64 parameter/step witness separately from a lower bound on the required design change and the resulting objective gap. Only a strict volume upper bound below the allowed band proves infeasibility. Resource exhaustion, unresolved extrema, packing failures and isolated feasible points can leave the search unresolved. A tolerance-qualified edit is not a claim of exact target reachability. Validate actual CAD independently and compare against complete fixed-profile rebuilding and CAD-only search, charging setup and final validation. A certificate is not evidence of a runtime advantage.

Automatic continuation from a regular design

For the same one-parameter, fixed-normal affine family, accept a finite closed parameter window and an ordinary seed parameter. Discover the next exact root of the local validity guards in either direction, instead of requiring the caller to supply an exchange position and reference radius. Only an isolated exchange of two interior translation events is supported. Collect all guards vanishing at the root; a non-event condition, simultaneous exchange, changed event inventory, or failed adjacent-chart construction leaves that frontier unconfirmed. Failure of a sufficient certificate is not geometric invalidity.

Choose trial centers using exact distances and bounded refinement. Rebase the original affine family without rounding its vertices, and compare both chart closures with an independently rebuilt fixed-parameter profile from exact planes. Retain regular open chart intervals, certified boundary points, and the uncovered part of the requested window separately. A nonregular seed or an event at a requested outer endpoint can remain unresolved. Chart and trial budgets do not imply that the resulting coverage is complete.

Reuse the bounded design query with one global interval budget. Every uncovered interval or singleton contributes its distance from the initial design to the objective lower bound. Partial coverage may still establish the requested gap if every unconfirmed region is too far away to improve the witness. It cannot establish whole-window infeasibility. Recheck numerical witnesses in the original global parameter coordinate, including after non-dyadic rebasing.

Exact volume and feasible-design laws do not imply that the chosen sufficient certificates are frame invariant: selecting a separating axis can change the confirmed region after a coordinate transformation. Report that limitation separately from physical value accuracy. There is no selection derivative, general parameter atlas, automatic STEP decomposition, or simultaneous-event solver. Validate edits against actual CAD, and distinguish preparation, first accuracy-qualified action, and final certificate costs in comparisons.

Consequences

The experiment can evaluate volume through a contact without freezing a mesh topology. It is neither a general Boolean engine nor an extension of the imported-hole editing contract. Interior hole-center motion still has zero volume derivative. Radius-driven inverse design can cross the first edge while using a volume objective with a valid nonzero derivative.

At exact tangency the boundary can pinch despite the scalar volume being C1. A failed mesh closure check there does not refute the volume derivative; it prevents claiming a regular solid mesh at that configuration. OCCT's absolute tolerance floor can also spoil scale covariance of remeshing.

Use local coordinates and x64 for sensitive comparisons. Extreme radius to plate ratios and nearly complete stock removal lose relative accuracy in floating point. Supported examples do not certify arbitrary aspect ratios, second derivatives, or topology-changing edits of general input CAD.

The planar extension handles a supplied patch or the stated convex-cell contact collection with positive thickness. Existing overlap, arbitrary decomposition of nonconvex STEP input, and curved contact patches remain outside its contract. A directional response is only first-order information: verify the chosen finite edit independently. Mixed tilt can create wedges below OCCT's resolution even when the continuous response is nonzero. Edge-only or point-only contact can also create finite overlap despite a zero first-order response.

Boundary shape calculus and exact derivatives of cut discretizations are established techniques; see Wegert et al. (2025) and Wegert et al. (2026). This implementation makes no novelty claim for those techniques. Its evidence concerns the stated bounded families, derivative consistency, and measured accuracy/cost. The cited cut-AD constructions assume stable cut topology; they do not directly prove the birth of overlap at opposing-face contact. Broader generalization requires a separate decision.