mirror of
https://github.com/bherbruck/solidcraft.git
synced 2026-11-03 18:45:55 +00:00
kernel: pcurve fits start from four samples per span
Each sample of an intersection curve is one of truck's double projections (about 0.13 ms in a release build), and a fit evaluates the curve at every sample and halfway between. Starting from four samples a span instead of eight halves that; the checks stay at eight points a span, and the knots at the curve's own breaks already carry the shape. The cylinder cut by a tilted box now takes 70 ms at 1e-3 mm and 149 ms at 1e-5 mm for all its faces (release), from 183 and 638 ms. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QWhMwdqJYQKQq8RCLSL1LT
This commit is contained in:
@@ -60,7 +60,7 @@ const MAX_SPANS: usize = 4000;
|
||||
/// Refinement rounds of one fit.
|
||||
const MAX_ROUNDS: usize = 40;
|
||||
/// Samples per knot span when a fit starts.
|
||||
const PER_SPAN: usize = 8;
|
||||
const PER_SPAN: usize = 4;
|
||||
/// Spans a fit starts from (more where the curve has its own knots).
|
||||
const START_SPANS: usize = 4;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user