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