0026936: Drawbacks of inlining in new type system in OCCT 7.0 -- automatic
[occt.git] / src / BRepCheck / BRepCheck_Wire.hxx
CommitLineData
42cf5bc1 1// Created on: 1995-12-12
2// Created by: Jacques GOUSSARD
3// Copyright (c) 1995-1999 Matra Datavision
4// Copyright (c) 1999-2014 OPEN CASCADE SAS
5//
6// This file is part of Open CASCADE Technology software library.
7//
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
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.
13//
14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
16
17#ifndef _BRepCheck_Wire_HeaderFile
18#define _BRepCheck_Wire_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_Type.hxx>
22
23#include <Standard_Boolean.hxx>
24#include <BRepCheck_Status.hxx>
25#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
26#include <BRepCheck_Result.hxx>
27class TopoDS_Wire;
28class TopoDS_Shape;
29class TopoDS_Face;
30class TopoDS_Edge;
31
32
33class BRepCheck_Wire;
34DEFINE_STANDARD_HANDLE(BRepCheck_Wire, BRepCheck_Result)
35
36
37class BRepCheck_Wire : public BRepCheck_Result
38{
39
40public:
41
42
43 Standard_EXPORT BRepCheck_Wire(const TopoDS_Wire& W);
44
45 //! if <ContextShape> is a face, consequently checks
46 //! SelfIntersect(), Closed(), Orientation() and
47 //! Closed2d until faulty is found
79104795 48 Standard_EXPORT void InContext (const TopoDS_Shape& ContextShape) Standard_OVERRIDE;
42cf5bc1 49
50 //! checks that the wire is not empty and "connex".
51 //! Called by constructor
79104795 52 Standard_EXPORT void Minimum() Standard_OVERRIDE;
42cf5bc1 53
54 //! Does nothing
79104795 55 Standard_EXPORT void Blind() Standard_OVERRIDE;
42cf5bc1 56
57 //! Checks if the oriented edges of the wire give a
58 //! closed wire. If the wire is closed, returns
59 //! BRepCheck_NoError. Warning : if the first and
60 //! last edge are infinite, the wire will be
61 //! considered as a closed one. If <Update> is set to
62 //! Standard_True, registers the status in the list.
63 //! May return (and registers):
64 //! **BRepCheck_NotConnected, if wire is not
65 //! topologically closed
66 //! **BRepCheck_RedundantEdge, if an edge is in wire
67 //! more than 3 times or in case of 2 occurences if
68 //! not with FORWARD and REVERSED orientation.
69 //! **BRepCheck_NoError
70 Standard_EXPORT BRepCheck_Status Closed (const Standard_Boolean Update = Standard_False);
71
72 //! Checks if edges of the wire give a wire closed in
73 //! 2d space.
74 //! Returns BRepCheck_NoError, or BRepCheck_NotClosed
75 //! If <Update> is set to Standard_True, registers the
76 //! status in the list.
77 Standard_EXPORT BRepCheck_Status Closed2d (const TopoDS_Face& F, const Standard_Boolean Update = Standard_False);
78
79 //! Checks if the oriented edges of the wire are
80 //! correctly oriented. An internal call is made to
81 //! the method Closed. If no face exists, call the
82 //! method with a null face (TopoDS_face()). If
83 //! <Update> is set to Standard_True, registers the
84 //! status in the list.
85 //! May return (and registers):
86 //! BRepCheck_InvalidDegeneratedFlag,
87 //! BRepCheck_BadOrientationOfSubshape,
88 //! BRepCheck_NotClosed,
89 //! BRepCheck_NoError
90 Standard_EXPORT BRepCheck_Status Orientation (const TopoDS_Face& F, const Standard_Boolean Update = Standard_False);
91
92 //! Checks if the wire intersect itself on the face
93 //! <F>. <E1> and <E2> are the first intersecting
94 //! edges found. <E2> may be a null edge when a
95 //! self-intersecting edge is found.If <Update> is set
96 //! to Standard_True, registers the status in the
97 //! list.
98 //! May return (and register):
99 //! BRepCheck_EmptyWire,
100 //! BRepCheck_SelfIntersectingWire,
101 //! BRepCheck_NoCurveOnSurface,
102 //! BRepCheck_NoError
103 Standard_EXPORT BRepCheck_Status SelfIntersect (const TopoDS_Face& F, TopoDS_Edge& E1, TopoDS_Edge& E2, const Standard_Boolean Update = Standard_False);
104
105 //! report SelfIntersect() check would be (is) done
106 Standard_EXPORT Standard_Boolean GeometricControls() const;
107
108 //! set SelfIntersect() to be checked
109 Standard_EXPORT void GeometricControls (const Standard_Boolean B);
110
111 //! Sets status of Wire;
112 Standard_EXPORT void SetStatus (const BRepCheck_Status theStatus);
113
114
115
116
92efcf78 117 DEFINE_STANDARD_RTTIEXT(BRepCheck_Wire,BRepCheck_Result)
42cf5bc1 118
119protected:
120
121
122
123
124private:
125
126
127 Standard_Boolean myCdone;
128 BRepCheck_Status myCstat;
129 TopTools_IndexedDataMapOfShapeListOfShape myMapVE;
130 Standard_Boolean myGctrl;
131
132
133};
134
135
136
137
138
139
140
141#endif // _BRepCheck_Wire_HeaderFile