-// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// Copyright (C) 2007-2008 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
//
// This library is free software; you can redistribute it and/or
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-//
-//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File : SMESH_MeshEditor.idl
-// $Header$
+//
#ifndef _SMESH_MESHEDITOR_IDL_
#define _SMESH_MESHEDITOR_IDL_
module SMESH
{
- /*!
- * Structure used in mesh edit preview data
- */
- struct ElementSubType { ElementType SMDS_ElementType;
- boolean isPoly;
- long nbNodesInElement; };
-
- typedef sequence<ElementSubType> types_array;
-
- /*!
- * Structure containing mesh edit preview data
- */
- struct MeshPreviewStruct { nodes_array nodesXYZ;
- long_array elementConnectivities;
- types_array elementTypes; };
-
/*!
* This interface makes modifications on the Mesh - removing elements and nodes etc.
*/
long AddNode(in double x, in double y, in double z);
+ /*!
+ * Create 0D element on the given node.
+ * \param IdOfNode Node IDs for creation of element.
+ */
+ long Add0DElement(in long IDOfNode);
+
/*!
* Create edge, either linear and quadratic (this is determed
* by number of given nodes).
in double AngleInRadians,
in long NbOfSteps,
in double Tolerance);
+ /*!
+ * \brief Genarate dim+1 elements by rotation of the object around axis
+ * \param theObject - object containing elements to ratate
+ * \param Axix - rotation axis
+ * \param AngleInRadians - rotation angle
+ * \param NbOfSteps - number of elements to generate from one element
+ */
+ void RotationSweepObject1D(in SMESH_IDSource theObject,
+ in AxisStruct Axix,
+ in double AngleInRadians,
+ in long NbOfSteps,
+ in double Tolerance);
+ /*!
+ * \brief Same as previous but additionally create groups of elements
+ * generated from elements belonging to preexisting groups
+ */
+ ListOfGroups RotationSweepObject1DMakeGroups(in SMESH_IDSource theObject,
+ in AxisStruct Axix,
+ in double AngleInRadians,
+ in long NbOfSteps,
+ in double Tolerance);
+ /*!
+ * \brief Genarate dim+1 elements by rotation of the object around axis
+ * \param theObject - object containing elements to ratate
+ * \param Axix - rotation axis
+ * \param AngleInRadians - rotation angle
+ * \param NbOfSteps - number of elements to generate from one element
+ */
+ void RotationSweepObject2D(in SMESH_IDSource theObject,
+ in AxisStruct Axix,
+ in double AngleInRadians,
+ in long NbOfSteps,
+ in double Tolerance);
+ /*!
+ * \brief Same as previous but additionally create groups of elements
+ * generated from elements belonging to preexisting groups
+ */
+ ListOfGroups RotationSweepObject2DMakeGroups(in SMESH_IDSource theObject,
+ in AxisStruct Axix,
+ in double AngleInRadians,
+ in long NbOfSteps,
+ in double Tolerance);
/*!
* \brief Genarate dim+1 elements by extrusion of elements along vector
* \param IDsOfElements - elements to sweep
EXTR_CANT_GET_TANGENT
};
+ ListOfGroups ExtrusionAlongPathX(in long_array IDsOfElements,
+ in SMESH_IDSource Path,
+ in long NodeStart,
+ in boolean HasAngles,
+ in double_array Angles,
+ in boolean LinearVariation,
+ in boolean HasRefPoint,
+ in PointStruct RefPoint,
+ in boolean MakeGroups,
+ in ElementType ElemType,
+ out Extrusion_Error Error);
+
+ ListOfGroups ExtrusionAlongPathObjX(in SMESH_IDSource theObject,
+ in SMESH_IDSource Path,
+ in long NodeStart,
+ in boolean HasAngles,
+ in double_array Angles,
+ in boolean LinearVariation,
+ in boolean HasRefPoint,
+ in PointStruct RefPoint,
+ in boolean MakeGroups,
+ in ElementType ElemType,
+ out Extrusion_Error Error);
+
Extrusion_Error ExtrusionAlongPath(in long_array IDsOfElements,
in SMESH_Mesh PathMesh,
in GEOM::GEOM_Object PathShape,
in PointStruct RefPoint,
out Extrusion_Error Error);
+ Extrusion_Error ExtrusionAlongPathObject1D(in SMESH_IDSource theObject,
+ in SMESH_Mesh PathMesh,
+ in GEOM::GEOM_Object PathShape,
+ in long NodeStart,
+ in boolean HasAngles,
+ in double_array Angles,
+ in boolean HasRefPoint,
+ in PointStruct RefPoint);
+ ListOfGroups ExtrusionAlongPathObject1DMakeGroups(in SMESH_IDSource theObject,
+ in SMESH_Mesh PathMesh,
+ in GEOM::GEOM_Object PathShape,
+ in long NodeStart,
+ in boolean HasAngles,
+ in double_array Angles,
+ in boolean HasRefPoint,
+ in PointStruct RefPoint,
+ out Extrusion_Error Error);
+
+ Extrusion_Error ExtrusionAlongPathObject2D(in SMESH_IDSource theObject,
+ in SMESH_Mesh PathMesh,
+ in GEOM::GEOM_Object PathShape,
+ in long NodeStart,
+ in boolean HasAngles,
+ in double_array Angles,
+ in boolean HasRefPoint,
+ in PointStruct RefPoint);
+ ListOfGroups ExtrusionAlongPathObject2DMakeGroups(in SMESH_IDSource theObject,
+ in SMESH_Mesh PathMesh,
+ in GEOM::GEOM_Object PathShape,
+ in long NodeStart,
+ in boolean HasAngles,
+ in double_array Angles,
+ in boolean HasRefPoint,
+ in PointStruct RefPoint,
+ out Extrusion_Error Error);
+
/*!
* Compute rotation angles for ExtrusionAlongPath as linear variation
* of given angles along path steps
*/
long MoveClosestNodeToPoint(in double x, in double y, in double z, in long nodeID);
+ /*!
+ * Return ID of node closest to a given point
+ */
+ long FindNodeClosestTo(in double x, in double y, in double z);
+
+ /*!
+ * Return elements of given type where the given point is IN or ON.
+ *
+ * 'ALL' type means elements of any type excluding nodes and 0D elements
+ */
+ long_array FindElementsByPoint(in double x, in double y, in double z, in ElementType type);
+
enum Sew_Error {
SEW_OK,
SEW_BORDER1_NOT_FOUND,
* not creared - returns empty list
*/
long_array GetLastCreatedElems();
+
+ /*!
+ * \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
+ * The nodes for duplication could be found from these elements
+ * \param theNodesNot - list of nodes to NOT replicate
+ * \param theAffectedElems - the list of elements (cells and edges) to which the
+ * replicated nodes should be associated to.
+ * \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 );
+
+ /*!
+ * \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
+ * The nodes for duplication could be found from these elements
+ * \param theNodesNot - list of nodes to NOT replicate
+ * \param theShape - shape to detect affected elements (element which geometric center
+ * located on or inside shape).
+ * The replicated nodes should be associated to affected elements.
+ * \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 );
+
+ /*!
+ * \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 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 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 );
+
+ /*!
+ * \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 theElems - group of elements (edges or faces) to be replicated
+ * \param theNodesNot - group of nodes not to replicated
+ * \param theShape - shape to detect affected elements (element which geometric center
+ * located on or inside shape).
+ * The replicated nodes should be associated to affected elements.
+ * \return TRUE if operation has been completed successfully, FALSE otherwise
+ * \sa DoubleNodesInRegion(), DoubleNodeGroupsInRegion()
+ */
+ boolean DoubleNodeGroupInRegion( in SMESH_GroupBase theElems,
+ in SMESH_GroupBase theNodesNot,
+ in GEOM::GEOM_Object theShape );
+
+ /*!
+ * \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 theElems - list of groups of elements (edges or faces) to be replicated
+ * \param theNodesNot - list of groups of nodes not to replicated
+ * \param theAffectedElems - group of elements to which the replicated nodes
+ * should be associated to.
+ * \return TRUE if operation has been completed successfully, FALSE otherwise
+ * \sa DoubleNodeGroup(), DoubleNodes()
+ */
+ boolean DoubleNodeGroups( in ListOfGroups theElems,
+ in ListOfGroups theNodesNot,
+ in ListOfGroups theAffectedElems );
+
+ /*!
+ * \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 theElems - list of groups of elements (edges or faces) to be replicated
+ * \param theNodesNot - list of groups of nodes not to replicated
+ * \param theShape - shape to detect affected elements (element which geometric center
+ * located on or inside shape).
+ * The replicated nodes should be associated to affected elements.
+ * \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 );
+
+ /*!
+ * \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
+ */
+ boolean Make2DMeshFrom3D();
};
};