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_Interf_HeaderFile
0016 #define BOPDS_Interf_HeaderFile
0017
0018 #include <IntTools_CommonPrt.hxx>
0019 #include <NCollection_BaseAllocator.hxx>
0020 #include <BOPDS_VectorOfCurve.hxx>
0021 #include <BOPDS_VectorOfPoint.hxx>
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033 class BOPDS_Interf {
0034 public:
0035
0036
0037
0038
0039
0040
0041
0042
0043 void SetIndices(const Standard_Integer theIndex1,
0044 const Standard_Integer theIndex2) {
0045 myIndex1=theIndex1;
0046 myIndex2=theIndex2;
0047 }
0048
0049
0050
0051
0052
0053
0054
0055
0056 void Indices(Standard_Integer& theIndex1,
0057 Standard_Integer& theIndex2) const {
0058 theIndex1=myIndex1;
0059 theIndex2=myIndex2;
0060 }
0061
0062
0063
0064
0065
0066
0067 void SetIndex1(const Standard_Integer theIndex) {
0068 myIndex1=theIndex;
0069 }
0070
0071
0072
0073
0074
0075
0076 void SetIndex2(const Standard_Integer theIndex) {
0077 myIndex2=theIndex;
0078 }
0079
0080
0081
0082
0083
0084
0085 Standard_Integer Index1() const {
0086 return myIndex1;
0087 }
0088
0089
0090
0091
0092
0093
0094 Standard_Integer Index2() const {
0095 return myIndex2;
0096 }
0097
0098
0099
0100
0101
0102
0103
0104
0105 Standard_Integer OppositeIndex(const Standard_Integer theI) const {
0106 if (theI==myIndex1) {
0107 return myIndex2;
0108 }
0109 else if(theI==myIndex2) {
0110 return myIndex1;
0111 }
0112 else {
0113 return -1;
0114 }
0115 }
0116
0117
0118
0119
0120
0121
0122
0123
0124 Standard_Boolean Contains(const Standard_Integer theIndex)const {
0125 return (myIndex1==theIndex || myIndex2==theIndex);
0126 }
0127
0128
0129
0130
0131
0132
0133 void SetIndexNew(const Standard_Integer theIndex) {
0134 myIndexNew=theIndex;
0135 }
0136
0137
0138
0139
0140
0141
0142
0143 Standard_Integer IndexNew() const {
0144 return myIndexNew;
0145 }
0146
0147
0148
0149
0150
0151
0152
0153
0154
0155 Standard_Boolean HasIndexNew(Standard_Integer& theIndex) const {
0156 theIndex=myIndexNew;
0157 return (myIndexNew>=0);
0158 }
0159
0160
0161
0162
0163
0164
0165 Standard_Boolean HasIndexNew() const {
0166 return (myIndexNew+1) != 0;
0167 }
0168
0169 protected:
0170 BOPDS_Interf() :
0171 myIndex1(-1),
0172 myIndex2(-1),
0173 myIndexNew(-1),
0174 myAllocator(NCollection_BaseAllocator::CommonBaseAllocator()) {
0175 }
0176
0177 BOPDS_Interf(const Handle(NCollection_BaseAllocator)& theAllocator) :
0178 myIndex1(-1),
0179 myIndex2(-1),
0180 myIndexNew(-1),
0181 myAllocator(theAllocator) {
0182 }
0183
0184 virtual ~BOPDS_Interf() {
0185 }
0186
0187 protected:
0188 Standard_Integer myIndex1;
0189 Standard_Integer myIndex2;
0190 Standard_Integer myIndexNew;
0191 Handle(NCollection_BaseAllocator) myAllocator;
0192 };
0193
0194
0195
0196
0197
0198
0199
0200
0201 class BOPDS_InterfVV : public BOPDS_Interf {
0202 public:
0203
0204
0205
0206
0207 BOPDS_InterfVV() : BOPDS_Interf() {
0208 }
0209
0210
0211
0212
0213
0214
0215 BOPDS_InterfVV(const Handle(NCollection_BaseAllocator)& theAllocator)
0216 : BOPDS_Interf(theAllocator) {
0217 }
0218
0219
0220
0221
0222 virtual ~BOPDS_InterfVV() {
0223 }
0224
0225 };
0226
0227
0228
0229
0230
0231
0232
0233
0234 class BOPDS_InterfVE : public BOPDS_Interf {
0235 public:
0236
0237
0238
0239
0240 BOPDS_InterfVE()
0241 :
0242 BOPDS_Interf(),
0243 myParameter(0.) {
0244 }
0245
0246
0247
0248
0249
0250
0251 BOPDS_InterfVE(const Handle(NCollection_BaseAllocator)& theAllocator)
0252 :
0253 BOPDS_Interf(theAllocator),
0254 myParameter(0.) {
0255 }
0256
0257
0258
0259
0260 virtual ~BOPDS_InterfVE() {
0261 }
0262
0263
0264
0265
0266
0267
0268
0269
0270
0271 void SetParameter(const Standard_Real theT) {
0272 myParameter=theT;
0273 }
0274
0275
0276
0277
0278
0279
0280
0281
0282
0283 Standard_Real Parameter() const {
0284 return myParameter;
0285 }
0286
0287 protected:
0288 Standard_Real myParameter;
0289
0290 };
0291
0292
0293
0294
0295
0296
0297
0298
0299 class BOPDS_InterfVF : public BOPDS_Interf {
0300 public:
0301
0302
0303
0304
0305 BOPDS_InterfVF()
0306 : BOPDS_Interf(),
0307 myU(0.),
0308 myV(0.) {
0309 }
0310
0311
0312
0313
0314
0315
0316 BOPDS_InterfVF(const Handle(NCollection_BaseAllocator)& theAllocator)
0317 : BOPDS_Interf(theAllocator),
0318 myU(0.),
0319 myV(0.) {
0320 }
0321
0322
0323
0324
0325 virtual ~BOPDS_InterfVF() {
0326 }
0327
0328
0329
0330
0331
0332
0333
0334
0335
0336
0337
0338 void SetUV(const Standard_Real theU,
0339 const Standard_Real theV) {
0340 myU=theU;
0341 myV=theV;
0342 }
0343
0344
0345
0346
0347
0348
0349
0350
0351
0352
0353
0354 void UV(Standard_Real& theU,Standard_Real& theV) const {
0355 theU=myU;
0356 theV=myV;
0357 }
0358
0359 protected:
0360 Standard_Real myU;
0361 Standard_Real myV;
0362
0363 };
0364
0365
0366
0367
0368
0369
0370
0371
0372 class BOPDS_InterfEE : public BOPDS_Interf {
0373 public:
0374
0375
0376
0377
0378 BOPDS_InterfEE() : BOPDS_Interf() {
0379 }
0380
0381
0382
0383
0384
0385
0386 BOPDS_InterfEE(const Handle(NCollection_BaseAllocator)& theAllocator)
0387 : BOPDS_Interf(theAllocator) {
0388 }
0389
0390
0391
0392
0393 virtual ~BOPDS_InterfEE() {
0394 }
0395
0396
0397
0398
0399
0400
0401
0402 void SetCommonPart(const IntTools_CommonPrt& theCP) {
0403 myCommonPart=theCP;
0404 }
0405
0406
0407
0408
0409
0410
0411
0412 const IntTools_CommonPrt& CommonPart() const {
0413 return myCommonPart;
0414 }
0415
0416 protected:
0417 IntTools_CommonPrt myCommonPart;
0418 };
0419
0420
0421
0422
0423
0424
0425
0426
0427 class BOPDS_InterfEF : public BOPDS_Interf {
0428 public:
0429
0430
0431
0432
0433 BOPDS_InterfEF(): BOPDS_Interf() {
0434 }
0435
0436
0437
0438
0439
0440
0441
0442
0443
0444
0445
0446 BOPDS_InterfEF(const Handle(NCollection_BaseAllocator)& theAllocator)
0447 : BOPDS_Interf(theAllocator) {
0448 }
0449
0450
0451
0452
0453 virtual ~BOPDS_InterfEF() {
0454 }
0455
0456
0457
0458
0459
0460
0461
0462 void SetCommonPart(const IntTools_CommonPrt& theCP){
0463 myCommonPart=theCP;
0464 }
0465
0466
0467
0468
0469
0470
0471
0472 const IntTools_CommonPrt& CommonPart() const {
0473 return myCommonPart;
0474 }
0475
0476 protected:
0477 IntTools_CommonPrt myCommonPart;
0478 }
0479
0480
0481
0482 ;
0483
0484
0485
0486
0487 class BOPDS_InterfFF : public BOPDS_Interf {
0488 public:
0489
0490
0491
0492
0493 BOPDS_InterfFF()
0494 :
0495 BOPDS_Interf(),
0496 myTangentFaces(Standard_False),
0497 myCurves(0, myAllocator),
0498 myPoints(0, myAllocator)
0499 {
0500 }
0501
0502
0503
0504
0505 virtual ~BOPDS_InterfFF() {
0506 }
0507
0508
0509
0510
0511
0512
0513
0514
0515
0516 void Init(const Standard_Integer theNbCurves,
0517 const Standard_Integer theNbPoints) {
0518 if (theNbCurves>0) {
0519 myCurves.SetIncrement(theNbCurves);
0520 }
0521 if (theNbPoints>0) {
0522 myPoints.SetIncrement(theNbPoints);
0523 }
0524 }
0525
0526
0527
0528
0529
0530
0531 void SetTangentFaces(const Standard_Boolean theFlag) {
0532 myTangentFaces=theFlag;
0533 }
0534
0535
0536
0537
0538
0539
0540 Standard_Boolean TangentFaces()const {
0541 return myTangentFaces;
0542 }
0543
0544
0545
0546
0547
0548
0549
0550 const BOPDS_VectorOfCurve& Curves()const{
0551 return myCurves;
0552 }
0553
0554
0555
0556
0557
0558
0559
0560 BOPDS_VectorOfCurve& ChangeCurves(){
0561 return myCurves;
0562 }
0563
0564
0565
0566
0567
0568
0569
0570 const BOPDS_VectorOfPoint& Points()const{
0571 return myPoints;
0572 }
0573
0574
0575
0576
0577
0578
0579
0580 BOPDS_VectorOfPoint& ChangePoints(){
0581 return myPoints;
0582 }
0583
0584 protected:
0585 Standard_Boolean myTangentFaces;
0586 BOPDS_VectorOfCurve myCurves;
0587 BOPDS_VectorOfPoint myPoints;
0588 };
0589
0590
0591
0592
0593
0594
0595
0596
0597
0598 class BOPDS_InterfVZ : public BOPDS_Interf {
0599 public:
0600
0601
0602
0603
0604 BOPDS_InterfVZ() : BOPDS_Interf() {
0605 };
0606
0607
0608
0609
0610
0611
0612 BOPDS_InterfVZ(const Handle(NCollection_BaseAllocator)& theAllocator)
0613 : BOPDS_Interf(theAllocator) {
0614 };
0615
0616
0617
0618
0619 virtual ~BOPDS_InterfVZ() {
0620 };
0621
0622 };
0623
0624
0625
0626
0627
0628
0629
0630
0631 class BOPDS_InterfEZ : public BOPDS_Interf {
0632 public:
0633
0634
0635
0636
0637 BOPDS_InterfEZ() : BOPDS_Interf() {
0638 };
0639
0640
0641
0642
0643
0644
0645 BOPDS_InterfEZ(const Handle(NCollection_BaseAllocator)& theAllocator)
0646 : BOPDS_Interf(theAllocator) {
0647 };
0648
0649
0650
0651
0652 virtual ~BOPDS_InterfEZ() {
0653 };
0654
0655 };
0656
0657
0658
0659
0660
0661
0662
0663
0664 class BOPDS_InterfFZ : public BOPDS_Interf {
0665 public:
0666
0667
0668
0669
0670 BOPDS_InterfFZ() : BOPDS_Interf() {
0671 };
0672
0673
0674
0675
0676
0677
0678 BOPDS_InterfFZ(const Handle(NCollection_BaseAllocator)& theAllocator)
0679 : BOPDS_Interf(theAllocator) {
0680 };
0681
0682
0683
0684
0685 virtual ~BOPDS_InterfFZ() {
0686 };
0687
0688 };
0689
0690
0691
0692
0693
0694
0695
0696
0697 class BOPDS_InterfZZ : public BOPDS_Interf {
0698 public:
0699
0700
0701
0702
0703 BOPDS_InterfZZ() : BOPDS_Interf() {
0704 };
0705
0706
0707
0708
0709
0710
0711 BOPDS_InterfZZ(const Handle(NCollection_BaseAllocator)& theAllocator)
0712 : BOPDS_Interf(theAllocator) {
0713 };
0714
0715
0716
0717
0718 virtual ~BOPDS_InterfZZ() {
0719 };
0720
0721 };
0722
0723 #endif