File indexing completed on 2025-01-18 10:03:15
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _BRepOffset_Analyse_HeaderFile
0018 #define _BRepOffset_Analyse_HeaderFile
0019
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022
0023 #include <TopoDS_Shape.hxx>
0024 #include <BRepOffset_DataMapOfShapeListOfInterval.hxx>
0025 #include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
0026 #include <BRepOffset_ListOfInterval.hxx>
0027 #include <ChFiDS_TypeOfConcavity.hxx>
0028 #include <TopTools_DataMapOfShapeListOfShape.hxx>
0029 #include <TopTools_DataMapOfShapeReal.hxx>
0030 #include <TopTools_DataMapOfShapeShape.hxx>
0031 #include <TopTools_ListOfShape.hxx>
0032 #include <TopTools_MapOfShape.hxx>
0033
0034 #include <Message_ProgressRange.hxx>
0035
0036 class TopoDS_Edge;
0037 class TopoDS_Vertex;
0038 class TopoDS_Face;
0039 class TopoDS_Compound;
0040
0041
0042
0043 class BRepOffset_Analyse
0044 {
0045 public:
0046 DEFINE_STANDARD_ALLOC
0047
0048 public:
0049
0050
0051 Standard_EXPORT BRepOffset_Analyse();
0052
0053
0054 Standard_EXPORT BRepOffset_Analyse (const TopoDS_Shape& theS,
0055 const Standard_Real theAngle);
0056
0057 public:
0058
0059
0060 Standard_EXPORT void Perform (const TopoDS_Shape& theS,
0061 const Standard_Real theAngle,
0062 const Message_ProgressRange& theRange = Message_ProgressRange());
0063
0064 public:
0065
0066
0067 Standard_Boolean IsDone() const
0068 {
0069 return myDone;
0070 }
0071
0072
0073 Standard_EXPORT const BRepOffset_ListOfInterval& Type (const TopoDS_Edge& theE) const;
0074
0075
0076
0077 Standard_EXPORT void Edges (const TopoDS_Vertex& theV,
0078 const ChFiDS_TypeOfConcavity theType,
0079 TopTools_ListOfShape& theL) const;
0080
0081
0082
0083 Standard_EXPORT void Edges (const TopoDS_Face& theF,
0084 const ChFiDS_TypeOfConcavity theType,
0085 TopTools_ListOfShape& theL) const;
0086
0087
0088
0089 Standard_EXPORT void TangentEdges (const TopoDS_Edge& theEdge,
0090 const TopoDS_Vertex& theVertex,
0091 TopTools_ListOfShape& theEdges) const;
0092
0093
0094 Standard_Boolean HasAncestor (const TopoDS_Shape& theS) const
0095 {
0096 return myAncestors.Contains (theS);
0097 }
0098
0099
0100 const TopTools_ListOfShape& Ancestors (const TopoDS_Shape& theS) const
0101 {
0102 return myAncestors.FindFromKey (theS);
0103 }
0104
0105
0106
0107 Standard_EXPORT void Explode (TopTools_ListOfShape& theL,
0108 const ChFiDS_TypeOfConcavity theType) const;
0109
0110
0111
0112 Standard_EXPORT void Explode (TopTools_ListOfShape& theL,
0113 const ChFiDS_TypeOfConcavity theType1,
0114 const ChFiDS_TypeOfConcavity theType2) const;
0115
0116
0117
0118 Standard_EXPORT void AddFaces (const TopoDS_Face& theFace,
0119 TopoDS_Compound& theCo,
0120 TopTools_MapOfShape& theMap,
0121 const ChFiDS_TypeOfConcavity theType) const;
0122
0123
0124
0125 Standard_EXPORT void AddFaces (const TopoDS_Face& theFace,
0126 TopoDS_Compound& theCo,
0127 TopTools_MapOfShape& theMap,
0128 const ChFiDS_TypeOfConcavity theType1,
0129 const ChFiDS_TypeOfConcavity theType2) const;
0130
0131 void SetOffsetValue (const Standard_Real theOffset)
0132 {
0133 myOffset = theOffset;
0134 }
0135
0136
0137 void SetFaceOffsetMap (const TopTools_DataMapOfShapeReal& theMap)
0138 {
0139 myFaceOffsetMap = theMap;
0140 }
0141
0142
0143
0144 const TopTools_ListOfShape& NewFaces() const { return myNewFaces; }
0145
0146
0147
0148 Standard_EXPORT TopoDS_Shape Generated (const TopoDS_Shape& theS) const;
0149
0150
0151 Standard_Boolean HasGenerated (const TopoDS_Shape& theS) const
0152 {
0153 return myGenerated.Seek (theS) != NULL;
0154 }
0155
0156
0157
0158 Standard_EXPORT const TopoDS_Edge& EdgeReplacement (const TopoDS_Face& theFace,
0159 const TopoDS_Edge& theEdge) const;
0160
0161
0162 Standard_EXPORT const TopTools_ListOfShape* Descendants (const TopoDS_Shape& theS,
0163 const Standard_Boolean theUpdate = Standard_False) const;
0164
0165 public:
0166
0167
0168 Standard_EXPORT void Clear();
0169
0170 private:
0171
0172
0173
0174 Standard_EXPORT void TreatTangentFaces (const TopTools_ListOfShape& theEdges, const Message_ProgressRange& theRange);
0175
0176 private:
0177
0178
0179 TopoDS_Shape myShape;
0180 Standard_Real myAngle;
0181
0182 Standard_Real myOffset;
0183 TopTools_DataMapOfShapeReal myFaceOffsetMap;
0184
0185
0186
0187 Standard_Boolean myDone;
0188
0189 BRepOffset_DataMapOfShapeListOfInterval myMapEdgeType;
0190 TopTools_IndexedDataMapOfShapeListOfShape myAncestors;
0191 NCollection_DataMap<TopoDS_Shape,
0192 TopTools_DataMapOfShapeShape,
0193 TopTools_ShapeMapHasher> myReplacement;
0194 mutable TopTools_DataMapOfShapeListOfShape myDescendants;
0195
0196
0197 TopTools_ListOfShape myNewFaces;
0198
0199 TopTools_DataMapOfShapeShape myGenerated;
0200 };
0201
0202 #endif