|
||||
File indexing completed on 2025-01-18 10:03:04
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_CommonBlock_HeaderFile 0016 #define _BOPDS_CommonBlock_HeaderFile 0017 0018 #include <Standard.hxx> 0019 #include <Standard_Type.hxx> 0020 0021 #include <BOPDS_ListOfPaveBlock.hxx> 0022 #include <NCollection_BaseAllocator.hxx> 0023 #include <Standard_Integer.hxx> 0024 #include <Standard_Transient.hxx> 0025 #include <TColStd_ListOfInteger.hxx> 0026 class BOPDS_PaveBlock; 0027 0028 0029 class BOPDS_CommonBlock; 0030 DEFINE_STANDARD_HANDLE(BOPDS_CommonBlock, Standard_Transient) 0031 0032 0033 //! The class BOPDS_CommonBlock is to store the information 0034 //! about pave blocks that have geometrical coincidence 0035 //! (in terms of a tolerance) with:<br> 0036 //! a) other pave block(s);<br> 0037 //! b) face(s).<br> 0038 //! First pave block in the common block (real pave block) 0039 //! is always a pave block with the minimal index of the original edge. 0040 class BOPDS_CommonBlock : public Standard_Transient 0041 { 0042 0043 public: 0044 0045 0046 0047 //! Empty constructor 0048 Standard_EXPORT BOPDS_CommonBlock(); 0049 0050 0051 //! Constructor 0052 //! @param theAllocator the allocator to manage the memory 0053 Standard_EXPORT BOPDS_CommonBlock(const Handle(NCollection_BaseAllocator)& theAllocator); 0054 0055 0056 //! Modifier 0057 //! Adds the pave block <aPB> to the list of pave blocks 0058 //! of the common block 0059 Standard_EXPORT void AddPaveBlock (const Handle(BOPDS_PaveBlock)& aPB); 0060 0061 0062 //! Modifier 0063 //! Sets the list of pave blocks for the common block 0064 Standard_EXPORT void SetPaveBlocks (const BOPDS_ListOfPaveBlock& aLPB); 0065 0066 0067 //! Modifier 0068 //! Adds the index of the face <aF> 0069 //! to the list of indices of faces 0070 //! of the common block 0071 Standard_EXPORT void AddFace (const Standard_Integer aF); 0072 0073 0074 //! Modifier 0075 //! Sets the list of indices of faces <aLF> 0076 //! of the common block 0077 Standard_EXPORT void SetFaces (const TColStd_ListOfInteger& aLF); 0078 0079 //! Modifier 0080 //! Appends the list of indices of faces <aLF> 0081 //! to the list of indices of faces 0082 //! of the common block (the input list is emptied) 0083 Standard_EXPORT void AppendFaces(TColStd_ListOfInteger& aLF); 0084 0085 0086 //! Selector 0087 //! Returns the list of pave blocks 0088 //! of the common block 0089 Standard_EXPORT const BOPDS_ListOfPaveBlock& PaveBlocks() const; 0090 0091 0092 //! Selector 0093 //! Returns the list of indices of faces 0094 //! of the common block 0095 Standard_EXPORT const TColStd_ListOfInteger& Faces() const; 0096 0097 0098 //! Selector 0099 //! Returns the first pave block 0100 //! of the common block 0101 Standard_EXPORT const Handle(BOPDS_PaveBlock)& PaveBlock1() const; 0102 0103 0104 //! Selector 0105 //! Returns the pave block that belongs 0106 //! to the edge with index <theIx> 0107 Standard_EXPORT Handle(BOPDS_PaveBlock)& PaveBlockOnEdge (const Standard_Integer theIndex); 0108 0109 0110 //! Query 0111 //! Returns true if the common block contains 0112 //! a pave block that belongs 0113 //! to the face with index <theIx> 0114 Standard_EXPORT Standard_Boolean IsPaveBlockOnFace (const Standard_Integer theIndex) const; 0115 0116 0117 //! Query 0118 //! Returns true if the common block contains 0119 //! a pave block that belongs 0120 //! to the edge with index <theIx> 0121 Standard_EXPORT Standard_Boolean IsPaveBlockOnEdge (const Standard_Integer theIndex) const; 0122 0123 0124 //! Query 0125 //! Returns true if the common block contains 0126 //! a pave block that is equal to <thePB> 0127 Standard_EXPORT Standard_Boolean Contains (const Handle(BOPDS_PaveBlock)& thePB) const; 0128 0129 0130 //! Query 0131 //! Returns true if the common block contains 0132 //! the face with index equal to <theF> 0133 Standard_EXPORT Standard_Boolean Contains (const Standard_Integer theF) const; 0134 0135 0136 //! Modifier 0137 //! Assign the index <theEdge> as the edge index 0138 //! to all pave blocks of the common block 0139 Standard_EXPORT void SetEdge (const Standard_Integer theEdge); 0140 0141 0142 //! Selector 0143 //! Returns the index of the edge 0144 //! of all pave blocks of the common block 0145 Standard_EXPORT Standard_Integer Edge() const; 0146 0147 Standard_EXPORT void Dump() const; 0148 0149 //! Moves the pave blocks in the list to make the given 0150 //! pave block to be the first. 0151 //! It will be representative for the whole group. 0152 Standard_EXPORT void SetRealPaveBlock(const Handle(BOPDS_PaveBlock)& thePB); 0153 0154 //! Sets the tolerance for the common block 0155 void SetTolerance(const Standard_Real theTol) 0156 { 0157 myTolerance = theTol; 0158 } 0159 0160 //! Return the tolerance of common block 0161 Standard_Real Tolerance() const 0162 { 0163 return myTolerance; 0164 } 0165 0166 DEFINE_STANDARD_RTTIEXT(BOPDS_CommonBlock,Standard_Transient) 0167 0168 protected: 0169 0170 BOPDS_ListOfPaveBlock myPaveBlocks; //!< Pave blocks of the common block 0171 TColStd_ListOfInteger myFaces; //!< Faces on which the pave blocks are lying 0172 Standard_Real myTolerance; //!< Tolerance of the common block 0173 0174 private: 0175 0176 }; 0177 0178 #endif // _BOPDS_CommonBlock_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |