mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-02-28 16:45:36 +05:00
0020439: EDF 695 SMESH : Improvement of DoubleNodes TUI feature
This commit is contained in:
parent
011119dbed
commit
a59868a798
@ -696,6 +696,49 @@ module SMESH
|
||||
* not creared - returns empty list
|
||||
*/
|
||||
long_array GetLastCreatedElems();
|
||||
|
||||
/*!
|
||||
* \brief Creates a hole in a mesh by doubling the nodes of some particular elements
|
||||
* \param theNodes - identifiers of nodes to be doubled
|
||||
* \param theModifiedElems - identifiers of elements to be updated by the new (doubled)
|
||||
* nodes. If list of element identifiers is empty then nodes are doubled but
|
||||
* they not assigned to elements
|
||||
* \return TRUE if operation has been completed successfully, FALSE otherwise
|
||||
* \sa DoubleNode(), DoubleNodeGroup(), DoubleNodeGroups()
|
||||
*/
|
||||
boolean DoubleNodes( in long_array theNodes, in long_array theModifiedElems );
|
||||
|
||||
/*!
|
||||
* \brief Creates a hole in a mesh by doubling the nodes of some particular elements
|
||||
* This method provided for convenience works as DoubleNodes() described above.
|
||||
* \param theNodeId - identifier of node to be doubled.
|
||||
* \param theModifiedElems - identifiers of elements to be updated.
|
||||
* \return TRUE if operation has been completed successfully, FALSE otherwise
|
||||
* \sa DoubleNodes(), DoubleNodeGroup(), DoubleNodeGroups()
|
||||
*/
|
||||
boolean DoubleNode( in long theNodeId, in long_array theModifiedElems );
|
||||
|
||||
/*!
|
||||
* \brief Creates a hole in a mesh by doubling the nodes of some particular elements
|
||||
* This method provided for convenience works as DoubleNodes() described above.
|
||||
* \param theNodes - group of nodes to be doubled.
|
||||
* \param theModifiedElems - group of elements to be updated.
|
||||
* \return TRUE if operation has been completed successfully, FALSE otherwise
|
||||
* \sa DoubleNode(), DoubleNodes(), DoubleNodeGroups()
|
||||
*/
|
||||
boolean DoubleNodeGroup( in SMESH_GroupBase theNodes,
|
||||
in SMESH_GroupBase theModifiedElems );
|
||||
|
||||
/*!
|
||||
\brief Creates a hole in a mesh by doubling the nodes of some particular elements
|
||||
This method provided for convenience works as DoubleNodes() described above.
|
||||
\param theNodes - list of groups of nodes to be doubled
|
||||
\param theModifiedElems - list of groups of elements to be updated.
|
||||
\return TRUE if operation has been completed successfully, FALSE otherwise
|
||||
\sa DoubleNode(), DoubleNodeGroup(), DoubleNodes()
|
||||
*/
|
||||
boolean DoubleNodeGroups( in ListOfGroups theNodes,
|
||||
in ListOfGroups theModifiedElems );
|
||||
|
||||
/*!
|
||||
* \brief Creates a hole in a mesh by doubling the nodes of some particular elements
|
||||
@ -707,9 +750,9 @@ module SMESH
|
||||
* \return TRUE if operation has been completed successfully, FALSE otherwise
|
||||
* \sa DoubleNodeGroup(), DoubleNodeGroups()
|
||||
*/
|
||||
boolean DoubleNodes( in long_array theElems,
|
||||
in long_array theNodesNot,
|
||||
in long_array theAffectedElems );
|
||||
boolean DoubleNodeElem( in long_array theElems,
|
||||
in long_array theNodesNot,
|
||||
in long_array theAffectedElems );
|
||||
|
||||
/*!
|
||||
* \brief Creates a hole in a mesh by doubling the nodes of some particular elements
|
||||
@ -722,9 +765,9 @@ module SMESH
|
||||
* \return TRUE if operation has been completed successfully, FALSE otherwise
|
||||
* \sa DoubleNodeGroupInRegion(), DoubleNodeGroupsInRegion()
|
||||
*/
|
||||
boolean DoubleNodesInRegion( in long_array theElems,
|
||||
in long_array theNodesNot,
|
||||
in GEOM::GEOM_Object theShape );
|
||||
boolean DoubleNodeElemInRegion( in long_array theElems,
|
||||
in long_array theNodesNot,
|
||||
in GEOM::GEOM_Object theShape );
|
||||
|
||||
/*!
|
||||
* \brief Creates a hole in a mesh by doubling the nodes of some particular elements
|
||||
@ -736,9 +779,9 @@ module SMESH
|
||||
* \return TRUE if operation has been completed successfully, FALSE otherwise
|
||||
* \sa DoubleNodes(), DoubleNodeGroups()
|
||||
*/
|
||||
boolean DoubleNodeGroup( in SMESH_GroupBase theElems,
|
||||
in SMESH_GroupBase theNodesNot,
|
||||
in SMESH_GroupBase theAffectedElems );
|
||||
boolean DoubleNodeElemGroup( in SMESH_GroupBase theElems,
|
||||
in SMESH_GroupBase theNodesNot,
|
||||
in SMESH_GroupBase theAffectedElems );
|
||||
|
||||
/*!
|
||||
* \brief Creates a hole in a mesh by doubling the nodes of some particular elements
|
||||
@ -751,7 +794,7 @@ module SMESH
|
||||
* \return TRUE if operation has been completed successfully, FALSE otherwise
|
||||
* \sa DoubleNodesInRegion(), DoubleNodeGroupsInRegion()
|
||||
*/
|
||||
boolean DoubleNodeGroupInRegion( in SMESH_GroupBase theElems,
|
||||
boolean DoubleNodeElemGroupInRegion( in SMESH_GroupBase theElems,
|
||||
in SMESH_GroupBase theNodesNot,
|
||||
in GEOM::GEOM_Object theShape );
|
||||
|
||||
@ -765,9 +808,9 @@ module SMESH
|
||||
* \return TRUE if operation has been completed successfully, FALSE otherwise
|
||||
* \sa DoubleNodeGroup(), DoubleNodes()
|
||||
*/
|
||||
boolean DoubleNodeGroups( in ListOfGroups theElems,
|
||||
in ListOfGroups theNodesNot,
|
||||
in ListOfGroups theAffectedElems );
|
||||
boolean DoubleNodeElemGroups( in ListOfGroups theElems,
|
||||
in ListOfGroups theNodesNot,
|
||||
in ListOfGroups theAffectedElems );
|
||||
|
||||
/*!
|
||||
* \brief Creates a hole in a mesh by doubling the nodes of some particular elements
|
||||
@ -780,9 +823,9 @@ module SMESH
|
||||
* \return TRUE if operation has been completed successfully, FALSE otherwise
|
||||
* \sa DoubleNodeGroupInRegion(), DoubleNodesInRegion()
|
||||
*/
|
||||
boolean DoubleNodeGroupsInRegion( in ListOfGroups theElems,
|
||||
in ListOfGroups theNodesNot,
|
||||
in GEOM::GEOM_Object theShape );
|
||||
boolean DoubleNodeElemGroupsInRegion( in ListOfGroups theElems,
|
||||
in ListOfGroups theNodesNot,
|
||||
in GEOM::GEOM_Object theShape );
|
||||
|
||||
/*!
|
||||
* \brief Generated skin mesh (containing 2D cells) from 3D mesh
|
||||
|
@ -8769,6 +8769,95 @@ static bool isInside(const SMDS_MeshElement* theElem,
|
||||
return (aState == TopAbs_IN || aState == TopAbs_ON );
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief Creates a hole in a mesh by doubling the nodes of some particular elements
|
||||
\param theNodes - identifiers of nodes to be doubled
|
||||
\param theModifiedElems - identifiers of elements to be updated by the new (doubled)
|
||||
nodes. If list of element identifiers is empty then nodes are doubled but
|
||||
they not assigned to elements
|
||||
\return TRUE if operation has been completed successfully, FALSE otherwise
|
||||
*/
|
||||
bool SMESH_MeshEditor::DoubleNodes( const std::list< int >& theListOfNodes,
|
||||
const std::list< int >& theListOfModifiedElems )
|
||||
{
|
||||
myLastCreatedElems.Clear();
|
||||
myLastCreatedNodes.Clear();
|
||||
|
||||
if ( theListOfNodes.size() == 0 )
|
||||
return false;
|
||||
|
||||
SMESHDS_Mesh* aMeshDS = GetMeshDS();
|
||||
if ( !aMeshDS )
|
||||
return false;
|
||||
|
||||
// iterate through nodes and duplicate them
|
||||
|
||||
std::map< const SMDS_MeshNode*, const SMDS_MeshNode* > anOldNodeToNewNode;
|
||||
|
||||
std::list< int >::const_iterator aNodeIter;
|
||||
for ( aNodeIter = theListOfNodes.begin(); aNodeIter != theListOfNodes.end(); ++aNodeIter )
|
||||
{
|
||||
int aCurr = *aNodeIter;
|
||||
SMDS_MeshNode* aNode = (SMDS_MeshNode*)aMeshDS->FindNode( aCurr );
|
||||
if ( !aNode )
|
||||
continue;
|
||||
|
||||
// duplicate node
|
||||
|
||||
const SMDS_MeshNode* aNewNode = aMeshDS->AddNode( aNode->X(), aNode->Y(), aNode->Z() );
|
||||
if ( aNewNode )
|
||||
{
|
||||
anOldNodeToNewNode[ aNode ] = aNewNode;
|
||||
myLastCreatedNodes.Append( aNewNode );
|
||||
}
|
||||
}
|
||||
|
||||
// Create map of new nodes for modified elements
|
||||
|
||||
std::map< SMDS_MeshElement*, vector<const SMDS_MeshNode*> > anElemToNodes;
|
||||
|
||||
std::list< int >::const_iterator anElemIter;
|
||||
for ( anElemIter = theListOfModifiedElems.begin();
|
||||
anElemIter != theListOfModifiedElems.end(); ++anElemIter )
|
||||
{
|
||||
int aCurr = *anElemIter;
|
||||
SMDS_MeshElement* anElem = (SMDS_MeshElement*)aMeshDS->FindElement( aCurr );
|
||||
if ( !anElem )
|
||||
continue;
|
||||
|
||||
vector<const SMDS_MeshNode*> aNodeArr( anElem->NbNodes() );
|
||||
|
||||
SMDS_ElemIteratorPtr anIter = anElem->nodesIterator();
|
||||
int ind = 0;
|
||||
while ( anIter->more() )
|
||||
{
|
||||
SMDS_MeshNode* aCurrNode = (SMDS_MeshNode*)anIter->next();
|
||||
if ( aCurr && anOldNodeToNewNode.find( aCurrNode ) != anOldNodeToNewNode.end() )
|
||||
{
|
||||
const SMDS_MeshNode* aNewNode = anOldNodeToNewNode[ aCurrNode ];
|
||||
aNodeArr[ ind++ ] = aNewNode;
|
||||
}
|
||||
else
|
||||
aNodeArr[ ind++ ] = aCurrNode;
|
||||
}
|
||||
anElemToNodes[ anElem ] = aNodeArr;
|
||||
}
|
||||
|
||||
// Change nodes of elements
|
||||
|
||||
std::map< SMDS_MeshElement*, vector<const SMDS_MeshNode*> >::iterator
|
||||
anElemToNodesIter = anElemToNodes.begin();
|
||||
for ( ; anElemToNodesIter != anElemToNodes.end(); ++anElemToNodesIter )
|
||||
{
|
||||
const SMDS_MeshElement* anElem = anElemToNodesIter->first;
|
||||
vector<const SMDS_MeshNode*> aNodeArr = anElemToNodesIter->second;
|
||||
if ( anElem )
|
||||
aMeshDS->ChangeElementNodes( anElem, &aNodeArr[ 0 ], anElem->NbNodes() );
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief Creates a hole in a mesh by doubling the nodes of some particular elements
|
||||
\param theElems - group of of elements (edges or faces) to be replicated
|
||||
|
@ -601,6 +601,9 @@ public:
|
||||
const SMESH_SequenceOfElemPtr& GetLastCreatedNodes() const { return myLastCreatedNodes; }
|
||||
|
||||
const SMESH_SequenceOfElemPtr& GetLastCreatedElems() const { return myLastCreatedElems; }
|
||||
|
||||
bool DoubleNodes( const std::list< int >& theListOfNodes,
|
||||
const std::list< int >& theListOfModifiedElems );
|
||||
|
||||
bool DoubleNodes( const TIDSortedElemSet& theElems,
|
||||
const TIDSortedElemSet& theNodesNot,
|
||||
@ -609,7 +612,7 @@ public:
|
||||
bool DoubleNodesInRegion( const TIDSortedElemSet& theElems,
|
||||
const TIDSortedElemSet& theNodesNot,
|
||||
const TopoDS_Shape& 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
|
||||
|
@ -4214,6 +4214,142 @@ void SMESH_MeshEditor_i::DumpGroupsList(TPythonDump & theDumpPytho
|
||||
}
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
\brief Creates a hole in a mesh by doubling the nodes of some particular elements
|
||||
\param theNodes - identifiers of nodes to be doubled
|
||||
\param theModifiedElems - identifiers of elements to be updated by the new (doubled)
|
||||
nodes. If list of element identifiers is empty then nodes are doubled but
|
||||
they not assigned to elements
|
||||
\return TRUE if operation has been completed successfully, FALSE otherwise
|
||||
\sa DoubleNode(), DoubleNodeGroup(), DoubleNodeGroups()
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
CORBA::Boolean SMESH_MeshEditor_i::DoubleNodes( const SMESH::long_array& theNodes,
|
||||
const SMESH::long_array& theModifiedElems )
|
||||
{
|
||||
initData();
|
||||
|
||||
::SMESH_MeshEditor aMeshEditor( myMesh );
|
||||
list< int > aListOfNodes;
|
||||
int i, n;
|
||||
for ( i = 0, n = theNodes.length(); i < n; i++ )
|
||||
aListOfNodes.push_back( theNodes[ i ] );
|
||||
|
||||
list< int > aListOfElems;
|
||||
for ( i = 0, n = theModifiedElems.length(); i < n; i++ )
|
||||
aListOfElems.push_back( theModifiedElems[ i ] );
|
||||
|
||||
bool aResult = aMeshEditor.DoubleNodes( aListOfNodes, aListOfElems );
|
||||
|
||||
storeResult( aMeshEditor) ;
|
||||
|
||||
return aResult;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
\brief Creates a hole in a mesh by doubling the nodes of some particular elements
|
||||
This method provided for convenience works as DoubleNodes() described above.
|
||||
\param theNodeId - identifier of node to be doubled.
|
||||
\param theModifiedElems - identifiers of elements to be updated.
|
||||
\return TRUE if operation has been completed successfully, FALSE otherwise
|
||||
\sa DoubleNodes(), DoubleNodeGroup(), DoubleNodeGroups()
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
CORBA::Boolean SMESH_MeshEditor_i::DoubleNode( CORBA::Long theNodeId,
|
||||
const SMESH::long_array& theModifiedElems )
|
||||
{
|
||||
SMESH::long_array_var aNodes = new SMESH::long_array;
|
||||
aNodes->length( 1 );
|
||||
aNodes[ 0 ] = theNodeId;
|
||||
return DoubleNodes( aNodes, theModifiedElems );
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
\brief Creates a hole in a mesh by doubling the nodes of some particular elements
|
||||
This method provided for convenience works as DoubleNodes() described above.
|
||||
\param theNodes - group of nodes to be doubled.
|
||||
\param theModifiedElems - group of elements to be updated.
|
||||
\return TRUE if operation has been completed successfully, FALSE otherwise
|
||||
\sa DoubleNode(), DoubleNodes(), DoubleNodeGroups()
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeGroup(
|
||||
SMESH::SMESH_GroupBase_ptr theNodes,
|
||||
SMESH::SMESH_GroupBase_ptr theModifiedElems )
|
||||
{
|
||||
if ( CORBA::is_nil( theNodes ) && theNodes->GetType() != SMESH::NODE )
|
||||
return false;
|
||||
|
||||
SMESH::long_array_var aNodes = theNodes->GetListOfID();
|
||||
SMESH::long_array_var aModifiedElems;
|
||||
if ( !CORBA::is_nil( theModifiedElems ) )
|
||||
aModifiedElems = theModifiedElems->GetListOfID();
|
||||
else
|
||||
{
|
||||
aModifiedElems = new SMESH::long_array;
|
||||
aModifiedElems->length( 0 );
|
||||
}
|
||||
|
||||
return DoubleNodes( aNodes, aModifiedElems );
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
\brief Creates a hole in a mesh by doubling the nodes of some particular elements
|
||||
This method provided for convenience works as DoubleNodes() described above.
|
||||
\param theNodes - list of groups of nodes to be doubled
|
||||
\param theModifiedElems - list of groups of elements to be updated.
|
||||
\return TRUE if operation has been completed successfully, FALSE otherwise
|
||||
\sa DoubleNode(), DoubleNodeGroup(), DoubleNodes()
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeGroups(
|
||||
const SMESH::ListOfGroups& theNodes,
|
||||
const SMESH::ListOfGroups& theModifiedElems )
|
||||
{
|
||||
initData();
|
||||
|
||||
::SMESH_MeshEditor aMeshEditor( myMesh );
|
||||
|
||||
std::list< int > aNodes;
|
||||
int i, n, j, m;
|
||||
for ( i = 0, n = theNodes.length(); i < n; i++ )
|
||||
{
|
||||
SMESH::SMESH_GroupBase_var aGrp = theNodes[ i ];
|
||||
if ( !CORBA::is_nil( aGrp ) && aGrp->GetType() == SMESH::NODE )
|
||||
{
|
||||
SMESH::long_array_var aCurr = aGrp->GetListOfID();
|
||||
for ( j = 0, m = aCurr->length(); j < m; j++ )
|
||||
aNodes.push_back( aCurr[ j ] );
|
||||
}
|
||||
}
|
||||
|
||||
std::list< int > anElems;
|
||||
for ( i = 0, n = theModifiedElems.length(); i < n; i++ )
|
||||
{
|
||||
SMESH::SMESH_GroupBase_var aGrp = theModifiedElems[ i ];
|
||||
if ( !CORBA::is_nil( aGrp ) && aGrp->GetType() != SMESH::NODE )
|
||||
{
|
||||
SMESH::long_array_var aCurr = aGrp->GetListOfID();
|
||||
for ( j = 0, m = aCurr->length(); j < m; j++ )
|
||||
anElems.push_back( aCurr[ j ] );
|
||||
}
|
||||
}
|
||||
|
||||
bool aResult = aMeshEditor.DoubleNodes( aNodes, anElems );
|
||||
|
||||
storeResult( aMeshEditor) ;
|
||||
|
||||
return aResult;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
\brief Creates a hole in a mesh by doubling the nodes of some particular elements
|
||||
@ -4227,9 +4363,9 @@ void SMESH_MeshEditor_i::DumpGroupsList(TPythonDump & theDumpPytho
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
CORBA::Boolean SMESH_MeshEditor_i::DoubleNodes( const SMESH::long_array& theElems,
|
||||
const SMESH::long_array& theNodesNot,
|
||||
const SMESH::long_array& theAffectedElems )
|
||||
CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeElem( const SMESH::long_array& theElems,
|
||||
const SMESH::long_array& theNodesNot,
|
||||
const SMESH::long_array& theAffectedElems )
|
||||
|
||||
{
|
||||
initData();
|
||||
@ -4266,7 +4402,7 @@ CORBA::Boolean SMESH_MeshEditor_i::DoubleNodes( const SMESH::long_array& theElem
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
CORBA::Boolean SMESH_MeshEditor_i::DoubleNodesInRegion
|
||||
CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeElemInRegion
|
||||
( const SMESH::long_array& theElems,
|
||||
const SMESH::long_array& theNodesNot,
|
||||
GEOM::GEOM_Object_ptr theShape )
|
||||
@ -4316,10 +4452,10 @@ static void groupToSet(SMESH::SMESH_GroupBase_ptr theGrp,
|
||||
arrayToSet( anIDs, theMeshDS, theElemSet, theType);
|
||||
}
|
||||
|
||||
CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeGroup(
|
||||
SMESH::SMESH_GroupBase_ptr theElems,
|
||||
SMESH::SMESH_GroupBase_ptr theNodesNot,
|
||||
SMESH::SMESH_GroupBase_ptr theAffectedElems )
|
||||
CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeElemGroup(
|
||||
SMESH::SMESH_GroupBase_ptr theElems,
|
||||
SMESH::SMESH_GroupBase_ptr theNodesNot,
|
||||
SMESH::SMESH_GroupBase_ptr theAffectedElems )
|
||||
|
||||
{
|
||||
if ( CORBA::is_nil( theElems ) && theElems->GetType() == SMESH::NODE )
|
||||
@ -4358,10 +4494,10 @@ CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeGroup(
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeGroupInRegion(
|
||||
SMESH::SMESH_GroupBase_ptr theElems,
|
||||
SMESH::SMESH_GroupBase_ptr theNodesNot,
|
||||
GEOM::GEOM_Object_ptr theShape )
|
||||
CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeElemGroupInRegion(
|
||||
SMESH::SMESH_GroupBase_ptr theElems,
|
||||
SMESH::SMESH_GroupBase_ptr theNodesNot,
|
||||
GEOM::GEOM_Object_ptr theShape )
|
||||
|
||||
{
|
||||
if ( CORBA::is_nil( theElems ) && theElems->GetType() == SMESH::NODE )
|
||||
@ -4417,10 +4553,10 @@ static void listOfGroupToSet(const SMESH::ListOfGroups& theGrpList,
|
||||
}
|
||||
}
|
||||
|
||||
CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeGroups(
|
||||
const SMESH::ListOfGroups& theElems,
|
||||
const SMESH::ListOfGroups& theNodesNot,
|
||||
const SMESH::ListOfGroups& theAffectedElems )
|
||||
CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeElemGroups(
|
||||
const SMESH::ListOfGroups& theElems,
|
||||
const SMESH::ListOfGroups& theNodesNot,
|
||||
const SMESH::ListOfGroups& theAffectedElems )
|
||||
{
|
||||
initData();
|
||||
|
||||
@ -4456,10 +4592,10 @@ CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeGroups(
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeGroupsInRegion(
|
||||
const SMESH::ListOfGroups& theElems,
|
||||
const SMESH::ListOfGroups& theNodesNot,
|
||||
GEOM::GEOM_Object_ptr theShape )
|
||||
CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeElemGroupsInRegion(
|
||||
const SMESH::ListOfGroups& theElems,
|
||||
const SMESH::ListOfGroups& theNodesNot,
|
||||
GEOM::GEOM_Object_ptr theShape )
|
||||
{
|
||||
initData();
|
||||
|
||||
|
@ -514,6 +514,17 @@ class SMESH_MeshEditor_i: public POA_SMESH::SMESH_MeshEditor
|
||||
*/
|
||||
int GetMeshId() const { return myMesh->GetId(); }
|
||||
|
||||
CORBA::Boolean DoubleNodes( const SMESH::long_array& theNodes,
|
||||
const SMESH::long_array& theModifiedElems );
|
||||
|
||||
CORBA::Boolean DoubleNode( CORBA::Long theNodeId,
|
||||
const SMESH::long_array& theModifiedElems );
|
||||
|
||||
CORBA::Boolean DoubleNodeGroup( SMESH::SMESH_GroupBase_ptr theNodes,
|
||||
SMESH::SMESH_GroupBase_ptr theModifiedElems );
|
||||
|
||||
CORBA::Boolean DoubleNodeGroups( const SMESH::ListOfGroups& theNodes,
|
||||
const SMESH::ListOfGroups& theModifiedElems);
|
||||
|
||||
/*!
|
||||
* \brief Creates a hole in a mesh by doubling the nodes of some particular elements
|
||||
@ -525,9 +536,9 @@ class SMESH_MeshEditor_i: public POA_SMESH::SMESH_MeshEditor
|
||||
* \return TRUE if operation has been completed successfully, FALSE otherwise
|
||||
* \sa DoubleNodeGroup(), DoubleNodeGroups()
|
||||
*/
|
||||
CORBA::Boolean DoubleNodes( const SMESH::long_array& theElems,
|
||||
const SMESH::long_array& theNodesNot,
|
||||
const SMESH::long_array& theAffectedElems );
|
||||
CORBA::Boolean DoubleNodeElem( const SMESH::long_array& theElems,
|
||||
const SMESH::long_array& theNodesNot,
|
||||
const SMESH::long_array& theAffectedElems );
|
||||
|
||||
/*!
|
||||
* \brief Creates a hole in a mesh by doubling the nodes of some particular elements
|
||||
@ -540,9 +551,9 @@ class SMESH_MeshEditor_i: public POA_SMESH::SMESH_MeshEditor
|
||||
* \return TRUE if operation has been completed successfully, FALSE otherwise
|
||||
* \sa DoubleNodeGroupInRegion(), DoubleNodeGroupsInRegion()
|
||||
*/
|
||||
CORBA::Boolean DoubleNodesInRegion( const SMESH::long_array& theElems,
|
||||
const SMESH::long_array& theNodesNot,
|
||||
GEOM::GEOM_Object_ptr theShape );
|
||||
CORBA::Boolean DoubleNodeElemInRegion( const SMESH::long_array& theElems,
|
||||
const SMESH::long_array& theNodesNot,
|
||||
GEOM::GEOM_Object_ptr theShape );
|
||||
|
||||
/*!
|
||||
* \brief Creates a hole in a mesh by doubling the nodes of some particular elements
|
||||
@ -553,10 +564,10 @@ class SMESH_MeshEditor_i: public POA_SMESH::SMESH_MeshEditor
|
||||
* \return TRUE if operation has been completed successfully, FALSE otherwise
|
||||
* \sa DoubleNodes(), DoubleNodeGroups()
|
||||
*/
|
||||
CORBA::Boolean DoubleNodeGroup( SMESH::SMESH_GroupBase_ptr theElems,
|
||||
SMESH::SMESH_GroupBase_ptr theNodesNot,
|
||||
SMESH::SMESH_GroupBase_ptr theAffectedElems );
|
||||
|
||||
CORBA::Boolean DoubleNodeElemGroup( SMESH::SMESH_GroupBase_ptr theElems,
|
||||
SMESH::SMESH_GroupBase_ptr theNodesNot,
|
||||
SMESH::SMESH_GroupBase_ptr theAffectedElems );
|
||||
|
||||
/*!
|
||||
* \brief Creates a hole in a mesh by doubling the nodes of some particular elements
|
||||
* \param theElems - group of of elements (edges or faces) to be replicated
|
||||
@ -567,9 +578,9 @@ class SMESH_MeshEditor_i: public POA_SMESH::SMESH_MeshEditor
|
||||
* \return TRUE if operation has been completed successfully, FALSE otherwise
|
||||
* \sa DoubleNodesInRegion(), DoubleNodeGroupsInRegion()
|
||||
*/
|
||||
CORBA::Boolean DoubleNodeGroupInRegion( SMESH::SMESH_GroupBase_ptr theElems,
|
||||
SMESH::SMESH_GroupBase_ptr theNodesNot,
|
||||
GEOM::GEOM_Object_ptr theShape );
|
||||
CORBA::Boolean DoubleNodeElemGroupInRegion( SMESH::SMESH_GroupBase_ptr theElems,
|
||||
SMESH::SMESH_GroupBase_ptr theNodesNot,
|
||||
GEOM::GEOM_Object_ptr theShape );
|
||||
|
||||
/*!
|
||||
* \brief Creates a hole in a mesh by doubling the nodes of some particular elements
|
||||
@ -581,9 +592,9 @@ class SMESH_MeshEditor_i: public POA_SMESH::SMESH_MeshEditor
|
||||
* \return TRUE if operation has been completed successfully, FALSE otherwise
|
||||
* \sa DoubleNodeGroup(), DoubleNodes()
|
||||
*/
|
||||
CORBA::Boolean DoubleNodeGroups( const SMESH::ListOfGroups& theElems,
|
||||
const SMESH::ListOfGroups& theNodesNot,
|
||||
const SMESH::ListOfGroups& theAffectedElems );
|
||||
CORBA::Boolean DoubleNodeElemGroups( const SMESH::ListOfGroups& theElems,
|
||||
const SMESH::ListOfGroups& theNodesNot,
|
||||
const SMESH::ListOfGroups& theAffectedElems );
|
||||
|
||||
|
||||
/*!
|
||||
@ -597,9 +608,9 @@ class SMESH_MeshEditor_i: public POA_SMESH::SMESH_MeshEditor
|
||||
* \return TRUE if operation has been completed successfully, FALSE otherwise
|
||||
* \sa DoubleNodeGroupInRegion(), DoubleNodesInRegion()
|
||||
*/
|
||||
CORBA::Boolean DoubleNodeGroupsInRegion( const SMESH::ListOfGroups& theElems,
|
||||
const SMESH::ListOfGroups& theNodesNot,
|
||||
GEOM::GEOM_Object_ptr theShape );
|
||||
CORBA::Boolean DoubleNodeElemGroupsInRegion( const SMESH::ListOfGroups& theElems,
|
||||
const SMESH::ListOfGroups& theNodesNot,
|
||||
GEOM::GEOM_Object_ptr theShape );
|
||||
|
||||
/*!
|
||||
* \brief Generated skin mesh (containing 2D cells) from 3D mesh
|
||||
|
@ -3420,6 +3420,43 @@ class Mesh:
|
||||
# @ingroup l1_auxiliary
|
||||
def GetLastCreatedElems(self):
|
||||
return self.editor.GetLastCreatedElems()
|
||||
|
||||
## Creates a hole in a mesh by doubling the nodes of some particular elements
|
||||
# @param theNodes identifiers of nodes to be doubled
|
||||
# @param theModifiedElems identifiers of elements to be updated by the new (doubled)
|
||||
# nodes. If list of element identifiers is empty then nodes are doubled but
|
||||
# they not assigned to elements
|
||||
# @return TRUE if operation has been completed successfully, FALSE otherwise
|
||||
# @ingroup l2_modif_edit
|
||||
def DoubleNodes(self, theNodes, theModifiedElems):
|
||||
return self.editor.DoubleNodes(theNodes, theModifiedElems)
|
||||
|
||||
## Creates a hole in a mesh by doubling the nodes of some particular elements
|
||||
# This method provided for convenience works as DoubleNodes() described above.
|
||||
# @param theNodes identifiers of node to be doubled
|
||||
# @param theModifiedElems identifiers of elements to be updated
|
||||
# @return TRUE if operation has been completed successfully, FALSE otherwise
|
||||
# @ingroup l2_modif_edit
|
||||
def DoubleNode(self, theNodeId, theModifiedElems):
|
||||
return self.editor.DoubleNode(theNodeId, theModifiedElems)
|
||||
|
||||
## Creates a hole in a mesh by doubling the nodes of some particular elements
|
||||
# This method provided for convenience works as DoubleNodes() described above.
|
||||
# @param theNodes group of nodes to be doubled
|
||||
# @param theModifiedElems group of elements to be updated.
|
||||
# @return TRUE if operation has been completed successfully, FALSE otherwise
|
||||
# @ingroup l2_modif_edit
|
||||
def DoubleNodeGroup(self, theNodes, theModifiedElems):
|
||||
return self.editor.DoubleNodeGroup(theNodes, theModifiedElems)
|
||||
|
||||
## Creates a hole in a mesh by doubling the nodes of some particular elements
|
||||
# This method provided for convenience works as DoubleNodes() described above.
|
||||
# @param theNodes list of groups of nodes to be doubled
|
||||
# @param theModifiedElems list of groups of elements to be updated.
|
||||
# @return TRUE if operation has been completed successfully, FALSE otherwise
|
||||
# @ingroup l2_modif_edit
|
||||
def DoubleNodeGroups(self, theNodes, theModifiedElems):
|
||||
return self.editor.DoubleNodeGroups(theNodes, theModifiedElems)
|
||||
|
||||
## Creates a hole in a mesh by doubling the nodes of some particular elements
|
||||
# @param theElems - the list of elements (edges or faces) to be replicated
|
||||
@ -3429,8 +3466,8 @@ class Mesh:
|
||||
# replicated nodes should be associated to.
|
||||
# @return TRUE if operation has been completed successfully, FALSE otherwise
|
||||
# @ingroup l2_modif_edit
|
||||
def DoubleNodes(self, theElems, theNodesNot, theAffectedElems):
|
||||
return self.editor.DoubleNodes(theElems, theNodesNot, theAffectedElems)
|
||||
def DoubleNodeElem(self, theElems, theNodesNot, theAffectedElems):
|
||||
return self.editor.DoubleNodeElem(theElems, theNodesNot, theAffectedElems)
|
||||
|
||||
## Creates a hole in a mesh by doubling the nodes of some particular elements
|
||||
# @param theElems - the list of elements (edges or faces) to be replicated
|
||||
@ -3441,8 +3478,8 @@ class Mesh:
|
||||
# The replicated nodes should be associated to affected elements.
|
||||
# @return TRUE if operation has been completed successfully, FALSE otherwise
|
||||
# @ingroup l2_modif_edit
|
||||
def DoubleNodesInRegion(self, theElems, theNodesNot, theShape):
|
||||
return self.editor.DoubleNodesInRegion(theElems, theNodesNot, theShape)
|
||||
def DoubleNodeElemInRegion(self, theElems, theNodesNot, theShape):
|
||||
return self.editor.DoubleNodeElemInRegion(theElems, theNodesNot, theShape)
|
||||
|
||||
## Creates a hole in a mesh by doubling the nodes of some particular elements
|
||||
# This method provided for convenience works as DoubleNodes() described above.
|
||||
@ -3451,8 +3488,8 @@ class Mesh:
|
||||
# @param theAffectedElems - group of elements to which the replicated nodes
|
||||
# should be associated to.
|
||||
# @ingroup l2_modif_edit
|
||||
def DoubleNodeGroup(self, theElems, theNodesNot, theAffectedElems):
|
||||
return self.editor.DoubleNodeGroup(theElems, theNodesNot, theAffectedElems)
|
||||
def DoubleNodeElemGroup(self, theElems, theNodesNot, theAffectedElems):
|
||||
return self.editor.DoubleNodeElemGroup(theElems, theNodesNot, theAffectedElems)
|
||||
|
||||
## Creates a hole in a mesh by doubling the nodes of some particular elements
|
||||
# This method provided for convenience works as DoubleNodes() described above.
|
||||
@ -3462,8 +3499,8 @@ class Mesh:
|
||||
# located on or inside shape).
|
||||
# The replicated nodes should be associated to affected elements.
|
||||
# @ingroup l2_modif_edit
|
||||
def DoubleNodeGroupInRegion(self, theElems, theNodesNot, theShape):
|
||||
return self.editor.DoubleNodeGroup(theElems, theNodesNot, theShape)
|
||||
def DoubleNodeElemGroupInRegion(self, theElems, theNodesNot, theShape):
|
||||
return self.editor.DoubleNodeElemGroup(theElems, theNodesNot, theShape)
|
||||
|
||||
## Creates a hole in a mesh by doubling the nodes of some particular elements
|
||||
# This method provided for convenience works as DoubleNodes() described above.
|
||||
@ -3473,8 +3510,8 @@ class Mesh:
|
||||
# should be associated to.
|
||||
# @return TRUE if operation has been completed successfully, FALSE otherwise
|
||||
# @ingroup l2_modif_edit
|
||||
def DoubleNodeGroups(self, theElems, theNodesNot, theAffectedElems):
|
||||
return self.editor.DoubleNodeGroups(theElems, theNodesNot, theAffectedElems)
|
||||
def DoubleNodeElemGroups(self, theElems, theNodesNot, theAffectedElems):
|
||||
return self.editor.DoubleNodeElemGroups(theElems, theNodesNot, theAffectedElems)
|
||||
|
||||
## Creates a hole in a mesh by doubling the nodes of some particular elements
|
||||
# This method provided for convenience works as DoubleNodes() described above.
|
||||
@ -3485,8 +3522,8 @@ class Mesh:
|
||||
# The replicated nodes should be associated to affected elements.
|
||||
# @return TRUE if operation has been completed successfully, FALSE otherwise
|
||||
# @ingroup l2_modif_edit
|
||||
def DoubleNodeGroupsInRegion(self, theElems, theNodesNot, theShape):
|
||||
return self.editor.DoubleNodeGroupsInRegion(theElems, theNodesNot, theShape)
|
||||
def DoubleNodeElemGroupsInRegion(self, theElems, theNodesNot, theShape):
|
||||
return self.editor.DoubleNodeElemGroupsInRegion(theElems, theNodesNot, theShape)
|
||||
|
||||
## The mother class to define algorithm, it is not recommended to use it directly.
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user