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=7b0ba25b873e150d6cf01d338c1f62f9fe5fb3a8;hpb=80caa820d03a86f6c09c2d89ae73f5a65a4c00e0;p=modules%2Fsmesh.git diff --git a/src/SMESH_I/SMESH_MeshEditor_i.cxx b/src/SMESH_I/SMESH_MeshEditor_i.cxx index 7b0ba25b8..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; @@ -2458,8 +2468,8 @@ namespace MeshEditor_I ExtrusionParams(CORBA::Double theStepSize, CORBA::Long theNbOfSteps, CORBA::Short theDim, - CORBA::Boolean theUseInputElemsOnly, CORBA::Boolean theByAverageNormal, + CORBA::Boolean theUseInputElemsOnly, CORBA::Boolean theMakeGroups ): ::SMESH_MeshEditor::ExtrusParam ( theStepSize, theNbOfSteps, @@ -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();