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