1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264
|
// File generated by CPPExt (Value)
//
// Copyright (C) 1991 - 2000 by
// Matra Datavision SA. All rights reserved.
//
// Copyright (C) 2001 - 2004 by
// Open CASCADE SA. All rights reserved.
//
// This file is part of the Open CASCADE Technology software.
//
// This software may be distributed and/or modified under the terms and
// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
// and appearing in the file LICENSE included in the packaging of this file.
//
// This software is distributed on an "AS IS" basis, without warranty of any
// kind, and Open CASCADE SA hereby disclaims all such warranties,
// including without limitation, any warranties of merchantability, fitness
// for a particular purpose or non-infringement. Please see the License for
// the specific terms and conditions governing rights and limitations under the
// License.
#ifndef _BooleanOperations_ShapesDataStructure_HeaderFile
#define _BooleanOperations_ShapesDataStructure_HeaderFile
#ifndef _BooleanOperations_PShapeAndInterferences_HeaderFile
#include <BooleanOperations_PShapeAndInterferences.hxx>
#endif
#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
#ifndef _TopoDS_Shape_HeaderFile
#include <TopoDS_Shape.hxx>
#endif
#ifndef _BooleanOperations_IndexedDataMapOfShapeInteger_HeaderFile
#include <BooleanOperations_IndexedDataMapOfShapeInteger.hxx>
#endif
#ifndef _BOPTColStd_CArray1OfInteger_HeaderFile
#include <BOPTColStd_CArray1OfInteger.hxx>
#endif
#ifndef _Standard_OStream_HeaderFile
#include <Standard_OStream.hxx>
#endif
#ifndef _TopAbs_ShapeEnum_HeaderFile
#include <TopAbs_ShapeEnum.hxx>
#endif
#ifndef _BooleanOperations_StateOfShape_HeaderFile
#include <BooleanOperations_StateOfShape.hxx>
#endif
#ifndef _Standard_Address_HeaderFile
#include <Standard_Address.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _TopAbs_Orientation_HeaderFile
#include <TopAbs_Orientation.hxx>
#endif
class BooleanOperations_Explorer;
class BooleanOperations_OnceExplorer;
class TopoDS_Shape;
class BooleanOperations_AncestorsSeqAndSuccessorsSeq;
class BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors;
class Bnd_Box;
class BooleanOperations_ShapeAndInterferences;
class BooleanOperations_IndexedDataMapOfShapeInteger;
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
#endif
class BooleanOperations_ShapesDataStructure {
public:
void* operator new(size_t,void* anAddress)
{
return anAddress;
}
void* operator new(size_t size)
{
return Standard::Allocate(size);
}
void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
// Methods PUBLIC
//
Standard_EXPORT BooleanOperations_ShapesDataStructure();
Standard_EXPORT virtual ~BooleanOperations_ShapesDataStructure();
Standard_EXPORT BooleanOperations_ShapesDataStructure(const TopoDS_Shape& Object,const TopoDS_Shape& Tool);
//! fill a line of the data structure, the shift is used <br>
//! for the numbers of the shapes of the Tool. <br>
Standard_EXPORT void InsertShapeAndAncestorsSuccessors(const TopoDS_Shape& S,const BooleanOperations_AncestorsSeqAndSuccessorsSeq& AncSuc,const Standard_Integer shift = 0) ;
//! to find the data structure we first decompose the <br>
//! Object and Tool in the indexed data map of shapes. <br>
Standard_EXPORT void FillIndexedMapOfShapesAncestorsAndSuccessors(const TopoDS_Shape& Sha,BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& IndDatMap) const;
//! to find all the subshapes of Sha and store them in <br>
//! IndDatMap if they had not been already taken into account. <br>
Standard_EXPORT void FindSubshapes(const TopoDS_Shape& Sha,Standard_Integer& TotalNumberOfShapes,BooleanOperations_IndexedDataMapOfShapeAncestorsSuccessors& IndDatMap) const;
//! dump the content of the fields. <br>
Standard_EXPORT void Dump(Standard_OStream& S) const;
//! dump the types of the shapes. <br>
Standard_EXPORT void LightDump(Standard_OStream& S) const;
Standard_EXPORT const TopoDS_Shape& GetShape(const Standard_Integer index) const;
Standard_EXPORT const TopoDS_Shape& Shape(const Standard_Integer anIndex) const;
Standard_EXPORT TopAbs_ShapeEnum GetShapeType(const Standard_Integer index) const;
Standard_EXPORT const Bnd_Box& GetBoundingBox(const Standard_Integer index) const;
Standard_EXPORT BooleanOperations_StateOfShape GetState(const Standard_Integer index) const;
Standard_EXPORT void SetState(const Standard_Integer index,const BooleanOperations_StateOfShape theState) ;
Standard_EXPORT Standard_Integer GetAncestor(const Standard_Integer index,const Standard_Integer ancestorNumber) const;
Standard_EXPORT Standard_Integer GetSuccessor(const Standard_Integer index,const Standard_Integer successorNumber) const;
Standard_EXPORT void GetAncestors(const Standard_Integer index,Standard_Address& theArrayOfAncestors,Standard_Integer& AncestorsSize) const;
Standard_EXPORT void GetSuccessors(const Standard_Integer index,Standard_Address& theArrayOfSuccessors,Standard_Integer& SuccessorsSize) const;
Standard_EXPORT Standard_Integer NumberOfAncestors(const Standard_Integer index) const;
Standard_EXPORT Standard_Integer NumberOfSuccessors(const Standard_Integer index) const;
Standard_EXPORT Standard_Integer NumberOfShapesOfTheTool() const;
Standard_EXPORT Standard_Integer NumberOfShapesOfTheObject() const;
Standard_EXPORT Standard_Integer NumberOfSourceShapes() const;
Standard_EXPORT Standard_Boolean IsNewShape(const Standard_Integer index) const;
Standard_EXPORT Standard_Integer NumberOfInsertedShapes() const;
Standard_EXPORT Standard_Integer NumberOfNewShapes() const;
Standard_EXPORT const BooleanOperations_ShapeAndInterferences& Line(const Standard_Integer index) const;
Standard_EXPORT const BooleanOperations_IndexedDataMapOfShapeInteger& ShapeIndexMap(const Standard_Integer iRank) const;
Standard_EXPORT virtual Standard_Integer ShapeIndex(const TopoDS_Shape& aS,const Standard_Integer iRank) const;
Standard_EXPORT const TopoDS_Shape& Object() const;
Standard_EXPORT const TopoDS_Shape& Tool() const;
Standard_EXPORT void ObjectRange(Standard_Integer& iFirst,Standard_Integer& iLast) const;
Standard_EXPORT void ToolRange(Standard_Integer& iFirst,Standard_Integer& iLast) const;
Standard_EXPORT virtual Standard_Integer Rank(const Standard_Integer anIndex) const;
//! for given index "anIndex" of an edge in DS get <br>
//! reference index of an edge <br>
Standard_EXPORT Standard_Integer RefEdge(const Standard_Integer anIndex) const;
//! returns number of edges from source shapes <br>
Standard_EXPORT Standard_Integer NbEdges() const;
Standard_EXPORT TopAbs_Orientation GetOrientation(const Standard_Integer index,const Standard_Integer successorNumber) const;
Standard_EXPORT void GetOrientations(const Standard_Integer index,Standard_Address& theArrayOfOrientations,Standard_Integer& OrientationsSize) const;
friend class BooleanOperations_Explorer;
friend class BooleanOperations_OnceExplorer;
protected:
// Methods PROTECTED
//
Standard_EXPORT void Destroy() ;
// Fields PROTECTED
//
BooleanOperations_PShapeAndInterferences myListOfShapeAndInterferences;
Standard_Integer myNumberOfShapesOfTheObject;
Standard_Integer myNumberOfShapesOfTheTool;
Standard_Integer myNumberOfInsertedShapes;
Standard_Integer myLength;
TopoDS_Shape myObject;
TopoDS_Shape myTool;
BooleanOperations_IndexedDataMapOfShapeInteger myShapeIndexMapObj;
BooleanOperations_IndexedDataMapOfShapeInteger myShapeIndexMapTool;
BOPTColStd_CArray1OfInteger myRefEdges;
Standard_Integer myNbEdges;
private:
// Methods PRIVATE
//
Standard_EXPORT void ReInit() ;
// Fields PRIVATE
//
};
// other Inline functions and methods (like "C++: function call" methods)
//
#endif
|