1 // Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 // File : SMESH_MeshEditor.idl
24 #ifndef _SMESH_MESHEDITOR_IDL_
25 #define _SMESH_MESHEDITOR_IDL_
27 #include "SMESH_Mesh.idl"
31 enum Bnd_Dimension { BND_2DFROM3D, BND_1DFROM3D, BND_1DFROM2D };
34 * This interface makes modifications on the Mesh - removing elements and nodes etc.
36 interface NumericalFunctor;
37 interface SMESH_MeshEditor
40 * \brief Wrap a sequence of ids in a SMESH_IDSource
41 * \param IDsOfElements list of mesh elements identifiers
42 * \return new ID source object
44 SMESH_IDSource MakeIDSource(in long_array IDsOfElements, in ElementType type);
47 * \brief Remove mesh elements specified by their identifiers.
48 * \param IDsOfElements list of mesh elements identifiers
49 * \return \c true if elements are correctly removed or \c false otherwise
51 boolean RemoveElements(in long_array IDsOfElements);
54 * \brief Remove mesh nodes specified by their identifiers.
55 * \param IDsOfNodes list of mesh nodes identifiers
56 * \return \c true if nodes are correctly removed or \c false otherwise
58 boolean RemoveNodes(in long_array IDsOfNodes);
61 * \brief Remove all orphan nodes.
62 * \return number of removed nodes
64 long RemoveOrphanNodes();
67 * \brief Add new node.
68 * \param x X coordinate of new node
69 * \param y Y coordinate of new node
70 * \param z Z coordinate of new node
71 * \return integer identifier of new node
73 long AddNode(in double x, in double y, in double z);
76 * Create 0D element on the given node.
77 * \param IdOfNode Node IDs for creation of element.
79 long Add0DElement(in long IDOfNode);
82 * Create edge, either linear and quadratic (this is determed
83 * by number of given nodes).
84 * \param IdsOfNodes List of node IDs for creation of element.
85 * Needed order of nodes in this list corresponds to description
86 * of MED. This description is located by the following link:
87 * http://www.salome-platform.org/salome2/web_med_internet/logiciels/medV2.2.2_doc_html/html/modele_de_donnees.html#3.
89 long AddEdge(in long_array IDsOfNodes);
92 * Create face, either linear and quadratic (this is determed
93 * by number of given nodes).
94 * \param IdsOfNodes List of node IDs for creation of element.
95 * Needed order of nodes in this list corresponds to description
96 * of MED. This description is located by the following link:
97 * http://www.salome-platform.org/salome2/web_med_internet/logiciels/medV2.2.2_doc_html/html/modele_de_donnees.html#3.
99 long AddFace(in long_array IDsOfNodes);
101 long AddPolygonalFace(in long_array IdsOfNodes);
104 * Create volume, either linear and quadratic (this is determed
105 * by number of given nodes).
106 * \param IdsOfNodes List of node IDs for creation of element.
107 * Needed order of nodes in this list corresponds to description
108 * of MED. This description is located by the following link:
109 * http://www.salome-platform.org/salome2/web_med_internet/logiciels/medV2.2.2_doc_html/html/modele_de_donnees.html#3.
111 long AddVolume(in long_array IDsOfNodes);
114 * Create volume of many faces, giving nodes for each face.
115 * \param IdsOfNodes List of node IDs for volume creation face by face.
116 * \param Quantities List of integer values, Quantities[i]
117 * gives quantity of nodes in face number i.
119 long AddPolyhedralVolume (in long_array IdsOfNodes,
120 in long_array Quantities);
123 * Create volume of many faces, giving IDs of existing faces.
124 * \param IdsOfFaces List of face IDs for volume creation.
125 * \note The created volume will refer only to nodes
126 * of the given faces, not to the faces itself.
128 long AddPolyhedralVolumeByFaces (in long_array IdsOfFaces);
131 * \brief Bind a node to a vertex
132 * \param NodeID - node ID
133 * \param VertexID - vertex ID available through GEOM_Object.GetSubShapeIndices()[0]
135 void SetNodeOnVertex(in long NodeID, in long VertexID)
136 raises (SALOME::SALOME_Exception);
138 * \brief Store node position on an edge
139 * \param NodeID - node ID
140 * \param EdgeID - edge ID available through GEOM_Object.GetSubShapeIndices()[0]
141 * \param paramOnEdge - parameter on edge where the node is located
143 void SetNodeOnEdge(in long NodeID, in long EdgeID, in double paramOnEdge)
144 raises (SALOME::SALOME_Exception);
146 * \brief Store node position on a face
147 * \param NodeID - node ID
148 * \param FaceID - face ID available through GEOM_Object.GetSubShapeIndices()[0]
149 * \param u - U parameter on face where the node is located
150 * \param v - V parameter on face where the node is located
152 void SetNodeOnFace(in long NodeID, in long FaceID, in double u, in double v)
153 raises (SALOME::SALOME_Exception);
155 * \brief Bind a node to a solid
156 * \param NodeID - node ID
157 * \param SolidID - vertex ID available through GEOM_Object.GetSubShapeIndices()[0]
159 void SetNodeInVolume(in long NodeID, in long SolidID)
160 raises (SALOME::SALOME_Exception);
162 * \brief Bind an element to a shape
163 * \param ElementID - element ID
164 * \param ShapeID - shape ID available through GEOM_Object.GetSubShapeIndices()[0]
166 void SetMeshElementOnShape(in long ElementID, in long ShapeID)
167 raises (SALOME::SALOME_Exception);
170 boolean MoveNode(in long NodeID, in double x, in double y, in double z);
172 boolean InverseDiag(in long NodeID1, in long NodeID2);
174 boolean DeleteDiag(in long NodeID1, in long NodeID2);
176 boolean Reorient(in long_array IDsOfElements);
178 boolean ReorientObject(in SMESH_IDSource theObject);
181 * \brief Fuse neighbour triangles into quadrangles.
182 * \param theElems The triangles to be fused.
183 * \param theCriterion Is used to choose a neighbour to fuse with.
184 * \param theMaxAngle Is a max angle between element normals at which fusion
185 * is still performed; theMaxAngle is mesured in radians.
186 * \return TRUE in case of success, FALSE otherwise.
188 boolean TriToQuad (in long_array IDsOfElements,
189 in NumericalFunctor Criterion,
193 * \brief Fuse neighbour triangles into quadrangles.
195 * Behaves like the above method, taking list of elements from \a theObject
197 boolean TriToQuadObject (in SMESH_IDSource theObject,
198 in NumericalFunctor Criterion,
202 * \brief Split quadrangles into triangles.
203 * \param theElems The faces to be splitted.
204 * \param theCriterion Is used to choose a diagonal for splitting.
205 * \return TRUE in case of success, FALSE otherwise.
207 boolean QuadToTri (in long_array IDsOfElements,
208 in NumericalFunctor Criterion);
211 * \brief Split quadrangles into triangles.
213 * Behaves like the above method, taking list of elements from \a theObject
215 boolean QuadToTriObject (in SMESH_IDSource theObject,
216 in NumericalFunctor Criterion);
219 * \brief Split quadrangles into triangles.
220 * \param theElems The faces to be splitted.
221 * \param the13Diag Is used to choose a diagonal for splitting.
222 * \return TRUE in case of success, FALSE otherwise.
224 boolean SplitQuad (in long_array IDsOfElements,
228 * \brief Split quadrangles into triangles.
230 * Behaves like the above method, taking list of elements from \a theObject
232 boolean SplitQuadObject (in SMESH_IDSource theObject,
236 * Find better splitting of the given quadrangle.
237 * \param IDOfQuad ID of the quadrangle to be splitted.
238 * \param Criterion A criterion to choose a diagonal for splitting.
239 * \return 1 if 1-3 diagonal is better, 2 if 2-4
240 * diagonal is better, 0 if error occurs.
242 long BestSplit (in long IDOfQuad,
243 in NumericalFunctor Criterion);
246 * \brief Split volumic elements into tetrahedrons
247 * \param elems - elements to split
248 * \param methodFlags - flags passing splitting method:
249 * 1 - split the hexahedron into 5 tetrahedrons
250 * 2 - split the hexahedron into 6 tetrahedrons
251 * 3 - split the hexahedron into 24 tetrahedrons
253 void SplitVolumesIntoTetra(in SMESH_IDSource elems, in short methodFlags)
254 raises (SALOME::SALOME_Exception);
257 enum Smooth_Method { LAPLACIAN_SMOOTH, CENTROIDAL_SMOOTH };
259 boolean Smooth(in long_array IDsOfElements,
260 in long_array IDsOfFixedNodes,
261 in long MaxNbOfIterations,
262 in double MaxAspectRatio,
263 in Smooth_Method Method);
265 boolean SmoothObject(in SMESH_IDSource theObject,
266 in long_array IDsOfFixedNodes,
267 in long MaxNbOfIterations,
268 in double MaxAspectRatio,
269 in Smooth_Method Method);
271 boolean SmoothParametric(in long_array IDsOfElements,
272 in long_array IDsOfFixedNodes,
273 in long MaxNbOfIterations,
274 in double MaxAspectRatio,
275 in Smooth_Method Method);
277 boolean SmoothParametricObject(in SMESH_IDSource theObject,
278 in long_array IDsOfFixedNodes,
279 in long MaxNbOfIterations,
280 in double MaxAspectRatio,
281 in Smooth_Method Method);
283 void ConvertToQuadratic(in boolean theForce3d);
285 boolean ConvertFromQuadratic();
287 void RenumberNodes();
289 void RenumberElements();
292 * \brief Genarate dim+1 elements by rotation of given elements around axis
293 * \param IDsOfElements - elements to ratate
294 * \param Axix - rotation axis
295 * \param AngleInRadians - rotation angle
296 * \param NbOfSteps - number of elements to generate from one element
298 void RotationSweep(in long_array IDsOfElements,
300 in double AngleInRadians,
302 in double Tolerance);
304 * \brief Same as previous but additionally create groups of elements
305 * generated from elements belonging to preexisting groups
307 ListOfGroups RotationSweepMakeGroups(in long_array IDsOfElements,
309 in double AngleInRadians,
311 in double Tolerance);
313 * \brief Genarate dim+1 elements by rotation of the object around axis
314 * \param theObject - object containing elements to ratate
315 * \param Axix - rotation axis
316 * \param AngleInRadians - rotation angle
317 * \param NbOfSteps - number of elements to generate from one element
319 void RotationSweepObject(in SMESH_IDSource theObject,
321 in double AngleInRadians,
323 in double Tolerance);
325 * \brief Same as previous but additionally create groups of elements
326 * generated from elements belonging to preexisting groups
328 ListOfGroups RotationSweepObjectMakeGroups(in SMESH_IDSource theObject,
330 in double AngleInRadians,
332 in double Tolerance);
334 * \brief Genarate dim+1 elements by rotation of the object around axis
335 * \param theObject - object containing elements to ratate
336 * \param Axix - rotation axis
337 * \param AngleInRadians - rotation angle
338 * \param NbOfSteps - number of elements to generate from one element
340 void RotationSweepObject1D(in SMESH_IDSource theObject,
342 in double AngleInRadians,
344 in double Tolerance);
346 * \brief Same as previous but additionally create groups of elements
347 * generated from elements belonging to preexisting groups
349 ListOfGroups RotationSweepObject1DMakeGroups(in SMESH_IDSource theObject,
351 in double AngleInRadians,
353 in double Tolerance);
355 * \brief Genarate dim+1 elements by rotation of the object around axis
356 * \param theObject - object containing elements to ratate
357 * \param Axix - rotation axis
358 * \param AngleInRadians - rotation angle
359 * \param NbOfSteps - number of elements to generate from one element
361 void RotationSweepObject2D(in SMESH_IDSource theObject,
363 in double AngleInRadians,
365 in double Tolerance);
367 * \brief Same as previous but additionally create groups of elements
368 * generated from elements belonging to preexisting groups
370 ListOfGroups RotationSweepObject2DMakeGroups(in SMESH_IDSource theObject,
372 in double AngleInRadians,
374 in double Tolerance);
376 * \brief Genarate dim+1 elements by extrusion of elements along vector
377 * \param IDsOfElements - elements to sweep
378 * \param StepVector - vector giving direction and distance of an extrusion step
379 * \param NbOfSteps - number of elements to generate from one element
381 void ExtrusionSweep(in long_array IDsOfElements,
382 in DirStruct StepVector,
385 * \brief Same as previous but additionally create groups of elements
386 * generated from elements belonging to preexisting groups
388 ListOfGroups ExtrusionSweepMakeGroups(in long_array IDsOfElements,
389 in DirStruct StepVector,
392 * Generate new elements by extrusion of theElements
393 * by StepVector by NbOfSteps
394 * param ExtrFlags set flags for performing extrusion
395 * param SewTolerance - uses for comparing locations of nodes if flag
396 * EXTRUSION_FLAG_SEW is set
398 void AdvancedExtrusion(in long_array IDsOfElements,
399 in DirStruct StepVector,
402 in double SewTolerance);
404 * \brief Same as previous but additionally create groups of elements
405 * generated from elements belonging to preexisting groups
407 ListOfGroups AdvancedExtrusionMakeGroups(in long_array IDsOfElements,
408 in DirStruct StepVector,
411 in double SewTolerance);
413 void ExtrusionSweepObject(in SMESH_IDSource theObject,
414 in DirStruct StepVector,
416 ListOfGroups ExtrusionSweepObjectMakeGroups(in SMESH_IDSource theObject,
417 in DirStruct StepVector,
420 void ExtrusionSweepObject1D(in SMESH_IDSource theObject,
421 in DirStruct StepVector,
423 ListOfGroups ExtrusionSweepObject1DMakeGroups(in SMESH_IDSource theObject,
424 in DirStruct StepVector,
427 void ExtrusionSweepObject2D(in SMESH_IDSource theObject,
428 in DirStruct StepVector,
430 ListOfGroups ExtrusionSweepObject2DMakeGroups(in SMESH_IDSource theObject,
431 in DirStruct StepVector,
434 enum Extrusion_Error {
439 EXTR_BAD_STARTING_NODE,
440 EXTR_BAD_ANGLES_NUMBER,
441 EXTR_CANT_GET_TANGENT
444 ListOfGroups ExtrusionAlongPathX(in long_array IDsOfElements,
445 in SMESH_IDSource Path,
447 in boolean HasAngles,
448 in double_array Angles,
449 in boolean LinearVariation,
450 in boolean HasRefPoint,
451 in PointStruct RefPoint,
452 in boolean MakeGroups,
453 in ElementType ElemType,
454 out Extrusion_Error Error);
456 ListOfGroups ExtrusionAlongPathObjX(in SMESH_IDSource theObject,
457 in SMESH_IDSource Path,
459 in boolean HasAngles,
460 in double_array Angles,
461 in boolean LinearVariation,
462 in boolean HasRefPoint,
463 in PointStruct RefPoint,
464 in boolean MakeGroups,
465 in ElementType ElemType,
466 out Extrusion_Error Error);
468 Extrusion_Error ExtrusionAlongPath(in long_array IDsOfElements,
469 in SMESH_Mesh PathMesh,
470 in GEOM::GEOM_Object PathShape,
472 in boolean HasAngles,
473 in double_array Angles,
474 in boolean HasRefPoint,
475 in PointStruct RefPoint);
476 ListOfGroups ExtrusionAlongPathMakeGroups(in long_array IDsOfElements,
477 in SMESH_Mesh PathMesh,
478 in GEOM::GEOM_Object PathShape,
480 in boolean HasAngles,
481 in double_array Angles,
482 in boolean HasRefPoint,
483 in PointStruct RefPoint,
484 out Extrusion_Error Error);
486 Extrusion_Error ExtrusionAlongPathObject(in SMESH_IDSource theObject,
487 in SMESH_Mesh PathMesh,
488 in GEOM::GEOM_Object PathShape,
490 in boolean HasAngles,
491 in double_array Angles,
492 in boolean HasRefPoint,
493 in PointStruct RefPoint);
494 ListOfGroups ExtrusionAlongPathObjectMakeGroups(in SMESH_IDSource theObject,
495 in SMESH_Mesh PathMesh,
496 in GEOM::GEOM_Object PathShape,
498 in boolean HasAngles,
499 in double_array Angles,
500 in boolean HasRefPoint,
501 in PointStruct RefPoint,
502 out Extrusion_Error Error);
504 Extrusion_Error ExtrusionAlongPathObject1D(in SMESH_IDSource theObject,
505 in SMESH_Mesh PathMesh,
506 in GEOM::GEOM_Object PathShape,
508 in boolean HasAngles,
509 in double_array Angles,
510 in boolean HasRefPoint,
511 in PointStruct RefPoint);
512 ListOfGroups ExtrusionAlongPathObject1DMakeGroups(in SMESH_IDSource theObject,
513 in SMESH_Mesh PathMesh,
514 in GEOM::GEOM_Object PathShape,
516 in boolean HasAngles,
517 in double_array Angles,
518 in boolean HasRefPoint,
519 in PointStruct RefPoint,
520 out Extrusion_Error Error);
522 Extrusion_Error ExtrusionAlongPathObject2D(in SMESH_IDSource theObject,
523 in SMESH_Mesh PathMesh,
524 in GEOM::GEOM_Object PathShape,
526 in boolean HasAngles,
527 in double_array Angles,
528 in boolean HasRefPoint,
529 in PointStruct RefPoint);
530 ListOfGroups ExtrusionAlongPathObject2DMakeGroups(in SMESH_IDSource theObject,
531 in SMESH_Mesh PathMesh,
532 in GEOM::GEOM_Object PathShape,
534 in boolean HasAngles,
535 in double_array Angles,
536 in boolean HasRefPoint,
537 in PointStruct RefPoint,
538 out Extrusion_Error Error);
541 * Compute rotation angles for ExtrusionAlongPath as linear variation
542 * of given angles along path steps
543 * param PathMesh mesh containing a 1D sub-mesh on the edge, along
544 * which proceeds the extrusion
545 * param PathShape is shape(edge); as the mesh can be complex, the edge
546 * is used to define the sub-mesh for the path
548 double_array LinearAnglesVariation(in SMESH_Mesh PathMesh,
549 in GEOM::GEOM_Object PathShape,
550 in double_array Angles);
552 enum MirrorType { POINT, AXIS, PLANE };
554 void Mirror (in long_array IDsOfElements,
555 in AxisStruct Mirror,
558 ListOfGroups MirrorMakeGroups (in long_array IDsOfElements,
559 in AxisStruct Mirror,
561 SMESH_Mesh MirrorMakeMesh (in long_array IDsOfElements,
562 in AxisStruct Mirror,
564 in boolean CopyGroups,
567 void MirrorObject (in SMESH_IDSource theObject,
568 in AxisStruct Mirror,
571 ListOfGroups MirrorObjectMakeGroups (in SMESH_IDSource theObject,
572 in AxisStruct Mirror,
574 SMESH_Mesh MirrorObjectMakeMesh (in SMESH_IDSource theObject,
575 in AxisStruct Mirror,
577 in boolean CopyGroups,
580 void Translate (in long_array IDsOfElements,
583 ListOfGroups TranslateMakeGroups (in long_array IDsOfElements,
584 in DirStruct Vector);
585 SMESH_Mesh TranslateMakeMesh (in long_array IDsOfElements,
587 in boolean CopyGroups,
590 void TranslateObject (in SMESH_IDSource theObject,
593 ListOfGroups TranslateObjectMakeGroups (in SMESH_IDSource theObject,
594 in DirStruct Vector);
595 SMESH_Mesh TranslateObjectMakeMesh (in SMESH_IDSource theObject,
597 in boolean CopyGroups,
600 void Scale (in SMESH_IDSource theObject,
601 in PointStruct thePoint,
602 in double_array theScaleFact,
604 ListOfGroups ScaleMakeGroups (in SMESH_IDSource theObject,
605 in PointStruct thePoint,
606 in double_array theScaleFact);
607 SMESH_Mesh ScaleMakeMesh (in SMESH_IDSource theObject,
608 in PointStruct thePoint,
609 in double_array theScaleFact,
610 in boolean CopyGroups,
613 void Rotate (in long_array IDsOfElements,
615 in double AngleInRadians,
617 ListOfGroups RotateMakeGroups (in long_array IDsOfElements,
619 in double AngleInRadians);
620 SMESH_Mesh RotateMakeMesh (in long_array IDsOfElements,
622 in double AngleInRadians,
623 in boolean CopyGroups,
626 void RotateObject (in SMESH_IDSource theObject,
628 in double AngleInRadians,
630 ListOfGroups RotateObjectMakeGroups (in SMESH_IDSource theObject,
632 in double AngleInRadians);
633 SMESH_Mesh RotateObjectMakeMesh (in SMESH_IDSource theObject,
635 in double AngleInRadians,
636 in boolean CopyGroups,
639 void FindCoincidentNodes (in double Tolerance,
640 out array_of_long_array GroupsOfNodes);
642 void FindCoincidentNodesOnPart (in SMESH_IDSource SubMeshOrGroup,
644 out array_of_long_array GroupsOfNodes);
646 void FindCoincidentNodesOnPartBut (in SMESH_IDSource SubMeshOrGroup,
648 out array_of_long_array GroupsOfNodes,
649 in ListOfIDSources ExceptSubMeshOrGroups);
651 void MergeNodes (in array_of_long_array GroupsOfNodes);
654 * \brief Find elements built on the same nodes.
655 * \param MeshOrSubMeshOrGroup Mesh or SubMesh, or Group of elements for searching.
656 * \return List of groups of equal elements.
658 void FindEqualElements (in SMESH_IDSource MeshOrSubMeshOrGroup,
659 out array_of_long_array GroupsOfElementsID);
662 * \brief Merge elements in each given group.
663 * \param GroupsOfElementsID Groups of elements for merging.
665 void MergeElements(in array_of_long_array GroupsOfElementsID);
668 * \brief Merge equal elements in the whole mesh.
670 void MergeEqualElements();
673 * If the given ID is a valid node ID (nodeID > 0), just move this node, else
674 * move the node closest to the point to point's location and return ID of the node
676 long MoveClosestNodeToPoint(in double x, in double y, in double z, in long nodeID);
679 * Return ID of node closest to a given point
681 long FindNodeClosestTo(in double x, in double y, in double z);
684 * Return elements of given type where the given point is IN or ON.
686 * 'ALL' type means elements of any type excluding nodes and 0D elements
688 long_array FindElementsByPoint(in double x, in double y, in double z, in ElementType type);
691 * Return point state in a closed 2D mesh in terms of TopAbs_State enumeration.
692 * TopAbs_UNKNOWN state means that either mesh is wrong or the analysis fails.
694 short GetPointState(in double x, in double y, in double z);
698 SEW_BORDER1_NOT_FOUND,
699 SEW_BORDER2_NOT_FOUND,
700 SEW_BOTH_BORDERS_NOT_FOUND,
702 SEW_VOLUMES_TO_SPLIT,
703 // for SewSideElements() only:
704 SEW_DIFF_NB_OF_ELEMENTS,
705 SEW_TOPO_DIFF_SETS_OF_ELEMENTS,
710 Sew_Error SewFreeBorders (in long FirstNodeID1,
711 in long SecondNodeID1,
713 in long FirstNodeID2,
714 in long SecondNodeID2,
716 in boolean CreatePolygons,
717 in boolean CreatePolyedrs);
719 Sew_Error SewConformFreeBorders (in long FirstNodeID1,
720 in long SecondNodeID1,
722 in long FirstNodeID2,
723 in long SecondNodeID2);
725 Sew_Error SewBorderToSide (in long FirstNodeIDOnFreeBorder,
726 in long SecondNodeIDOnFreeBorder,
727 in long LastNodeIDOnFreeBorder,
728 in long FirstNodeIDOnSide,
729 in long LastNodeIDOnSide,
730 in boolean CreatePolygons,
731 in boolean CreatePolyedrs);
733 Sew_Error SewSideElements (in long_array IDsOfSide1Elements,
734 in long_array IDsOfSide2Elements,
735 in long NodeID1OfSide1ToMerge,
736 in long NodeID1OfSide2ToMerge,
737 in long NodeID2OfSide1ToMerge,
738 in long NodeID2OfSide2ToMerge);
741 * Set new nodes for given element.
742 * If number of nodes is not corresponded to type of
743 * element - returns false
745 boolean ChangeElemNodes(in long ide, in long_array newIDs);
748 * Return data of mesh edition preview which is computed provided
749 * that the editor was obtained trough SMESH_Mesh::GetMeshEditPreviewer()
751 MeshPreviewStruct GetPreviewData();
754 * If during last operation of MeshEditor some nodes were
755 * created this method returns list of it's IDs, if new nodes
756 * not creared - returns empty list
758 long_array GetLastCreatedNodes();
761 * If during last operation of MeshEditor some elements were
762 * created this method returns list of it's IDs, if new elements
763 * not creared - returns empty list
765 long_array GetLastCreatedElems();
768 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
769 * \param theNodes - identifiers of nodes to be doubled
770 * \param theModifiedElems - identifiers of elements to be updated by the new (doubled)
771 * nodes. If list of element identifiers is empty then nodes are doubled but
772 * they not assigned to elements
773 * \return TRUE if operation has been completed successfully, FALSE otherwise
774 * \sa DoubleNode(), DoubleNodeGroup(), DoubleNodeGroups()
776 boolean DoubleNodes( in long_array theNodes, in long_array theModifiedElems );
779 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
780 * This method provided for convenience works as DoubleNodes() described above.
781 * \param theNodeId - identifier of node to be doubled.
782 * \param theModifiedElems - identifiers of elements to be updated.
783 * \return TRUE if operation has been completed successfully, FALSE otherwise
784 * \sa DoubleNodes(), DoubleNodeGroup(), DoubleNodeGroups()
786 boolean DoubleNode( in long theNodeId, in long_array theModifiedElems );
789 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
790 * This method provided for convenience works as DoubleNodes() described above.
791 * \param theNodes - group of nodes to be doubled.
792 * \param theModifiedElems - group of elements to be updated.
793 * \return TRUE if operation has been completed successfully, FALSE otherwise
794 * \sa DoubleNode(), DoubleNodes(), DoubleNodeGroups(), DoubleNodeGroupNew()
796 boolean DoubleNodeGroup( in SMESH_GroupBase theNodes,
797 in SMESH_GroupBase theModifiedElems );
800 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
801 * Works as DoubleNodeGroup() described above, but returns a new group with
802 * newly created nodes.
803 * \param theNodes - group of nodes to be doubled.
804 * \param theModifiedElems - group of elements to be updated.
805 * \return a new group with newly created nodes
806 * \sa DoubleNodeGroup()
808 SMESH_Group DoubleNodeGroupNew( in SMESH_GroupBase theNodes,
809 in SMESH_GroupBase theModifiedElems );
812 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
813 * This method provided for convenience works as DoubleNodes() described above.
814 * \param theNodes - list of groups of nodes to be doubled
815 * \param theModifiedElems - list of groups of elements to be updated.
816 * \return TRUE if operation has been completed successfully, FALSE otherwise
817 * \sa DoubleNode(), DoubleNodeGroup(), DoubleNodes()
819 boolean DoubleNodeGroups( in ListOfGroups theNodes,
820 in ListOfGroups theModifiedElems );
823 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
824 * Works as DoubleNodeGroups() described above, but returns a new group with
825 * newly created nodes.
826 * \param theNodes - list of groups of nodes to be doubled
827 * \param theModifiedElems - list of groups of elements to be updated.
828 * \return a new group with newly created nodes
829 * \sa DoubleNodeGroups()
831 SMESH_Group DoubleNodeGroupsNew( in ListOfGroups theNodes,
832 in ListOfGroups theModifiedElems );
835 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
836 * \param theElems - the list of elements (edges or faces) to be replicated
837 * The nodes for duplication could be found from these elements
838 * \param theNodesNot - list of nodes to NOT replicate
839 * \param theAffectedElems - the list of elements (cells and edges) to which the
840 * replicated nodes should be associated to.
841 * \return TRUE if operation has been completed successfully, FALSE otherwise
842 * \sa DoubleNodeGroup(), DoubleNodeGroups()
844 boolean DoubleNodeElem( in long_array theElems,
845 in long_array theNodesNot,
846 in long_array theAffectedElems );
849 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
850 * \param theElems - the list of elements (edges or faces) to be replicated
851 * The nodes for duplication could be found from these elements
852 * \param theNodesNot - list of nodes to NOT replicate
853 * \param theShape - shape to detect affected elements (element which geometric center
854 * located on or inside shape).
855 * The replicated nodes should be associated to affected elements.
856 * \return TRUE if operation has been completed successfully, FALSE otherwise
857 * \sa DoubleNodeGroupInRegion(), DoubleNodeGroupsInRegion()
859 boolean DoubleNodeElemInRegion( in long_array theElems,
860 in long_array theNodesNot,
861 in GEOM::GEOM_Object theShape );
864 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
865 * This method provided for convenience works as DoubleNodes() described above.
866 * \param theElems - group of of elements (edges or faces) to be replicated
867 * \param theNodesNot - group of nodes not to replicated
868 * \param theAffectedElems - group of elements to which the replicated nodes
869 * should be associated to.
870 * \return TRUE if operation has been completed successfully, FALSE otherwise
871 * \sa DoubleNodes(), DoubleNodeGroups(), DoubleNodeElemGroupNew()
873 boolean DoubleNodeElemGroup( in SMESH_GroupBase theElems,
874 in SMESH_GroupBase theNodesNot,
875 in SMESH_GroupBase theAffectedElems );
878 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
879 * Works as DoubleNodeElemGroup() described above, but returns a new group with
880 * newly created elements.
881 * \param theElems - group of of elements (edges or faces) to be replicated
882 * \param theNodesNot - group of nodes not to replicated
883 * \param theAffectedElems - group of elements to which the replicated nodes
884 * should be associated to.
885 * \return a new group with newly created elements
886 * \sa DoubleNodeElemGroup()
888 SMESH_Group DoubleNodeElemGroupNew( in SMESH_GroupBase theElems,
889 in SMESH_GroupBase theNodesNot,
890 in SMESH_GroupBase theAffectedElems );
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 theElems - group of elements (edges or faces) to be replicated
896 * \param theNodesNot - group of nodes not to replicated
897 * \param theShape - shape to detect affected elements (element which geometric center
898 * located on or inside shape).
899 * The replicated nodes should be associated to affected elements.
900 * \return TRUE if operation has been completed successfully, FALSE otherwise
901 * \sa DoubleNodesInRegion(), DoubleNodeGroupsInRegion()
903 boolean DoubleNodeElemGroupInRegion( in SMESH_GroupBase theElems,
904 in SMESH_GroupBase theNodesNot,
905 in GEOM::GEOM_Object theShape );
908 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
909 * This method provided for convenience works as DoubleNodes() described above.
910 * \param theElems - list of groups of elements (edges or faces) to be replicated
911 * \param theNodesNot - list of groups of nodes not to replicated
912 * \param theAffectedElems - group of elements to which the replicated nodes
913 * should be associated to.
914 * \return TRUE if operation has been completed successfully, FALSE otherwise
915 * \sa DoubleNodeGroup(), DoubleNodes(), DoubleNodeElemGroupsNew()
917 boolean DoubleNodeElemGroups( in ListOfGroups theElems,
918 in ListOfGroups theNodesNot,
919 in ListOfGroups theAffectedElems );
922 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
923 * Works as DoubleNodeElemGroups() described above, but returns a new group with
924 * newly created elements.
925 * \param theElems - list of groups of elements (edges or faces) to be replicated
926 * \param theNodesNot - list of groups of nodes not to replicated
927 * \param theAffectedElems - group of elements to which the replicated nodes
928 * should be associated to.
929 * \return a new group with newly created elements
930 * \sa DoubleNodeElemGroups()
932 SMESH_Group DoubleNodeElemGroupsNew( in ListOfGroups theElems,
933 in ListOfGroups theNodesNot,
934 in ListOfGroups theAffectedElems );
937 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
938 * This method provided for convenience works as DoubleNodes() described above.
939 * \param theElems - list of groups of elements (edges or faces) to be replicated
940 * \param theNodesNot - list of groups of nodes not to replicated
941 * \param theShape - shape to detect affected elements (element which geometric center
942 * located on or inside shape).
943 * The replicated nodes should be associated to affected elements.
944 * \return TRUE if operation has been completed successfully, FALSE otherwise
945 * \sa DoubleNodeGroupInRegion(), DoubleNodesInRegion()
947 boolean DoubleNodeElemGroupsInRegion( in ListOfGroups theElems,
948 in ListOfGroups theNodesNot,
949 in GEOM::GEOM_Object theShape );
952 * \brief Generates skin mesh (containing 2D cells) from 3D mesh
953 * The created 2D mesh elements based on nodes of free faces of boundary volumes
954 * \return TRUE if operation has been completed successfully, FALSE otherwise
956 boolean Make2DMeshFrom3D();
959 * \brief Double nodes on shared faces between groups of volumes and create flat elements on demand.
960 * The list of groups must describe a partition of the mesh volumes.
961 * The nodes of the internal faces at the boundaries of the groups are doubled.
962 * In option, the internal faces are replaced by flat elements.
963 * Triangles are transformed in prisms, and quadrangles in hexahedrons.
964 * \param theDomains - list of groups of volumes
965 * \param createJointElems - if TRUE, create the elements
966 * \return TRUE if operation has been completed successfully, FALSE otherwise
968 boolean DoubleNodesOnGroupBoundaries( in ListOfGroups theDomains,
969 in boolean createJointElems );
972 * \brief Creates missing boundary elements
973 * \param elements - elements whose boundary is to be checked
974 * \param dimension - defines type of boundary elements to create
975 * \param groupName - a name of group to store created boundary elements in,
976 * "" means not to create the group
977 * \param meshName - a name of new mesh to store created boundary elements in,
978 * "" means not to create the new mesh
979 * \param toCopyElements - if true, the checked elements will be copied into the new mesh
980 * \param toCopyExistingBondary - if true, not only new but also pre-existing
981 * boundary elements will be copied into the new mesh
982 * \param group - returns the create group, if any
983 * \retval SMESH::SMESH_Mesh - the mesh where elements were added to
985 SMESH::SMESH_Mesh MakeBoundaryMesh(in SMESH_IDSource elements,
986 in Bnd_Dimension dimension,
989 in boolean toCopyElements,
990 in boolean toCopyExistingBondary,
991 out SMESH_Group group);