From: fps Date: Tue, 3 Jul 2012 12:36:38 +0000 (+0000) Subject: Correction des bugs 21586 et 21634 X-Git-Tag: V6_6_0a1~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=554d3417089e7fce4070433ba15d9afbcfc4ba90;p=plugins%2Fhexablockplugin.git Correction des bugs 21586 et 21634 --- diff --git a/src/HEXABLOCKPlugin/HEXABLOCKPlugin_HEXABLOCK.cxx b/src/HEXABLOCKPlugin/HEXABLOCKPlugin_HEXABLOCK.cxx index 19ca5e9..9c5fdca 100755 --- a/src/HEXABLOCKPlugin/HEXABLOCKPlugin_HEXABLOCK.cxx +++ b/src/HEXABLOCKPlugin/HEXABLOCKPlugin_HEXABLOCK.cxx @@ -121,19 +121,26 @@ bool HEXABLOCKPlugin_HEXABLOCK::Compute(SMESH_Mesh& theMesh, const TopoDS_Shape& for ( ; expShape.More(); expShape.Next() ) { _nbShape++; } - _tabNode = new SMDS_MeshNode*[_nbShape]; } - _tabNode[_iShape] = meshDS->AddNode(0, 0, 0); - meshDS->NewSubMesh( meshDS->ShapeToIndex(theShape))->AddElement( _tabNode[_iShape] ); + // to prevent from displaying error message after computing, + for ( int i = 0; i < _nbShape; ++i ) + if ( SMESH_subMesh* sm = theMesh.GetSubMeshContaining( theShape )) + { + SMESH_subMeshIteratorPtr smIt = sm->getDependsOnIterator(/*includeSelf=*/true, + /*complexShapeFirst=*/false); + while ( smIt->more() ) + { + sm = smIt->next(); + if ( !sm->IsMeshComputed() ) + sm->SetIsAlwaysComputed( true ); + } + } + _iShape++; if ( _iShape == _nbShape ) { - for (int i=0; i<_nbShape; i++) { - meshDS->RemoveNode( _tabNode[i] ); - } - delete [] _tabNode; _nbShape = 0; _iShape = 0; @@ -191,6 +198,8 @@ bool HEXABLOCKPlugin_HEXABLOCK::Compute3D(SMESH_Mesh& theMesh) { SMESH_HexaBlocks hexaBuilder(theMesh); HEXA_NS::Document* doc = _hyp->GetDocument(); + // doc->reorderFaces (); // 0) Abu 06/03/2012 + hexaBuilder.computeDoc(doc); hexaBuilder.buildGroups(doc); @@ -209,6 +218,8 @@ bool HEXABLOCKPlugin_HEXABLOCK::Compute2D(SMESH_Mesh& theMesh) if(MYDEBUG) MESSAGE("HEXABLOCKPlugin_HEXABLOCK::Compute 2D"); HEXA_NS::Document* doc = _hyp->GetDocument(); + // doc->reorderFaces (); // 0) Abu 06/03/2012 + SMESH_HexaBlocks hexaBuilder(theMesh); // A) Vertex computation @@ -330,6 +341,8 @@ bool HEXABLOCKPlugin_HEXABLOCK::Compute1D(SMESH_Mesh& theMesh) if(MYDEBUG) MESSAGE("HEXABLOCKPlugin_HEXABLOCK::Compute 1D"); HEXA_NS::Document* doc = _hyp->GetDocument(); + // doc->reorderFaces (); // 0) Abu 06/03/2012 + SMESH_HexaBlocks hexaBuilder(theMesh); // A) Vertex computation @@ -371,6 +384,8 @@ bool HEXABLOCKPlugin_HEXABLOCK::Compute0D(SMESH_Mesh& theMesh) if(MYDEBUG) MESSAGE("HEXABLOCKPlugin_HEXABLOCK::Compute 0D"); HEXA_NS::Document* doc = _hyp->GetDocument(); + // doc->reorderFaces (); // 0) Abu 06/03/2012 + SMESH_HexaBlocks hexaBuilder(theMesh); // A) Vertex computation diff --git a/src/HEXABLOCKPlugin/HEXABLOCKPlugin_HEXABLOCK.hxx b/src/HEXABLOCKPlugin/HEXABLOCKPlugin_HEXABLOCK.hxx index ac9c6ae..5817a42 100755 --- a/src/HEXABLOCKPlugin/HEXABLOCKPlugin_HEXABLOCK.hxx +++ b/src/HEXABLOCKPlugin/HEXABLOCKPlugin_HEXABLOCK.hxx @@ -61,7 +61,6 @@ private: const HEXABLOCKPlugin_Hypothesis* _hyp; int _iShape; int _nbShape; - SMDS_MeshNode** _tabNode; }; #endif