X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FSMESH_I%2FSMESH_MeshEditor_i.hxx;h=2dbdd475d42980b7fdedf9275a01e614ccbac842;hb=062f1da5dde14e9ca8755c2eda44cbe8850f1d3a;hp=ff2a69cad1d359b4bc0b3688e41799857cc751fb;hpb=a232cd7e03b3cb4b81233ca7f6f1b44bd73bb55d;p=modules%2Fsmesh.git diff --git a/src/SMESH_I/SMESH_MeshEditor_i.hxx b/src/SMESH_I/SMESH_MeshEditor_i.hxx index ff2a69cad..2dbdd475d 100644 --- a/src/SMESH_I/SMESH_MeshEditor_i.hxx +++ b/src/SMESH_I/SMESH_MeshEditor_i.hxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -19,6 +19,7 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + // SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses // File : SMESH_MeshEditor_i.hxx // Author : Nicolas REJNERI @@ -34,6 +35,7 @@ #include "SMESH_Mesh.hxx" #include "SMESH_PythonDump.hxx" +#include "SMESH_MeshEditor.hxx" #include class SMESH_MeshEditor; @@ -51,10 +53,11 @@ public: /*! * \brief Wrap a sequence of ids in a SMESH_IDSource */ - SMESH::SMESH_IDSource_ptr MakeIDSource(const SMESH::long_array& IDsOfElements); - + SMESH::SMESH_IDSource_ptr MakeIDSource(const SMESH::long_array& IDsOfElements, + SMESH::ElementType type); CORBA::Boolean RemoveElements(const SMESH::long_array & IDsOfElements); CORBA::Boolean RemoveNodes(const SMESH::long_array & IDsOfNodes); + CORBA::Long RemoveOrphanNodes(); /*! * Methods for creation new elements. @@ -448,6 +451,10 @@ public: void FindCoincidentNodesOnPart(SMESH::SMESH_IDSource_ptr Object, CORBA::Double Tolerance, SMESH::array_of_long_array_out GroupsOfNodes); + void FindCoincidentNodesOnPartBut(SMESH::SMESH_IDSource_ptr Object, + CORBA::Double Tolerance, + SMESH::array_of_long_array_out GroupsOfNodes, + const SMESH::ListOfIDSources& ExceptSubMeshOrGroups); void MergeNodes (const SMESH::array_of_long_array& GroupsOfNodes); void FindEqualElements(SMESH::SMESH_IDSource_ptr Object, SMESH::array_of_long_array_out GroupsOfElementsID); @@ -541,7 +548,7 @@ public: */ int GetMeshId() const { return myMesh->GetId(); } - CORBA::Boolean DoubleNodes( const SMESH::long_array& theNodes, + CORBA::Boolean DoubleNodes( const SMESH::long_array& theNodes, const SMESH::long_array& theModifiedElems ); CORBA::Boolean DoubleNode( CORBA::Long theNodeId, @@ -550,6 +557,17 @@ public: CORBA::Boolean DoubleNodeGroup( SMESH::SMESH_GroupBase_ptr theNodes, SMESH::SMESH_GroupBase_ptr theModifiedElems ); + /*! + * \brief Creates a hole in a mesh by doubling the nodes of some particular elements. + * Works as DoubleNodeGroup(), but returns a new group with newly created nodes. + * \param theNodes - group of nodes to be doubled. + * \param theModifiedElems - group of elements to be updated. + * \return a new group with newly created nodes + * \sa DoubleNodeGroup() + */ + SMESH::SMESH_Group_ptr DoubleNodeGroupNew( SMESH::SMESH_GroupBase_ptr theNodes, + SMESH::SMESH_GroupBase_ptr theModifiedElems ); + CORBA::Boolean DoubleNodeGroups( const SMESH::ListOfGroups& theNodes, const SMESH::ListOfGroups& theModifiedElems); @@ -594,6 +612,20 @@ public: 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 + * Works as DoubleNodeElemGroup(), but returns a new group with newly created elements. + * \param theElems - group of of elements (edges or faces) to be replicated + * \param theNodesNot - group of nodes not to replicated + * \param theAffectedElems - group of elements to which the replicated nodes + * should be associated to. + * \return a new group with newly created elements + * \sa DoubleNodeElemGroup() + */ + SMESH::SMESH_Group_ptr DoubleNodeElemGroupNew( 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 @@ -639,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(); } @@ -705,36 +745,38 @@ public: const bool MakeGroups, const SMDSAbs_ElementType ElementType, SMESH::SMESH_MeshEditor::Extrusion_Error & theError); - SMESH::ListOfGroups* mirror(const SMESH::long_array & IDsOfElements, + SMESH::ListOfGroups* mirror(TIDSortedElemSet & IDsOfElements, const SMESH::AxisStruct & Axis, SMESH::SMESH_MeshEditor::MirrorType MirrorType, CORBA::Boolean Copy, const bool MakeGroups, ::SMESH_Mesh* TargetMesh=0); - SMESH::ListOfGroups* translate(const SMESH::long_array & IDsOfElements, + SMESH::ListOfGroups* translate(TIDSortedElemSet & IDsOfElements, const SMESH::DirStruct & Vector, CORBA::Boolean Copy, const bool MakeGroups, ::SMESH_Mesh* TargetMesh=0); - SMESH::ListOfGroups* rotate(const SMESH::long_array & IDsOfElements, + SMESH::ListOfGroups* rotate(TIDSortedElemSet & IDsOfElements, const SMESH::AxisStruct & Axis, CORBA::Double Angle, CORBA::Boolean Copy, const bool MakeGroups, ::SMESH_Mesh* TargetMesh=0); - SMESH::ListOfGroups* scale(const SMESH::long_array & theIDsOfElements, - const SMESH::PointStruct& thePoint, - const SMESH::double_array& theScaleFact, - CORBA::Boolean theCopy, - const bool theMakeGroups, - ::SMESH_Mesh* theTargetMesh=0); + SMESH::ListOfGroups* scale(SMESH::SMESH_IDSource_ptr theObject, + const SMESH::PointStruct& thePoint, + const SMESH::double_array& theScaleFact, + CORBA::Boolean theCopy, + const bool theMakeGroups, + ::SMESH_Mesh* theTargetMesh=0); SMESH::SMESH_Mesh_ptr makeMesh(const char* theMeshName); void DumpGroupsList(SMESH::TPythonDump & theDumpPython, const SMESH::ListOfGroups * theGroupList); + string generateGroupName(const string& thePrefix); + private: //!< fields SMESH_Mesh_i* myMesh_i;