X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESH%2FSMESH_Gen.cxx;h=d515351393d12d2ad617c0f2e3be0162697c2e38;hb=cb2ff0ef7093f4e532ec69f15f514ba5a1c5a37e;hp=cc7d3870711be6b44a959829543eddc6b8913412;hpb=ae86d2a1abc7da8301c1febf716ef6528c6af16e;p=modules%2Fsmesh.git diff --git a/src/SMESH/SMESH_Gen.cxx b/src/SMESH/SMESH_Gen.cxx index cc7d38707..d51535139 100644 --- a/src/SMESH/SMESH_Gen.cxx +++ b/src/SMESH/SMESH_Gen.cxx @@ -120,16 +120,17 @@ SMESH_Mesh* SMESH_Gen::CreateMesh(int theStudyId, bool theIsEmbeddedMode) } //============================================================================= -/*! +/* * Compute a mesh */ //============================================================================= bool SMESH_Gen::Compute(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape, - const bool anUpward, - const ::MeshDimension aDim, - TSetOfInt* aShapesId) + const bool aShapeOnly /*=false*/, + const bool anUpward /*=false*/, + const ::MeshDimension aDim /*=::MeshDim_3D*/, + TSetOfInt* aShapesId /*=0*/) { MESSAGE("SMESH_Gen::Compute"); MEMOSTAT; @@ -143,11 +144,12 @@ bool SMESH_Gen::Compute(SMESH_Mesh & aMesh, const int globalAlgoDim = 100; SMESH_subMeshIteratorPtr smIt; - SMESH_subMesh::compute_event computeEvent; - if ( !anUpward && aShape.IsSame( aMesh.GetShapeToMesh() )) - computeEvent = SMESH_subMesh::COMPUTE; - else - computeEvent = SMESH_subMesh::COMPUTE_SUBMESH; + + // Fix of Issue 22150. Due to !BLSURF->OnlyUnaryInput(), BLSURF computes edges + // that must be computed by Projection 1D-2D when Projection asks to compute + // one face only. + SMESH_subMesh::compute_event computeEvent = + aShapeOnly ? SMESH_subMesh::COMPUTE_SUBMESH : SMESH_subMesh::COMPUTE; if ( anUpward ) // is called from the below code in this method { @@ -204,7 +206,9 @@ bool SMESH_Gen::Compute(SMESH_Mesh & aMesh, list< SMESH_subMesh* > smWithAlgoSupportingSubmeshes[4]; // for each dim // map to sort sm with same dim algos according to dim of - // the shape the algo assigned to (issue 0021217) + // the shape the algo assigned to (issue 0021217). + // Other issues influenced the algo applying order: + // 21406, 21556, 21893, 20206 multimap< int, SMESH_subMesh* > shDim2sm; multimap< int, SMESH_subMesh* >::reverse_iterator shDim2smIt; TopoDS_Shape algoShape; @@ -273,7 +277,7 @@ bool SMESH_Gen::Compute(SMESH_Mesh & aMesh, // reload sub-meshes from shDim2sm into smWithAlgoSupportingSubmeshes for ( shDim2smIt = shDim2sm.rbegin(); shDim2smIt != shDim2sm.rend(); ++shDim2smIt ) if ( shDim2smIt->first == globalAlgoDim ) - smWithAlgoSupportingSubmeshes[0].push_back( shDim2smIt->second ); + smWithAlgoSupportingSubmeshes[3].push_back( shDim2smIt->second ); else smWithAlgoSupportingSubmeshes[0].push_front( shDim2smIt->second ); @@ -329,7 +333,7 @@ bool SMESH_Gen::Compute(SMESH_Mesh & aMesh, SMESH_Hypothesis::Hypothesis_Status status; if ( subAlgo->CheckHypothesis( aMesh, aSubShape, status )) // mesh a lower smToCompute starting from vertices - Compute( aMesh, aSubShape, /*anUpward=*/true, aDim, aShapesId ); + Compute( aMesh, aSubShape, aShapeOnly, /*anUpward=*/true, aDim, aShapesId ); } } } @@ -361,7 +365,7 @@ bool SMESH_Gen::Compute(SMESH_Mesh & aMesh, // ----------------------------------------------- // mesh the rest sub-shapes starting from vertices // ----------------------------------------------- - ret = Compute( aMesh, aShape, /*anUpward=*/true, aDim, aShapesId ); + ret = Compute( aMesh, aShape, aShapeOnly, /*anUpward=*/true, aDim, aShapesId ); } MESSAGE( "VSR - SMESH_Gen::Compute() finished, OK = " << ret); @@ -625,7 +629,9 @@ static bool checkConformIgnoredAlgos(SMESH_Mesh& aMesh, theErrors.back().Set( SMESH_Hypothesis::HYP_NOTCONFORM, algo, false ); } - // sub-algos will be hidden by a local + // sub-algos will be hidden by a local if does not support sub-meshes + if ( algo->SupportSubmeshes() ) + algo = 0; SMESH_subMeshIteratorPtr revItSub = aSubMesh->getDependsOnIterator( /*includeSelf=*/false, /*complexShapeFirst=*/true); bool checkConform2 = false;