24 #ifndef _SMDS_UNSTRUCTUREDGRID_HXX
25 #define _SMDS_UNSTRUCTUREDGRID_HXX
29 #include <vtkUnstructuredGrid.h>
30 #include <vtkCellLinks.h>
38 #define VTK_MAXTYPE VTK_POLYHEDRON
43 #define NBMAXNEIGHBORS 100
46 #define NBMAXNODESINCELL 5000
50 #ifndef VTK_HAS_MTIME_TYPE
51 #define VTK_HAS_MTIME_TYPE
64 void ResizeForPoint(vtkIdType vtkID);
65 void BuildLinks(vtkDataSet *data, vtkCellArray *Connectivity, vtkUnsignedCharArray* types);
76 void compactGrid(std::vector<int>& idNodesOldToNew,
78 std::vector<int>& idCellsOldToNew,
81 virtual vtkPoints *GetPoints();
83 int InsertNextLinkedCell(
int type,
int npts, vtkIdType *pts);
85 int CellIdToDownId(
int vtkCellId);
86 void setCellIdToDownId(
int vtkCellId,
int downId);
87 void CleanDownwardConnectivity();
88 void BuildDownwardConnectivity(
bool withEdges);
89 int GetNeighbors(
int* neighborsVtkIds,
int* downIds,
unsigned char* downTypes,
int vtkId,
bool getSkin=
false);
90 int GetParentVolumes(
int* volVtkIds,
int vtkId);
91 int GetParentVolumes(
int* volVtkIds,
int downId,
unsigned char downType);
92 void GetNodeIds(std::set<int>& nodeSet,
int downId,
unsigned char downType);
93 void ModifyCellNodes(
int vtkVolId, std::map<int, int> localClonedNodeIds);
94 int getOrderedNodesOfFace(
int vtkVolId,
int& dim, std::vector<vtkIdType>& orderedNodes);
95 SMDS_MeshCell* extrudeVolumeFromFace(
int vtkVolId,
int domain1,
int domain2,
96 std::set<int>& originalNodes,
97 std::map<
int, std::map<int, int> >& nodeDomains,
98 std::map<
int, std::map<long,int> >& nodeQuadDomains);
106 return _downArray[vtkType];
108 void AllocateDiameters( vtkIdType maxVtkID );
109 void SetBallDiameter( vtkIdType vtkID,
double diameter );
110 double GetBallDiameter( vtkIdType vtkID )
const;
118 void copyNodes(vtkPoints *newPoints, std::vector<int>& idNodesOldToNew,
int& alreadyCopied,
int start,
int end);
119 void copyBloc(vtkUnsignedCharArray *newTypes, std::vector<int>& idCellsOldToNew, std::vector<int>& idNodesOldToNew,
120 vtkCellArray* newConnectivity, vtkIdTypeArray* newLocations, vtkIdType* pointsCell,
int& alreadyCopied,