pub struct ShellVectorArea {Show 16 fields
pub shell: u64,
pub faces: usize,
pub closed: bool,
pub reference: Vec3,
pub trim_residual: Vec3,
pub edge_residual: Vec3,
pub edge_length: f64,
pub boundary_length: f64,
pub bar: f64,
pub quadrature_error: f64,
pub trim_closure_gap: f64,
pub edge_closure_gap: f64,
pub spans: usize,
pub spans_at_depth_limit: usize,
pub gave_up: bool,
pub face_areas: Vec<FaceVectorArea>,
}Expand description
One shell’s vector-area closure: shell_vector_areas’ per-shell verdict.
Fields§
§shell: u64§faces: usize§closed: boolEvery non-degenerate edge this shell’s coedges use is used EXACTLY
TWICE by them. ∫ n dA = 0 is a statement about a closed shell only,
so an open one is measured and reported but never flagged: its
residual is its open boundary’s own vector area, which is a fact about
the sheet rather than a defect.
reference: Vec3The point every arm is taken from — the centre of the bounding box of
the vertices this shell’s edges use. The residual is independent of it
to |R| * closure_gap (below), and a local reference is what keeps a
far-translated part’s face terms from dwarfing the number being read,
the same reason mass_properties::shell_volume_reference exists.
trim_residual: Vec3Σ_faces (1/2) ∮ (r − R) × dr over the TRIMS. Exactly zero on a
sound closed shell, and otherwise the sum of every face’s departure
from the edges it shares.
edge_residual: Vec3The same sum over the EDGE curves. Every edge’s integral is computed ONCE and added with each coedge’s sign, so on a shell where every edge is used twice with opposite senses the curve terms cancel to rounding and what is left is the loops’ closing chords alone. It is therefore a BOOKKEEPING check rather than an accuracy one: it moves off zero when the shell is open, when an edge is used twice the SAME way, or when the edge curves do not meet at the vertices they share.
edge_length: f64Total arc length of the shell’s non-degenerate edges, each counted ONCE.
boundary_length: f64Total arc length walked by the faces’ loops — 2 * edge_length on a
closed shell.
bar: f64The comparand: PCURVE_REFINEMENT_TOLERANCE * edge_length. See the
section docs for the derivation and for why the strict bound is twice
this.
quadrature_error: f64The summed |half-vs-whole| difference at every accepted span — an OVER-estimate of this shell’s quadrature error, and the error bar the residual is read against. A residual is a measurement only while it is far above this.
trim_closure_gap: f64Total length of the chords that close the TRIM loops — how far the sampled trims fail to meet each other at the vertices they share, over the whole shell. Two trims arriving at one vertex are fitted independently, so a few 1e-9 per vertex is ordinary; the chords are integrated (they are part of the region the mass integrator’s own trim polygon bounds), so this is reported as a fact about the record rather than as an error term.
edge_closure_gap: f64The same for the EDGE loops: how far consecutive edge curves fail to
meet at their shared vertex. validate() checks each curve against
its vertex (IssueKind::CurveVertexGap); this is what the gaps are
worth to the shell’s closure.
spans: usizeSpans integrated: the pcurve’s own knot spans, cut at the surface’s knot levels, bisected to convergence, plus the edge curves’ own. The cost of the whole check is this times one eight-station rule.
spans_at_depth_limit: usizeHow many of those spans were accepted at the DEPTH LIMIT rather than
because they converged. Their last half-vs-whole difference is in
quadrature_error like any other, so the error bar stays honest, but
a shell with many of these is paying the full recursion on an
integrand the bisection cannot resolve — a kink rather than a curve —
and the cost is the symptom.
gave_up: boolThe scan ABANDONED this shell on [VECTOR_AREA_SPAN_BUDGET] with
whole faces still unread.
Its trim_residual is then a PARTIAL SUM over the faces that were
reached, and a partial sum of a boundary integral is not a smaller
version of the answer — it is the vector area of an arbitrary subset
of the shell, which on a 1004-face gear reads 6.08e+3 where the whole
shell reads 1.16e-5. Self::residual returns NaN for such a shell
so that number cannot be read as either a residual or an open
boundary’s area.
face_areas: Vec<FaceVectorArea>Per face, in record order.
Implementations§
Source§impl ShellVectorArea
impl ShellVectorArea
Sourcepub fn reading(&self) -> ClosureReading
pub fn reading(&self) -> ClosureReading
The typed outcome — what this shell’s scan actually came back with.
Sourcepub fn residual(&self) -> f64
pub fn residual(&self) -> f64
|trim_residual|, and NaN when the scan gave up on this shell:
see Self::gave_up. A partial sum is not a residual. Prefer
Self::reading, which cannot be compared by accident.
Sourcepub fn is_over_bar(&self) -> bool
pub fn is_over_bar(&self) -> bool
The predicate: a CLOSED shell whose trims enclose a vector area no fit
at the refinement floor can account for. False for a shell the scan
did not measure — ask Self::reading to tell those apart.
Sourcepub fn worst_faces(&self, count: usize) -> Vec<&FaceVectorArea>
pub fn worst_faces(&self, count: usize) -> Vec<&FaceVectorArea>
The faces that own the residual, worst departure first.
Sourcepub fn worst_face_name(&self) -> Option<String>
pub fn worst_face_name(&self) -> Option<String>
The worst face’s name, or its id when it has none.