9928b17c7e94735eb756916fe53ad31db78edcdc
[occt.git] / src / BRepCheck / BRepCheck.cdl
1 -- Created on: 1995-12-06
2 -- Created by: Jacques GOUSSARD
3 -- Copyright (c) 1995-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
24 package BRepCheck 
25
26         ---Purpose: This package  provides tools to check the validity
27         --          of the BRep.
28
29 uses MMgt,
30      StdFail,
31      TCollection,
32      TopAbs,
33      Adaptor3d,
34      TopoDS,
35      BRep,
36      TopTools
37
38 is
39
40     deferred class Result;   -- inherits TShared from MMgt
41     
42     class Vertex;            -- inherits Shape
43     
44     class Edge;              -- inherits Shape
45     
46     class Wire;              -- inherits Shape
47     
48     class Face;              -- inherits Shape
49     
50     class Shell;             -- inherits Shape
51     
52 --    class Solid;             -- inherits Shape
53
54     class Analyzer;
55
56
57     enumeration Status is
58       NoError,
59       
60       -- for vertices
61       InvalidPointOnCurve,
62       InvalidPointOnCurveOnSurface,
63       InvalidPointOnSurface,
64             
65       -- for edges
66       No3DCurve,
67       Multiple3DCurve,
68       Invalid3DCurve,
69       NoCurveOnSurface,
70       InvalidCurveOnSurface,
71       InvalidCurveOnClosedSurface,
72       InvalidSameRangeFlag,
73       InvalidSameParameterFlag,
74       InvalidDegeneratedFlag,
75       
76       FreeEdge,
77       InvalidMultiConnexity,
78       InvalidRange,
79       
80       
81       -- for wires
82       EmptyWire,
83       RedundantEdge,
84       SelfIntersectingWire, -- on a face
85
86       -- for faces
87       NoSurface,
88       InvalidWire,
89       RedundantWire,
90       IntersectingWires,
91       InvalidImbricationOfWires,
92
93       -- for shells
94       EmptyShell,
95       RedundantFace,
96
97
98       -- for shapes
99       UnorientableShape,
100       NotClosed,
101       NotConnected,
102       
103       SubshapeNotInShape,
104       
105       BadOrientation,
106       BadOrientationOfSubshape,
107       
108       InvalidToleranceValue,
109
110       -- for exception
111       CheckFail
112     
113     end Status;
114
115
116     class ListOfStatus instantiates List from TCollection
117         (Status from BRepCheck);
118        
119     class DataMapOfShapeListOfStatus instantiates DataMap from TCollection 
120         (Shape          from TopoDS,
121          ListOfStatus   from BRepCheck,
122          ShapeMapHasher from TopTools);
123         
124         
125     class DataMapOfShapeResult instantiates DataMap from TCollection
126         (Shape          from TopoDS,
127          Result         from BRepCheck,
128          OrientedShapeMapHasher from TopTools);
129          
130          
131     -- Package method
132
133     Add(List: in out ListOfStatus from BRepCheck; 
134         Stat: Status from BRepCheck);
135
136
137
138     Print(Stat: Status from BRepCheck;
139           OS: in out OStream from Standard);
140
141     SelfIntersection(W      : Wire from TopoDS;
142                    F      : Face from TopoDS;
143                    E1 : out Edge from TopoDS;
144                    E2 : out Edge from TopoDS)
145       returns Boolean from Standard;
146       
147 end BRepCheck;