-// Copyright (C) 2007-2021 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2024 CEA, EDF, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
<< theIDsOfElements << ", "
<< theVector << " )";
}
- return aGroups;
+ return aGroups ? aGroups : new SMESH::ListOfGroups();
}
//=======================================================================
<< theObject << ", "
<< theVector << " )";
}
- return aGroups;
+ return aGroups ? aGroups : new SMESH::ListOfGroups();
}
//=======================================================================
<< theAxis << ", "
<< TVar( theAngle ) << " )";
}
- return aGroups;
+ return aGroups ? aGroups : new SMESH::ListOfGroups();
}
//=======================================================================
<< theAxis << ", "
<< TVar( theAngle ) << " )";
}
- return aGroups;
+ return aGroups ? aGroups : new SMESH::ListOfGroups();
}
//=======================================================================
* mesh + created boundary elements; "" means not to create the new mesh
* \param toCopyAll - if true, the whole initial mesh will be copied into
* the new mesh else only boundary elements will be copied into the new mesh
+ * \param toCreateAllElements - if true all the dim element are created from the mesh
* \param groups - optional groups of elements to make boundary around
* \param mesh - returns the mesh where elements were added to
* \param group - returns the created group, if any
const char* groupName,
const char* meshName,
CORBA::Boolean toCopyAll,
+ CORBA::Boolean toCreateAllElements,
const SMESH::ListOfIDSources& groups,
SMESH::SMESH_Mesh_out mesh,
SMESH::SMESH_Group_out group)
// process groups belonging to another mesh
SMESH::SMESH_Mesh_var otherMesh = groupsOfOtherMesh[0]->GetMesh();
SMESH::SMESH_MeshEditor_var editor = otherMesh->GetMeshEditor();
- nbAdded += editor->MakeBoundaryElements( dim, groupName, meshName, toCopyAll,
+ nbAdded += editor->MakeBoundaryElements( dim, groupName, meshName, toCopyAll, toCreateAllElements,
groupsOfOtherMesh, mesh, group );
}
SMESH_Mesh* srcMesh = ( toCopyMesh && !toCopyAll ) ? myMesh : tgtMesh;
SMESHDS_Mesh* srcMeshDS = srcMesh->GetMeshDS();
+
// group of boundary elements
SMESH_Group* smesh_group = 0;
SMDSAbs_ElementType elemType = (dim == SMESH::BND_2DFROM3D) ? SMDSAbs_Volume : SMDSAbs_Face;
}
TIDSortedElemSet elements;
-
if ( groups.length() > 0 )
{
for ( int i = 0; i < nbGroups; ++i )
/*toCopyElements=*/false,
/*toCopyExistingBondary=*/srcMesh != tgtMesh,
/*toAddExistingBondary=*/true,
- /*aroundElements=*/true);
+ /*aroundElements=*/true,
+ /*toCreateAllElements=*/toCreateAllElements);
}
}
}
tgtMesh,
/*toCopyElements=*/false,
/*toCopyExistingBondary=*/srcMesh != tgtMesh,
- /*toAddExistingBondary=*/true);
+ /*toAddExistingBondary=*/true,
+ /*aroundElements=*/toCreateAllElements);
}
tgtMesh->GetMeshDS()->Modified();
if ( group_var->_is_nil() )
pyDump << "_NoneGroup = "; // assignment to None is forbidden
else
+
pyDump << group_var << " = ";
- pyDump << this << ".MakeBoundaryElements( "
- << "SMESH." << dimName[int(dim)] << ", "
- << "'" << groupName << "', "
- << "'" << meshName<< "', "
- << toCopyAll << ", "
- << groups << ")";
+
+ if ( toCreateAllElements )
+ pyDump << this << ".MakeBoundaryOfEachElement( ";
+ else
+ {
+ pyDump << this << ".MakeBoundaryElements( "
+ << "SMESH." << dimName[int(dim)] << ", ";
+ }
+
+ pyDump<< "'" << groupName << "', "
+ << "'" << meshName<< "', "
+ << toCopyAll << ", "
+ << groups << ")";
mesh = mesh_var._retn();
group = group_var._retn();