File indexing completed on 2024-11-15 09:47:04
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _HLRBRep_Data_HeaderFile
0018 #define _HLRBRep_Data_HeaderFile
0019
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022
0023 #include <Standard_Integer.hxx>
0024 #include <TopTools_IndexedMapOfShape.hxx>
0025 #include <HLRBRep_Array1OfEData.hxx>
0026 #include <HLRBRep_Array1OfFData.hxx>
0027 #include <TColStd_Array1OfInteger.hxx>
0028 #include <Standard_ShortReal.hxx>
0029 #include <HLRAlgo_Projector.hxx>
0030 #include <HLRBRep_CLProps.hxx>
0031 #include <HLRBRep_SLProps.hxx>
0032 #include <Standard_Real.hxx>
0033 #include <HLRBRep_FaceIterator.hxx>
0034 #include <Standard_Address.hxx>
0035 #include <GeomAbs_SurfaceType.hxx>
0036 #include <Standard_Boolean.hxx>
0037 #include <GeomAbs_CurveType.hxx>
0038 #include <TopAbs_Orientation.hxx>
0039 #include <HLRBRep_Intersector.hxx>
0040 #include <HLRAlgo_Interference.hxx>
0041 #include <Standard_Transient.hxx>
0042 #include <BRepTopAdaptor_MapOfShapeTool.hxx>
0043 #include <TopAbs_State.hxx>
0044 #include <HLRAlgo_InterferenceList.hxx>
0045 class BRepTopAdaptor_TopolTool;
0046 class gp_Dir2d;
0047 class HLRBRep_EdgeData;
0048 class HLRBRep_FaceData;
0049 class IntRes2d_IntersectionPoint;
0050 class TableauRejection;
0051
0052 class HLRBRep_Data;
0053 DEFINE_STANDARD_HANDLE(HLRBRep_Data, Standard_Transient)
0054
0055 class HLRBRep_Data : public Standard_Transient
0056 {
0057
0058 public:
0059
0060
0061
0062
0063 Standard_EXPORT HLRBRep_Data(const Standard_Integer NV, const Standard_Integer NE, const Standard_Integer NF);
0064
0065
0066
0067 Standard_EXPORT void Write (const Handle(HLRBRep_Data)& DS, const Standard_Integer dv, const Standard_Integer de, const Standard_Integer df);
0068
0069 HLRBRep_Array1OfEData& EDataArray();
0070
0071 HLRBRep_Array1OfFData& FDataArray();
0072
0073
0074
0075 void Tolerance (const Standard_ShortReal tol);
0076
0077
0078
0079 Standard_ShortReal Tolerance() const;
0080
0081
0082
0083 Standard_EXPORT void Update (const HLRAlgo_Projector& P);
0084
0085 HLRAlgo_Projector& Projector();
0086
0087 Standard_Integer NbVertices() const;
0088
0089 Standard_Integer NbEdges() const;
0090
0091 Standard_Integer NbFaces() const;
0092
0093 TopTools_IndexedMapOfShape& EdgeMap();
0094
0095 TopTools_IndexedMapOfShape& FaceMap();
0096
0097
0098 Standard_EXPORT void InitBoundSort (const HLRAlgo_EdgesBlock::MinMaxIndices& MinMaxTot, const Standard_Integer e1, const Standard_Integer e2);
0099
0100
0101
0102 Standard_EXPORT void InitEdge (const Standard_Integer FI, BRepTopAdaptor_MapOfShapeTool& MST);
0103
0104 Standard_EXPORT Standard_Boolean MoreEdge();
0105
0106 Standard_EXPORT void NextEdge (const Standard_Boolean skip = Standard_True);
0107
0108
0109 Standard_EXPORT Standard_Integer Edge() const;
0110
0111
0112
0113 Standard_Boolean HidingTheFace() const;
0114
0115
0116
0117 Standard_Boolean SimpleHidingFace() const;
0118
0119
0120
0121
0122 Standard_EXPORT void InitInterference();
0123
0124 Standard_Boolean MoreInterference() const;
0125
0126 Standard_EXPORT void NextInterference();
0127
0128
0129 Standard_EXPORT Standard_Boolean RejectedInterference();
0130
0131
0132
0133 Standard_EXPORT Standard_Boolean AboveInterference();
0134
0135 HLRAlgo_Interference& Interference();
0136
0137
0138
0139 Standard_EXPORT void LocalLEGeometry2D (const Standard_Real Param, gp_Dir2d& Tg, gp_Dir2d& Nm, Standard_Real& Cu);
0140
0141
0142
0143 Standard_EXPORT void LocalFEGeometry2D (const Standard_Integer FE, const Standard_Real Param, gp_Dir2d& Tg, gp_Dir2d& Nm, Standard_Real& Cu);
0144
0145
0146
0147
0148 Standard_EXPORT void EdgeState (const Standard_Real p1, const Standard_Real p2, TopAbs_State& stbef, TopAbs_State& staf);
0149
0150
0151
0152 Standard_Boolean EdgeOfTheHidingFace (const Standard_Integer E, const HLRBRep_EdgeData& ED) const;
0153
0154
0155
0156
0157
0158 Standard_EXPORT Standard_Integer HidingStartLevel (const Standard_Integer E, const HLRBRep_EdgeData& ED, const HLRAlgo_InterferenceList& IL);
0159
0160
0161
0162 Standard_EXPORT TopAbs_State Compare (const Standard_Integer E, const HLRBRep_EdgeData& ED);
0163
0164
0165
0166
0167 Standard_EXPORT TopAbs_State SimplClassify (const Standard_Integer E, const HLRBRep_EdgeData& ED, const Standard_Integer Nbp, const Standard_Real p1, const Standard_Real p2);
0168
0169
0170 Standard_EXPORT TopAbs_State Classify (const Standard_Integer E, const HLRBRep_EdgeData& ED, const Standard_Boolean LevelFlag, Standard_Integer& Level, const Standard_Real param);
0171
0172
0173 Standard_EXPORT Standard_Boolean IsBadFace() const;
0174
0175 Standard_EXPORT void Destroy();
0176 ~HLRBRep_Data()
0177 {
0178 Destroy();
0179 }
0180
0181 DEFINE_STANDARD_RTTIEXT(HLRBRep_Data,Standard_Transient)
0182
0183 private:
0184
0185
0186
0187
0188 Standard_EXPORT Standard_Boolean OrientOutLine (const Standard_Integer I, HLRBRep_FaceData& FD);
0189
0190
0191
0192 Standard_EXPORT void OrientOthEdge (const Standard_Integer I, HLRBRep_FaceData& FD);
0193
0194
0195 Standard_EXPORT Standard_Boolean RejectedPoint (const IntRes2d_IntersectionPoint& PInter, const TopAbs_Orientation BoundOri, const Standard_Integer NumSeg);
0196
0197
0198 Standard_EXPORT Standard_Boolean SameVertex (const Standard_Boolean head1, const Standard_Boolean head2);
0199
0200 private:
0201
0202 Standard_Integer myNbVertices;
0203 Standard_Integer myNbEdges;
0204 Standard_Integer myNbFaces;
0205 TopTools_IndexedMapOfShape myEMap;
0206 TopTools_IndexedMapOfShape myFMap;
0207 HLRBRep_Array1OfEData myEData;
0208 HLRBRep_Array1OfFData myFData;
0209 TColStd_Array1OfInteger myEdgeIndices;
0210 Standard_ShortReal myToler;
0211 HLRAlgo_Projector myProj;
0212 HLRBRep_CLProps myLLProps;
0213 HLRBRep_CLProps myFLProps;
0214 HLRBRep_SLProps mySLProps;
0215 Standard_Real myBigSize;
0216 HLRBRep_FaceIterator myFaceItr1;
0217 HLRBRep_FaceIterator myFaceItr2;
0218 Standard_Integer iFace;
0219 HLRBRep_FaceData* iFaceData;
0220 Standard_Address iFaceGeom;
0221 HLRAlgo_EdgesBlock::MinMaxIndices* iFaceMinMax;
0222 GeomAbs_SurfaceType iFaceType;
0223 Standard_Boolean iFaceBack;
0224 Standard_Boolean iFaceSimp;
0225 Standard_Boolean iFaceSmpl;
0226 Standard_Boolean iFaceTest;
0227 Standard_Integer myHideCount;
0228 Standard_Real myDeca[16];
0229 Standard_Real mySurD[16];
0230 Standard_Integer myCurSortEd;
0231 Standard_Integer myNbrSortEd;
0232 Standard_Integer myLE;
0233 Standard_Boolean myLEOutLine;
0234 Standard_Boolean myLEInternal;
0235 Standard_Boolean myLEDouble;
0236 Standard_Boolean myLEIsoLine;
0237 HLRBRep_EdgeData* myLEData;
0238 const HLRBRep_Curve* myLEGeom;
0239 HLRAlgo_EdgesBlock::MinMaxIndices* myLEMinMax;
0240 GeomAbs_CurveType myLEType;
0241 Standard_ShortReal myLETol;
0242 Standard_Integer myFE;
0243 TopAbs_Orientation myFEOri;
0244 Standard_Boolean myFEOutLine;
0245 Standard_Boolean myFEInternal;
0246 Standard_Boolean myFEDouble;
0247 HLRBRep_EdgeData* myFEData;
0248 HLRBRep_Curve* myFEGeom;
0249 GeomAbs_CurveType myFEType;
0250 Standard_ShortReal myFETol;
0251 HLRBRep_Intersector myIntersector;
0252 Handle(BRepTopAdaptor_TopolTool) myClassifier;
0253 Standard_Boolean mySameVertex;
0254 Standard_Boolean myIntersected;
0255 Standard_Integer myNbPoints;
0256 Standard_Integer myNbSegments;
0257 Standard_Integer iInterf;
0258 HLRAlgo_Interference myIntf;
0259 Standard_Boolean myAboveIntf;
0260 TableauRejection* myReject;
0261
0262 };
0263
0264 #include <HLRBRep_Data.lxx>
0265
0266
0267 #endif