Wave 435/509: Fillets: a curvature-continuous fillet's corners are G2 patches

1 commits, squashed; the originals stay reachable from tag archive/merge-main-develop.

- ccc690c53 jyviko: Fillets: a curvature-continuous fillet's corners are G2 patches

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DtL5M41G8Nua7HvuFPZkmJ
This commit is contained in:
jyviko
2026-10-30 06:38:21 -04:00
parent 4a0519e464
commit e58e85e3d6
13 changed files with 661 additions and 16 deletions
+9 -1
View File
@@ -3642,6 +3642,15 @@ fn blend_body(
let (mut used, mut tapered) = (None, Vec::new());
// The blended body, and the lineage of what the last blend started from.
let (nb, from) = match &f.kind {
// A curvature-continuous fillet's corners are G2 patches, whatever `corner` says: SMLib's
// own corner patch is only tangent to its rounds.
FeatureKind::Fillet { style: crate::FilletStyle::Curvature, setbacks, .. } => {
let mut corners = Vec::with_capacity(setbacks.len());
for c in setbacks {
corners.push((c.vertex.0, val(vals, &c.distance, Kind::Length)?));
}
(kernel::fillet_g2_with_g2_corners(&mb.body, edges, r, &corners)?, input)
}
FeatureKind::Fillet { corner, setbacks, .. } if matches!(corner, crate::FilletCorner::G2) || !setbacks.is_empty() => {
// Each setback: its corner's vertex and its distance.
let mut corners = Vec::with_capacity(setbacks.len());
@@ -3653,7 +3662,6 @@ fn blend_body(
crate::FilletCorner::Rolling => (kernel::fillet_setback(&mb.body, edges, r, &corners)?, input),
}
}
FeatureKind::Fillet { style: crate::FilletStyle::Curvature, .. } => (kernel::fillet_g2(&mb.body, edges, r)?, input),
FeatureKind::Fillet { style: crate::FilletStyle::Chord, .. } => (kernel::fillet_chord(&mb.body, edges, r)?, input),
FeatureKind::Fillet { style: crate::FilletStyle::Variable { radius2, start, mid, smooth }, .. } => {
let r2 = val(vals, radius2, Kind::Length)?;