Salome HOME
Merge branch 'master' into pre/penta18
[modules/smesh.git] / idl / SMESH_MeshEditor.idl
1 // Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License, or (at your option) any later version.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 // Lesser General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 //  File   : SMESH_MeshEditor.idl
23
24 #ifndef _SMESH_MESHEDITOR_IDL_
25 #define _SMESH_MESHEDITOR_IDL_
26
27 #include "SMESH_Mesh.idl"
28 #include "SMESH_Gen.idl"
29
30 module SMESH
31 {
32   interface NumericalFunctor;
33
34   enum Bnd_Dimension { BND_2DFROM3D, BND_1DFROM3D, BND_1DFROM2D };
35
36
37   struct FreeBorder
38   {
39     SMESH::long_array nodeIDs; // all nodes defining a free border
40     // 1st and last node is same in a closed border
41   };
42   struct FreeBorderPart
43   {
44     short border; // border index within a sequence<FreeBorder>
45     long  node1;  // node index within the border-th FreeBorder
46     long  node2;
47     long  nodeLast;
48   };
49   typedef sequence<FreeBorder>       ListOfFreeBorders;
50   typedef sequence<FreeBorderPart>   FreeBordersGroup;
51   typedef sequence<FreeBordersGroup> ListOfFreeBorderGroups;
52
53   struct CoincidentFreeBorders
54   {
55     ListOfFreeBorders      borders;          // nodes of all free borders
56     ListOfFreeBorderGroups coincidentGroups; // groups of coincident parts of borders
57   };
58
59
60   /*!
61    * This interface makes modifications on the Mesh - removing elements and nodes etc.
62    */
63   interface SMESH_MeshEditor
64   {
65    /*!
66     * Returns a mesh subject to edition
67     */
68     SMESH_Mesh GetMesh();
69
70    /*!
71     * Return data of mesh edition preview which is computed provided
72     * that the editor was obtained through SMESH_Mesh::GetMeshEditPreviewer()
73     */
74     MeshPreviewStruct GetPreviewData() raises (SALOME::SALOME_Exception);
75
76    /*!
77     * If during last operation of MeshEditor some nodes were
78     * created, this method returns list of their IDs, if new nodes
79     * not created - returns empty list
80     */
81     long_array GetLastCreatedNodes() raises (SALOME::SALOME_Exception);
82
83    /*!
84     * If during last operation of MeshEditor some elements were
85     * created, this method returns list of their IDs, if new elements
86     * not created - returns empty list
87     */
88     long_array GetLastCreatedElems() raises (SALOME::SALOME_Exception);
89
90     /*!
91      * \brief Clears sequences of last created elements and nodes 
92      */
93     void ClearLastCreated() raises (SALOME::SALOME_Exception);
94
95     /*!
96      * \brief Returns description of an error/warning occurred during the last operation
97      */
98     ComputeError GetLastError() raises (SALOME::SALOME_Exception);
99
100     /*!
101      * \brief Wrap a sequence of ids in a SMESH_IDSource
102      * \param IDsOfElements list of mesh elements identifiers
103      * \return new ID source object
104      */
105     SMESH_IDSource MakeIDSource(in long_array IDsOfElements, in ElementType type);
106
107     /*!
108      * \brief Remove mesh elements specified by their identifiers.
109      * \param IDsOfElements list of mesh elements identifiers
110      * \return \c true if elements are correctly removed or \c false otherwise
111      */
112     boolean RemoveElements(in long_array IDsOfElements) raises (SALOME::SALOME_Exception);
113
114     /*!
115      * \brief Remove mesh nodes specified by their identifiers.
116      * \param IDsOfNodes list of mesh nodes identifiers
117      * \return \c true if nodes are correctly removed or \c false otherwise
118      */
119     boolean RemoveNodes(in long_array IDsOfNodes) raises (SALOME::SALOME_Exception);
120
121     /*!
122      * \brief Remove all orphan nodes.
123      * \return number of removed nodes
124      */
125     long RemoveOrphanNodes() raises (SALOME::SALOME_Exception);
126
127     /*!
128      * \brief Add a new node.
129      * \param x X coordinate of new node
130      * \param y Y coordinate of new node
131      * \param z Z coordinate of new node
132      * \return integer identifier of new node
133      */
134     long AddNode(in double x, in double y, in double z) raises (SALOME::SALOME_Exception);
135
136     /*!
137      *  Create a 0D element on the given node.
138      *  \param IdOfNode Node IDs for creation of element.
139      *  \param DuplicateElements to add one more 0D element to a node or not
140      */
141     long Add0DElement(in long    IDOfNode,
142                       in boolean DuplicateElements) raises (SALOME::SALOME_Exception);
143
144     /*!
145      *  Create a ball element on the given node.
146      *  \param IdOfNode Node IDs for creation of element.
147      */
148     long AddBall(in long IDOfNode, in double diameter) raises (SALOME::SALOME_Exception);
149
150     /*!
151      *  Create an edge, either linear and quadratic (this is determed
152      *  by number of given nodes, two or three).
153      *  \param IdsOfNodes List of node IDs for creation of element.
154      *  Needed order of nodes in this list corresponds to description
155      *  of MED. This description is located by the following link:
156      *   http://www.salome-platform.org/salome2/web_med_internet/logiciels/medV2.2.2_doc_html/html/modele_de_donnees.html#3.
157      */
158     long AddEdge(in long_array IDsOfNodes) raises (SALOME::SALOME_Exception);
159
160     /*!
161      *  Create face, either linear and quadratic (this is determed
162      *  by number of given nodes).
163      *  \param IdsOfNodes List of node IDs for creation of element.
164      *  Needed order of nodes in this list corresponds to description
165      *  of MED. This description is located by the following link:
166      *   http://www.salome-platform.org/salome2/web_med_internet/logiciels/medV2.2.2_doc_html/html/modele_de_donnees.html#3.
167      */
168     long AddFace(in long_array IDsOfNodes) raises (SALOME::SALOME_Exception);
169
170     long AddPolygonalFace(in long_array IdsOfNodes) raises (SALOME::SALOME_Exception);
171
172     /*!
173      * Create a quadratic polygonal face
174      *  \param IdsOfNodes - nodes of the polygon; corner nodes follow first
175      *  \return long - ID of a new polygon
176      */
177     long AddQuadPolygonalFace(in long_array IdsOfNodes) raises (SALOME::SALOME_Exception);
178
179     /*!
180      *  Create volume, either linear and quadratic (this is determed
181      *  by number of given nodes).
182      *  \param IdsOfNodes List of node IDs for creation of element.
183      *  Needed order of nodes in this list corresponds to description
184      *  of MED. This description is located by the following link:
185      *   http://www.salome-platform.org/salome2/web_med_internet/logiciels/medV2.2.2_doc_html/html/modele_de_donnees.html#3.
186      */
187     long AddVolume(in long_array IDsOfNodes) raises (SALOME::SALOME_Exception);
188
189     /*!
190      *  Create volume of many faces, giving nodes for each face.
191      *  \param IdsOfNodes List of node IDs for volume creation face by face.
192      *  \param Quantities List of integer values, Quantities[i]
193      *         gives quantity of nodes in face number i.
194      */
195     long AddPolyhedralVolume (in long_array IdsOfNodes,
196                               in long_array Quantities) raises (SALOME::SALOME_Exception);
197     /*!
198      *  Create volume of many faces, giving IDs of existing faces.
199      *  \param IdsOfFaces List of face IDs for volume creation.
200      *  \note The created volume will refer only to nodes
201      *        of the given faces, not to the faces itself.
202      */
203     long AddPolyhedralVolumeByFaces (in long_array IdsOfFaces) raises (SALOME::SALOME_Exception);
204
205     /*!
206      * Create 0D elements on all nodes of the given object.
207      *  \param theObject object on whose nodes 0D elements will be created.
208      *  \param theGroupName optional name of a group to add 0D elements created
209      *         and/or found on nodes of \a theObject.
210      *  \param theDuplicateElements to add one more 0D element to a node or not
211      *  \return an object (a new group or a temporary SMESH_IDSource) holding
212      *          ids of new and/or found 0D elements.
213      */
214     SMESH_IDSource Create0DElementsOnAllNodes(in SMESH_IDSource theObject,
215                                               in string         theGroupName,
216                                               in boolean        theDuplicateElements)
217       raises (SALOME::SALOME_Exception);
218
219     /*!
220      * \brief Bind a node to a vertex
221       * \param NodeID - node ID
222       * \param VertexID - vertex ID available through GEOM_Object.GetSubShapeIndices()[0]
223      */
224     void SetNodeOnVertex(in long NodeID, in long VertexID)
225       raises (SALOME::SALOME_Exception);
226     /*!
227      * \brief Store node position on an edge
228       * \param NodeID - node ID
229       * \param EdgeID - edge ID available through GEOM_Object.GetSubShapeIndices()[0]
230       * \param paramOnEdge - parameter on edge where the node is located
231      */
232     void SetNodeOnEdge(in long NodeID, in long EdgeID, in double paramOnEdge)
233       raises (SALOME::SALOME_Exception);
234     /*!
235      * \brief Store node position on a face
236       * \param NodeID - node ID
237       * \param FaceID - face ID available through GEOM_Object.GetSubShapeIndices()[0]
238       * \param u - U parameter on face where the node is located
239       * \param v - V parameter on face where the node is located
240      */
241     void SetNodeOnFace(in long NodeID, in long FaceID, in double u, in double v)
242       raises (SALOME::SALOME_Exception);
243     /*!
244      * \brief Bind a node to a solid
245       * \param NodeID - node ID
246       * \param SolidID - vertex ID available through GEOM_Object.GetSubShapeIndices()[0]
247      */
248     void SetNodeInVolume(in long NodeID, in long SolidID)
249       raises (SALOME::SALOME_Exception);
250     /*!
251      * \brief Bind an element to a shape
252       * \param ElementID - element ID
253       * \param ShapeID - shape ID available through GEOM_Object.GetSubShapeIndices()[0]
254      */
255     void SetMeshElementOnShape(in long ElementID, in long ShapeID)
256       raises (SALOME::SALOME_Exception);
257
258
259     boolean MoveNode(in long NodeID, in double x, in double y, in double z)
260       raises (SALOME::SALOME_Exception);
261
262     boolean InverseDiag(in long NodeID1, in long NodeID2) 
263       raises (SALOME::SALOME_Exception);
264
265     boolean DeleteDiag(in long NodeID1, in long NodeID2) 
266       raises (SALOME::SALOME_Exception);
267
268     boolean Reorient(in long_array IDsOfElements) 
269       raises (SALOME::SALOME_Exception);
270
271     boolean ReorientObject(in SMESH_IDSource theObject) 
272       raises (SALOME::SALOME_Exception);
273     /*!
274      * \brief Reorient faces contained in \a the2Dgroup.
275      * \param the2Dgroup - the mesh or its part to reorient
276      * \param theDirection - desired direction of normal of \a theFace
277      * \param theFace - ID of face whose orientation is checked.
278      *        It can be < 1 then \a thePoint is used to find a face.
279      * \param thePoint - is used to find a face if \a theFace < 1.
280      * \return number of reoriented faces.
281      */
282     long Reorient2D(in SMESH_IDSource the2Dgroup,
283                     in DirStruct      theDirection,
284                     in long           theFace,
285                     in PointStruct    thePoint) raises (SALOME::SALOME_Exception);
286     /*!
287      * \brief Reorient faces basing on orientation of adjacent volumes.
288      * \param faces - a list of objects containing face to reorient
289      * \param volumes - an object containing volumes.
290      * \param outsideNormal - to orient faces to have their normal 
291      *        pointing either \a outside or \a inside the adjacent volumes.
292      * \return number of reoriented faces.
293      */
294     long Reorient2DBy3D(in ListOfIDSources faces,
295                         in SMESH_IDSource  volumes,
296                         in boolean         outsideNormal) raises (SALOME::SALOME_Exception);
297
298     /*!
299      * \brief Fuse neighbour triangles into quadrangles.
300      * \param IDsOfElements Ids of triangles to be fused.
301      * \param theCriterion Is used to choose a neighbour to fuse with.
302      * \param theMaxAngle  Is a max angle between element normals at which fusion
303      *                     is still performed; theMaxAngle is mesured in radians.
304      * \return \c true in case of success, FALSE otherwise.
305      */
306     boolean TriToQuad (in long_array       IDsOfElements,
307                        in NumericalFunctor Criterion,
308                        in double           MaxAngle) raises (SALOME::SALOME_Exception);
309     /*!
310      * \brief Fuse neighbour triangles into quadrangles.
311      *
312      * Behaves like the above method, taking a list of elements from \a theObject
313      */
314     boolean TriToQuadObject (in SMESH_IDSource   theObject,
315                              in NumericalFunctor Criterion,
316                              in double           MaxAngle) raises (SALOME::SALOME_Exception);
317
318     /*!
319      * \brief Split quadrangles into triangles.
320      * \param IDsOfElements Ids of quadrangles to split.
321      * \param theCriterion Is used to choose a diagonal for splitting.
322      * \return TRUE in case of success, FALSE otherwise.
323      */
324     boolean QuadToTri (in long_array       IDsOfElements,
325                        in NumericalFunctor Criterion) raises (SALOME::SALOME_Exception);
326     /*!
327      * \brief Split quadrangles into triangles.
328      *
329      * Behaves like the above method, taking a list of elements from \a theObject
330      */
331     boolean QuadToTriObject (in SMESH_IDSource   theObject,
332                              in NumericalFunctor Criterion) raises (SALOME::SALOME_Exception);
333     /*!
334      * \brief Split each of quadrangles into 4 triangles.
335      * \param theQuads Container of quadrangles to split.
336      */
337     void QuadTo4Tri (in SMESH_IDSource theQuads) raises (SALOME::SALOME_Exception);
338
339     /*!
340      * \brief Split quadrangles into triangles.
341      * \param theElems  The faces to be splitted.
342      * \param the13Diag Is used to choose a diagonal for splitting.
343      * \return TRUE in case of success, FALSE otherwise.
344      */
345     boolean SplitQuad (in long_array IDsOfElements,
346                        in boolean    Diag13) raises (SALOME::SALOME_Exception);
347     /*!
348      * \brief Split quadrangles into triangles.
349      *
350      * Behaves like the above method, taking list of elements from \a theObject
351      */
352     boolean SplitQuadObject (in SMESH_IDSource theObject,
353                              in boolean        Diag13) raises (SALOME::SALOME_Exception);
354
355     /*!
356      *  Find better splitting of the given quadrangle.
357      *  \param IDOfQuad  ID of the quadrangle to be splitted.
358      *  \param Criterion A criterion to choose a diagonal for splitting.
359      *  \return 1 if 1-3 diagonal is better, 2 if 2-4
360      *          diagonal is better, 0 if error occurs.
361      */
362     long BestSplit (in long             IDOfQuad,
363                     in NumericalFunctor Criterion) raises (SALOME::SALOME_Exception);
364
365     /*!
366      * \brief Split volumic elements into tetrahedrons
367      *  \param elems - elements to split
368      *  \param methodFlags - flags passing splitting method:
369      *         1 - split the hexahedron into 5 tetrahedrons
370      *         2 - split the hexahedron into 6 tetrahedrons
371      *         3 - split the hexahedron into 24 tetrahedrons
372      */
373     void SplitVolumesIntoTetra(in SMESH_IDSource elems, in short methodFlags)
374       raises (SALOME::SALOME_Exception);
375
376     /*!
377      * \brief Split hexahedra into triangular prisms
378      *  \param elems - elements to split
379      *  \param startHexPoint - a point used to find a hexahedron for which \a facetToSplitNormal
380      *         gives a normal vector defining facets to split into triangles.
381      *  \param facetToSplitNormal - normal used to find a facet of hexahedron
382      *         to split into triangles.
383      *  \param methodFlags - flags passing splitting method:
384      *         1 - split the hexahedron into 2 prisms
385      *         2 - split the hexahedron into 4 prisms
386      *  \param allDomains - if \c False, only hexahedra adjacent to one closest
387      *         to \a facetToSplitNormal location are split, else \a facetToSplitNormal
388      *         is used to find the facet to split in all domains present in \a elems.
389      */
390     void SplitHexahedraIntoPrisms(in SMESH_IDSource     elems,
391                                   in SMESH::PointStruct startHexPoint,
392                                   in SMESH::DirStruct   facetToSplitNormal,
393                                   in short              methodFlags,
394                                   in boolean            allDomains)
395       raises (SALOME::SALOME_Exception);
396
397     /*!
398      * \brief Split bi-quadratic elements into linear ones without creation of additional nodes.
399      *   - bi-quadratic triangle will be split into 3 linear quadrangles;
400      *   - bi-quadratic quadrangle will be split into 4 linear quadrangles;
401      *   - tri-quadratic hexahedron will be split into 8 linear hexahedra;
402      *   Quadratic elements of lower dimension  adjacent to the split bi-quadratic element
403      *   will be split in order to keep the mesh conformal.
404      *  \param elems - elements to split
405      */
406     void SplitBiQuadraticIntoLinear(in ListOfIDSources elems)
407       raises (SALOME::SALOME_Exception);
408
409
410     enum Smooth_Method { LAPLACIAN_SMOOTH, CENTROIDAL_SMOOTH };
411
412     boolean Smooth(in long_array    IDsOfElements,
413                    in long_array    IDsOfFixedNodes,
414                    in long          MaxNbOfIterations,
415                    in double        MaxAspectRatio,
416                    in Smooth_Method Method) raises (SALOME::SALOME_Exception);
417
418     boolean SmoothObject(in SMESH_IDSource  theObject,
419                          in long_array      IDsOfFixedNodes,
420                          in long            MaxNbOfIterations,
421                          in double          MaxAspectRatio,
422                          in Smooth_Method   Method) raises (SALOME::SALOME_Exception);
423
424     boolean SmoothParametric(in long_array    IDsOfElements,
425                              in long_array    IDsOfFixedNodes,
426                              in long          MaxNbOfIterations,
427                              in double        MaxAspectRatio,
428                              in Smooth_Method Method) raises (SALOME::SALOME_Exception);
429
430     boolean SmoothParametricObject(in SMESH_IDSource  theObject,
431                                    in long_array      IDsOfFixedNodes,
432                                    in long            MaxNbOfIterations,
433                                    in double          MaxAspectRatio,
434                                    in Smooth_Method   Method) raises (SALOME::SALOME_Exception);
435
436     void ConvertToQuadratic(in boolean theForce3d) 
437       raises (SALOME::SALOME_Exception);
438     void ConvertToQuadraticObject(in boolean        theForce3d, 
439                                   in SMESH_IDSource theObject) 
440       raises (SALOME::SALOME_Exception);
441     
442     boolean ConvertFromQuadratic() 
443       raises (SALOME::SALOME_Exception);
444     void    ConvertFromQuadraticObject(in SMESH_IDSource theObject)
445       raises (SALOME::SALOME_Exception);
446
447     void ConvertToBiQuadratic(in boolean        theForce3d,
448                               in SMESH_IDSource theObject)
449       raises (SALOME::SALOME_Exception);
450
451     void RenumberNodes() raises (SALOME::SALOME_Exception);
452
453     void RenumberElements() raises (SALOME::SALOME_Exception);
454
455     /*!
456      * \brief Generate dim+1 elements by rotation of the object around axis
457      *  \param Nodes - nodes to revolve: a list including groups, sub-meshes or a mesh
458      *  \param Edges - edges to revolve: a list including groups, sub-meshes or a mesh
459      *  \param Faces - faces to revolve: a list including groups, sub-meshes or a mesh
460      *  \param Axis - rotation axis
461      *  \param AngleInRadians - rotation angle
462      *  \param NbOfSteps - number of elements to generate from one element
463      *  \param ToMakeGroups - if true, new elements will be included into new groups
464      *         corresponding to groups the input elements included in.
465      *  \return ListOfGroups - new groups craeted if \a ToMakeGroups is true
466      */
467     ListOfGroups RotationSweepObjects(in ListOfIDSources Nodes,
468                                       in ListOfIDSources Edges,
469                                       in ListOfIDSources Faces,
470                                       in AxisStruct      Axis,
471                                       in double          AngleInRadians,
472                                       in long            NbOfSteps,
473                                       in double          Tolerance,
474                                       in boolean         ToMakeGroups)
475       raises (SALOME::SALOME_Exception);
476
477     /*!
478      * \brief Generate dim+1 elements by extrusion of elements along vector
479      *  \param nodes - nodes to extrude: a list including groups, sub-meshes or a mesh
480      *  \param edges - edges to extrude: a list including groups, sub-meshes or a mesh
481      *  \param faces - faces to extrude: a list including groups, sub-meshes or a mesh
482      *  \param stepVector - vector giving direction and distance of an extrusion step
483      *  \param nbOfSteps - number of elements to generate from one element
484      *  \param toMakeGroups - if true, new elements will be included into new groups
485      *         corresponding to groups the input elements included in.
486      *  \return ListOfGroups - new groups craeted if \a toMakeGroups is true
487      */
488     ListOfGroups ExtrusionSweepObjects(in ListOfIDSources nodes,
489                                        in ListOfIDSources edges,
490                                        in ListOfIDSources faces,
491                                        in DirStruct       stepVector,
492                                        in long            nbOfSteps,
493                                        in double_array    scaleFactors,
494                                        in boolean         linearVariation,
495                                        in double_array    basePoint,
496                                        in boolean         toMakeGroups)
497       raises (SALOME::SALOME_Exception);
498
499     /*! Generates new elements by extrusion along the normal to a discretized surface or wire
500      */
501     ListOfGroups ExtrusionByNormal(in ListOfIDSources theObjects,
502                                    in double          stepSize,
503                                    in long            nbOfSteps,
504                                    in boolean         byAverageNormal,
505                                    in boolean         useInputElemsOnly,
506                                    in boolean         makeGroups,
507                                    in short           dim)
508       raises (SALOME::SALOME_Exception);
509
510     /*!
511      * Generate new elements by extrusion of theElements
512      * by StepVector by NbOfSteps
513      *  \param ExtrFlags set flags for performing extrusion
514      *  \param SewTolerance - uses for comparing locations of nodes if flag
515      *         EXTRUSION_FLAG_SEW is set
516      *  \param ToMakeGroups - if true, new elements will be included into new groups
517      *         corresponding to groups the input elements included in.
518      *  \return ListOfGroups - new groups craeted if \a ToMakeGroups is true
519      */
520     ListOfGroups AdvancedExtrusion(in long_array IDsOfElements,
521                                    in DirStruct  StepVector,
522                                    in long       NbOfSteps,
523                                    in long       ExtrFlags,
524                                    in double     SewTolerance,
525                                    in boolean    ToMakeGroups)
526       raises (SALOME::SALOME_Exception);
527
528     enum Extrusion_Error {
529       EXTR_OK,
530       EXTR_NO_ELEMENTS,
531       EXTR_PATH_NOT_EDGE,
532       EXTR_BAD_PATH_SHAPE,
533       EXTR_BAD_STARTING_NODE,
534       EXTR_BAD_ANGLES_NUMBER,
535       EXTR_CANT_GET_TANGENT
536     };
537
538     ListOfGroups ExtrusionAlongPathObjects(in ListOfIDSources Nodes,
539                                            in ListOfIDSources Edges,
540                                            in ListOfIDSources Faces,
541                                            in SMESH_IDSource    Path,
542                                            in GEOM::GEOM_Object PathShape,
543                                            in long              NodeStart,
544                                            in boolean           HasAngles,
545                                            in double_array      Angles,
546                                            in boolean           LinearVariation,
547                                            in boolean           HasRefPoint,
548                                            in PointStruct       RefPoint,
549                                            in boolean           MakeGroups,
550                                            out Extrusion_Error  Error)
551       raises (SALOME::SALOME_Exception);
552
553    /*!
554     * Compute rotation angles for ExtrusionAlongPath as linear variation
555     * of given angles along path steps
556     * param PathMesh mesh containing a 1D sub-mesh on the edge, along
557     *                which proceeds the extrusion
558     * param PathShape is shape(edge); as the mesh can be complex, the edge
559     *                 is used to define the sub-mesh for the path
560     */
561     double_array LinearAnglesVariation(in SMESH_Mesh        PathMesh,
562                                        in GEOM::GEOM_Object PathShape,
563                                        in double_array      Angles);
564
565     enum MirrorType { POINT, AXIS, PLANE };
566
567     void Mirror (in long_array IDsOfElements,
568                  in AxisStruct Mirror,
569                  in MirrorType Type,
570                  in boolean    Copy) 
571       raises (SALOME::SALOME_Exception);
572     ListOfGroups MirrorMakeGroups (in long_array IDsOfElements,
573                                    in AxisStruct Mirror,
574                                    in MirrorType Type) 
575       raises (SALOME::SALOME_Exception);
576     SMESH_Mesh MirrorMakeMesh (in long_array IDsOfElements,
577                                in AxisStruct Mirror,
578                                in MirrorType Type,
579                                in boolean    CopyGroups,
580                                in string     MeshName) 
581       raises (SALOME::SALOME_Exception);
582
583     void MirrorObject (in SMESH_IDSource theObject,
584                        in AxisStruct     Mirror,
585                        in MirrorType     Type,
586                        in boolean        Copy) 
587       raises (SALOME::SALOME_Exception);
588     ListOfGroups MirrorObjectMakeGroups (in SMESH_IDSource theObject,
589                                          in AxisStruct     Mirror,
590                                          in MirrorType     Type) 
591       raises (SALOME::SALOME_Exception);
592     SMESH_Mesh MirrorObjectMakeMesh (in SMESH_IDSource theObject,
593                                      in AxisStruct     Mirror,
594                                      in MirrorType     Type,
595                                      in boolean        CopyGroups,
596                                      in string         MeshName) 
597       raises (SALOME::SALOME_Exception);
598
599     void Translate (in long_array IDsOfElements,
600                     in DirStruct  Vector,
601                     in boolean    Copy) 
602       raises (SALOME::SALOME_Exception);
603     ListOfGroups TranslateMakeGroups (in long_array IDsOfElements,
604                                       in DirStruct  Vector) 
605       raises (SALOME::SALOME_Exception);
606     SMESH_Mesh TranslateMakeMesh (in long_array IDsOfElements,
607                                   in DirStruct  Vector,
608                                   in boolean    CopyGroups,
609                                   in string     MeshName) 
610       raises (SALOME::SALOME_Exception);
611
612     void TranslateObject (in SMESH_IDSource theObject,
613                           in DirStruct      Vector,
614                           in boolean        Copy) 
615       raises (SALOME::SALOME_Exception);
616     ListOfGroups TranslateObjectMakeGroups (in SMESH_IDSource theObject,
617                                             in DirStruct      Vector) 
618       raises (SALOME::SALOME_Exception);
619     SMESH_Mesh TranslateObjectMakeMesh (in SMESH_IDSource theObject,
620                                         in DirStruct      Vector,
621                                         in boolean        CopyGroups,
622                                         in string         MeshName) 
623       raises (SALOME::SALOME_Exception);
624
625     void Scale (in SMESH_IDSource theObject,
626                 in PointStruct    thePoint,
627                 in double_array   theScaleFact,
628                 in boolean        Copy) 
629       raises (SALOME::SALOME_Exception);
630     ListOfGroups ScaleMakeGroups (in SMESH_IDSource theObject,
631                                   in PointStruct    thePoint,
632                                   in double_array   theScaleFact) 
633       raises (SALOME::SALOME_Exception);
634     SMESH_Mesh ScaleMakeMesh (in SMESH_IDSource theObject,
635                               in PointStruct    thePoint,
636                               in double_array   theScaleFact,
637                               in boolean        CopyGroups,
638                               in string         MeshName) 
639       raises (SALOME::SALOME_Exception);
640
641     void Rotate (in long_array IDsOfElements,
642                  in AxisStruct Axis,
643                  in double     AngleInRadians,
644                  in boolean    Copy) 
645       raises (SALOME::SALOME_Exception);
646     ListOfGroups RotateMakeGroups (in long_array IDsOfElements,
647                                    in AxisStruct Axis,
648                                    in double     AngleInRadians) 
649       raises (SALOME::SALOME_Exception);
650     SMESH_Mesh RotateMakeMesh (in long_array IDsOfElements,
651                                in AxisStruct Axis,
652                                in double     AngleInRadians,
653                                in boolean    CopyGroups,
654                                in string     MeshName)
655       raises (SALOME::SALOME_Exception);
656
657     void RotateObject (in SMESH_IDSource theObject,
658                        in AxisStruct     Axis,
659                        in double         AngleInRadians,
660                        in boolean        Copy)
661       raises (SALOME::SALOME_Exception);
662     ListOfGroups RotateObjectMakeGroups (in SMESH_IDSource theObject,
663                                          in AxisStruct     Axis,
664                                          in double         AngleInRadians)
665       raises (SALOME::SALOME_Exception);
666     SMESH_Mesh RotateObjectMakeMesh (in SMESH_IDSource theObject,
667                                      in AxisStruct     Axis,
668                                      in double         AngleInRadians,
669                                      in boolean        CopyGroups,
670                                      in string         MeshName)
671       raises (SALOME::SALOME_Exception);
672
673     void FindCoincidentNodes (in  double              Tolerance,
674                               out array_of_long_array GroupsOfNodes,
675                               in  boolean             SeparateCornersAndMedium)
676       raises (SALOME::SALOME_Exception);
677
678     void FindCoincidentNodesOnPart (in  SMESH_IDSource      SubMeshOrGroup,
679                                     in  double              Tolerance,
680                                     out array_of_long_array GroupsOfNodes,
681                                     in  boolean             SeparateCornersAndMedium)
682       raises (SALOME::SALOME_Exception);
683
684     void FindCoincidentNodesOnPartBut (in  SMESH_IDSource      SubMeshOrGroup,
685                                        in  double              Tolerance,
686                                        out array_of_long_array GroupsOfNodes,
687                                        in  ListOfIDSources     ExceptSubMeshOrGroups,
688                                        in  boolean             SeparateCornersAndMedium)
689       raises (SALOME::SALOME_Exception);
690
691     void MergeNodes (in array_of_long_array    GroupsOfNodes,
692                      in SMESH::ListOfIDSources NodesToKeep,
693                      in boolean                AvoidMakingHoles)
694       raises (SALOME::SALOME_Exception);
695
696     /*!
697      * \brief Find elements built on the same nodes.
698      * \param MeshOrSubMeshOrGroup Mesh or SubMesh, or Group of elements for searching.
699      * \return List of groups of equal elements.
700      */
701     void FindEqualElements (in  SMESH_IDSource      MeshOrSubMeshOrGroup,
702                             out array_of_long_array GroupsOfElementsID) 
703       raises (SALOME::SALOME_Exception);
704
705     /*!
706      * \brief Merge elements in each given group.
707      * \param GroupsOfElementsID Groups of elements for merging.
708      */
709     void MergeElements(in array_of_long_array GroupsOfElementsID) 
710       raises (SALOME::SALOME_Exception);
711
712     /*!
713      * \brief Merge equal elements in the whole mesh.
714      */
715     void MergeEqualElements() 
716       raises (SALOME::SALOME_Exception);
717
718     /*!
719      * If the given ID is a valid node ID (nodeID > 0), just move this node, else
720      * move the node closest to the point to point's location and return ID of the node
721      */
722     long MoveClosestNodeToPoint(in double x, in double y, in double z, in long nodeID) 
723       raises (SALOME::SALOME_Exception);
724
725     /*!
726      * Return ID of node closest to a given point
727      */
728     long FindNodeClosestTo(in double x, in double y, in double z) 
729       raises (SALOME::SALOME_Exception);
730
731     /*!
732      * Return elements of given type where the given point is IN or ON.
733      *
734      * 'ALL' type means elements of any type excluding nodes and 0D elements
735      */
736     long_array FindElementsByPoint(in double x, in double y, in double z, in ElementType type) 
737       raises (SALOME::SALOME_Exception);
738
739     /*!
740      * Searching among the given elements, return elements of given type 
741      * where the given point is IN or ON.
742      *
743      * 'ALL' type means elements of any type excluding nodes and 0D elements
744      */
745     long_array FindAmongElementsByPoint(in SMESH_IDSource elements,
746                                         in double x, in double y, in double z, 
747                                         in ElementType type) 
748       raises (SALOME::SALOME_Exception);
749
750     /*!
751      * Return point state in a closed 2D mesh in terms of TopAbs_State enumeration.
752      * TopAbs_UNKNOWN state means that either mesh is wrong or the analysis fails.
753      */
754     short GetPointState(in double x, in double y, in double z) 
755       raises (SALOME::SALOME_Exception);
756
757     /*!
758      * Returns groups of FreeBorder's coincident within the given tolerance.
759      * If the tolerance <= 0.0 then one tenth of an average size of elements adjacent
760      * to free borders being compared is used.
761      */
762     CoincidentFreeBorders FindCoincidentFreeBorders(in double tolerance);
763
764     /*!
765      * Sew FreeBorder's of each group
766      */
767     short SewCoincidentFreeBorders (in CoincidentFreeBorders freeBorders,
768                                     in boolean               createPolygons,
769                                     in boolean               createPolyedrs)
770       raises (SALOME::SALOME_Exception);
771
772     enum Sew_Error {
773       SEW_OK,
774       SEW_BORDER1_NOT_FOUND,
775       SEW_BORDER2_NOT_FOUND,
776       SEW_BOTH_BORDERS_NOT_FOUND,
777       SEW_BAD_SIDE_NODES,
778       SEW_VOLUMES_TO_SPLIT,
779       // for SewSideElements() only:
780       SEW_DIFF_NB_OF_ELEMENTS,
781       SEW_TOPO_DIFF_SETS_OF_ELEMENTS,
782       SEW_BAD_SIDE1_NODES,
783       SEW_BAD_SIDE2_NODES,
784       SEW_INTERNAL_ERROR
785     };
786
787     Sew_Error SewFreeBorders (in long FirstNodeID1,
788                               in long SecondNodeID1,
789                               in long LastNodeID1,
790                               in long FirstNodeID2,
791                               in long SecondNodeID2,
792                               in long LastNodeID2,
793                               in boolean CreatePolygons,
794                               in boolean CreatePolyedrs) 
795       raises (SALOME::SALOME_Exception);
796
797     Sew_Error SewConformFreeBorders (in long FirstNodeID1,
798                                      in long SecondNodeID1,
799                                      in long LastNodeID1,
800                                      in long FirstNodeID2,
801                                      in long SecondNodeID2) 
802       raises (SALOME::SALOME_Exception);
803
804     Sew_Error SewBorderToSide (in long FirstNodeIDOnFreeBorder,
805                                in long SecondNodeIDOnFreeBorder,
806                                in long LastNodeIDOnFreeBorder,
807                                in long FirstNodeIDOnSide,
808                                in long LastNodeIDOnSide,
809                                in boolean CreatePolygons,
810                                in boolean CreatePolyedrs) 
811       raises (SALOME::SALOME_Exception);
812
813     Sew_Error SewSideElements (in long_array IDsOfSide1Elements,
814                                in long_array IDsOfSide2Elements,
815                                in long       NodeID1OfSide1ToMerge,
816                                in long       NodeID1OfSide2ToMerge,
817                                in long       NodeID2OfSide1ToMerge,
818                                in long       NodeID2OfSide2ToMerge) 
819       raises (SALOME::SALOME_Exception);
820
821    /*!
822     * Set new nodes for given element.
823     * If number of nodes is not corresponded to type of
824     * element - returns false
825     */
826     boolean ChangeElemNodes(in long ide, in long_array newIDs) 
827       raises (SALOME::SALOME_Exception);
828
829     /*!
830      * \brief Duplicates given elements, i.e. creates new elements based on the 
831      *        same nodes as the given ones.
832      * \param theElements - container of elements to duplicate.
833      * \param theGroupName - a name of group to contain the generated elements.
834      *                    If a group with such a name already exists, the new elements
835      *                    are added to the existng group, else a new group is created.
836      *                    If \a theGroupName is empty, new elements are not added 
837      *                    in any group.
838      * \return a group where the new elements are added. NULL if theGroupName == "".
839      * \sa DoubleNode()
840      */
841     SMESH_Group DoubleElements( in SMESH_IDSource theElements, 
842                                 in string         theGroupName )
843       raises (SALOME::SALOME_Exception);
844
845     /*!
846      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
847      * \param theNodes - identifiers of nodes to be doubled
848      * \param theModifiedElems - identifiers of elements to be updated by the new (doubled)
849      *        nodes. If list of element identifiers is empty then nodes are doubled but
850      *        they not assigned to elements
851      * \return TRUE if operation has been completed successfully, FALSE otherwise
852      * \sa DoubleNode(), DoubleNodeGroup(), DoubleNodeGroups()
853      */
854     boolean DoubleNodes( in long_array theNodes, in long_array theModifiedElems ) 
855       raises (SALOME::SALOME_Exception);
856
857     /*!
858      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
859      * This method provided for convenience works as DoubleNodes() described above.
860      * \param theNodeId - identifier of node to be doubled.
861      * \param theModifiedElems - identifiers of elements to be updated.
862      * \return TRUE if operation has been completed successfully, FALSE otherwise
863      * \sa DoubleNodes(), DoubleNodeGroup(), DoubleNodeGroups()
864      */
865     boolean DoubleNode( in long theNodeId, in long_array theModifiedElems ) 
866       raises (SALOME::SALOME_Exception);
867
868     /*!
869      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
870      * This method provided for convenience works as DoubleNodes() described above.
871      * \param theNodes - group of nodes to be doubled.
872      * \param theModifiedElems - group of elements to be updated.
873      * \return TRUE if operation has been completed successfully, FALSE otherwise
874      * \sa DoubleNode(), DoubleNodes(), DoubleNodeGroups(), DoubleNodeGroupNew()
875      */
876     boolean DoubleNodeGroup( in SMESH_GroupBase theNodes,
877                              in SMESH_GroupBase theModifiedElems ) 
878       raises (SALOME::SALOME_Exception);
879     /*!
880      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
881      * Works as DoubleNodeGroup() described above, but returns a new group with
882      * newly created nodes.
883      * \param theNodes - group of nodes to be doubled.
884      * \param theModifiedElems - group of elements to be updated.
885      * \return a new group with newly created nodes
886      * \sa DoubleNodeGroup()
887      */
888     SMESH_Group DoubleNodeGroupNew( in SMESH_GroupBase theNodes,
889                                     in SMESH_GroupBase theModifiedElems ) 
890       raises (SALOME::SALOME_Exception);
891
892     /*!
893      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
894      * This method provided for convenience works as DoubleNodes() described above.
895      * \param theNodes - list of groups of nodes to be doubled
896      * \param theModifiedElems - list of groups of elements to be updated.
897      * \return TRUE if operation has been completed successfully, FALSE otherwise
898      * \sa DoubleNode(), DoubleNodeGroup(), DoubleNodes()
899      */
900     boolean DoubleNodeGroups( in ListOfGroups theNodes,
901                               in ListOfGroups theModifiedElems ) 
902       raises (SALOME::SALOME_Exception);
903     /*!
904      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
905      * Works as DoubleNodeGroups() described above, but returns a new group with
906      * newly created nodes.
907      * \param theNodes - list of groups of nodes to be doubled
908      * \param theModifiedElems - list of groups of elements to be updated.
909      * \return a new group with newly created nodes
910      * \sa DoubleNodeGroups()
911      */
912     SMESH_Group DoubleNodeGroupsNew( in ListOfGroups theNodes,
913                                      in ListOfGroups theModifiedElems ) 
914       raises (SALOME::SALOME_Exception);
915
916     /*!
917      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
918      * \param theElems - the list of elements (edges or faces) to be replicated
919      *        The nodes for duplication could be found from these elements
920      * \param theNodesNot - list of nodes to NOT replicate
921      * \param theAffectedElems - the list of elements (cells and edges) to which the
922      *        replicated nodes should be associated to.
923      * \return TRUE if operation has been completed successfully, FALSE otherwise
924      * \sa DoubleNodeGroup(), DoubleNodeGroups()
925      */
926     boolean DoubleNodeElem( in long_array theElems,
927                             in long_array theNodesNot,
928                             in long_array theAffectedElems ) 
929       raises (SALOME::SALOME_Exception);
930
931     /*!
932      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
933      * \param theElems - the list of elements (edges or faces) to be replicated
934      *        The nodes for duplication could be found from these elements
935      * \param theNodesNot - list of nodes to NOT replicate
936      * \param theShape - shape to detect affected elements (element which geometric center
937      *        located on or inside shape).
938      *        The replicated nodes should be associated to affected elements.
939      * \return TRUE if operation has been completed successfully, FALSE otherwise
940      * \sa DoubleNodeGroupInRegion(), DoubleNodeGroupsInRegion()
941      */
942     boolean DoubleNodeElemInRegion( in long_array theElems,
943                                     in long_array theNodesNot,
944                                     in GEOM::GEOM_Object theShape ) 
945       raises (SALOME::SALOME_Exception);
946
947     /*!
948      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
949      * This method provided for convenience works as DoubleNodes() described above.
950      * \param theElems - group of of elements (edges or faces) to be replicated
951      * \param theNodesNot - group of nodes not to replicated
952      * \param theAffectedElems - group of elements to which the replicated nodes
953      *        should be associated to.
954      * \return TRUE if operation has been completed successfully, FALSE otherwise
955      * \sa DoubleNodes(), DoubleNodeGroups(), DoubleNodeElemGroupNew()
956      */
957     boolean DoubleNodeElemGroup( in SMESH_GroupBase theElems,
958                                  in SMESH_GroupBase theNodesNot,
959                                  in SMESH_GroupBase theAffectedElems ) 
960       raises (SALOME::SALOME_Exception);
961     /*!
962      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
963      * Works as DoubleNodeElemGroup() described above, but returns a new group with
964      * newly created elements.
965      * \param theElems - group of of elements (edges or faces) to be replicated
966      * \param theNodesNot - group of nodes not to replicated
967      * \param theAffectedElems - group of elements to which the replicated nodes
968      *        should be associated to.
969      * \return a new group with newly created elements
970      * \sa DoubleNodeElemGroup()
971      */
972     SMESH_Group DoubleNodeElemGroupNew( in SMESH_GroupBase theElems,
973                                         in SMESH_GroupBase theNodesNot,
974                                         in SMESH_GroupBase theAffectedElems ) 
975       raises (SALOME::SALOME_Exception);
976     /*!
977      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
978      * Works as DoubleNodeElemGroup() described above, but returns two new groups:
979      * a group of newly created elements and a group of newly created nodes
980      * \param theElems - group of of elements (edges or faces) to be replicated
981      * \param theNodesNot - group of nodes not to replicated
982      * \param theAffectedElems - group of elements to which the replicated nodes
983      *        should be associated to.
984      * \param theElemGroupNeeded - to create group of new elements or not
985      * \param theNodeGroupNeeded - to create group of new nodes or not
986      * \return two new groups of newly created elements (1st) and nodes (2nd)
987      * \sa DoubleNodeElemGroup()
988      */
989     ListOfGroups DoubleNodeElemGroup2New( in SMESH_GroupBase theElems,
990                                           in SMESH_GroupBase theNodesNot,
991                                           in SMESH_GroupBase theAffectedElems,
992                                           in boolean         theElemGroupNeeded,
993                                           in boolean         theNodeGroupNeeded) 
994       raises (SALOME::SALOME_Exception);
995
996     /*!
997      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
998      * This method provided for convenience works as DoubleNodes() described above.
999      * \param theElems - group of elements (edges or faces) to be replicated
1000      * \param theNodesNot - group of nodes not to replicated
1001      * \param theShape - shape to detect affected elements (element which geometric center
1002      *        located on or inside shape).
1003      *        The replicated nodes should be associated to affected elements.
1004      * \return TRUE if operation has been completed successfully, FALSE otherwise
1005      * \sa DoubleNodesInRegion(), DoubleNodeGroupsInRegion()
1006      */
1007     boolean DoubleNodeElemGroupInRegion( in SMESH_GroupBase theElems,
1008                                          in SMESH_GroupBase theNodesNot,
1009                                          in GEOM::GEOM_Object theShape ) 
1010       raises (SALOME::SALOME_Exception);
1011
1012     /*!
1013      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
1014      * This method provided for convenience works as DoubleNodes() described above.
1015      * \param theElems - list of groups of elements (edges or faces) to be replicated
1016      * \param theNodesNot - list of groups of nodes not to replicated
1017      * \param theAffectedElems - group of elements to which the replicated nodes
1018      *        should be associated to.
1019      * \return TRUE if operation has been completed successfully, FALSE otherwise
1020      * \sa DoubleNodeGroup(), DoubleNodes(), DoubleNodeElemGroupsNew()
1021      */
1022     boolean DoubleNodeElemGroups( in ListOfGroups theElems,
1023                                   in ListOfGroups theNodesNot,
1024                                   in ListOfGroups theAffectedElems ) 
1025       raises (SALOME::SALOME_Exception);
1026     /*!
1027      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
1028      * Works as DoubleNodeElemGroups() described above, but returns a new group with
1029      * newly created elements.
1030      * \param theElems - list of groups of elements (edges or faces) to be replicated
1031      * \param theNodesNot - list of groups of nodes not to replicated
1032      * \param theAffectedElems - group of elements to which the replicated nodes
1033      *        should be associated to.
1034      * \return a new group with newly created elements
1035      * \sa DoubleNodeElemGroups()
1036      */
1037     SMESH_Group DoubleNodeElemGroupsNew( in ListOfGroups theElems,
1038                                          in ListOfGroups theNodesNot,
1039                                          in ListOfGroups theAffectedElems ) 
1040       raises (SALOME::SALOME_Exception);
1041     /*!
1042      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
1043      * Works as DoubleNodeElemGroups() described above, but returns two new groups:
1044      * a group of newly created elements and a group of newly created nodes.
1045      * \param theElems - list of groups of elements (edges or faces) to be replicated
1046      * \param theNodesNot - list of groups of nodes not to replicated
1047      * \param theAffectedElems - group of elements to which the replicated nodes
1048      *        should be associated to.
1049      * \param theElemGroupNeeded - to create group of new elements or not
1050      * \param theNodeGroupNeeded - to create group of new nodes or not
1051      * \return two new groups of newly created elements (1st) and nodes (2nd)
1052      * \sa DoubleNodeElemGroups()
1053      */
1054     ListOfGroups DoubleNodeElemGroups2New( in ListOfGroups theElems,
1055                                            in ListOfGroups theNodesNot,
1056                                            in ListOfGroups theAffectedElems,
1057                                            in boolean         theElemGroupNeeded,
1058                                            in boolean         theNodeGroupNeeded ) 
1059       raises (SALOME::SALOME_Exception);
1060
1061     /*!
1062      * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
1063      * This method provided for convenience works as DoubleNodes() described above.
1064      * \param theElems - list of groups of elements (edges or faces) to be replicated
1065      * \param theNodesNot - list of groups of nodes not to replicated
1066      * \param theShape - shape to detect affected elements (element which geometric center
1067      *        located on or inside shape).
1068      *        The replicated nodes should be associated to affected elements.
1069      * \return TRUE if operation has been completed successfully, FALSE otherwise
1070      * \sa DoubleNodeGroupInRegion(), DoubleNodesInRegion()
1071      */
1072     boolean DoubleNodeElemGroupsInRegion( in ListOfGroups theElems,
1073                                           in ListOfGroups theNodesNot,
1074                                           in GEOM::GEOM_Object theShape )
1075       raises (SALOME::SALOME_Exception);
1076
1077     /*!
1078      * \brief Identify the elements that will be affected by node duplication (actual duplication is not performed).
1079      * This method is the first step of DoubleNodeElemGroupsInRegion.
1080      * \param theElems - list of groups of elements (edges or faces) to be replicated
1081      * \param theNodesNot - list of groups of nodes not to replicated
1082      * \param theShape - shape to detect affected elements (element which geometric center
1083      *        located on or inside shape).
1084      *        The replicated nodes should be associated to affected elements.
1085      * \return groups of affected elements
1086      * \sa DoubleNodeElemGroupsInRegion()
1087      */
1088     ListOfGroups AffectedElemGroupsInRegion( in ListOfGroups theElems,
1089                                              in ListOfGroups theNodesNot,
1090                                              in GEOM::GEOM_Object theShape ) 
1091       raises (SALOME::SALOME_Exception);
1092
1093     /*!
1094      * \brief Generates skin mesh (containing 2D cells) from 3D mesh
1095      * The created 2D mesh elements based on nodes of free faces of boundary volumes
1096      * \return TRUE if operation has been completed successfully, FALSE otherwise
1097      */
1098     boolean Make2DMeshFrom3D() raises (SALOME::SALOME_Exception);
1099
1100     /*!
1101      * \brief Creates missing boundary elements
1102      *  \param elements - elements whose boundary is to be checked
1103      *  \param dimension - defines type of boundary elements to create
1104      *    BND_1DFROM3D creates mesh edges on all borders of free facets of 3D elements.
1105      *  \param groupName - a name of group to store created boundary elements in,
1106      *                     "" means not to create the group
1107      *  \param meshName - a name of new mesh to store created boundary elements in,
1108      *                     "" means not to create the new mesh
1109      *  \param toCopyElements - if true, the checked elements will be copied into the new mesh
1110      *                          else only boundary elements will be copied into the new mesh
1111      *  \param toCopyExistingBondary - if true, not only new but also pre-existing
1112      *                                boundary elements will be copied into the new mesh
1113      *  \param group - returns the create group, if any
1114      *  \retval SMESH::SMESH_Mesh - the mesh where elements were added to
1115      */
1116     SMESH_Mesh MakeBoundaryMesh(in SMESH_IDSource elements,
1117                                 in Bnd_Dimension  dimension,
1118                                 in string         groupName,
1119                                 in string         meshName,
1120                                 in boolean        toCopyElements,
1121                                 in boolean        toCopyExistingBondary,
1122                                 out SMESH_Group   group) raises (SALOME::SALOME_Exception);
1123     /*!
1124      * \brief Creates missing boundary elements around either the whole mesh or 
1125      *    groups of 2D elements
1126      *  \param dimension - defines type of boundary elements to create
1127      *  \param groupName - a name of group to store all boundary elements in,
1128      *    "" means not to create the group
1129      *  \param meshName - a name of a new mesh, which is a copy of the initial 
1130      *    mesh + created boundary elements; "" means not to create the new mesh
1131      *  \param toCopyAll - if true, the whole initial mesh will be copied into
1132      *    the new mesh else only boundary elements will be copied into the new mesh
1133      *  \param groups - optional groups of 2D elements to make boundary around
1134      *  \param mesh - returns the mesh where elements were added to
1135      *  \param group - returns the created group, if any
1136      *  \retval long - number of added boundary elements
1137      */
1138     long MakeBoundaryElements(in Bnd_Dimension   dimension,
1139                               in string          groupName,
1140                               in string          meshName,
1141                               in boolean         toCopyAll,
1142                               in ListOfIDSources groups,
1143                               out SMESH_Mesh     mesh,
1144                               out SMESH_Group    group) raises (SALOME::SALOME_Exception);
1145
1146     /*!
1147      * \brief Double nodes on shared faces between groups of volumes and create flat elements on demand.
1148      * Flat elements are mainly used by some types of mechanic calculations.
1149      *
1150      * The list of groups must describe a partition of the mesh volumes.
1151      * The nodes of the internal faces at the boundaries of the groups are doubled.
1152      * In option, the internal faces are replaced by flat elements.
1153      * Triangles are transformed in prisms, and quadrangles in hexahedrons.
1154      * \param theDomains - list of groups of volumes
1155      * \param createJointElems - if TRUE, create the elements
1156      * \param onAllBoundaries - if TRUE, the nodes and elements are also created on
1157      *        the boundary between \a theDomains and the rest mesh
1158      * \return TRUE if operation has been completed successfully, FALSE otherwise
1159      */
1160     boolean DoubleNodesOnGroupBoundaries( in ListOfGroups theDomains,
1161                                           in boolean      createJointElems,
1162                                           in boolean      onAllBoundaries) 
1163       raises (SALOME::SALOME_Exception);
1164
1165     /*!
1166      * \brief Double nodes on some external faces and create flat elements.
1167      * Flat elements are mainly used by some types of mechanic calculations.
1168      *
1169      * Each group of the list must be constituted of faces.
1170      * Triangles are transformed in prisms, and quadrangles in hexahedrons.
1171      * \param theGroupsOfFaces - list of groups of faces
1172      * \return TRUE if operation has been completed successfully, FALSE otherwise
1173      */
1174     boolean CreateFlatElementsOnFacesGroups( in ListOfGroups theGroupsOfFaces ) 
1175       raises (SALOME::SALOME_Exception); 
1176
1177     /*!
1178      *  \brief identify all the elements around a geom shape, get the faces delimiting the hole
1179      *  Build groups of volume to remove, groups of faces to replace on the skin of the object,
1180      *  groups of faces to remove insidethe object, (idem edges).
1181      *  Build ordered list of nodes at the border of each group of faces to replace (to be used to build a geom subshape)
1182      */
1183     void CreateHoleSkin(in double radius,
1184                         in GEOM::GEOM_Object theShape,
1185                         in string groupName,
1186                         in double_array theNodesCoords,
1187                         out array_of_long_array GroupsOfNodes) 
1188       raises (SALOME::SALOME_Exception);
1189   };
1190 };
1191
1192 #endif