b311480e |
1 | -- Created on: 1995-09-21 |
2 | -- Created by: Philippe GIRODENGO |
3 | -- Copyright (c) 1995-1999 Matra Datavision |
973c2be1 |
4 | -- Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
5 | -- |
973c2be1 |
6 | -- This file is part of Open CASCADE Technology software library. |
b311480e |
7 | -- |
d5f74e42 |
8 | -- This library is free software; you can redistribute it and/or modify it under |
9 | -- the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
10 | -- by the Free Software Foundation, with special exception defined in the file |
11 | -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
12 | -- distribution for complete text of the license and disclaimer of any warranty. |
b311480e |
13 | -- |
973c2be1 |
14 | -- Alternatively, this file may be used under the terms of Open CASCADE |
15 | -- commercial license or contractual agreement. |
7fd59977 |
16 | |
17 | class MeshDomain from StlMesh inherits TShared from MMgt |
18 | |
19 | ---Purpose: A mesh domain is a set of triangles defined with |
ff8178ef |
20 | -- three geometric vertices and a given orientation. |
21 | -- The mesh domain has its own deflection. |
22 | -- Internal class used to classify the triangles of each domain. |
7fd59977 |
23 | uses |
24 | SequenceOfXYZ from TColgp, |
25 | SequenceOfMeshTriangle from StlMesh |
26 | |
27 | |
28 | raises |
29 | |
30 | NegativeValue from Standard, |
31 | NullValue from Standard |
32 | |
33 | is |
34 | |
6e33d3ce |
35 | Create returns MeshDomain; |
7fd59977 |
36 | ---Purpose: The mesh deflection is defaulted to Confusion from |
37 | -- package Precision. |
38 | |
39 | |
6e33d3ce |
40 | Create (Deflection : Real) returns MeshDomain |
7fd59977 |
41 | raises NegativeValue, |
42 | ---Purpose: Raised if the deflection is lower than zero |
43 | NullValue; |
44 | ---Purpose: Raised if the deflection is lower than Confusion |
45 | -- from package Precision |
46 | |
47 | |
48 | AddTriangle (me : mutable; V1, V2, V3 : Integer; Xn, Yn, Zn : Real) |
49 | returns Integer |
50 | ---Purpose: Build a triangle with the triplet of vertices (V1, |
51 | -- V2, V3). This triplet defines the indexes of the |
52 | -- vertex in the current domain The coordinates Xn, |
53 | -- Yn, Zn defines the normal direction to the |
54 | -- triangle. Returns the range of the triangle in |
55 | -- the current domain. |
56 | is virtual; |
57 | |
58 | |
59 | AddVertex (me : mutable; X, Y, Z : Real) returns Integer |
60 | ---Purpose: Returns the range of the vertex in the current |
61 | -- domain. |
62 | is virtual; |
63 | |
64 | |
65 | AddOnlyNewVertex (me : mutable; X, Y, Z : Real; IsNew : in out Boolean) |
66 | returns Integer |
67 | ---Purpose: Returns the range of the vertex in the current |
68 | -- domain. The current vertex is not inserted in the |
69 | -- mesh if it already exist. |
70 | is virtual; |
71 | |
72 | |
73 | Deflection (me) returns Real is virtual; |
74 | ---C++: inline |
75 | |
76 | |
77 | NbTriangles (me) returns Integer is virtual; |
78 | ---Purpose: Number of triangles in the mesh. |
79 | ---C++: inline |
80 | |
81 | |
82 | NbVertices (me) returns Integer is virtual; |
83 | ---Purpose: Number of vertices in the mesh. |
84 | ---C++: inline |
85 | |
86 | |
87 | Triangles (me) returns SequenceOfMeshTriangle is virtual; |
88 | ---Purpose: Returns the set of triangles of the current mesh domain |
89 | ---C++: return const & |
90 | ---C++: inline |
91 | |
92 | |
93 | |
94 | Vertices (me) returns SequenceOfXYZ is virtual; |
95 | ---Purpose: Returns the coordinates of the vertices of the |
96 | -- mesh domain of range <DomainIndex>. {XV1, YV1, |
97 | -- ZV1, XV2, YV2, ZV2, XV3,.....} |
98 | ---C++: return const & |
99 | ---C++: inline |
100 | |
101 | |
102 | fields |
103 | |
104 | deflection : Real; |
105 | nbVertices : Integer; |
106 | nbTriangles : Integer; |
107 | vertexCoords : SequenceOfXYZ; |
108 | trianglesVertex : SequenceOfMeshTriangle; |
109 | |
110 | end MeshDomain; |
111 | |
112 | |