StlNormals class final
How a facet's normal is chosen.
A class with constants rather than an enum, so a value added in a minor
release does not break a switch written against it: name is what a
file or a snapshot writes, and byName reads it back.
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
byName(
String name) → StlNormals? -
The value called
name, or null for a name this version does not know, which is what a file written by a later version can carry.
Constants
- fromFile → const StlNormals
- The facet's own normal record — unless it is the zero vector, which a surprising number of exporters write instead of computing one, in which case this falls back to the triangle's own cross product for that facet alone rather than leaving a NaN in the mesh.
- recomputed → const StlNormals
- Always the cross product of the triangle's own edges, ignoring whatever the file recorded. STL has no shared vertices to smooth across, so this is never a worse answer than the file's own normal and is sometimes a better one — a mesh assembled by hand or converted through a lossy tool can have facets whose recorded normal simply disagrees with its winding.
-
values
→ const List<
StlNormals> - Every value this version names, in declaration order. A later version appends; nothing is removed or renamed within a major.