brep, kernel: a face's side is read on its NURBS form (#4149)

A shell's `forward` is about the surface the face's (u, v) are on, its NURBS form when it has
one, which may run against its cylinder, cone, sphere or torus. The kernel read it against the
analytic surface, so a fillet's bore whose form runs the other way was a shaft and an M10 thread
was refused in its 8.5 mm hole. `Face::form_turns` says when the form turns the normal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
jyvikoandClaude Opus 5.5 committed 2026-10-27 02:28:51 -04:00
1 parent 768034bbb6
commit f070eee2b6
2 files changed
+34 -3

No files matched your search

+2 -1
View File
@@ -37,7 +37,8 @@ fn axes(f: &Frame) -> Option<(Vec3, Vec3)> {
/// uses its natural side.
pub(crate) fn surf_of(b: &Brep, face: usize) -> Option<Surf> {
let f = b.faces.get(face)?;
let out = crate::assemble::natural_out(b, face)?;
// `forward` is about the face's NURBS form, which may run against its surface.
let out = crate::assemble::natural_out(b, face)? != f.form_turns()?;
let sign = if out { 1.0 } else { -1.0 };
Some(match &f.surface {
Surface::Plane { origin, u_axis, v_axis } => {