File indexing completed on 2025-01-18 10:03:04
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #ifndef _BOPDS_DS_HeaderFile
0016 #define _BOPDS_DS_HeaderFile
0017
0018 #include <Standard.hxx>
0019 #include <Standard_DefineAlloc.hxx>
0020 #include <Standard_Handle.hxx>
0021
0022 #include <BOPDS_DataMapOfPaveBlockCommonBlock.hxx>
0023 #include <BOPDS_ListOfPaveBlock.hxx>
0024 #include <BOPDS_MapOfPair.hxx>
0025 #include <BOPDS_MapOfPaveBlock.hxx>
0026 #include <BOPDS_VectorOfFaceInfo.hxx>
0027 #include <BOPDS_VectorOfIndexRange.hxx>
0028 #include <BOPDS_VectorOfInterfEE.hxx>
0029 #include <BOPDS_VectorOfInterfEF.hxx>
0030 #include <BOPDS_VectorOfInterfEZ.hxx>
0031 #include <BOPDS_VectorOfInterfFF.hxx>
0032 #include <BOPDS_VectorOfInterfFZ.hxx>
0033 #include <BOPDS_VectorOfInterfVE.hxx>
0034 #include <BOPDS_VectorOfInterfVF.hxx>
0035 #include <BOPDS_VectorOfInterfVV.hxx>
0036 #include <BOPDS_VectorOfInterfVZ.hxx>
0037 #include <BOPDS_VectorOfInterfZZ.hxx>
0038 #include <BOPDS_VectorOfListOfPaveBlock.hxx>
0039 #include <BOPDS_VectorOfShapeInfo.hxx>
0040 #include <NCollection_BaseAllocator.hxx>
0041 #include <Precision.hxx>
0042 #include <Standard_Integer.hxx>
0043 #include <Standard_Real.hxx>
0044 #include <TColStd_DataMapOfIntegerInteger.hxx>
0045 #include <TColStd_DataMapOfIntegerListOfInteger.hxx>
0046 #include <TColStd_ListOfInteger.hxx>
0047 #include <TColStd_MapOfInteger.hxx>
0048 #include <TopTools_DataMapOfShapeInteger.hxx>
0049 #include <TopTools_ListOfShape.hxx>
0050
0051 class BOPDS_IndexRange;
0052 class BOPDS_ShapeInfo;
0053 class TopoDS_Shape;
0054 class BOPDS_PaveBlock;
0055 class BOPDS_CommonBlock;
0056 class BOPDS_FaceInfo;
0057 class Bnd_Box;
0058
0059
0060
0061
0062
0063
0064
0065
0066
0067
0068
0069
0070
0071
0072
0073
0074
0075
0076
0077
0078 class BOPDS_DS
0079 {
0080 public:
0081
0082 DEFINE_STANDARD_ALLOC
0083
0084
0085
0086
0087 Standard_EXPORT BOPDS_DS();
0088
0089 Standard_EXPORT virtual ~BOPDS_DS();
0090
0091
0092
0093 Standard_EXPORT BOPDS_DS(const Handle(NCollection_BaseAllocator)& theAllocator);
0094
0095
0096
0097 Standard_EXPORT void Clear();
0098
0099
0100
0101 Standard_EXPORT const Handle(NCollection_BaseAllocator)& Allocator() const;
0102
0103
0104
0105
0106 Standard_EXPORT void SetArguments (const TopTools_ListOfShape& theLS);
0107
0108
0109
0110
0111 Standard_EXPORT const TopTools_ListOfShape& Arguments() const;
0112
0113
0114
0115
0116 Standard_EXPORT void Init(const Standard_Real theFuzz = Precision::Confusion());
0117
0118
0119
0120
0121 Standard_EXPORT Standard_Integer NbShapes() const;
0122
0123
0124
0125
0126 Standard_EXPORT Standard_Integer NbSourceShapes() const;
0127
0128
0129
0130
0131 Standard_EXPORT Standard_Integer NbRanges() const;
0132
0133
0134
0135
0136 Standard_EXPORT const BOPDS_IndexRange& Range (const Standard_Integer theIndex) const;
0137
0138
0139
0140
0141 Standard_EXPORT Standard_Integer Rank (const Standard_Integer theIndex) const;
0142
0143
0144
0145
0146 Standard_EXPORT Standard_Boolean IsNewShape (const Standard_Integer theIndex) const;
0147
0148
0149
0150
0151
0152
0153 Standard_EXPORT Standard_Integer Append (const BOPDS_ShapeInfo& theSI);
0154
0155
0156
0157
0158
0159
0160 Standard_EXPORT Standard_Integer Append (const TopoDS_Shape& theS);
0161
0162
0163
0164
0165
0166 Standard_EXPORT const BOPDS_ShapeInfo& ShapeInfo (const Standard_Integer theIndex) const;
0167
0168
0169
0170
0171
0172 Standard_EXPORT BOPDS_ShapeInfo& ChangeShapeInfo (const Standard_Integer theIndex);
0173
0174
0175
0176
0177
0178 Standard_EXPORT const TopoDS_Shape& Shape (const Standard_Integer theIndex) const;
0179
0180
0181
0182
0183 Standard_EXPORT Standard_Integer Index (const TopoDS_Shape& theS) const;
0184
0185
0186
0187
0188 Standard_EXPORT const BOPDS_VectorOfListOfPaveBlock& PaveBlocksPool() const;
0189
0190
0191
0192
0193 Standard_EXPORT BOPDS_VectorOfListOfPaveBlock& ChangePaveBlocksPool();
0194
0195
0196
0197
0198
0199 Standard_EXPORT Standard_Boolean HasPaveBlocks (const Standard_Integer theIndex) const;
0200
0201
0202
0203
0204 Standard_EXPORT const BOPDS_ListOfPaveBlock& PaveBlocks (const Standard_Integer theIndex) const;
0205
0206
0207
0208
0209 Standard_EXPORT BOPDS_ListOfPaveBlock& ChangePaveBlocks (const Standard_Integer theIndex);
0210
0211
0212
0213 Standard_EXPORT void UpdatePaveBlocks();
0214
0215
0216
0217 Standard_EXPORT void UpdatePaveBlock (const Handle(BOPDS_PaveBlock)& thePB);
0218
0219
0220
0221 Standard_EXPORT void UpdateCommonBlock (const Handle(BOPDS_CommonBlock)& theCB,
0222 const Standard_Real theFuzz);
0223
0224
0225
0226
0227 Standard_EXPORT Standard_Boolean IsCommonBlock (const Handle(BOPDS_PaveBlock)& thePB) const;
0228
0229
0230
0231
0232 Standard_EXPORT Handle(BOPDS_CommonBlock) CommonBlock (const Handle(BOPDS_PaveBlock)& thePB) const;
0233
0234
0235
0236
0237 Standard_EXPORT void SetCommonBlock (const Handle(BOPDS_PaveBlock)& thePB, const Handle(BOPDS_CommonBlock)& theCB);
0238
0239
0240
0241
0242 Standard_EXPORT Handle(BOPDS_PaveBlock) RealPaveBlock (const Handle(BOPDS_PaveBlock)& thePB) const;
0243
0244
0245
0246
0247 Standard_EXPORT Standard_Boolean IsCommonBlockOnEdge (const Handle(BOPDS_PaveBlock)& thePB) const;
0248
0249
0250
0251
0252 Standard_EXPORT const BOPDS_VectorOfFaceInfo& FaceInfoPool() const;
0253
0254
0255
0256
0257
0258 Standard_EXPORT Standard_Boolean HasFaceInfo (const Standard_Integer theIndex) const;
0259
0260
0261
0262
0263 Standard_EXPORT const BOPDS_FaceInfo& FaceInfo (const Standard_Integer theIndex) const;
0264
0265
0266
0267
0268 Standard_EXPORT BOPDS_FaceInfo& ChangeFaceInfo (const Standard_Integer theIndex);
0269
0270
0271
0272 Standard_EXPORT void UpdateFaceInfoIn (const Standard_Integer theIndex);
0273
0274
0275 Standard_EXPORT void UpdateFaceInfoIn (const TColStd_MapOfInteger& theFaces);
0276
0277
0278 Standard_EXPORT void UpdateFaceInfoOn (const Standard_Integer theIndex);
0279
0280
0281 Standard_EXPORT void UpdateFaceInfoOn (const TColStd_MapOfInteger& theFaces);
0282
0283
0284
0285
0286 Standard_EXPORT void FaceInfoOn (const Standard_Integer theIndex, BOPDS_IndexedMapOfPaveBlock& theMPB, TColStd_MapOfInteger& theMVP);
0287
0288
0289
0290
0291
0292 Standard_EXPORT void FaceInfoIn (const Standard_Integer theIndex, BOPDS_IndexedMapOfPaveBlock& theMPB, TColStd_MapOfInteger& theMVP);
0293
0294
0295
0296
0297
0298 Standard_EXPORT void AloneVertices (const Standard_Integer theF, TColStd_ListOfInteger& theLI) const;
0299
0300
0301
0302
0303
0304
0305 Standard_EXPORT void RefineFaceInfoOn();
0306
0307
0308 Standard_EXPORT void RefineFaceInfoIn();
0309
0310
0311
0312
0313
0314
0315 Standard_EXPORT void SubShapesOnIn(const Standard_Integer theNF1,
0316 const Standard_Integer theNF2,
0317 TColStd_MapOfInteger& theMVOnIn,
0318 TColStd_MapOfInteger& theMVCommon,
0319 BOPDS_IndexedMapOfPaveBlock& thePBOnIn,
0320 BOPDS_MapOfPaveBlock& theCommonPB) const;
0321
0322
0323
0324
0325
0326
0327 Standard_EXPORT void SharedEdges (const Standard_Integer theF1, const Standard_Integer theF2, TColStd_ListOfInteger& theLI, const Handle(NCollection_BaseAllocator)& theAllocator);
0328
0329
0330
0331
0332 Standard_EXPORT TColStd_DataMapOfIntegerInteger& ShapesSD();
0333
0334
0335
0336
0337
0338 Standard_EXPORT void AddShapeSD (const Standard_Integer theIndex, const Standard_Integer theIndexSD);
0339
0340
0341
0342
0343
0344
0345
0346
0347 Standard_EXPORT Standard_Boolean HasShapeSD (const Standard_Integer theIndex, Standard_Integer& theIndexSD) const;
0348
0349
0350
0351
0352 BOPDS_VectorOfInterfVV& InterfVV();
0353
0354
0355
0356
0357 BOPDS_VectorOfInterfVE& InterfVE();
0358
0359
0360
0361
0362 BOPDS_VectorOfInterfVF& InterfVF();
0363
0364
0365
0366
0367 BOPDS_VectorOfInterfEE& InterfEE();
0368
0369
0370
0371
0372 BOPDS_VectorOfInterfEF& InterfEF();
0373
0374
0375
0376
0377 BOPDS_VectorOfInterfFF& InterfFF();
0378
0379
0380
0381
0382 BOPDS_VectorOfInterfVZ& InterfVZ();
0383
0384
0385
0386
0387 BOPDS_VectorOfInterfEZ& InterfEZ();
0388
0389
0390
0391
0392 BOPDS_VectorOfInterfFZ& InterfFZ();
0393
0394
0395
0396
0397 BOPDS_VectorOfInterfZZ& InterfZZ();
0398
0399
0400
0401 static Standard_Integer NbInterfTypes();
0402
0403
0404
0405
0406
0407 Standard_Boolean AddInterf (const Standard_Integer theI1, const Standard_Integer theI2);
0408
0409
0410
0411
0412 Standard_Boolean HasInterf (const Standard_Integer theI) const;
0413
0414
0415
0416
0417 Standard_Boolean HasInterf (const Standard_Integer theI1, const Standard_Integer theI2) const;
0418
0419
0420
0421
0422
0423
0424 Standard_EXPORT Standard_Boolean HasInterfShapeSubShapes (const Standard_Integer theI1, const Standard_Integer theI2, const Standard_Boolean theFlag = Standard_True) const;
0425
0426
0427
0428
0429
0430 Standard_EXPORT Standard_Boolean HasInterfSubShapes (const Standard_Integer theI1, const Standard_Integer theI2) const;
0431
0432
0433
0434
0435
0436
0437 const BOPDS_MapOfPair& Interferences() const;
0438
0439 Standard_EXPORT void Dump() const;
0440
0441 Standard_EXPORT Standard_Boolean IsSubShape (const Standard_Integer theI1, const Standard_Integer theI2);
0442
0443
0444
0445 Standard_EXPORT void Paves (const Standard_Integer theIndex, BOPDS_ListOfPave& theLP);
0446
0447
0448 Standard_EXPORT void UpdatePaveBlocksWithSDVertices();
0449
0450
0451 Standard_EXPORT void UpdatePaveBlockWithSDVertices(const Handle(BOPDS_PaveBlock)& thePB);
0452
0453
0454 Standard_EXPORT void UpdateCommonBlockWithSDVertices(const Handle(BOPDS_CommonBlock)& theCB);
0455
0456 Standard_EXPORT void InitPaveBlocksForVertex(const Standard_Integer theNV);
0457
0458
0459 Standard_EXPORT void ReleasePaveBlocks();
0460
0461
0462
0463
0464
0465 Standard_EXPORT Standard_Boolean IsValidShrunkData(const Handle(BOPDS_PaveBlock)& thePB);
0466
0467
0468
0469
0470 Standard_EXPORT void BuildBndBoxSolid (const Standard_Integer theIndex,
0471 Bnd_Box& theBox,
0472 const Standard_Boolean theCheckInverted = Standard_True);
0473
0474 protected:
0475
0476
0477
0478
0479 Standard_EXPORT void InitPaveBlocks (const Standard_Integer theIndex);
0480
0481
0482 Standard_EXPORT void InitFaceInfo (const Standard_Integer theIndex);
0483
0484
0485
0486 Standard_EXPORT void InitFaceInfoIn (const Standard_Integer theIndex);
0487
0488 Standard_EXPORT void InitShape (const Standard_Integer theIndex, const TopoDS_Shape& theS);
0489
0490 Standard_EXPORT Standard_Boolean CheckCoincidence (const Handle(BOPDS_PaveBlock)& thePB1,
0491 const Handle(BOPDS_PaveBlock)& thePB2,
0492 const Standard_Real theFuzz);
0493
0494
0495 Handle(NCollection_BaseAllocator) myAllocator;
0496 TopTools_ListOfShape myArguments;
0497 Standard_Integer myNbShapes;
0498 Standard_Integer myNbSourceShapes;
0499 BOPDS_VectorOfIndexRange myRanges;
0500 BOPDS_VectorOfShapeInfo myLines;
0501 TopTools_DataMapOfShapeInteger myMapShapeIndex;
0502 BOPDS_VectorOfListOfPaveBlock myPaveBlocksPool;
0503 BOPDS_DataMapOfPaveBlockCommonBlock myMapPBCB;
0504 BOPDS_VectorOfFaceInfo myFaceInfoPool;
0505 TColStd_DataMapOfIntegerInteger myShapesSD;
0506 TColStd_DataMapOfIntegerListOfInteger myMapVE;
0507 BOPDS_MapOfPair myInterfTB;
0508 BOPDS_VectorOfInterfVV myInterfVV;
0509 BOPDS_VectorOfInterfVE myInterfVE;
0510 BOPDS_VectorOfInterfVF myInterfVF;
0511 BOPDS_VectorOfInterfEE myInterfEE;
0512 BOPDS_VectorOfInterfEF myInterfEF;
0513 BOPDS_VectorOfInterfFF myInterfFF;
0514 BOPDS_VectorOfInterfVZ myInterfVZ;
0515 BOPDS_VectorOfInterfEZ myInterfEZ;
0516 BOPDS_VectorOfInterfFZ myInterfFZ;
0517 BOPDS_VectorOfInterfZZ myInterfZZ;
0518 TColStd_MapOfInteger myInterfered;
0519
0520
0521 private:
0522
0523
0524
0525
0526
0527 };
0528
0529
0530 #include <BOPDS_DS.lxx>
0531
0532
0533
0534
0535
0536 #endif