3 -- Created: Mon Mar 6 09:38:50 1995
4 -- Author: Laurent PAINNOT
6 ---Copyright: Matra Datavision 1995
12 ---Purpose: This package provides classes and services to
15 -- * 3D triangular polyhedrons.
21 -- * Tools to dump, save and restore those objects.
35 ---Purpose: A triangle is a triplet of integers (indices of
38 class Array1OfTriangle
39 instantiates Array1 from TCollection(Triangle from Poly);
41 class HArray1OfTriangle
42 instantiates HArray1 from TCollection(Triangle from Poly,
43 Array1OfTriangle from Poly);
46 ---Purpose: A Triangulation is a 3D polyhedron made of
47 -- triangles. It is made of a nodes which are
48 -- indexed. Nodes have a 3d value and a 2d value.
49 -- Triangles are triplet of node indices.
51 -- This is a Transient class.
55 ---Purpose: A Polygon3D is made of indexed nodes.
56 -- Nodes have a 3d value.
59 ---Purpose: A Polygon2D is made of indexed nodes.
60 -- Nodes have a 2d value.
62 class PolygonOnTriangulation;
63 ---Purpose: A polygonOnTriangulation is made of node indices
64 -- referencing a triangulation.
68 -- Tools to use triangulations
72 ---Purpose: Computes and stores the link from nodes to
73 -- triangles and from triangles to neighbouring
75 -- This tool is obsolete, replaced by Poly_CoherentTriangulation
78 -- Data types for the Coherent Triangulation data model
80 imported CogerentTriangulation;
81 imported CoherentTriangle;
82 imported CoherentNode;
83 imported CoherentLink;
84 imported CoherentTriPtr;
85 imported ListOfTriangulation;
88 ---Purpose: Algorithm to make minimal loops in a graph
94 Catenate (lstTri: ListOfTriangulation from Poly)
95 returns Triangulation from Poly;
96 ---Purpose: Join several triangulations to one new triangulation object.
97 -- The new triangulation is just a mechanical sum of input
98 -- triangulations, without node sharing. UV coordinates are
99 -- dropped in the result.
101 Write(T : Triangulation from Poly;
103 Compact : Boolean = Standard_True);
105 ---Purpose: Writes the content of the triangulation <T> on the
106 -- stream <OS>. If <Compact> is true this is a "save"
107 -- format intended to be read back with the Read
108 -- method. If compact is False it is a "Dump" format
109 -- intended to be informative.
111 Write(P : Polygon3D from Poly;
113 Compact : Boolean = Standard_True);
115 ---Purpose: Writes the content of the 3D polygon <P> on the
116 -- stream <OS>. If <Compact> is true this is a "save"
117 -- format intended to be read back with the Read
118 -- method. If compact is False it is a "Dump" format
119 -- intended to be informative.
121 Write(P : Polygon2D from Poly;
123 Compact : Boolean = Standard_True);
125 ---Purpose: Writes the content of the 2D polygon <P> on the
126 -- stream <OS>. If <Compact> is true this is a "save"
127 -- format intended to be read back with the Read
128 -- method. If compact is False it is a "Dump" format
129 -- intended to be informative.
132 Dump(T : Triangulation from Poly;
133 OS : in out OStream);
134 ---Purpose: Dumps the triangulation. This is a call to the
135 -- previous method with Comapct set to False.
137 Dump(P : Polygon3D from Poly;
138 OS : in out OStream);
139 ---Purpose: Dumps the 3D polygon. This is a call to the
140 -- previous method with Comapct set to False.
142 Dump(P : Polygon2D from Poly;
143 OS : in out OStream);
144 ---Purpose: Dumps the 2D polygon. This is a call to the
145 -- previous method with Comapct set to False.
148 ReadTriangulation(IS : in out IStream)
149 returns Triangulation from Poly;
150 ---Purpose: Reads a triangulation from the stream <IS>.
152 ReadPolygon3D(IS : in out IStream)
153 returns Polygon3D from Poly;
154 ---Purpose: Reads a 3d polygon from the stream <IS>.
156 ReadPolygon2D(IS : in out IStream)
157 returns Polygon2D from Poly;
158 ---Purpose: Reads a 2D polygon from the stream <IS>.
160 ComputeNormals(Tri : Triangulation from Poly);
161 ---Purpose: Compute node normals for face triangulation
162 -- as mean normal of surrounding triangles