- SMESHDS_Mesh* aMesh = GetMeshDS();
-
- set<const SMDS_MeshElement*> elements;
- for (int i = 0; i < theIDsOfElements.length(); i++)
- {
- CORBA::Long index = theIDsOfElements[i];
- const SMDS_MeshElement * elem = aMesh->FindElement(index);
- if ( elem )
- elements.insert( elem );
- }
- const SMESH::PointStruct * P = &theStepVector.PS;
- gp_Vec stepVec( P->x, P->y, P->z );
+ CASCatch_TRY {
+ SMESHDS_Mesh* aMesh = GetMeshDS();
+
+ set<const SMDS_MeshElement*> elements;
+ for (int i = 0; i < theIDsOfElements.length(); i++)
+ {
+ CORBA::Long index = theIDsOfElements[i];
+ const SMDS_MeshElement * elem = aMesh->FindElement(index);
+ if ( elem )
+ elements.insert( elem );
+ }
+ const SMESH::PointStruct * P = &theStepVector.PS;
+ gp_Vec stepVec( P->x, P->y, P->z );
+
+ TElemOfElemListMap aHystory;
+ ::SMESH_MeshEditor anEditor( _myMesh );
+ anEditor.ExtrusionSweep (elements, stepVec, theNbOfSteps, aHystory);