Skip to main content

validate_solid

Function validate_solid 

Source
pub fn validate_solid(
    topo: &Topology,
    solid: SolidId,
) -> Result<ValidationReport, OperationsError>
Expand description
  1. Euler-Poincaré: V - E + F = 2(1 - g) for genus-g closed solid
  2. Manifold edges: each edge shared by exactly 2 faces
  3. Boundary edges: no edge shared by only 1 face (open shell)
  4. Degenerate faces: each face has at least 3 vertices
  5. Face normal consistency: normals should be non-zero
  6. Wire closure: every wire forms a closed loop
  7. Degenerate face area: near-zero polygon area warning for planar faces
  8. Zero-length edges: edges with coincident start/end vertices
  9. Empty wires: wires with no edges
  10. Shell connectivity: all faces reachable from any face
  11. Redundant faces: same face ID appearing twice in shell
  12. Edge vertex consistency: edge vertices belong to the solid

§Errors

Returns an error if topology lookups fail.