Class Facet
A representation of a facet which is defined by its location (Vertices) and directionality (Normal).
public class Facet : IEquatable<Facet>, IEnumerable<Vertex>, IEnumerable
- Inheritance
-
Facet
- Implements
- Inherited Members
- Extension Methods
Constructors
Facet()
Creates a new, empty Facet.
public Facet()
Facet(E, IEnumerable<Vertex>, ushort)
public Facet(E normal, IEnumerable<Vertex> vertices, ushort attributeByteCount)
Parameters
normalEverticesIEnumerable<Vertex>attributeByteCountushort
Properties
AttributeByteCount
Additional data attached to the facet.
public ushort AttributeByteCount { get; set; }
Property Value
Remarks
Depending on the source of the STL, this could be used to indicate such things as the color of the Facet. This functionality only exists in binary STLs.
Normal
Indicates the directionality of the Facet.
public E? Normal { get; set; }
Property Value
Vertices
Indicates the location of the Facet.
public IList<Vertex> Vertices { get; set; }
Property Value
Methods
Equals(Facet?)
Determines whether or not this instance is the same as the other instance.
public bool Equals(Facet? other)
Parameters
Returns
Equals(object?)
public override bool Equals(object? other)
Parameters
otherobject
Returns
GetEnumerator()
Iterates through the Vertices collection.
public IEnumerator<Vertex> GetEnumerator()
Returns
GetHashCode()
public override int GetHashCode()
Returns
Read(BinaryReader)
Reads a single Facet from the reader.
public static Facet Read(BinaryReader reader)
Parameters
readerBinaryReaderThe reader which contains a Facet to be read at the current position.
Returns
Read(StreamReader)
Reads a single Facet from the reader.
public static Facet Read(StreamReader reader)
Parameters
readerStreamReaderThe reader which contains a Facet to be read at the current position.
Returns
ToString()
Returns the string representation of this Facet.
public override string ToString()
Returns
Write(BinaryWriter)
Writes the Facet as binary to the writer.
public void Write(BinaryWriter writer)
Parameters
writerBinaryWriterThe writer to which the Facet will be written at the current position.
Write(StreamWriter)
Writes the Facet as text to the writer.
public void Write(StreamWriter writer)
Parameters
writerStreamWriterThe writer to which the Facet will be written at the current position.