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
6 // This file is part of Open CASCADE Technology software library.
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.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #include <ShapeAnalysis_HSequenceOfFreeBounds.hxx>
19 //=======================================================================
21 //purpose : Returns shape
22 //=======================================================================
24 inline TopoDS_Shape ShapeAnalysis_FreeBoundsProperties::Shape() const
30 //=======================================================================
32 //purpose : Returns True if shape is loaded
33 //=======================================================================
35 inline Standard_Boolean ShapeAnalysis_FreeBoundsProperties::IsLoaded() const
37 return !(myShape.IsNull());
41 //=======================================================================
42 //function : Tolerance
43 //purpose : Returns tolerance
44 //=======================================================================
46 inline Standard_Real ShapeAnalysis_FreeBoundsProperties::Tolerance() const
52 //=======================================================================
53 //function : NbFreeBounds
54 //purpose : Returns number of free bounds
55 //=======================================================================
57 inline Standard_Integer ShapeAnalysis_FreeBoundsProperties::NbFreeBounds() const
59 return (myClosedFreeBounds->Length() + myOpenFreeBounds->Length());
63 //=======================================================================
64 //function : NbClosedFreeBounds
65 //purpose : Returns number of closed free bounds
66 //=======================================================================
68 inline Standard_Integer ShapeAnalysis_FreeBoundsProperties::NbClosedFreeBounds() const
70 return myClosedFreeBounds->Length();
74 //=======================================================================
75 //function : NbOpenFreeBounds
76 //purpose : Returns number of open free bounds
77 //=======================================================================
79 inline Standard_Integer ShapeAnalysis_FreeBoundsProperties::NbOpenFreeBounds() const
81 return myOpenFreeBounds->Length();
85 //=======================================================================
86 //function : ClosedFreeBounds
87 //purpose : Returns all closed free bounds
88 //=======================================================================
90 inline Handle(ShapeAnalysis_HSequenceOfFreeBounds) ShapeAnalysis_FreeBoundsProperties::ClosedFreeBounds() const
92 return myClosedFreeBounds;
95 //=======================================================================
96 //function : OpenFreeBounds
97 //purpose : Returns all open free bounds
98 //=======================================================================
100 inline Handle(ShapeAnalysis_HSequenceOfFreeBounds) ShapeAnalysis_FreeBoundsProperties::OpenFreeBounds() const
102 return myOpenFreeBounds;
105 //=======================================================================
106 //function : ClosedFreeBound
107 //purpose : Returns properties of closed free bound specified by its rank
109 //=======================================================================
111 inline Handle(ShapeAnalysis_FreeBoundData) ShapeAnalysis_FreeBoundsProperties::ClosedFreeBound(const Standard_Integer index) const
113 return myClosedFreeBounds->Value(index);
116 //=======================================================================
117 //function : OpenFreeBound
118 //purpose : Returns properties of open free bound specified by its rank
120 //=======================================================================
122 inline Handle(ShapeAnalysis_FreeBoundData) ShapeAnalysis_FreeBoundsProperties::OpenFreeBound(const Standard_Integer index) const
124 return myOpenFreeBounds->Value(index);