Blend Suppression#

Topological suppression of recognized blends with Euler operators.

Note

This document is intended for developers working on the shape_editing.euler module. Read Euler Operators first for the topological primitives it relies on.

Blend Suppression#

This document describes the topological blend-suppression pipeline in volmdlr_tools.shape_editing.euler. It removes recognized blends (fillets and rounds) from a solid by applying Euler operators locally around each blend and then rebuilding only the affected geometry, rather than deleting faces and asking the kernel to heal the result globally.

Status: proof-of-mechanism. The pipeline correctly suppresses several canonical configurations (single edge blends and edge/vertex-blend chains on planar and simple curved supports) but does not yet match the robustness claimed in the source papers. See Current status and known limitations below.

Background and academic basis#

The approach follows three papers:

  • Venkataraman & Sohoni (2001), “Blend Recognition Algorithm and Applications.” — how to recognize a blend from its boundary topology: a blend face is a constant- or variable-radius patch bounded by spring edges (the smooth tangency curves where it joins its support faces) and terminated at its ends by cross edges (shared with neighbouring blends in a chain) or terminating edges (shared with the ordinary faces that cap the chain).

  • Venkataraman, Sohoni & Elber (2002), “Removal of Blends from Boundary Representation Models.” — how to suppress a recognized blend: reconstruct the geometry the blend replaced by extending and intersecting its support faces, after a topological edit that re-glues those supports.

  • Slyadnev & Turlapov (2020), “Simplification of CAD Models by Automatic Recognition and Suppression of Blend Chains.” — how to drive the suppression with Euler operators so the model stays a valid manifold at every step, and how to treat a whole blend chain as one suppression unit.

Why Euler operators instead of direct face removal?#

volmdlr_tools already has a defeaturing path built on the kernel’s own tools — BRepTools_ReShape for soft (isolated) features and BRepAlgoAPI_Defeaturing for hard ones (see Shape Editing Architecture). Those work well for many features. So why a second, Euler-operator-based path specifically for blends?

1. A blend removal is fundamentally a local re-gluing, and global healers solve a harder problem than necessary. Deleting a fillet face and asking BRepAlgoAPI_Defeaturing to close the gap makes the kernel re-extend the surrounding surfaces, recompute all their mutual intersections, and rebuild the affected region of the solid as a global boolean-style operation. For a fillet whose effect is purely local — two known support faces that simply need to meet again at a sharp edge — that machinery is both heavier than the problem and harder to predict. The Euler-operator recipe states the answer directly: kill these boundary edges, kill the blend face, weld the two supports along the surviving spring edge.

2. Validity is guaranteed by construction, not checked after the fact. Every Euler operator preserves the Euler–Poincaré invariant (V - E + F - (L - F) - 2(S - G) = 0), so the intermediate model is always a valid manifold. A face-removal-plus-heal step, by contrast, can silently produce a non-manifold or self-intersecting result that only a posterior BRepCheck_Analyzer pass will catch — at which point the operation must be discarded wholesale. With Euler operators the topology is never in doubt; only the geometry reconstruction can fail, and it fails on a single well-posed intersection that can be rolled back cleanly.

3. Topology and geometry are decoupled, which makes failures legible. The topological recipe is exact and identical regardless of the blend’s radius or whether its supports are planar or curved. The geometry is reconstructed separately as a set of surface/curve intersections. When a blend cannot be suppressed, the failure is localized to a specific edge reconstruction with a specific reason (“carrier surfaces do not intersect”, “restored corner is degenerate”), instead of an opaque “the boolean operation failed”.

4. Chains can be suppressed coherently. A run of fillets meeting at vertex blends shares cross edges and corner vertices. Euler operators let the whole chain be edited on one shared engine — every cross edge and shared corner consumed before any geometry is rebuilt — so a corner can be resolved against the real faces that survive, not against a neighbouring blend that is itself about to disappear. A face-by-face global heal has no natural place to express that ordering.

The trade-off is that the geometry-reconstruction half must be written by hand per carrier type (planar, cylindrical, …), whereas the kernel healer covers many surface types out of the box. This is the central reason the Euler path is currently a proof-of-mechanism rather than a drop-in replacement.

The pipeline#

            ┌─────────────────────────┐
   solid ──►│  1. Blend recognition   │  BlendExtractor over the AAG
            │     (spring/cross/term   │  → blend faces + chains, each face
            │      edge classification)│    tagged with a BlendAttribute
            └────────────┬────────────┘
                         ▼
            ┌─────────────────────────┐
            │  2. Condition dispatch   │  recognize_condition()
            │     (local topology →    │  → FFIsolated / FFOrdinaryEBF /
            │      suppression recipe) │    FFOrdinaryVBF
            └────────────┬────────────┘
                         ▼
            ┌─────────────────────────┐
            │  3. Euler-operator edit  │  EulerEngine: KEV / KEF / KFMV,
            │     (topology only)      │  staged, history-tracked
            └────────────┬────────────┘
                         ▼
            ┌─────────────────────────┐
            │  4. Geometry             │  normalize_edges /
            │     normalization        │  normalize_chain_edges
            │     (rebuild affected    │  → restored sharp edges + corners
            │      edges only)         │
            └────────────┬────────────┘
                         ▼
                   suppressed solid

1. Recognition#

BlendExtractor walks the Attributed Adjacency Graph and tags each blend face with a BlendAttribute recording its kind (Ordinary edge blend or Vertex blend) and the indices of its spring, cross and terminating edges. Tangentially-connected blend faces are grouped into chains. (Recognition is covered in depth by the feature-recognition documentation; this pipeline consumes its output.)

2. Condition dispatch — recognize_condition()#

A blend is suppressed by the Euler sequence implied by its local topology — the arrangement, on the AAG, of its bounding edges and the support/terminating faces around it. recognize_condition() tries an extensible registry of BlendTopoCondition subclasses and returns the first that matches:

Condition

Matches

Recipe

FFIsolatedCondition

edge blend with 2 spring + 2 terminating edges, no cross edges (a standalone fillet)

KEV each terminating edge, then KEF the blend face

FFOrdinaryEBFCondition

edge blend inside a chain: 2 spring edges + a boundary of 2 cross edges (or 1 cross + 1 terminating)

KEV each boundary edge, then KEF the blend face; beside a cliff over a step on its floor, keep the cross edge to the cliff and join the floor instead

FFNotchedEBFCondition

edge blend inside a chain between 2 cross edges, whose border with one support face is interrupted by a recess cut into that face or a boss standing on it: the walls of the recess (or boss) end on the blend along terminating edges

KEV each cross edge, then join the blend face to the notched support face, inside which the recess (or boss) becomes a feature of its own; removed only together with its chain (chain_only: refused alone before any edit)

FFOrdinaryVBFCondition

a vertex blend

KFMV — collapse the patch to its corner vertex

CliffCondition

face-edge blend: 1 spring edge to a support face, 1 cliff edge to the face beyond it, which continues the blend within 15° of tangent, and terminating edges at its ends (a round meeting the far face at a sharp angle, as one riding over a step, is not taken here: see CliffOverAStepCondition)

KEV each terminating edge, then KEF the blend face, keeping the spring edge

CliffOverAStepCondition

a cliff blend in the sense of Cui, Gao & Zhou: a cylindrical round on the edge of a step no higher than its radius, consuming the step’s side; the support and the face beyond the straight cliff edge are parallel planes facing the same way. Closed by terminating edges, or, for a step as high as the radius inside a ring of rounds about a boss, between 2 cross edges whose rounds each have a support on the riser’s plane, the floor

substitute the blend face by the riser, a plane through the cliff edge square to the support, and rebuild its edges on it. In a ring, the rounds across the cross edges keep those edges and join the floor, the chain rebuild lays the edges straight, and the riser is merged into the floor; removed only together with its chain (chain_only)

FFFullRoundCondition

blend running all the way round a periodic surface: 2 closed spring edges and no cross or terminating edge

KEV each seam of the blend surface, then KEF the blend face

Each condition also declares exactly which edges to rebuild afterwards and which vertices stay frozen, so normalization never has to guess.

3. Topological edit#

The condition’s recipe runs on a shared EulerEngine (see Euler Operators). For an isolated fillet this is, in essence:

engine = EulerEngine(solid)
condition = recognize_condition(aag, blend_face_index)
condition.suppress(engine)   # KEV + KEV + KEF, staged with history actualize

After this step the blend face is gone and the two support faces are topologically welded along the surviving spring edge — but that edge still carries its old curve.

4. Geometry normalization#

normalize_edges (single blend) and normalize_chain_edges (whole chain) rebuild only the declared affected edges:

  • The survivor (sharp) edge becomes the intersection of its two support surfaces. For two planar supports this is their intersection line; for curved supports it is the intersection branch nearest the old edge.

  • A moved corner is recomputed as that curve met with the declared terminating face, or — in a chain — as the triple point where two restored edges’ carrier surfaces meet. A corner the suppression did not move keeps its position. If the recomputed point lands on a vertex already present in the model, that existing vertex is reused rather than a coincident-but-distinct one minted — keeping the restored edges welded to the surrounding topology.

  • A setback side edge that collapses is removed. When a blend abuts an existing model vertex, one of the support faces’ short side edges (its length was the blend radius) shrinks to zero as the sharp edge is restored — its moved corner snaps onto its other endpoint. Such an edge is dropped (an in-normalizer kill-edge) instead of rebuilt, welding the corner to that vertex, which is exactly what direct face removal produces.

  • Parametric curves are re-derived on each host face and a final same-parameter / shape-fix pass closes the model.

If any reconstruction is ill-posed (surfaces that do not intersect, a corner that collapses to zero length), normalization raises and the driver rolls the suppression back — keeping the blend is always preferable to emitting a broken solid (Golden Rule: no silent failures).

Public entry points#

from volmdlr_tools.shape_editing.euler.suppressor import suppress_blend, suppress_blend_chain

# Suppress a single recognized blend face (0-based index, AAG with recognition already run):
result = suppress_blend(solid, blend_face_index, aag)

# Suppress a whole chain at once (edge blends are consumed before vertex blends):
result = suppress_blend_chain(solid, chain_face_indices, aag)

Taking every blend off a model: IncrementalBlendRemover#

IncrementalBlendRemover takes the blends off a whole model removal by removal — a chain, or with engine="face_removal" a network of chains — recognizing them again on the model left after each removal, and keeps the history of what came off.

from volmdlr_tools.shape_editing.defeaturing import IncrementalBlendRemover

remover = IncrementalBlendRemover(check_validity=True, engine="euler_then_face_removal", keep={"isolated"})
remover.perform(solid)
result = remover.result
for refusal in remover.refusals:
    print(refusal.reason, refusal.face_count, refusal.message)

engine chooses how the blends come off:

  • "euler" (the default) — the topological suppression described above: the faces around a blend are extended over the gap it leaves.

  • "euler_then_face_removal" — the same, then each chain still left is offered to whole-face removal. That result is kept only when the model has fewer faces, no more defects than the input, and every face the chain did not hold: whole-face removal can fill a pocket together with the blends around it, and such a result is refused.

  • "face_removal" — whole-face removal alone. Chains whose faces meet, directly or through another chain — blends of several radii joined at corners, or a blend running onto another — make a network, and a chain that is part of one is taken off with the whole network, in one operation: one chain at a time leaves its neighbours rounding edges that no longer exist. The network’s result is kept only when the model has fewer faces, every face the network did not hold, and no more defects than the input (with check_validity) or than the model the network was taken off (without). A network not kept is not handed on again in the same sweep, and its chains are retried one at a time. When the network was refused, without check_validity, for adding defects, each of its chains is held to the same rule: kept only with no more defects than the model it was taken off (an "adds_defects" refusal otherwise), so that one chain at a time cannot keep a result the network was refused for. A network the operator refused, or that took other faces, leaves its chains judged as any other. Each chain left gives a refusal of its own. A network removed counts as many chains as it holds in suppressed_chains_count.

keep names the blends to leave in place, a chain being left when every face of it is of the kind: "isolated", a standalone rounded corner of a profile; "isolable", a blend that reduces to a rounded corner of a profile; or "half_round", an edge blend turning by 170 degrees or more between two faces that face opposite ways, such as the rounded end of a slot, straight, drafted or running along an arc. All three are better re-created with the profile than removed as fillets: a half round even has no sharp edge to give back, its two sides never meeting. A blend kept is offered to no engine, and is not listed in refusals.

With check_validity=True, a removal is kept only when the model left has no more defects than the input had: none, for a sound input. A removal that leaves the model unsound waits until nothing else comes off, since a later removal in the same network of blends may mend it. It is then taken, and it and the removals that followed it are undone, its faces never tried again, if the model does not get back to as few defects as the input had. An input that already fails the validity check is returned no worse than it came, not mended. Without check_validity, every removal that takes a face off is kept, but for a network and the chains of a network refused for adding defects (see "face_removal" above).

A corner the engine restores may have to slide along its curve past a vertex at the other end of an edge, which the topology it set beforehand leaves no room for: the engine then refuses the chain, naming that vertex. When the shape does not need the vertex — the end of the seam of a face closing on itself, such as the side of a round boss, or a vertex merely splitting an edge in two — the remover takes it away without moving any point of the shape, the seam being laid elsewhere on the same surface (a cylinder, a cone or a torus, standing out or cut in), and tries the chain again. A vertex that cannot be taken away is listed in refusals with the reason it is kept.

refusals lists, in the order it happened, why blends were left in place or a removal was not kept: each entry is a BlendRefusal with its reason (the engine refused the chain, nothing came off, the model was left with more defects, whole-face removal refused the chain or took other faces with it, removals were undone, the input already failed the validity check, the run reached its limit, …), the number of faces concerned and a message. "validity_gate" is a result with more defects than the input, under check_validity. Four reasons are about a network taken off whole: "network_refused" (whole-face removal refused it), "network_no_valid_result" (it left no smaller model, or, under check_validity, one with more defects than the input), "network_adds_defects" (without check_validity, it left more defects than the model it was taken off) and "network_took_other_faces" (other faces of the part went with it). These leave no blend by themselves, its chains being retried one at a time: their leaves_blends is false, and they are not in warnings. A chain of a network refused for adding defects that adds defects in turn is refused as "adds_defects", and left. The Euler engine itself refuses a chain by raising a BlendSuppressionError, which BlendChainRemover.refusal holds, its reason saying why in a word: among others kept_cross_edge when a round a cliff over a step counts on to keep a cross edge is not in the chain or would have to join two floors, and floor_merge when the riser put in a cliff’s place could not be merged into its floor. BRepDefeaturerProcessor(euler_blend_removal=True) runs the remover with engine="euler_then_face_removal", keep={"half_round"} and check_validity=True, and lists the same in blend_removal_refusals.

Current status and known limitations#

The Euler path is a proof-of-mechanism and does not yet reach the robustness reported in the papers. Known gaps:

  • Carrier coverage. Geometry normalization is implemented for planar carriers and simple curved carriers (single-branch surface intersections). Multi-branch and tangential curved cases are only partially handled.

  • Topological cases. Only the seven conditions above are registered. Blends whose local topology does not match — overflow configurations, or blends whose supports share no direct edge — are not recognized and are left in place.

  • No variable-radius reconstruction. Variable-radius and spherical-corner reconstructions beyond the vertex-blend collapse are not yet implemented.

When the engine declines a blend, that suppression is atomic: it rolls back to the solid it was given. Across a whole run, IncrementalBlendRemover with check_validity=True keeps a removal only when the model left is no worse than the input, and undoes a run of removals that does not get back there; without it, a removal that takes faces off is kept even when the model it leaves is unsound. Every blend left in place is listed in refusals.

See also#

See Also#