0029915: Porting to VC 2017 : Regressions in Modeling Algorithms on VC 2017
[occt.git] / src / ShapeAnalysis / ShapeAnalysis_FreeBoundsProperties.lxx
1 // Created on: 1998-08-17
2 // Created by: Pavel DURANDIN
3 // Copyright (c) 1998-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 #include <ShapeAnalysis_HSequenceOfFreeBounds.hxx>
18
19 //=======================================================================
20 //function : Shape
21 //purpose  : Returns shape
22 //=======================================================================
23
24 inline  TopoDS_Shape ShapeAnalysis_FreeBoundsProperties::Shape() const
25 {
26   return myShape;
27 }
28
29  
30 //=======================================================================
31 //function : IsLoaded
32 //purpose  : Returns True if shape is loaded 
33 //=======================================================================
34
35 inline  Standard_Boolean ShapeAnalysis_FreeBoundsProperties::IsLoaded() const
36 {
37   return !(myShape.IsNull());
38 }
39
40  
41 //=======================================================================
42 //function : Tolerance
43 //purpose  : Returns tolerance
44 //=======================================================================
45
46 inline  Standard_Real ShapeAnalysis_FreeBoundsProperties::Tolerance() const
47 {
48   return myTolerance;
49 }
50
51  
52 //=======================================================================
53 //function : NbFreeBounds
54 //purpose  : Returns number of free bounds
55 //=======================================================================
56
57 inline  Standard_Integer ShapeAnalysis_FreeBoundsProperties::NbFreeBounds() const
58 {
59   return (myClosedFreeBounds->Length() + myOpenFreeBounds->Length());
60 }
61
62
63 //=======================================================================
64 //function : NbClosedFreeBounds
65 //purpose  : Returns number of closed free bounds
66 //=======================================================================
67
68 inline  Standard_Integer ShapeAnalysis_FreeBoundsProperties::NbClosedFreeBounds() const
69 {
70   return myClosedFreeBounds->Length();
71 }
72
73
74 //=======================================================================
75 //function : NbOpenFreeBounds
76 //purpose  : Returns number of open free bounds
77 //=======================================================================
78
79 inline  Standard_Integer ShapeAnalysis_FreeBoundsProperties::NbOpenFreeBounds() const
80 {
81   return myOpenFreeBounds->Length();
82 }
83
84
85 //=======================================================================
86 //function : ClosedFreeBounds
87 //purpose  : Returns all closed free bounds
88 //=======================================================================
89
90 inline  Handle(ShapeAnalysis_HSequenceOfFreeBounds) ShapeAnalysis_FreeBoundsProperties::ClosedFreeBounds() const
91 {
92   return myClosedFreeBounds;
93 }
94
95 //=======================================================================
96 //function : OpenFreeBounds
97 //purpose  : Returns all open free bounds
98 //=======================================================================
99
100 inline  Handle(ShapeAnalysis_HSequenceOfFreeBounds) ShapeAnalysis_FreeBoundsProperties::OpenFreeBounds() const
101 {
102   return myOpenFreeBounds;
103 }
104
105 //=======================================================================
106 //function : ClosedFreeBound
107 //purpose  : Returns properties of closed free bound specified by its rank
108 //           number
109 //=======================================================================
110
111 inline Handle(ShapeAnalysis_FreeBoundData) ShapeAnalysis_FreeBoundsProperties::ClosedFreeBound(const Standard_Integer index) const
112 {
113   return myClosedFreeBounds->Value(index);
114 }
115
116 //=======================================================================
117 //function : OpenFreeBound
118 //purpose  : Returns properties of open free bound specified by its rank
119 //           number
120 //=======================================================================
121
122 inline Handle(ShapeAnalysis_FreeBoundData) ShapeAnalysis_FreeBoundsProperties::OpenFreeBound(const Standard_Integer index) const
123 {
124   return myOpenFreeBounds->Value(index);
125 }
126
127