Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-21 09:16:22

0001 // Created by: Peter KURNEV
0002 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0003 //
0004 // This file is part of Open CASCADE Technology software library.
0005 //
0006 // This library is free software; you can redistribute it and/or modify it under
0007 // the terms of the GNU Lesser General Public License version 2.1 as published
0008 // by the Free Software Foundation, with special exception defined in the file
0009 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0010 // distribution for complete text of the license and disclaimer of any warranty.
0011 //
0012 // Alternatively, this file may be used under the terms of Open CASCADE
0013 // commercial license or contractual agreement.
0014 
0015 #ifndef BOPDS_CoupleOfPaveBlocks_HeaderFile
0016 #define BOPDS_CoupleOfPaveBlocks_HeaderFile
0017 
0018 #include <BOPDS_PaveBlock.hxx>
0019 
0020 //! Stores information about two pave blocks and satellite data.
0021 class BOPDS_CoupleOfPaveBlocks
0022 {
0023 public:
0024   //! Default constructor.
0025   BOPDS_CoupleOfPaveBlocks()
0026       : myIndexInterf(-1),
0027         myIndex(-1),
0028         myTolerance(0)
0029   {
0030   }
0031 
0032   //! Constructor with two pave blocks.
0033   //! @param[in] thePB1 first pave block
0034   //! @param[in] thePB2 second pave block
0035   BOPDS_CoupleOfPaveBlocks(const occ::handle<BOPDS_PaveBlock>& thePB1,
0036                            const occ::handle<BOPDS_PaveBlock>& thePB2)
0037       : myIndexInterf(-1),
0038         myIndex(-1),
0039         myTolerance(0)
0040   {
0041     SetPaveBlocks(thePB1, thePB2);
0042   }
0043 
0044   ~BOPDS_CoupleOfPaveBlocks() = default;
0045 
0046   //! Sets the index.
0047   //! @param[in] theIndex the index
0048   void SetIndex(const int theIndex) { myIndex = theIndex; }
0049 
0050   //! Returns the index.
0051   //! @return the index
0052   int Index() const { return myIndex; }
0053 
0054   //! Sets the index of an interference.
0055   //! @param[in] theIndex index of an interference
0056   void SetIndexInterf(const int theIndex) { myIndexInterf = theIndex; }
0057 
0058   //! Returns the index of an interference.
0059   //! @return index of an interference
0060   int IndexInterf() const { return myIndexInterf; }
0061 
0062   //! Sets both pave blocks.
0063   //! @param[in] thePB1 first pave block
0064   //! @param[in] thePB2 second pave block
0065   void SetPaveBlocks(const occ::handle<BOPDS_PaveBlock>& thePB1,
0066                      const occ::handle<BOPDS_PaveBlock>& thePB2)
0067   {
0068     myPB[0] = thePB1;
0069     myPB[1] = thePB2;
0070   }
0071 
0072   //! @deprecated Use PaveBlock1() and PaveBlock2() instead.
0073   Standard_DEPRECATED("Use PaveBlock1() and PaveBlock2() instead")
0074   void PaveBlocks(occ::handle<BOPDS_PaveBlock>& thePB1, occ::handle<BOPDS_PaveBlock>& thePB2) const
0075   {
0076     thePB1 = PaveBlock1();
0077     thePB2 = PaveBlock2();
0078   }
0079 
0080   //! Sets the first pave block.
0081   //! @param[in] thePB the first pave block
0082   void SetPaveBlock1(const occ::handle<BOPDS_PaveBlock>& thePB) { myPB[0] = thePB; }
0083 
0084   //! Returns the first pave block.
0085   //! @return handle to the first pave block
0086   const occ::handle<BOPDS_PaveBlock>& PaveBlock1() const { return myPB[0]; }
0087 
0088   //! Sets the second pave block.
0089   //! @param[in] thePB the second pave block
0090   void SetPaveBlock2(const occ::handle<BOPDS_PaveBlock>& thePB) { myPB[1] = thePB; }
0091 
0092   //! Returns the second pave block.
0093   //! @return handle to the second pave block
0094   const occ::handle<BOPDS_PaveBlock>& PaveBlock2() const { return myPB[1]; }
0095 
0096   //! Sets the tolerance associated with this couple.
0097   //! @param[in] theTol the tolerance value
0098   void SetTolerance(const double theTol) { myTolerance = theTol; }
0099 
0100   //! Returns the tolerance associated with this couple.
0101   //! @return the tolerance value
0102   double Tolerance() const { return myTolerance; }
0103 
0104 protected:
0105   int                          myIndexInterf;
0106   int                          myIndex;
0107   occ::handle<BOPDS_PaveBlock> myPB[2];
0108   double                       myTolerance;
0109 };
0110 
0111 #endif