Warning, /include/opencascade/ShapeAnalysis_FreeBoundsProperties.lxx is written in an unsupported language. File is not indexed.
0001 // Created on: 1998-08-17
0002 // Created by: Pavel DURANDIN
0003 // Copyright (c) 1998-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016
0017 #include <ShapeAnalysis_FreeBoundData.hxx>
0018 #include <NCollection_Sequence.hxx>
0019 #include <NCollection_HSequence.hxx>
0020
0021 //=================================================================================================
0022
0023 inline TopoDS_Shape ShapeAnalysis_FreeBoundsProperties::Shape() const
0024 {
0025 return myShape;
0026 }
0027
0028 //=======================================================================
0029 // function : IsLoaded
0030 // purpose : Returns True if shape is loaded
0031 //=======================================================================
0032
0033 inline bool ShapeAnalysis_FreeBoundsProperties::IsLoaded() const
0034 {
0035 return !(myShape.IsNull());
0036 }
0037
0038 //=================================================================================================
0039
0040 inline double ShapeAnalysis_FreeBoundsProperties::Tolerance() const
0041 {
0042 return myTolerance;
0043 }
0044
0045 //=================================================================================================
0046
0047 inline int ShapeAnalysis_FreeBoundsProperties::NbFreeBounds() const
0048 {
0049 return (myClosedFreeBounds->Length() + myOpenFreeBounds->Length());
0050 }
0051
0052 //=======================================================================
0053 // function : NbClosedFreeBounds
0054 // purpose : Returns number of closed free bounds
0055 //=======================================================================
0056
0057 inline int ShapeAnalysis_FreeBoundsProperties::NbClosedFreeBounds() const
0058 {
0059 return myClosedFreeBounds->Length();
0060 }
0061
0062 //=======================================================================
0063 // function : NbOpenFreeBounds
0064 // purpose : Returns number of open free bounds
0065 //=======================================================================
0066
0067 inline int ShapeAnalysis_FreeBoundsProperties::NbOpenFreeBounds() const
0068 {
0069 return myOpenFreeBounds->Length();
0070 }
0071
0072 //=======================================================================
0073 // function : ClosedFreeBounds
0074 // purpose : Returns all closed free bounds
0075 //=======================================================================
0076
0077 inline occ::handle<NCollection_HSequence<occ::handle<ShapeAnalysis_FreeBoundData>>>
0078 ShapeAnalysis_FreeBoundsProperties::ClosedFreeBounds() const
0079 {
0080 return myClosedFreeBounds;
0081 }
0082
0083 //=================================================================================================
0084
0085 inline occ::handle<NCollection_HSequence<occ::handle<ShapeAnalysis_FreeBoundData>>>
0086 ShapeAnalysis_FreeBoundsProperties::OpenFreeBounds() const
0087 {
0088 return myOpenFreeBounds;
0089 }
0090
0091 //=======================================================================
0092 // function : ClosedFreeBound
0093 // purpose : Returns properties of closed free bound specified by its rank
0094 // number
0095 //=======================================================================
0096
0097 inline occ::handle<ShapeAnalysis_FreeBoundData> ShapeAnalysis_FreeBoundsProperties::ClosedFreeBound(
0098 const int index) const
0099 {
0100 return myClosedFreeBounds->Value(index);
0101 }
0102
0103 //=======================================================================
0104 // function : OpenFreeBound
0105 // purpose : Returns properties of open free bound specified by its rank
0106 // number
0107 //=======================================================================
0108
0109 inline occ::handle<ShapeAnalysis_FreeBoundData> ShapeAnalysis_FreeBoundsProperties::OpenFreeBound(
0110 const int index) const
0111 {
0112 return myOpenFreeBounds->Value(index);
0113 }