1 // File: ShapeAnalysis_FreeBoundData.lxx
2 // Created: Thu Sep 17 18:05:04 1998
3 // Author: data exchange team
4 // <det@nnov.matra-dtv.fr>
7 #include <TopTools_HSequenceOfShape.hxx>
9 //=======================================================================
10 //function : SetFreeBound
11 //purpose : Sets contour
12 //=======================================================================
14 inline void ShapeAnalysis_FreeBoundData::SetFreeBound(const TopoDS_Wire& freebound)
19 //=======================================================================
21 //purpose : Sets area of the contour
22 //=======================================================================
24 inline void ShapeAnalysis_FreeBoundData::SetArea(const Standard_Real area)
29 //=======================================================================
30 //function : SetPerimeter
31 //purpose : Sets perimeter of the contour
32 //=======================================================================
34 inline void ShapeAnalysis_FreeBoundData::SetPerimeter(const Standard_Real perimeter)
36 myPerimeter = perimeter;
39 //=======================================================================
41 //purpose : Sets ratio of average length to average width of the contour
42 //=======================================================================
44 inline void ShapeAnalysis_FreeBoundData::SetRatio(const Standard_Real ratio)
49 //=======================================================================
51 //purpose : Sets average width of the contour
52 //=======================================================================
54 inline void ShapeAnalysis_FreeBoundData::SetWidth(const Standard_Real width)
59 //=======================================================================
61 //purpose : Adds notch on free bound with its maximum width
62 //=======================================================================
64 //=======================================================================
65 //function : FreeBound
66 //purpose : Returns contour
67 //=======================================================================
69 inline TopoDS_Wire ShapeAnalysis_FreeBoundData::FreeBound() const
74 //=======================================================================
76 //purpose : Returns area of the contour
77 //=======================================================================
79 inline Standard_Real ShapeAnalysis_FreeBoundData::Area() const
84 //=======================================================================
85 //function : Perimeter
86 //purpose : Returns perimeter of the contour
87 //=======================================================================
89 inline Standard_Real ShapeAnalysis_FreeBoundData::Perimeter() const
94 //=======================================================================
96 //purpose : Returns ratio of average length to average width of the contour
97 //=======================================================================
99 inline Standard_Real ShapeAnalysis_FreeBoundData::Ratio() const
104 //=======================================================================
106 //purpose : Returns average width of the contour
107 //=======================================================================
109 inline Standard_Real ShapeAnalysis_FreeBoundData::Width() const
114 //=======================================================================
115 //function : NbNotches
116 //purpose : Returns number of notches on the contour
117 //=======================================================================
119 inline Standard_Integer ShapeAnalysis_FreeBoundData::NbNotches() const
121 return myNotches->Length();
124 //=======================================================================
126 //purpose : Returns sequence of notches on the contour
127 //=======================================================================
129 inline Handle_TopTools_HSequenceOfShape ShapeAnalysis_FreeBoundData::Notches() const
134 //=======================================================================
136 //purpose : Returns notch on the contour
137 //=======================================================================
139 inline TopoDS_Wire ShapeAnalysis_FreeBoundData::Notch(const Standard_Integer index) const
141 return TopoDS::Wire(myNotches->Value(index));