Test for 0022778: Bug in BRepMesh
[occt.git] / src / Intf / Intf_ToolPolyhedron.cdl
1 -- Created on: 1991-09-18
2 -- Created by: Didier PIFFAULT
3 -- Copyright (c) 1991-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
5 --
6 -- The content of this file is subject to the Open CASCADE Technology Public
7 -- License Version 6.5 (the "License"). You may not use the content of this file
8 -- except in compliance with the License. Please obtain a copy of the License
9 -- at http://www.opencascade.org and read it completely before using this file.
10 --
11 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13 --
14 -- The Original Code and all software distributed under the License is
15 -- distributed on an "AS IS" basis, without warranty of any kind, and the
16 -- Initial Developer hereby disclaims all such warranties, including without
17 -- limitation, any warranties of merchantability, fitness for a particular
18 -- purpose or non-infringement. Please see the License for the specific terms
19 -- and conditions governing the rights and limitations under the License.
20
21
22
23 generic class ToolPolyhedron from Intf (Polyhedron as any)
24
25     ---Purpose: Describes the signature  of  a polyedral surface with  only
26     --          triangular facets and the information  necessary to compute
27     --          the interferences.
28
29
30 uses    XYZ from gp,
31         Pnt from gp,
32         Box from Bnd,
33         HArray1OfBox from Bnd
34
35
36 raises  OutOfRange from Standard
37
38
39 is  Bounding       (myclass; thePolyh : Polyhedron)
40                     returns Box from Bnd;
41     ---Purpose: Returns the bounding box of the ToolPolyhedron.
42
43     ComponentsBounding
44                    (myclass; thePolyh : Polyhedron)
45                     returns HArray1OfBox from Bnd;
46     ---Purpose: Returns the array of boxes. The box <n> corresponding 
47     --          to the triangle <n>.
48
49
50     DeflectionOverEstimation
51                    (myclass; thePolyh : Polyhedron)
52                     returns Real from Standard;
53     ---Purpose: Returns the tolerance of the polygon.
54
55
56 -- Structure needings :
57
58     NbTriangles    (myclass; thePolyh : Polyhedron) 
59                     returns Integer from Standard;
60     ---Purpose: Returns the number of triangles in this polyedron.
61
62
63     Triangle       (myclass; thePolyh : Polyhedron;
64                     Index     : in Integer from Standard;
65                     P1,P2,P3  : out Integer from Standard)
66                     raises OutOfRange from Standard;
67     ---Purpose: Returns the indices  of  the 3 points of  the triangle of
68     --          address Index in the ToolPolyhedron.
69
70
71     Point          (myclass; thePolyh : Polyhedron;
72                     Index : in Integer)
73                     returns Pnt from gp
74                     raises OutOfRange from Standard;
75     ---Purpose: Returns the point of index i in the polyedron.
76
77
78     TriConnex      (myclass; thePolyh : Polyhedron;
79                     Triang       : in Integer;
80                     Pivot,Pedge  : in Integer;
81                     TriCon       : out Integer;
82                     OtherPedge   : out Integer)
83                     returns Integer
84                     raises OutOfRange from Standard;
85     ---Purpose: Returns  the  triangle <Tricon> connected  to  the triangle
86     --          <Triang> by  the edge <Pivot><Pedge>.   The  third point of
87     --          the connected triangle is returned in <OtherPedge> (Used to
88     --          turn  around a vertex).   When the edge  <Pivot><Pedge>  is
89     --          free  (no  connected triangle) <Tricon> is  null.   In this
90     --          case the function returns the triangle on the free bound of
91     --          the polyhedron connected to <Triang> by vertex <Pivot>.
92
93
94
95 end ToolPolyhedron;