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