{
if(MYDEBUG) MESSAGE("SMESH_Mesh::ShapeToMesh");
- if ( !aShape.IsNull() && _isShapeToMesh )
- throw SALOME_Exception(LOCALIZED ("a shape to mesh has already been defined"));
-
+ if ( !aShape.IsNull() && _isShapeToMesh ) {
+ if ( aShape.ShapeType() != TopAbs_COMPOUND && // group contents is allowed to change
+ _myMeshDS->ShapeToMesh().ShapeType() != TopAbs_COMPOUND )
+ throw SALOME_Exception(LOCALIZED ("a shape to mesh has already been defined"));
+ }
// clear current data
if ( !_myMeshDS->ShapeToMesh().IsNull() )
{
*/
//================================================================================
+int SMESH_Mesh::Nb0DElements() throw(SALOME_Exception)
+{
+ Unexpect aCatch(SalomeException);
+ return _myMeshDS->GetMeshInfo().Nb0DElements();
+}
+
+//================================================================================
+/*!
+ * \brief Return number of edges of given order in the mesh
+ */
+//================================================================================
+
int SMESH_Mesh::NbEdges(SMDSAbs_ElementOrder order) throw(SALOME_Exception)
{
Unexpect aCatch(SalomeException);