You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added functionality to abstract the reading of text/binary STLs (see STLDocument.Read) (fixes#2); commented the codebase (fixes#3); binary STLs now write the AttributeByteCount value for facets (fixes#4); added functionality to convert an STL document between text and binary format (see STLDocument.CopyAsText and STLDocument.CopyAsBinary) (fixes#5).
/// <summary>A representation of a facet which is defined by its location (<see cref="Vertices"/>) and directionality (<see cref="Normal"/>).</summary>
/// <summary>Indicates the directionality of the <see cref="Facet"/>.</summary>
13
15
publicNormalNormal{get;set;}
14
-
publicList<Vertex>Vertices{get;set;}
16
+
17
+
/// <summary>Indicates the location of the <see cref="Facet"/>.</summary>
18
+
publicIList<Vertex>Vertices{get;set;}
19
+
20
+
/// <summary>Additional data attached to the facet.</summary>
21
+
/// <remarks>Depending on the source of the STL, this could be used to indicate such things as the color of the <see cref="Facet"/>. This functionality only exists in binary STLs.</remarks>
15
22
publicintAttributeByteCount{get;set;}
16
23
24
+
/// <summary>Creates a new, empty <see cref="Facet"/>.</summary>
17
25
publicFacet()
18
26
{
19
27
this.Vertices=newList<Vertex>();
20
28
}
21
29
30
+
/// <summary>Creates a new <see cref="Facet"/> using the provided parameters.</summary>
31
+
/// <param name="normal">The directionality of the <see cref="Facet"/>.</param>
32
+
/// <param name="vertices">The location of the <see cref="Facet"/>.</param>
33
+
/// <param name="attributeByteCount">Additional data to attach to the <see cref="Facet"/>.</param>
/// <summary>Reads a single <see cref="Normal"/> from the <paramref name="reader"/>.</summary>
20
+
/// <param name="reader">The reader which contains a <see cref="Normal"/> to be read at the current position</param>
22
21
publicstaticNormalRead(StreamReaderreader)
23
22
{
24
23
returnNormal.FromVertex(Vertex.Read(reader));
25
24
}
26
25
26
+
/// <summary>Reads a single <see cref="Normal"/> from the <paramref name="reader"/>.</summary>
27
+
/// <param name="reader">The reader which contains a <see cref="Normal"/> to be read at the current position</param>
27
28
publicstaticNormalRead(BinaryReaderreader)
28
29
{
29
30
returnNormal.FromVertex(Vertex.Read(reader));
30
31
}
31
32
33
+
/// <summary>Converts the <paramref name="vertex"/> to a normal.</summary>
34
+
/// <remarks>This does nothing more than copy the X, Y and Z coordinates of the <paramref name="vertex"/> into a new <see cref="Normal"/> instance.</remarks>
35
+
/// <param name="vertex">The <see cref="Vertex"/> to be converted into a <see cref="Normal"/>.</param>
36
+
/// <returns>A <see cref="Normal"/> or null if the <paramref name="vertex"/> is null.</returns>
32
37
publicstaticNormalFromVertex(Vertexvertex)
33
38
{
34
39
if(vertex==null)
@@ -42,6 +47,7 @@ public static Normal FromVertex(Vertex vertex)
42
47
};
43
48
}
44
49
50
+
/// <summary>Returns the string representation of this <see cref="Normal"/>.</summary>
<description>This library facilitates the reading and writing of Stereo Lithograph (STL) files.</description>
14
-
<releaseNotes>This is the initial release which includes all basic features required to read/write STL files.</releaseNotes>
15
-
<copyright>Copyright 2013 Quantum Concepts Corporation, released under the GNU Affero General Public License./</copyright>
14
+
<releaseNotes>Added functionality to abstract the reading of text/binary STLs (see STLDocument.Read); commented the codebase; binary STLs now write the AttributeByteCount value for facets; added functionality to convert an STL document between text and binary format (see STLDocument.CopyAsText and STLDocument.CopyAsBinary).</releaseNotes>
15
+
<copyright>Copyright 2014 Quantum Concepts Corporation, released under the GNU Affero General Public License./</copyright>
0 commit comments