From 8f31c088f411ed0ae8d1dca8b87f7f670655ae99 Mon Sep 17 00:00:00 2001 From: jyviko <2501648+jyviko@users.noreply.github.com> Date: Wed, 21 Oct 2026 01:55:38 -0400 Subject: [PATCH] brep: a budget of 4,000,000 items, pcurves included Schema 4 counts every pcurve's control points as items, which schema 3 had none of, so a body that fitted the old 1,000,000 no longer does (a STEP plate of 50k faces). The binary envelope's own caps on bytes, values and entries per collection still bound a body. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01QWhMwdqJYQKQq8RCLSL1LT --- crates/geom/src/brep.rs | 2 +- docs/native-brep.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/geom/src/brep.rs b/crates/geom/src/brep.rs index 1d13d4270..b5f59d2cc 100644 --- a/crates/geom/src/brep.rs +++ b/crates/geom/src/brep.rs @@ -19,7 +19,7 @@ mod topology; pub use curve2::Curve2; pub const VERSION: u32 = 4; -pub const MAX_ITEMS: usize = 1_000_000; +pub const MAX_ITEMS: usize = 4_000_000; pub const MAX_SHELLS: usize = 1024; const MAX_DEPTH: usize = 16; const TAU: f64 = std::f64::consts::TAU; diff --git a/docs/native-brep.md b/docs/native-brep.md index d1b249441..ebadb064c 100644 --- a/docs/native-brep.md +++ b/docs/native-brep.md @@ -171,7 +171,7 @@ by lifting it; everything else is a cubic B-spline fitted within the tolerance. ## Validation and trust `Brep::validate` checks structure and resources without a kernel. It caps 1,024 -shells, 1,000,000 combined topology and geometry items, geometry nesting at 16, +shells, 4,000,000 combined topology and geometry items (pcurve control points included), geometry nesting at 16, spline degree at 16 and control points per spline direction at 4,096. Numbers must be finite and at most 1e12 in magnitude. It checks knot order, active spline domains, multiplicities, rectangular grids, positive rational weights,