pub struct SegmentOptions {
pub deflection_angle_deg: f64,
pub min_region_triangles: usize,
pub fit_tolerance: f64,
pub normal_tolerance_deg: f64,
pub planar_extraction_angle_deg: f64,
pub planar_min_area_percent: f64,
pub weld_tolerance: f64,
}Expand description
Options for segment_mesh_faces. All tolerances are dimensionless or in
degrees; distances derive from the region/mesh scale so the segmentation
is size-invariant.
Fields§
§deflection_angle_deg: f64Region-growing gate: triangles on either side of an edge join the same smooth region when their dihedral (normal-to-normal) angle is below this threshold, in degrees.
min_region_triangles: usizeRegions with fewer triangles than this are not fitted (they stay
Freeform). The app used 8 for noisy scanned meshes; the default 1
fits everything.
fit_tolerance: f64Carrier acceptance: maximum vertex deviation from the fitted carrier as a fraction of the region’s bounding-box diagonal.
normal_tolerance_deg: f64Carrier acceptance: maximum angle between a triangle normal and the carrier normal at the triangle centroid, in degrees.
planar_extraction_angle_deg: f64Refinement pass: a triangle joins a seed plane only when its normal is within this many degrees of the seed normal (and its vertices lie within the distance gate of the seed plane).
planar_min_area_percent: f64Refinement pass: an extracted planar group is kept only when its area is at least this percentage of its parent region’s area (mirrors the app’s planar minimum-area percent).
weld_tolerance: f64Vertex weld tolerance; <= 0 derives it from the bounding-box
diagonal (diagonal · 1e-6), matching mesh_to_faceted_brep.
Trait Implementations§
Source§impl Clone for SegmentOptions
impl Clone for SegmentOptions
Source§fn clone(&self) -> SegmentOptions
fn clone(&self) -> SegmentOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more