mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-03-01 00:55:36 +05:00
0020439: EDF 695 SMESH : Improvement of DoubleNodes TUI feature
This commit is contained in:
parent
011119dbed
commit
a59868a798
@ -697,6 +697,49 @@ module SMESH
|
|||||||
*/
|
*/
|
||||||
long_array GetLastCreatedElems();
|
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
|
* \brief 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
|
* \param theElems - the list of elements (edges or faces) to be replicated
|
||||||
@ -707,9 +750,9 @@ module SMESH
|
|||||||
* \return TRUE if operation has been completed successfully, FALSE otherwise
|
* \return TRUE if operation has been completed successfully, FALSE otherwise
|
||||||
* \sa DoubleNodeGroup(), DoubleNodeGroups()
|
* \sa DoubleNodeGroup(), DoubleNodeGroups()
|
||||||
*/
|
*/
|
||||||
boolean DoubleNodes( in long_array theElems,
|
boolean DoubleNodeElem( in long_array theElems,
|
||||||
in long_array theNodesNot,
|
in long_array theNodesNot,
|
||||||
in long_array theAffectedElems );
|
in long_array theAffectedElems );
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Creates a hole in a mesh by doubling the nodes of some particular elements
|
* \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
|
* \return TRUE if operation has been completed successfully, FALSE otherwise
|
||||||
* \sa DoubleNodeGroupInRegion(), DoubleNodeGroupsInRegion()
|
* \sa DoubleNodeGroupInRegion(), DoubleNodeGroupsInRegion()
|
||||||
*/
|
*/
|
||||||
boolean DoubleNodesInRegion( in long_array theElems,
|
boolean DoubleNodeElemInRegion( in long_array theElems,
|
||||||
in long_array theNodesNot,
|
in long_array theNodesNot,
|
||||||
in GEOM::GEOM_Object theShape );
|
in GEOM::GEOM_Object theShape );
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Creates a hole in a mesh by doubling the nodes of some particular elements
|
* \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
|
* \return TRUE if operation has been completed successfully, FALSE otherwise
|
||||||
* \sa DoubleNodes(), DoubleNodeGroups()
|
* \sa DoubleNodes(), DoubleNodeGroups()
|
||||||
*/
|
*/
|
||||||
boolean DoubleNodeGroup( in SMESH_GroupBase theElems,
|
boolean DoubleNodeElemGroup( in SMESH_GroupBase theElems,
|
||||||
in SMESH_GroupBase theNodesNot,
|
in SMESH_GroupBase theNodesNot,
|
||||||
in SMESH_GroupBase theAffectedElems );
|
in SMESH_GroupBase theAffectedElems );
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Creates a hole in a mesh by doubling the nodes of some particular elements
|
* \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
|
* \return TRUE if operation has been completed successfully, FALSE otherwise
|
||||||
* \sa DoubleNodesInRegion(), DoubleNodeGroupsInRegion()
|
* \sa DoubleNodesInRegion(), DoubleNodeGroupsInRegion()
|
||||||
*/
|
*/
|
||||||
boolean DoubleNodeGroupInRegion( in SMESH_GroupBase theElems,
|
boolean DoubleNodeElemGroupInRegion( in SMESH_GroupBase theElems,
|
||||||
in SMESH_GroupBase theNodesNot,
|
in SMESH_GroupBase theNodesNot,
|
||||||
in GEOM::GEOM_Object theShape );
|
in GEOM::GEOM_Object theShape );
|
||||||
|
|
||||||
@ -765,9 +808,9 @@ module SMESH
|
|||||||
* \return TRUE if operation has been completed successfully, FALSE otherwise
|
* \return TRUE if operation has been completed successfully, FALSE otherwise
|
||||||
* \sa DoubleNodeGroup(), DoubleNodes()
|
* \sa DoubleNodeGroup(), DoubleNodes()
|
||||||
*/
|
*/
|
||||||
boolean DoubleNodeGroups( in ListOfGroups theElems,
|
boolean DoubleNodeElemGroups( in ListOfGroups theElems,
|
||||||
in ListOfGroups theNodesNot,
|
in ListOfGroups theNodesNot,
|
||||||
in ListOfGroups theAffectedElems );
|
in ListOfGroups theAffectedElems );
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Creates a hole in a mesh by doubling the nodes of some particular elements
|
* \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
|
* \return TRUE if operation has been completed successfully, FALSE otherwise
|
||||||
* \sa DoubleNodeGroupInRegion(), DoubleNodesInRegion()
|
* \sa DoubleNodeGroupInRegion(), DoubleNodesInRegion()
|
||||||
*/
|
*/
|
||||||
boolean DoubleNodeGroupsInRegion( in ListOfGroups theElems,
|
boolean DoubleNodeElemGroupsInRegion( in ListOfGroups theElems,
|
||||||
in ListOfGroups theNodesNot,
|
in ListOfGroups theNodesNot,
|
||||||
in GEOM::GEOM_Object theShape );
|
in GEOM::GEOM_Object theShape );
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Generated skin mesh (containing 2D cells) from 3D mesh
|
* \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 );
|
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
|
\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
|
\param theElems - group of of elements (edges or faces) to be replicated
|
||||||
|
@ -602,6 +602,9 @@ public:
|
|||||||
|
|
||||||
const SMESH_SequenceOfElemPtr& GetLastCreatedElems() const { return myLastCreatedElems; }
|
const SMESH_SequenceOfElemPtr& GetLastCreatedElems() const { return myLastCreatedElems; }
|
||||||
|
|
||||||
|
bool DoubleNodes( const std::list< int >& theListOfNodes,
|
||||||
|
const std::list< int >& theListOfModifiedElems );
|
||||||
|
|
||||||
bool DoubleNodes( const TIDSortedElemSet& theElems,
|
bool DoubleNodes( const TIDSortedElemSet& theElems,
|
||||||
const TIDSortedElemSet& theNodesNot,
|
const TIDSortedElemSet& theNodesNot,
|
||||||
const TIDSortedElemSet& theAffectedElems );
|
const TIDSortedElemSet& theAffectedElems );
|
||||||
|
@ -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
|
\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,
|
CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeElem( const SMESH::long_array& theElems,
|
||||||
const SMESH::long_array& theNodesNot,
|
const SMESH::long_array& theNodesNot,
|
||||||
const SMESH::long_array& theAffectedElems )
|
const SMESH::long_array& theAffectedElems )
|
||||||
|
|
||||||
{
|
{
|
||||||
initData();
|
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& theElems,
|
||||||
const SMESH::long_array& theNodesNot,
|
const SMESH::long_array& theNodesNot,
|
||||||
GEOM::GEOM_Object_ptr theShape )
|
GEOM::GEOM_Object_ptr theShape )
|
||||||
@ -4316,10 +4452,10 @@ static void groupToSet(SMESH::SMESH_GroupBase_ptr theGrp,
|
|||||||
arrayToSet( anIDs, theMeshDS, theElemSet, theType);
|
arrayToSet( anIDs, theMeshDS, theElemSet, theType);
|
||||||
}
|
}
|
||||||
|
|
||||||
CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeGroup(
|
CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeElemGroup(
|
||||||
SMESH::SMESH_GroupBase_ptr theElems,
|
SMESH::SMESH_GroupBase_ptr theElems,
|
||||||
SMESH::SMESH_GroupBase_ptr theNodesNot,
|
SMESH::SMESH_GroupBase_ptr theNodesNot,
|
||||||
SMESH::SMESH_GroupBase_ptr theAffectedElems )
|
SMESH::SMESH_GroupBase_ptr theAffectedElems )
|
||||||
|
|
||||||
{
|
{
|
||||||
if ( CORBA::is_nil( theElems ) && theElems->GetType() == SMESH::NODE )
|
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(
|
CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeElemGroupInRegion(
|
||||||
SMESH::SMESH_GroupBase_ptr theElems,
|
SMESH::SMESH_GroupBase_ptr theElems,
|
||||||
SMESH::SMESH_GroupBase_ptr theNodesNot,
|
SMESH::SMESH_GroupBase_ptr theNodesNot,
|
||||||
GEOM::GEOM_Object_ptr theShape )
|
GEOM::GEOM_Object_ptr theShape )
|
||||||
|
|
||||||
{
|
{
|
||||||
if ( CORBA::is_nil( theElems ) && theElems->GetType() == SMESH::NODE )
|
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(
|
CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeElemGroups(
|
||||||
const SMESH::ListOfGroups& theElems,
|
const SMESH::ListOfGroups& theElems,
|
||||||
const SMESH::ListOfGroups& theNodesNot,
|
const SMESH::ListOfGroups& theNodesNot,
|
||||||
const SMESH::ListOfGroups& theAffectedElems )
|
const SMESH::ListOfGroups& theAffectedElems )
|
||||||
{
|
{
|
||||||
initData();
|
initData();
|
||||||
|
|
||||||
@ -4456,10 +4592,10 @@ CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeGroups(
|
|||||||
*/
|
*/
|
||||||
//================================================================================
|
//================================================================================
|
||||||
|
|
||||||
CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeGroupsInRegion(
|
CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeElemGroupsInRegion(
|
||||||
const SMESH::ListOfGroups& theElems,
|
const SMESH::ListOfGroups& theElems,
|
||||||
const SMESH::ListOfGroups& theNodesNot,
|
const SMESH::ListOfGroups& theNodesNot,
|
||||||
GEOM::GEOM_Object_ptr theShape )
|
GEOM::GEOM_Object_ptr theShape )
|
||||||
{
|
{
|
||||||
initData();
|
initData();
|
||||||
|
|
||||||
|
@ -514,6 +514,17 @@ class SMESH_MeshEditor_i: public POA_SMESH::SMESH_MeshEditor
|
|||||||
*/
|
*/
|
||||||
int GetMeshId() const { return myMesh->GetId(); }
|
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
|
* \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
|
* \return TRUE if operation has been completed successfully, FALSE otherwise
|
||||||
* \sa DoubleNodeGroup(), DoubleNodeGroups()
|
* \sa DoubleNodeGroup(), DoubleNodeGroups()
|
||||||
*/
|
*/
|
||||||
CORBA::Boolean DoubleNodes( const SMESH::long_array& theElems,
|
CORBA::Boolean DoubleNodeElem( const SMESH::long_array& theElems,
|
||||||
const SMESH::long_array& theNodesNot,
|
const SMESH::long_array& theNodesNot,
|
||||||
const SMESH::long_array& theAffectedElems );
|
const SMESH::long_array& theAffectedElems );
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Creates a hole in a mesh by doubling the nodes of some particular elements
|
* \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
|
* \return TRUE if operation has been completed successfully, FALSE otherwise
|
||||||
* \sa DoubleNodeGroupInRegion(), DoubleNodeGroupsInRegion()
|
* \sa DoubleNodeGroupInRegion(), DoubleNodeGroupsInRegion()
|
||||||
*/
|
*/
|
||||||
CORBA::Boolean DoubleNodesInRegion( const SMESH::long_array& theElems,
|
CORBA::Boolean DoubleNodeElemInRegion( const SMESH::long_array& theElems,
|
||||||
const SMESH::long_array& theNodesNot,
|
const SMESH::long_array& theNodesNot,
|
||||||
GEOM::GEOM_Object_ptr theShape );
|
GEOM::GEOM_Object_ptr theShape );
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Creates a hole in a mesh by doubling the nodes of some particular elements
|
* \brief Creates a hole in a mesh by doubling the nodes of some particular elements
|
||||||
@ -553,9 +564,9 @@ class SMESH_MeshEditor_i: public POA_SMESH::SMESH_MeshEditor
|
|||||||
* \return TRUE if operation has been completed successfully, FALSE otherwise
|
* \return TRUE if operation has been completed successfully, FALSE otherwise
|
||||||
* \sa DoubleNodes(), DoubleNodeGroups()
|
* \sa DoubleNodes(), DoubleNodeGroups()
|
||||||
*/
|
*/
|
||||||
CORBA::Boolean DoubleNodeGroup( SMESH::SMESH_GroupBase_ptr theElems,
|
CORBA::Boolean DoubleNodeElemGroup( SMESH::SMESH_GroupBase_ptr theElems,
|
||||||
SMESH::SMESH_GroupBase_ptr theNodesNot,
|
SMESH::SMESH_GroupBase_ptr theNodesNot,
|
||||||
SMESH::SMESH_GroupBase_ptr theAffectedElems );
|
SMESH::SMESH_GroupBase_ptr theAffectedElems );
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Creates a hole in a mesh by doubling the nodes of some particular elements
|
* \brief Creates a hole in a mesh by doubling the nodes of some particular elements
|
||||||
@ -567,9 +578,9 @@ class SMESH_MeshEditor_i: public POA_SMESH::SMESH_MeshEditor
|
|||||||
* \return TRUE if operation has been completed successfully, FALSE otherwise
|
* \return TRUE if operation has been completed successfully, FALSE otherwise
|
||||||
* \sa DoubleNodesInRegion(), DoubleNodeGroupsInRegion()
|
* \sa DoubleNodesInRegion(), DoubleNodeGroupsInRegion()
|
||||||
*/
|
*/
|
||||||
CORBA::Boolean DoubleNodeGroupInRegion( SMESH::SMESH_GroupBase_ptr theElems,
|
CORBA::Boolean DoubleNodeElemGroupInRegion( SMESH::SMESH_GroupBase_ptr theElems,
|
||||||
SMESH::SMESH_GroupBase_ptr theNodesNot,
|
SMESH::SMESH_GroupBase_ptr theNodesNot,
|
||||||
GEOM::GEOM_Object_ptr theShape );
|
GEOM::GEOM_Object_ptr theShape );
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Creates a hole in a mesh by doubling the nodes of some particular elements
|
* \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
|
* \return TRUE if operation has been completed successfully, FALSE otherwise
|
||||||
* \sa DoubleNodeGroup(), DoubleNodes()
|
* \sa DoubleNodeGroup(), DoubleNodes()
|
||||||
*/
|
*/
|
||||||
CORBA::Boolean DoubleNodeGroups( const SMESH::ListOfGroups& theElems,
|
CORBA::Boolean DoubleNodeElemGroups( const SMESH::ListOfGroups& theElems,
|
||||||
const SMESH::ListOfGroups& theNodesNot,
|
const SMESH::ListOfGroups& theNodesNot,
|
||||||
const SMESH::ListOfGroups& theAffectedElems );
|
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
|
* \return TRUE if operation has been completed successfully, FALSE otherwise
|
||||||
* \sa DoubleNodeGroupInRegion(), DoubleNodesInRegion()
|
* \sa DoubleNodeGroupInRegion(), DoubleNodesInRegion()
|
||||||
*/
|
*/
|
||||||
CORBA::Boolean DoubleNodeGroupsInRegion( const SMESH::ListOfGroups& theElems,
|
CORBA::Boolean DoubleNodeElemGroupsInRegion( const SMESH::ListOfGroups& theElems,
|
||||||
const SMESH::ListOfGroups& theNodesNot,
|
const SMESH::ListOfGroups& theNodesNot,
|
||||||
GEOM::GEOM_Object_ptr theShape );
|
GEOM::GEOM_Object_ptr theShape );
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Generated skin mesh (containing 2D cells) from 3D mesh
|
* \brief Generated skin mesh (containing 2D cells) from 3D mesh
|
||||||
|
@ -3421,6 +3421,43 @@ class Mesh:
|
|||||||
def GetLastCreatedElems(self):
|
def GetLastCreatedElems(self):
|
||||||
return self.editor.GetLastCreatedElems()
|
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
|
## 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
|
# @param theElems - the list of elements (edges or faces) to be replicated
|
||||||
# The nodes for duplication could be found from these elements
|
# The nodes for duplication could be found from these elements
|
||||||
@ -3429,8 +3466,8 @@ class Mesh:
|
|||||||
# replicated nodes should be associated to.
|
# replicated nodes should be associated to.
|
||||||
# @return TRUE if operation has been completed successfully, FALSE otherwise
|
# @return TRUE if operation has been completed successfully, FALSE otherwise
|
||||||
# @ingroup l2_modif_edit
|
# @ingroup l2_modif_edit
|
||||||
def DoubleNodes(self, theElems, theNodesNot, theAffectedElems):
|
def DoubleNodeElem(self, theElems, theNodesNot, theAffectedElems):
|
||||||
return self.editor.DoubleNodes(theElems, theNodesNot, theAffectedElems)
|
return self.editor.DoubleNodeElem(theElems, theNodesNot, theAffectedElems)
|
||||||
|
|
||||||
## Creates a hole in a mesh by doubling the nodes of some particular elements
|
## 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
|
# @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.
|
# The replicated nodes should be associated to affected elements.
|
||||||
# @return TRUE if operation has been completed successfully, FALSE otherwise
|
# @return TRUE if operation has been completed successfully, FALSE otherwise
|
||||||
# @ingroup l2_modif_edit
|
# @ingroup l2_modif_edit
|
||||||
def DoubleNodesInRegion(self, theElems, theNodesNot, theShape):
|
def DoubleNodeElemInRegion(self, theElems, theNodesNot, theShape):
|
||||||
return self.editor.DoubleNodesInRegion(theElems, theNodesNot, theShape)
|
return self.editor.DoubleNodeElemInRegion(theElems, theNodesNot, theShape)
|
||||||
|
|
||||||
## Creates a hole in a mesh by doubling the nodes of some particular elements
|
## Creates a hole in a mesh by doubling the nodes of some particular elements
|
||||||
# This method provided for convenience works as DoubleNodes() described above.
|
# 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
|
# @param theAffectedElems - group of elements to which the replicated nodes
|
||||||
# should be associated to.
|
# should be associated to.
|
||||||
# @ingroup l2_modif_edit
|
# @ingroup l2_modif_edit
|
||||||
def DoubleNodeGroup(self, theElems, theNodesNot, theAffectedElems):
|
def DoubleNodeElemGroup(self, theElems, theNodesNot, theAffectedElems):
|
||||||
return self.editor.DoubleNodeGroup(theElems, theNodesNot, theAffectedElems)
|
return self.editor.DoubleNodeElemGroup(theElems, theNodesNot, theAffectedElems)
|
||||||
|
|
||||||
## Creates a hole in a mesh by doubling the nodes of some particular elements
|
## Creates a hole in a mesh by doubling the nodes of some particular elements
|
||||||
# This method provided for convenience works as DoubleNodes() described above.
|
# This method provided for convenience works as DoubleNodes() described above.
|
||||||
@ -3462,8 +3499,8 @@ class Mesh:
|
|||||||
# located on or inside shape).
|
# located on or inside shape).
|
||||||
# The replicated nodes should be associated to affected elements.
|
# The replicated nodes should be associated to affected elements.
|
||||||
# @ingroup l2_modif_edit
|
# @ingroup l2_modif_edit
|
||||||
def DoubleNodeGroupInRegion(self, theElems, theNodesNot, theShape):
|
def DoubleNodeElemGroupInRegion(self, theElems, theNodesNot, theShape):
|
||||||
return self.editor.DoubleNodeGroup(theElems, theNodesNot, theShape)
|
return self.editor.DoubleNodeElemGroup(theElems, theNodesNot, theShape)
|
||||||
|
|
||||||
## Creates a hole in a mesh by doubling the nodes of some particular elements
|
## Creates a hole in a mesh by doubling the nodes of some particular elements
|
||||||
# This method provided for convenience works as DoubleNodes() described above.
|
# This method provided for convenience works as DoubleNodes() described above.
|
||||||
@ -3473,8 +3510,8 @@ class Mesh:
|
|||||||
# should be associated to.
|
# should be associated to.
|
||||||
# @return TRUE if operation has been completed successfully, FALSE otherwise
|
# @return TRUE if operation has been completed successfully, FALSE otherwise
|
||||||
# @ingroup l2_modif_edit
|
# @ingroup l2_modif_edit
|
||||||
def DoubleNodeGroups(self, theElems, theNodesNot, theAffectedElems):
|
def DoubleNodeElemGroups(self, theElems, theNodesNot, theAffectedElems):
|
||||||
return self.editor.DoubleNodeGroups(theElems, theNodesNot, theAffectedElems)
|
return self.editor.DoubleNodeElemGroups(theElems, theNodesNot, theAffectedElems)
|
||||||
|
|
||||||
## Creates a hole in a mesh by doubling the nodes of some particular elements
|
## Creates a hole in a mesh by doubling the nodes of some particular elements
|
||||||
# This method provided for convenience works as DoubleNodes() described above.
|
# 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.
|
# The replicated nodes should be associated to affected elements.
|
||||||
# @return TRUE if operation has been completed successfully, FALSE otherwise
|
# @return TRUE if operation has been completed successfully, FALSE otherwise
|
||||||
# @ingroup l2_modif_edit
|
# @ingroup l2_modif_edit
|
||||||
def DoubleNodeGroupsInRegion(self, theElems, theNodesNot, theShape):
|
def DoubleNodeElemGroupsInRegion(self, theElems, theNodesNot, theShape):
|
||||||
return self.editor.DoubleNodeGroupsInRegion(theElems, theNodesNot, theShape)
|
return self.editor.DoubleNodeElemGroupsInRegion(theElems, theNodesNot, theShape)
|
||||||
|
|
||||||
## The mother class to define algorithm, it is not recommended to use it directly.
|
## The mother class to define algorithm, it is not recommended to use it directly.
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user