Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-18 08:29:58

0001 // Created on: 2016-04-07
0002 // Copyright (c) 2016 OPEN CASCADE SAS
0003 // Created by: Oleg AGASHIN
0004 //
0005 // This file is part of Open CASCADE Technology software library.
0006 //
0007 // This library is free software; you can redistribute it and/or modify it under
0008 // the terms of the GNU Lesser General Public License version 2.1 as published
0009 // by the Free Software Foundation, with special exception defined in the file
0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0011 // distribution for complete text of the license and disclaimer of any warranty.
0012 //
0013 // Alternatively, this file may be used under the terms of Open CASCADE
0014 // commercial license or contractual agreement.
0015 
0016 #ifndef _IMeshData_Types_HeaderFile
0017 #define _IMeshData_Types_HeaderFile
0018 
0019 #include <NCollection_Sequence.hxx>
0020 #include <NCollection_List.hxx>
0021 #include <NCollection_Shared.hxx>
0022 #include <TopTools_ShapeMapHasher.hxx>
0023 #include <TopoDS_Shape.hxx>
0024 #include <NCollection_DefineAlloc.hxx>
0025 #include <NCollection_OccAllocator.hxx>
0026 #include <IMeshData_ParametersListArrayAdaptor.hxx>
0027 #include <TColStd_MapIteratorOfPackedMapOfInteger.hxx>
0028 #include <NCollection_EBTree.hxx>
0029 #include <Bnd_Box2d.hxx>
0030 #include <NCollection_CellFilter.hxx>
0031 #include <NCollection_IndexedDataMap.hxx>
0032 #include <NCollection_UBTreeFiller.hxx>
0033 #include <NCollection_IndexedMap.hxx>
0034 #include <BRepMesh_Vertex.hxx>
0035 #include <Bnd_B2d.hxx>
0036 #include <BRepMesh_Circle.hxx>
0037 #include <BRepMesh_Triangle.hxx>
0038 #include <BRepMesh_PairOfIndex.hxx>
0039 #include <BRepMesh_Edge.hxx>
0040 
0041 #include <memory>
0042 #include <queue>
0043 
0044 class IMeshData_Shape;
0045 class IMeshData_Face;
0046 class IMeshData_Wire;
0047 class IMeshData_Edge;
0048 class IMeshData_Curve;
0049 class IMeshData_PCurve;
0050 class IMeshData_Model;
0051 class BRepMesh_VertexInspector;
0052 class BRepMesh_CircleInspector;
0053 
0054 #define DEFINE_INC_ALLOC                                                                           \
0055   DEFINE_NCOLLECTION_ALLOC                                                                         \
0056   void operator delete(void* /*theAddress*/)                                                       \
0057   {                                                                                                \
0058     /*it's inc allocator, nothing to do*/                                                          \
0059   }
0060 
0061 namespace IMeshData
0062 {
0063 //! Default size for memory block allocated by IncAllocator.
0064 /**
0065  * The idea here is that blocks of the given size are returned to the system
0066  * rather than retained in the malloc heap, at least on WIN32 and WIN64 platforms.
0067  */
0068 #ifdef _WIN64
0069 const size_t MEMORY_BLOCK_SIZE_HUGE = 1024 * 1024;
0070 #else
0071 const size_t MEMORY_BLOCK_SIZE_HUGE = 512 * 1024;
0072 #endif
0073 
0074 typedef IMeshData_Edge* IEdgePtr;
0075 typedef IMeshData_Face* IFacePtr;
0076 
0077 typedef Handle(IMeshData_Edge)   IEdgeHandle;
0078 typedef Handle(IMeshData_Wire)   IWireHandle;
0079 typedef Handle(IMeshData_Face)   IFaceHandle;
0080 typedef Handle(IMeshData_Curve)  ICurveHandle;
0081 typedef Handle(IMeshData_PCurve) IPCurveHandle;
0082 
0083 typedef IMeshData_ParametersListArrayAdaptor<ICurveHandle> ICurveArrayAdaptor;
0084 typedef Handle(ICurveArrayAdaptor)                         ICurveArrayAdaptorHandle;
0085 
0086 typedef NCollection_Shared<NCollection_EBTree<Standard_Integer, Bnd_Box2d>> BndBox2dTree;
0087 typedef NCollection_UBTreeFiller<Standard_Integer, Bnd_Box2d>               BndBox2dTreeFiller;
0088 
0089 // Vectors
0090 typedef NCollection_Shared<NCollection_Vector<IFaceHandle>>        VectorOfIFaceHandles;
0091 typedef NCollection_Shared<NCollection_Vector<IWireHandle>>        VectorOfIWireHandles;
0092 typedef NCollection_Shared<NCollection_Vector<IEdgeHandle>>        VectorOfIEdgeHandles;
0093 typedef NCollection_Shared<NCollection_Vector<IPCurveHandle>>      VectorOfIPCurveHandles;
0094 typedef NCollection_Shared<NCollection_Vector<IEdgePtr>>           VectorOfIEdgePtrs;
0095 typedef NCollection_Shared<NCollection_Vector<Standard_Boolean>>   VectorOfBoolean;
0096 typedef NCollection_Shared<NCollection_Vector<Standard_Integer>>   VectorOfInteger;
0097 typedef NCollection_Shared<NCollection_Vector<TopAbs_Orientation>> VectorOfOrientation;
0098 typedef NCollection_Shared<NCollection_Vector<BRepMesh_Triangle>>  VectorOfElements;
0099 typedef NCollection_Shared<NCollection_Vector<BRepMesh_Circle>>    VectorOfCircle;
0100 
0101 typedef NCollection_Shared<NCollection_Array1<BRepMesh_Vertex>> Array1OfVertexOfDelaun;
0102 typedef NCollection_Shared<NCollection_Vector<BRepMesh_Vertex>> VectorOfVertex;
0103 
0104 // Sequences
0105 typedef NCollection_Shared<NCollection_Sequence<Bnd_B2d>>          SequenceOfBndB2d;
0106 typedef NCollection_Shared<NCollection_Sequence<Standard_Integer>> SequenceOfInteger;
0107 typedef NCollection_Shared<NCollection_Sequence<Standard_Real>>    SequenceOfReal;
0108 
0109 namespace Model
0110 {
0111 typedef std::deque<gp_Pnt, NCollection_OccAllocator<gp_Pnt>>                     SequenceOfPnt;
0112 typedef std::deque<gp_Pnt2d, NCollection_OccAllocator<gp_Pnt2d>>                 SequenceOfPnt2d;
0113 typedef std::deque<Standard_Real, NCollection_OccAllocator<Standard_Real>>       SequenceOfReal;
0114 typedef std::deque<Standard_Integer, NCollection_OccAllocator<Standard_Integer>> SequenceOfInteger;
0115 } // namespace Model
0116 
0117 // Lists
0118 typedef NCollection_Shared<NCollection_List<Standard_Integer>> ListOfInteger;
0119 typedef NCollection_Shared<NCollection_List<gp_Pnt2d>>         ListOfPnt2d;
0120 typedef NCollection_Shared<NCollection_List<IPCurveHandle>>    ListOfIPCurves;
0121 
0122 typedef NCollection_Shared<TColStd_PackedMapOfInteger> MapOfInteger;
0123 typedef TColStd_MapIteratorOfPackedMapOfInteger        IteratorOfMapOfInteger;
0124 
0125 typedef NCollection_CellFilter<BRepMesh_CircleInspector> CircleCellFilter;
0126 typedef NCollection_CellFilter<BRepMesh_VertexInspector> VertexCellFilter;
0127 
0128 typedef NCollection_Shared<
0129   NCollection_DataMap<TopoDS_Shape, Standard_Integer, TopTools_ShapeMapHasher>>
0130   DMapOfShapeInteger;
0131 typedef NCollection_Shared<NCollection_DataMap<IFacePtr, ListOfInteger>>
0132                                                                    DMapOfIFacePtrsListOfInteger;
0133 typedef NCollection_Shared<NCollection_Map<IEdgePtr>>              MapOfIEdgePtr;
0134 typedef NCollection_Shared<NCollection_Map<IFacePtr>>              MapOfIFacePtr;
0135 typedef NCollection_Shared<NCollection_Map<BRepMesh_OrientedEdge>> MapOfOrientedEdges;
0136 typedef NCollection_Shared<NCollection_Map<Standard_Real>>         MapOfReal;
0137 typedef NCollection_Shared<NCollection_IndexedDataMap<IFacePtr, ListOfIPCurves>>
0138   IDMapOfIFacePtrsListOfIPCurves;
0139 typedef NCollection_Shared<NCollection_DataMap<IFacePtr, Handle(MapOfIEdgePtr)>>
0140   DMapOfIFacePtrsMapOfIEdgePtrs;
0141 typedef NCollection_Shared<NCollection_IndexedDataMap<BRepMesh_Edge, BRepMesh_PairOfIndex>>
0142   IDMapOfLink;
0143 typedef NCollection_Shared<NCollection_DataMap<Standard_Integer, ListOfInteger>>
0144   DMapOfIntegerListOfInteger;
0145 typedef NCollection_Shared<NCollection_DataMap<Standard_Integer, Standard_Boolean>>
0146                                                                   MapOfIntegerInteger;
0147 typedef NCollection_Shared<NCollection_IndexedMap<Standard_Real>> IMapOfReal;
0148 
0149 typedef NCollection_Shared<NCollection_Array1<Standard_Integer>> Array1OfInteger;
0150 } // namespace IMeshData
0151 
0152 #endif