X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMDS%2FSMDS_UnstructuredGrid.cxx;h=5fe82a432a7cd65a17750e81df074b22c043cecf;hb=c2037920d01df98a73df98df8a2b234babe1106c;hp=5a05789969713c900d85498ebb0f13cb5bf60993;hpb=9a54694a0ab1e5cbc558a35c4606ceea4f7af2ef;p=modules%2Fsmesh.git diff --git a/src/SMDS/SMDS_UnstructuredGrid.cxx b/src/SMDS/SMDS_UnstructuredGrid.cxx index 5a0578996..5fe82a432 100644 --- a/src/SMDS/SMDS_UnstructuredGrid.cxx +++ b/src/SMDS/SMDS_UnstructuredGrid.cxx @@ -1,9 +1,9 @@ -// Copyright (C) 2010-2012 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2010-2015 CEA/DEN, EDF R&D, OPEN CASCADE // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either -// version 2.1 of the License. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -24,6 +24,7 @@ #include "SMDS_MeshVolume.hxx" #include "utilities.h" +#include "chrono.hxx" #include #include @@ -87,7 +88,8 @@ unsigned long SMDS_UnstructuredGrid::GetMTime() MESSAGE("vtkUnstructuredGrid::GetMTime: " << mtime); return mtime; } - +// OUV_PORTING_VTK6: seems to be useless +/* void SMDS_UnstructuredGrid::Update() { MESSAGE("SMDS_UnstructuredGrid::Update"); @@ -99,7 +101,7 @@ void SMDS_UnstructuredGrid::UpdateInformation() MESSAGE("SMDS_UnstructuredGrid::UpdateInformation"); return vtkUnstructuredGrid::UpdateInformation(); } - +*/ vtkPoints* SMDS_UnstructuredGrid::GetPoints() { // TODO erreur incomprehensible de la macro vtk GetPoints apparue avec la version paraview de fin aout 2010 @@ -284,8 +286,6 @@ void SMDS_UnstructuredGrid::compactGrid(std::vector& idNodesOldToNew, int n } newFaceLocations->Squeeze(); newFaces->Squeeze(); - newFaceLocations->Register(this); - newFaces->Register(this); this->SetCells(newTypes, newLocations, newConnectivity, newFaceLocations, newFaces); newFaceLocations->Delete(); newFaces->Delete(); @@ -327,7 +327,7 @@ void SMDS_UnstructuredGrid::copyBloc(vtkUnsignedCharArray *newTypes, int start, int end) { - MESSAGE("copyBloc " << alreadyCopied << " " << start << " " << end << " size: " << end - start << " total: " << alreadyCopied + end - start); + //MESSAGE("copyBloc " << alreadyCopied << " " << start << " " << end << " size: " << end - start << " total: " << alreadyCopied + end - start); for (int j = start; j < end; j++) { newTypes->SetValue(alreadyCopied, this->Types->GetValue(j)); @@ -401,6 +401,7 @@ void SMDS_UnstructuredGrid::BuildDownwardConnectivity(bool withEdges) _downArray[VTK_QUADRATIC_EDGE] = new SMDS_DownQuadEdge(this); _downArray[VTK_TRIANGLE] = new SMDS_DownTriangle(this); _downArray[VTK_QUADRATIC_TRIANGLE] = new SMDS_DownQuadTriangle(this); + _downArray[VTK_BIQUADRATIC_TRIANGLE] = new SMDS_DownQuadTriangle(this); _downArray[VTK_QUAD] = new SMDS_DownQuadrangle(this); _downArray[VTK_QUADRATIC_QUAD] = new SMDS_DownQuadQuadrangle(this); _downArray[VTK_BIQUADRATIC_QUAD] = new SMDS_DownQuadQuadrangle(this); @@ -441,6 +442,7 @@ void SMDS_UnstructuredGrid::BuildDownwardConnectivity(bool withEdges) GuessSize[VTK_QUADRATIC_EDGE] = nbQuadEdgeGuess; GuessSize[VTK_TRIANGLE] = nbLinTriaGuess; GuessSize[VTK_QUADRATIC_TRIANGLE] = nbQuadTriaGuess; + GuessSize[VTK_BIQUADRATIC_TRIANGLE] = nbQuadTriaGuess; GuessSize[VTK_QUAD] = nbLinQuadGuess; GuessSize[VTK_QUADRATIC_QUAD] = nbQuadQuadGuess; GuessSize[VTK_BIQUADRATIC_QUAD] = nbQuadQuadGuess; @@ -459,6 +461,7 @@ void SMDS_UnstructuredGrid::BuildDownwardConnectivity(bool withEdges) _downArray[VTK_QUADRATIC_EDGE] ->allocate(nbQuadEdgeGuess); _downArray[VTK_TRIANGLE] ->allocate(nbLinTriaGuess); _downArray[VTK_QUADRATIC_TRIANGLE] ->allocate(nbQuadTriaGuess); + _downArray[VTK_BIQUADRATIC_TRIANGLE] ->allocate(nbQuadTriaGuess); _downArray[VTK_QUAD] ->allocate(nbLinQuadGuess); _downArray[VTK_QUADRATIC_QUAD] ->allocate(nbQuadQuadGuess); _downArray[VTK_BIQUADRATIC_QUAD] ->allocate(nbQuadQuadGuess); @@ -1079,8 +1082,11 @@ SMDS_MeshCell* SMDS_UnstructuredGrid::extrudeVolumeFromFace(int vtkVolId, double *coords = this->GetPoint(oldId); SMDS_MeshNode *newNode = _mesh->AddNode(coords[0], coords[1], coords[2]); newId = newNode->getVtkId(); - std::map emptyMap; - nodeQuadDomains[oldId] = emptyMap; + if (! nodeQuadDomains.count(oldId)) + { + std::map emptyMap; + nodeQuadDomains[oldId] = emptyMap; + } nodeQuadDomains[oldId][dom1_2] = newId; } orderedNodes.push_back(newId);