mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-13 18:20:34 +05:00
0020749: EDF 1291 SMESH : Create 2D Mesh from 2D improvement
+ SMESH::SMESH_Mesh MakeBoundaryMesh(in SMESH_IDSource elements, + in Bnd_Dimension dimension, + in string groupName, + in string meshName, + in boolean toCopyElements, + in boolean toCopyExistingBondary, + out SMESH_Group group);
This commit is contained in:
parent
39599f24f0
commit
68f20ecf75
@ -29,6 +29,8 @@
|
||||
|
||||
module SMESH
|
||||
{
|
||||
enum Bnd_Dimension { BND_2DFROM3D, BND_1DFROM3D, BND_1DFROM2D };
|
||||
|
||||
/*!
|
||||
* This interface makes modifications on the Mesh - removing elements and nodes etc.
|
||||
*/
|
||||
@ -921,12 +923,34 @@ module SMESH
|
||||
in GEOM::GEOM_Object theShape );
|
||||
|
||||
/*!
|
||||
* \brief Generated skin mesh (containing 2D cells) from 3D mesh
|
||||
* \brief Generates skin mesh (containing 2D cells) from 3D mesh
|
||||
* The created 2D mesh elements based on nodes of free faces of boundary volumes
|
||||
* \return TRUE if operation has been completed successfully, FALSE otherwise
|
||||
*/
|
||||
boolean Make2DMeshFrom3D();
|
||||
|
||||
/*!
|
||||
* \brief Creates missing boundary elements
|
||||
* \param elements - elements whose boundary is to be checked
|
||||
* \param dimension - defines type of boundary elements to create
|
||||
* \param groupName - a name of group to store created boundary elements in,
|
||||
* "" means not to create the group
|
||||
* \param meshName - a name of new mesh to store created boundary elements in,
|
||||
* "" means not to create the new mesh
|
||||
* \param toCopyElements - if true, the checked elements will be copied into the new mesh
|
||||
* \param toCopyExistingBondary - if true, not only new but also pre-existing
|
||||
* boundary elements will be copied into the new mesh
|
||||
* \param group - returns the create group, if any
|
||||
* \retval SMESH::SMESH_Mesh - the mesh where elements were added to
|
||||
*/
|
||||
SMESH::SMESH_Mesh MakeBoundaryMesh(in SMESH_IDSource elements,
|
||||
in Bnd_Dimension dimension,
|
||||
in string groupName,
|
||||
in string meshName,
|
||||
in boolean toCopyElements,
|
||||
in boolean toCopyExistingBondary,
|
||||
out SMESH_Group group);
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -5182,7 +5182,37 @@ CORBA::Boolean SMESH_MeshEditor_i::Make2DMeshFrom3D()
|
||||
::SMESH_MeshEditor aMeshEditor( myMesh );
|
||||
bool aResult = aMeshEditor.Make2DMeshFrom3D();
|
||||
storeResult( aMeshEditor) ;
|
||||
|
||||
|
||||
TPythonDump() << "isDone = " << this << ".Make2DMeshFrom3D()";
|
||||
return aResult;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Creates missing boundary elements
|
||||
* \param elements - elements whose boundary is to be checked
|
||||
* \param dimension - defines type of boundary elements to create
|
||||
* \param groupName - a name of group to store created boundary elements in,
|
||||
* "" means not to create the group
|
||||
* \param meshName - a name of new mesh to store created boundary elements in,
|
||||
* "" means not to create the new mesh
|
||||
* \param toCopyElements - if true, the checked elements will be copied into the new mesh
|
||||
* \param toCopyExistingBondary - if true, not only new but also pre-existing
|
||||
* boundary elements will be copied into the new mesh
|
||||
* \param group - returns the create group, if any
|
||||
* \retval SMESH::SMESH_Mesh - the mesh where elements were added to
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
SMESH::SMESH_Mesh_ptr
|
||||
SMESH_MeshEditor_i::MakeBoundaryMesh(SMESH::SMESH_IDSource_ptr elements,
|
||||
SMESH::Bnd_Dimension dimension,
|
||||
const char* groupName,
|
||||
const char* meshName,
|
||||
CORBA::Boolean toCopyElements,
|
||||
CORBA::Boolean toCopyMissingBondary,
|
||||
SMESH::SMESH_Group_out group)
|
||||
{
|
||||
|
||||
return SMESH::SMESH_Mesh::_duplicate( myMesh_i->_this() );
|
||||
}
|
||||
|
@ -671,14 +671,22 @@ public:
|
||||
const SMESH::ListOfGroups& theNodesNot,
|
||||
GEOM::GEOM_Object_ptr theShape );
|
||||
|
||||
/*!
|
||||
* \brief Generated skin mesh (containing 2D cells) from 3D mesh
|
||||
* The created 2D mesh elements based on nodes of free faces of boundary volumes
|
||||
* \return TRUE if operation has been completed successfully, FALSE otherwise
|
||||
*/
|
||||
CORBA::Boolean Make2DMeshFrom3D();
|
||||
/*!
|
||||
* \brief Generated skin mesh (containing 2D cells) from 3D mesh
|
||||
* The created 2D mesh elements based on nodes of free faces of boundary volumes
|
||||
* \return TRUE if operation has been completed successfully, FALSE otherwise
|
||||
*/
|
||||
CORBA::Boolean Make2DMeshFrom3D();
|
||||
|
||||
private: //!< private methods
|
||||
SMESH::SMESH_Mesh_ptr MakeBoundaryMesh(SMESH::SMESH_IDSource_ptr elements,
|
||||
SMESH::Bnd_Dimension dimension,
|
||||
const char* groupName,
|
||||
const char* meshName,
|
||||
CORBA::Boolean toCopyElements,
|
||||
CORBA::Boolean toCopyMissingBondary,
|
||||
SMESH::SMESH_Group_out group);
|
||||
|
||||
private: //!< private methods
|
||||
|
||||
SMESHDS_Mesh * GetMeshDS() { return myMesh->GetMeshDS(); }
|
||||
|
||||
|
@ -201,6 +201,7 @@ PrecisionConfusion = 1e-07
|
||||
# Methods of splitting a hexahedron into tetrahedra
|
||||
Hex_5Tet, Hex_6Tet, Hex_24Tet = 1, 2, 3
|
||||
|
||||
|
||||
## Converts an angle from degrees to radians
|
||||
def DegreesToRadians(AngleInDegrees):
|
||||
from math import pi
|
||||
@ -2558,6 +2559,8 @@ class Mesh:
|
||||
def SplitVolumesIntoTetra(self, elemIDs, method=Hex_5Tet ):
|
||||
if isinstance( elemIDs, Mesh ):
|
||||
elemIDs = elemIDs.GetMesh()
|
||||
if ( isinstance( elemIDs, list )):
|
||||
elemIDs = self.editor.MakeIDSource(elemIDs, SMESH.VOLUME)
|
||||
self.editor.SplitVolumesIntoTetra(elemIDs, method)
|
||||
|
||||
## Splits quadrangle faces near triangular facets of volumes
|
||||
@ -2792,7 +2795,30 @@ class Mesh:
|
||||
# @ingroup l2_modif_edit
|
||||
def Make2DMeshFrom3D(self):
|
||||
return self.editor. Make2DMeshFrom3D()
|
||||
|
||||
|
||||
## Creates missing boundary elements
|
||||
# @param elements - elements whose boundary is to be checked:
|
||||
# mesh, group, sub-mesh or list of elements
|
||||
# @param dimension - defines type of boundary elements to create:
|
||||
# SMESH.BND_2DFROM3D, SMESH.BND_1DFROM3D, SMESH.BND_1DFROM2D
|
||||
# @param groupName - a name of group to store created boundary elements in,
|
||||
# "" means not to create the group
|
||||
# @param meshName - a name of new mesh to store created boundary elements in,
|
||||
# "" means not to create the new mesh
|
||||
# @param toCopyElements - if true, the checked elements will be copied into the new mesh
|
||||
# @param toCopyExistingBondary - if true, not only new but also pre-existing
|
||||
# boundary elements will be copied into the new mesh
|
||||
# @return tuple (mesh, group) where bondary elements were added to
|
||||
# @ingroup l2_modif_edit
|
||||
def MakeBoundaryMesh(self, elements, dimension=SMESH.BND_2DFROM3D, groupName="", meshName="",
|
||||
toCopyElements=False, toCopyExistingBondary=False):
|
||||
if isinstance( elements, Mesh ):
|
||||
elements = elements.GetMesh()
|
||||
if ( isinstance( elements, list )):
|
||||
elements = self.editor.MakeIDSource(elements, SMESH.ALL)
|
||||
return self.editor.MakeBoundaryMesh(elements,dimension,groupName,meshName,
|
||||
toCopyElements,toCopyExistingBondary)
|
||||
|
||||
## Renumber mesh nodes
|
||||
# @ingroup l2_modif_renumber
|
||||
def RenumberNodes(self):
|
||||
|
Loading…
Reference in New Issue
Block a user