feat(tess): use angular sampling

Route curve, hatch, sweep, loft, surface, edge, and isoline tessellation through the shared kernel policy.
This commit is contained in:
Hakan Seven committed 2026-08-10 12:12:16 +03:00
1 parent f607422c9d
commit 96be8214f9
21 files changed
+158 -767

No files matched your search

+7 -6
View File
@@ -17,16 +17,17 @@ use acadrust::kernel::brep::{self, Body};
use crate::scene::model::mesh_model::{MeshLodSet, MeshModel};
/// How far a triangle may sit from the surface it lies on. A drawing is
/// measured in millimetres, and a twentieth of one is past what a screen
/// resolves at any sane zoom.
const SAG: f64 = 0.05;
/// What counts as the same point when the kernel checks a body over.
const TOL: f64 = 1e-9;
fn tessellation(body: &Body) -> brep::mesh::BodyMesh {
brep::mesh::tessellate(body, brep::mesh::TessellationTolerance::new(SAG, TOL))
brep::mesh::tessellate(
body,
brep::mesh::TessellationTolerance::new(
acadrust::kernel::tessellation::DEFAULT_ANGLE,
TOL,
),
)
}
/// Axis-aligned box from its center and full extents.