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