Salome HOME
projects
/
modules
/
smesh.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
22874: [CEA 1425] Performance SMESH Module
[modules/smesh.git]
/
src
/
SMESH_I
/
SMESH_MeshEditor_i.cxx
diff --git
a/src/SMESH_I/SMESH_MeshEditor_i.cxx
b/src/SMESH_I/SMESH_MeshEditor_i.cxx
index d233bb63fa7c62b3ae7ce33c9692b70955526da9..519478d300bd5126f75585304eb9676c955fc84c 100644
(file)
--- 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();
}
{
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;
};// struct TPreviewMesh
static SMESH_NodeSearcher * theNodeSearcher = 0;
@@
-2398,6
+2404,10
@@
SMESH_MeshEditor_i::RotationSweepObjects(const SMESH::ListOfIDSources & theNodes
<< TVar( theTolerance ) << ", "
<< theMakeGroups << " )";
}
<< TVar( theTolerance ) << ", "
<< theMakeGroups << " )";
}
+ else
+ {
+ getPreviewMesh()->Remove( SMDSAbs_Volume );
+ }
return aGroups ? aGroups : new SMESH::ListOfGroups;
return aGroups ? aGroups : new SMESH::ListOfGroups;
@@
-2551,6
+2561,10
@@
SMESH_MeshEditor_i::ExtrusionSweepObjects(const SMESH::ListOfIDSources & theNode
<< TVar( theNbOfSteps ) << ", "
<< theToMakeGroups << " )";
}
<< TVar( theNbOfSteps ) << ", "
<< theToMakeGroups << " )";
}
+ else
+ {
+ getPreviewMesh()->Remove( SMDSAbs_Volume );
+ }
return aGroups ? aGroups : new SMESH::ListOfGroups;
return aGroups ? aGroups : new SMESH::ListOfGroups;
@@
-2623,6
+2637,10
@@
SMESH_MeshEditor_i::ExtrusionByNormal(const SMESH::ListOfIDSources& objects,
<< ", " << dim
<< " )";
}
<< ", " << dim
<< " )";
}
+ else
+ {
+ getPreviewMesh()->Remove( SMDSAbs_Volume );
+ }
declareMeshModified( /*isReComputeSafe=*/true ); // does not influence Compute()
declareMeshModified( /*isReComputeSafe=*/true ); // does not influence Compute()
@@
-2675,6
+2693,10
@@
SMESH_MeshEditor_i::AdvancedExtrusion(const SMESH::long_array & theIDsOfElements
<< theSewTolerance << ", "
<< theMakeGroups << " )";
}
<< theSewTolerance << ", "
<< theMakeGroups << " )";
}
+ else
+ {
+ getPreviewMesh()->Remove( SMDSAbs_Volume );
+ }
return aGroups ? aGroups : new SMESH::ListOfGroups;
return aGroups ? aGroups : new SMESH::ListOfGroups;
@@
-2844,6
+2866,10
@@
SMESH_MeshEditor_i::ExtrusionAlongPathObjects(const SMESH::ListOfIDSources & the
<< ( theHasRefPoint ? theRefPoint.z : 0 ) << " ), "
<< theMakeGroups << " )";
}
<< ( theHasRefPoint ? theRefPoint.z : 0 ) << " ), "
<< theMakeGroups << " )";
}
+ else
+ {
+ getPreviewMesh()->Remove( SMDSAbs_Volume );
+ }
return aGroups._retn();
return aGroups._retn();