X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESH_I%2FSMESH_MeshEditor_i.cxx;h=519478d300bd5126f75585304eb9676c955fc84c;hb=0921263864977d53ebb778e3d1c9d88d61a4912f;hp=d233bb63fa7c62b3ae7ce33c9692b70955526da9;hpb=bbca2cb797c37bb7695d3f35490bcd328fbddd4e;p=modules%2Fsmesh.git diff --git a/src/SMESH_I/SMESH_MeshEditor_i.cxx b/src/SMESH_I/SMESH_MeshEditor_i.cxx index d233bb63f..519478d30 100644 --- a/src/SMESH_I/SMESH_MeshEditor_i.cxx +++ b/src/SMESH_I/SMESH_MeshEditor_i.cxx @@ -182,6 +182,12 @@ namespace MeshEditor_I { { GetMeshDS()->ClearMesh(); } + void Remove( SMDSAbs_ElementType type ) + { + SMDS_ElemIteratorPtr eIt = GetMeshDS()->elementsIterator( type ); + while ( eIt->more() ) + GetMeshDS()->RemoveFreeElement( eIt->next(), /*sm=*/0, /*fromGroups=*/false ); + } };// struct TPreviewMesh static SMESH_NodeSearcher * theNodeSearcher = 0; @@ -2398,6 +2404,10 @@ SMESH_MeshEditor_i::RotationSweepObjects(const SMESH::ListOfIDSources & theNodes << TVar( theTolerance ) << ", " << theMakeGroups << " )"; } + else + { + getPreviewMesh()->Remove( SMDSAbs_Volume ); + } return aGroups ? aGroups : new SMESH::ListOfGroups; @@ -2551,6 +2561,10 @@ SMESH_MeshEditor_i::ExtrusionSweepObjects(const SMESH::ListOfIDSources & theNode << TVar( theNbOfSteps ) << ", " << theToMakeGroups << " )"; } + else + { + getPreviewMesh()->Remove( SMDSAbs_Volume ); + } return aGroups ? aGroups : new SMESH::ListOfGroups; @@ -2623,6 +2637,10 @@ SMESH_MeshEditor_i::ExtrusionByNormal(const SMESH::ListOfIDSources& objects, << ", " << dim << " )"; } + else + { + getPreviewMesh()->Remove( SMDSAbs_Volume ); + } declareMeshModified( /*isReComputeSafe=*/true ); // does not influence Compute() @@ -2675,6 +2693,10 @@ SMESH_MeshEditor_i::AdvancedExtrusion(const SMESH::long_array & theIDsOfElements << theSewTolerance << ", " << theMakeGroups << " )"; } + else + { + getPreviewMesh()->Remove( SMDSAbs_Volume ); + } return aGroups ? aGroups : new SMESH::ListOfGroups; @@ -2844,6 +2866,10 @@ SMESH_MeshEditor_i::ExtrusionAlongPathObjects(const SMESH::ListOfIDSources & the << ( theHasRefPoint ? theRefPoint.z : 0 ) << " ), " << theMakeGroups << " )"; } + else + { + getPreviewMesh()->Remove( SMDSAbs_Volume ); + } return aGroups._retn();