Vixen
02b45cc4
csharp
public readonly record struct MeshReport

Everything true of a mesh that a tool might need to know before acting on it.

Read the guide page for this →

Remarks

A report, not a verdict, and doc 24's D2 is the argument. A half-edge structure cannot represent a non-manifold edge, so a kernel built on one refuses the ordinary blockout case — a wall meeting a floor in a T, a boolean result, an imported mesh with a stray internal face. This one represents them and says where they are, which is what lets a tool answer "this operation needs a manifold edge" instead of producing something wrong.

⚠ None of these is an error on its own. A block-out under construction is boundary edges all the way down; a wall built by mirroring is non-manifold where the halves meet; an inside-out face is a mistake a designer made and can undo. What is an error is a mesh whose tables disagree with each other — a corner naming no position, a face of two corners — and those are refused at the door rather than reported here.

This is the assertion helper doc 24's testing table calls the highest-value item. Every operation's tests run it afterwards, because a mesh operation that corrupts the edge table produces geometry that looks correct and fails three operations later, in a mesh a designer has spent an hour on, with no way to attribute it.

Fields and properties (9)

  • public IReadOnlyList<int> NonManifold

    Edges with more than two faces.

  • public IReadOnlyList<int> Boundary

    Edges with one — the open rim of an unclosed surface.

  • public IReadOnlyList<int> Reversed

    Edges whose two faces walk them the same way, so one of them is inside out.

  • public IReadOnlyList<int> Degenerate

    Faces with no area.

  • public int Orphans

    Positions no face uses.

  • public bool IsManifold

    Whether every edge has one face or two.

  • public bool IsClosed

    Whether the surface has no rim: every edge shared by exactly two faces.

  • public bool IsConsistent

    Whether every pair of neighbours agrees which way is out.

  • public bool IsSolid

    Whether the mesh is tidy: closed, consistent, no slivers and nothing left over.

Methods (2)

  • public MeshReport(IReadOnlyList<int> NonManifold, IReadOnlyList<int> Boundary, IReadOnlyList<int> Reversed, IReadOnlyList<int> Degenerate, int Orphans)

    Everything true of a mesh that a tool might need to know before acting on it.

  • public string? Describe()

    What is wrong, in a sentence, or when the answer is nothing.

Used by (11)

  • EditMeshVixen.Geometry
  • EditMeshTestsVixen.Geometry.Tests
  • MeshBooleanPropertyTestsVixen.Geometry.Tests
  • MeshBooleanTestsVixen.Geometry.Tests
  • MeshOperationTestsVixen.Geometry.Tests
  • MeshPropertyTestsVixen.Geometry.Tests
  • MeshShapeTestsVixen.Geometry.Tests
  • BlockoutBooleanTestsVixen.Editor.Blockout.Tests
  • BlockoutCreateTestsVixen.Editor.Blockout.Tests
  • BlockoutGeometryTestsVixen.Editor.Blockout.Tests
  • EditMeshSceneTestsVixen.Editor.SceneView.Tests