From: eap Date: Wed, 20 May 2009 15:43:35 +0000 (+0000) Subject: + StdMeshers_CompositeHexa_3D.cxx \ X-Git-Tag: V4_1_0_maintainance_FINAL~79 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=8302fc4896f508f6737a54365ad81ba011a2958a;p=modules%2Fsmesh.git + StdMeshers_CompositeHexa_3D.cxx \ --- diff --git a/src/StdMeshers/Makefile.am b/src/StdMeshers/Makefile.am index 50e728f2f..86a489492 100644 --- a/src/StdMeshers/Makefile.am +++ b/src/StdMeshers/Makefile.am @@ -64,6 +64,7 @@ salomeinclude_HEADERS = \ StdMeshers_CompositeSegment_1D.hxx \ StdMeshers_UseExisting_1D2D.hxx \ StdMeshers_QuadToTriaAdaptor.hxx \ + StdMeshers_CompositeHexa_3D.hxx \ SMESH_StdMeshers.hxx \ StdMeshers_TrianglePreference.hxx @@ -108,6 +109,7 @@ dist_libStdMeshers_la_SOURCES = \ StdMeshers_CompositeSegment_1D.cxx \ StdMeshers_UseExisting_1D2D.cxx \ StdMeshers_QuadToTriaAdaptor.cxx \ + StdMeshers_CompositeHexa_3D.cxx \ StdMeshers_TrianglePreference.cxx diff --git a/src/StdMeshers/StdMeshers_CompositeHexa_3D.cxx b/src/StdMeshers/StdMeshers_CompositeHexa_3D.cxx index 42acee19e..8254219d2 100644 --- a/src/StdMeshers/StdMeshers_CompositeHexa_3D.cxx +++ b/src/StdMeshers/StdMeshers_CompositeHexa_3D.cxx @@ -33,7 +33,6 @@ #include "SMESH_Comment.hxx" #include "SMESH_ComputeError.hxx" #include "SMESH_Mesh.hxx" -#include "SMESH_MeshEditor.hxx" #include "SMESH_MesherHelper.hxx" #include "SMESH_subMesh.hxx" @@ -815,7 +814,7 @@ bool _QuadFaceGrid::LoadGrid( SMESH_Mesh& mesh ) TIDSortedElemSet emptySet, avoidSet; avoidSet.insert( firstQuad ); firstQuad = SMESH_MeshEditor::FindFaceInSet( n1down, n2down, emptySet, avoidSet); - if ( firstQuad && !faceSubMesh->Contains( firstQuad )) { + while ( firstQuad && !faceSubMesh->Contains( firstQuad )) { avoidSet.insert( firstQuad ); firstQuad = SMESH_MeshEditor::FindFaceInSet( n1down, n2down, emptySet, avoidSet); } diff --git a/src/StdMeshers/StdMeshers_Hexa_3D.cxx b/src/StdMeshers/StdMeshers_Hexa_3D.cxx index 60be202f2..3320a4ee9 100644 --- a/src/StdMeshers/StdMeshers_Hexa_3D.cxx +++ b/src/StdMeshers/StdMeshers_Hexa_3D.cxx @@ -24,13 +24,13 @@ // Moved here from SMESH_Hexa_3D.cxx // Author : Paul RASCLE, EDF // Module : SMESH -// $Header$ // #include "StdMeshers_Hexa_3D.hxx" -#include "StdMeshers_Quadrangle_2D.hxx" +#include "StdMeshers_CompositeHexa_3D.hxx" #include "StdMeshers_FaceSide.hxx" #include "StdMeshers_Penta_3D.hxx" #include "StdMeshers_Prism_3D.hxx" +#include "StdMeshers_Quadrangle_2D.hxx" #include "SMESH_Gen.hxx" #include "SMESH_Mesh.hxx" @@ -214,7 +214,7 @@ bool StdMeshers_Hexa_3D::Compute(SMESH_Mesh & aMesh, //Unexpect aCatch(SalomeException); MESSAGE("StdMeshers_Hexa_3D::Compute"); SMESHDS_Mesh * meshDS = aMesh.GetMeshDS(); - + // 0. - shape and face mesh verification // 0.1 - shape must be a solid (or a shell) with 6 faces @@ -224,8 +224,13 @@ bool StdMeshers_Hexa_3D::Compute(SMESH_Mesh & aMesh, ASSERT(aSubMesh); meshFaces.push_back(aSubMesh); } - if (meshFaces.size() != 6) - return error(COMPERR_BAD_SHAPE, TComm(meshFaces.size())<<" instead of 6 faces in a block"); + if (meshFaces.size() != 6) { + //return error(COMPERR_BAD_SHAPE, TComm(meshFaces.size())<<" instead of 6 faces in a block"); + static StdMeshers_CompositeHexa_3D compositeHexa(-10, 0, aMesh.GetGen()); + if ( !compositeHexa.Compute( aMesh, aShape )) + return error( compositeHexa.GetComputeError() ); + return true; + } // 0.2 - is each face meshed with Quadrangle_2D? (so, with a wire of 4 edges)