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
23 // File : SMESH_MeshEditor.idl
25 #ifndef _SMESH_MESHEDITOR_IDL_
26 #define _SMESH_MESHEDITOR_IDL_
28 #include "SMESH_Mesh.idl"
32 enum Bnd_Dimension { BND_2DFROM3D, BND_1DFROM3D, BND_1DFROM2D };
35 * This interface makes modifications on the Mesh - removing elements and nodes etc.
37 interface NumericalFunctor;
38 interface SMESH_MeshEditor
41 * \brief Wrap a sequence of ids in a SMESH_IDSource
42 * \param IDsOfElements list of mesh elements identifiers
43 * \return new ID source object
45 SMESH_IDSource MakeIDSource(in long_array IDsOfElements, in ElementType type);
48 * \brief Remove mesh elements specified by their identifiers.
49 * \param IDsOfElements list of mesh elements identifiers
50 * \return \c true if elements are correctly removed or \c false otherwise
52 boolean RemoveElements(in long_array IDsOfElements);
55 * \brief Remove mesh nodes specified by their identifiers.
56 * \param IDsOfNodes list of mesh nodes identifiers
57 * \return \c true if nodes are correctly removed or \c false otherwise
59 boolean RemoveNodes(in long_array IDsOfNodes);
62 * \brief Remove all orphan nodes.
63 * \return number of removed nodes
65 long RemoveOrphanNodes();
68 * \brief Add new node.
69 * \param x X coordinate of new node
70 * \param y Y coordinate of new node
71 * \param z Z coordinate of new node
72 * \return integer identifier of new node
74 long AddNode(in double x, in double y, in double z);
77 * Create 0D element on the given node.
78 * \param IdOfNode Node IDs for creation of element.
80 long Add0DElement(in long IDOfNode);
83 * Create edge, either linear and quadratic (this is determed
84 * by number of given nodes).
85 * \param IdsOfNodes List of node IDs for creation of element.
86 * Needed order of nodes in this list corresponds to description
87 * of MED. This description is located by the following link:
88 * http://www.salome-platform.org/salome2/web_med_internet/logiciels/medV2.2.2_doc_html/html/modele_de_donnees.html#3.
90 long AddEdge(in long_array IDsOfNodes);
93 * Create face, either linear and quadratic (this is determed
94 * by number of given nodes).
95 * \param IdsOfNodes List of node IDs for creation of element.
96 * Needed order of nodes in this list corresponds to description
97 * of MED. This description is located by the following link:
98 * http://www.salome-platform.org/salome2/web_med_internet/logiciels/medV2.2.2_doc_html/html/modele_de_donnees.html#3.
100 long AddFace(in long_array IDsOfNodes);
102 long AddPolygonalFace(in long_array IdsOfNodes);
105 * Create volume, either linear and quadratic (this is determed
106 * by number of given nodes).
107 * \param IdsOfNodes List of node IDs for creation of element.
108 * Needed order of nodes in this list corresponds to description
109 * of MED. This description is located by the following link:
110 * http://www.salome-platform.org/salome2/web_med_internet/logiciels/medV2.2.2_doc_html/html/modele_de_donnees.html#3.
112 long AddVolume(in long_array IDsOfNodes);
115 * Create volume of many faces, giving nodes for each face.
116 * \param IdsOfNodes List of node IDs for volume creation face by face.
117 * \param Quantities List of integer values, Quantities[i]
118 * gives quantity of nodes in face number i.
120 long AddPolyhedralVolume (in long_array IdsOfNodes,
121 in long_array Quantities);
124 * Create volume of many faces, giving IDs of existing faces.
125 * \param IdsOfFaces List of face IDs for volume creation.
126 * \note The created volume will refer only to nodes
127 * of the given faces, not to the faces itself.
129 long AddPolyhedralVolumeByFaces (in long_array IdsOfFaces);
132 * \brief Bind a node to a vertex
133 * \param NodeID - node ID
134 * \param VertexID - vertex ID available through GEOM_Object.GetSubShapeIndices()[0]
136 void SetNodeOnVertex(in long NodeID, in long VertexID)
137 raises (SALOME::SALOME_Exception);
139 * \brief Store node position on an edge
140 * \param NodeID - node ID
141 * \param EdgeID - edge ID available through GEOM_Object.GetSubShapeIndices()[0]
142 * \param paramOnEdge - parameter on edge where the node is located
144 void SetNodeOnEdge(in long NodeID, in long EdgeID, in double paramOnEdge)
145 raises (SALOME::SALOME_Exception);
147 * \brief Store node position on a face
148 * \param NodeID - node ID
149 * \param FaceID - face ID available through GEOM_Object.GetSubShapeIndices()[0]
150 * \param u - U parameter on face where the node is located
151 * \param v - V parameter on face where the node is located
153 void SetNodeOnFace(in long NodeID, in long FaceID, in double u, in double v)
154 raises (SALOME::SALOME_Exception);
156 * \brief Bind a node to a solid
157 * \param NodeID - node ID
158 * \param SolidID - vertex ID available through GEOM_Object.GetSubShapeIndices()[0]
160 void SetNodeInVolume(in long NodeID, in long SolidID)
161 raises (SALOME::SALOME_Exception);
163 * \brief Bind an element to a shape
164 * \param ElementID - element ID
165 * \param ShapeID - shape ID available through GEOM_Object.GetSubShapeIndices()[0]
167 void SetMeshElementOnShape(in long ElementID, in long ShapeID)
168 raises (SALOME::SALOME_Exception);
171 boolean MoveNode(in long NodeID, in double x, in double y, in double z);
173 boolean InverseDiag(in long NodeID1, in long NodeID2);
175 boolean DeleteDiag(in long NodeID1, in long NodeID2);
177 boolean Reorient(in long_array IDsOfElements);
179 boolean ReorientObject(in SMESH_IDSource theObject);
182 * \brief Fuse neighbour triangles into quadrangles.
183 * \param theElems The triangles to be fused.
184 * \param theCriterion Is used to choose a neighbour to fuse with.
185 * \param theMaxAngle Is a max angle between element normals at which fusion
186 * is still performed; theMaxAngle is mesured in radians.
187 * \return TRUE in case of success, FALSE otherwise.
189 boolean TriToQuad (in long_array IDsOfElements,
190 in NumericalFunctor Criterion,
194 * \brief Fuse neighbour triangles into quadrangles.
196 * Behaves like the above method, taking list of elements from \a theObject
198 boolean TriToQuadObject (in SMESH_IDSource theObject,
199 in NumericalFunctor Criterion,
203 * \brief Split quadrangles into triangles.
204 * \param theElems The faces to be splitted.
205 * \param theCriterion Is used to choose a diagonal for splitting.
206 * \return TRUE in case of success, FALSE otherwise.
208 boolean QuadToTri (in long_array IDsOfElements,
209 in NumericalFunctor Criterion);
212 * \brief Split quadrangles into triangles.
214 * Behaves like the above method, taking list of elements from \a theObject
216 boolean QuadToTriObject (in SMESH_IDSource theObject,
217 in NumericalFunctor Criterion);
220 * \brief Split quadrangles into triangles.
221 * \param theElems The faces to be splitted.
222 * \param the13Diag Is used to choose a diagonal for splitting.
223 * \return TRUE in case of success, FALSE otherwise.
225 boolean SplitQuad (in long_array IDsOfElements,
229 * \brief Split quadrangles into triangles.
231 * Behaves like the above method, taking list of elements from \a theObject
233 boolean SplitQuadObject (in SMESH_IDSource theObject,
237 * Find better splitting of the given quadrangle.
238 * \param IDOfQuad ID of the quadrangle to be splitted.
239 * \param Criterion A criterion to choose a diagonal for splitting.
240 * \return 1 if 1-3 diagonal is better, 2 if 2-4
241 * diagonal is better, 0 if error occurs.
243 long BestSplit (in long IDOfQuad,
244 in NumericalFunctor Criterion);
247 * \brief Split volumic elements into tetrahedrons
248 * \param elems - elements to split
249 * \param methodFlags - flags passing splitting method:
250 * 1 - split the hexahedron into 5 tetrahedrons
251 * 2 - split the hexahedron into 6 tetrahedrons
252 * 3 - split the hexahedron into 24 tetrahedrons
254 void SplitVolumesIntoTetra(in SMESH_IDSource elems, in short methodFlags)
255 raises (SALOME::SALOME_Exception);
258 enum Smooth_Method { LAPLACIAN_SMOOTH, CENTROIDAL_SMOOTH };
260 boolean Smooth(in long_array IDsOfElements,
261 in long_array IDsOfFixedNodes,
262 in long MaxNbOfIterations,
263 in double MaxAspectRatio,
264 in Smooth_Method Method);
266 boolean SmoothObject(in SMESH_IDSource theObject,
267 in long_array IDsOfFixedNodes,
268 in long MaxNbOfIterations,
269 in double MaxAspectRatio,
270 in Smooth_Method Method);
272 boolean SmoothParametric(in long_array IDsOfElements,
273 in long_array IDsOfFixedNodes,
274 in long MaxNbOfIterations,
275 in double MaxAspectRatio,
276 in Smooth_Method Method);
278 boolean SmoothParametricObject(in SMESH_IDSource theObject,
279 in long_array IDsOfFixedNodes,
280 in long MaxNbOfIterations,
281 in double MaxAspectRatio,
282 in Smooth_Method Method);
284 void ConvertToQuadratic(in boolean theForce3d);
286 boolean ConvertFromQuadratic();
288 void RenumberNodes();
290 void RenumberElements();
293 * \brief Genarate dim+1 elements by rotation of given elements around axis
294 * \param IDsOfElements - elements to ratate
295 * \param Axix - rotation axis
296 * \param AngleInRadians - rotation angle
297 * \param NbOfSteps - number of elements to generate from one element
299 void RotationSweep(in long_array IDsOfElements,
301 in double AngleInRadians,
303 in double Tolerance);
305 * \brief Same as previous but additionally create groups of elements
306 * generated from elements belonging to preexisting groups
308 ListOfGroups RotationSweepMakeGroups(in long_array IDsOfElements,
310 in double AngleInRadians,
312 in double Tolerance);
314 * \brief Genarate dim+1 elements by rotation of the object around axis
315 * \param theObject - object containing elements to ratate
316 * \param Axix - rotation axis
317 * \param AngleInRadians - rotation angle
318 * \param NbOfSteps - number of elements to generate from one element
320 void RotationSweepObject(in SMESH_IDSource theObject,
322 in double AngleInRadians,
324 in double Tolerance);
326 * \brief Same as previous but additionally create groups of elements
327 * generated from elements belonging to preexisting groups
329 ListOfGroups RotationSweepObjectMakeGroups(in SMESH_IDSource theObject,
331 in double AngleInRadians,
333 in double Tolerance);
335 * \brief Genarate dim+1 elements by rotation of the object around axis
336 * \param theObject - object containing elements to ratate
337 * \param Axix - rotation axis
338 * \param AngleInRadians - rotation angle
339 * \param NbOfSteps - number of elements to generate from one element
341 void RotationSweepObject1D(in SMESH_IDSource theObject,
343 in double AngleInRadians,
345 in double Tolerance);
347 * \brief Same as previous but additionally create groups of elements
348 * generated from elements belonging to preexisting groups
350 ListOfGroups RotationSweepObject1DMakeGroups(in SMESH_IDSource theObject,
352 in double AngleInRadians,
354 in double Tolerance);
356 * \brief Genarate dim+1 elements by rotation of the object around axis
357 * \param theObject - object containing elements to ratate
358 * \param Axix - rotation axis
359 * \param AngleInRadians - rotation angle
360 * \param NbOfSteps - number of elements to generate from one element
362 void RotationSweepObject2D(in SMESH_IDSource theObject,
364 in double AngleInRadians,
366 in double Tolerance);
368 * \brief Same as previous but additionally create groups of elements
369 * generated from elements belonging to preexisting groups
371 ListOfGroups RotationSweepObject2DMakeGroups(in SMESH_IDSource theObject,
373 in double AngleInRadians,
375 in double Tolerance);
377 * \brief Genarate dim+1 elements by extrusion of elements along vector
378 * \param IDsOfElements - elements to sweep
379 * \param StepVector - vector giving direction and distance of an extrusion step
380 * \param NbOfSteps - number of elements to generate from one element
382 void ExtrusionSweep(in long_array IDsOfElements,
383 in DirStruct StepVector,
386 * \brief Same as previous but additionally create groups of elements
387 * generated from elements belonging to preexisting groups
389 ListOfGroups ExtrusionSweepMakeGroups(in long_array IDsOfElements,
390 in DirStruct StepVector,
393 * Generate new elements by extrusion of theElements
394 * by StepVector by NbOfSteps
395 * param ExtrFlags set flags for performing extrusion
396 * param SewTolerance - uses for comparing locations of nodes if flag
397 * EXTRUSION_FLAG_SEW is set
399 void AdvancedExtrusion(in long_array IDsOfElements,
400 in DirStruct StepVector,
403 in double SewTolerance);
405 * \brief Same as previous but additionally create groups of elements
406 * generated from elements belonging to preexisting groups
408 ListOfGroups AdvancedExtrusionMakeGroups(in long_array IDsOfElements,
409 in DirStruct StepVector,
412 in double SewTolerance);
414 void ExtrusionSweepObject(in SMESH_IDSource theObject,
415 in DirStruct StepVector,
417 ListOfGroups ExtrusionSweepObjectMakeGroups(in SMESH_IDSource theObject,
418 in DirStruct StepVector,
421 void ExtrusionSweepObject1D(in SMESH_IDSource theObject,
422 in DirStruct StepVector,
424 ListOfGroups ExtrusionSweepObject1DMakeGroups(in SMESH_IDSource theObject,
425 in DirStruct StepVector,
428 void ExtrusionSweepObject2D(in SMESH_IDSource theObject,
429 in DirStruct StepVector,
431 ListOfGroups ExtrusionSweepObject2DMakeGroups(in SMESH_IDSource theObject,
432 in DirStruct StepVector,
435 enum Extrusion_Error {
440 EXTR_BAD_STARTING_NODE,
441 EXTR_BAD_ANGLES_NUMBER,
442 EXTR_CANT_GET_TANGENT
445 ListOfGroups ExtrusionAlongPathX(in long_array IDsOfElements,
446 in SMESH_IDSource Path,
448 in boolean HasAngles,
449 in double_array Angles,
450 in boolean LinearVariation,
451 in boolean HasRefPoint,
452 in PointStruct RefPoint,
453 in boolean MakeGroups,
454 in ElementType ElemType,
455 out Extrusion_Error Error);
457 ListOfGroups ExtrusionAlongPathObjX(in SMESH_IDSource theObject,
458 in SMESH_IDSource Path,
460 in boolean HasAngles,
461 in double_array Angles,
462 in boolean LinearVariation,
463 in boolean HasRefPoint,
464 in PointStruct RefPoint,
465 in boolean MakeGroups,
466 in ElementType ElemType,
467 out Extrusion_Error Error);
469 Extrusion_Error ExtrusionAlongPath(in long_array IDsOfElements,
470 in SMESH_Mesh PathMesh,
471 in GEOM::GEOM_Object PathShape,
473 in boolean HasAngles,
474 in double_array Angles,
475 in boolean HasRefPoint,
476 in PointStruct RefPoint);
477 ListOfGroups ExtrusionAlongPathMakeGroups(in long_array IDsOfElements,
478 in SMESH_Mesh PathMesh,
479 in GEOM::GEOM_Object PathShape,
481 in boolean HasAngles,
482 in double_array Angles,
483 in boolean HasRefPoint,
484 in PointStruct RefPoint,
485 out Extrusion_Error Error);
487 Extrusion_Error ExtrusionAlongPathObject(in SMESH_IDSource theObject,
488 in SMESH_Mesh PathMesh,
489 in GEOM::GEOM_Object PathShape,
491 in boolean HasAngles,
492 in double_array Angles,
493 in boolean HasRefPoint,
494 in PointStruct RefPoint);
495 ListOfGroups ExtrusionAlongPathObjectMakeGroups(in SMESH_IDSource theObject,
496 in SMESH_Mesh PathMesh,
497 in GEOM::GEOM_Object PathShape,
499 in boolean HasAngles,
500 in double_array Angles,
501 in boolean HasRefPoint,
502 in PointStruct RefPoint,
503 out Extrusion_Error Error);
505 Extrusion_Error ExtrusionAlongPathObject1D(in SMESH_IDSource theObject,
506 in SMESH_Mesh PathMesh,
507 in GEOM::GEOM_Object PathShape,
509 in boolean HasAngles,
510 in double_array Angles,
511 in boolean HasRefPoint,
512 in PointStruct RefPoint);
513 ListOfGroups ExtrusionAlongPathObject1DMakeGroups(in SMESH_IDSource theObject,
514 in SMESH_Mesh PathMesh,
515 in GEOM::GEOM_Object PathShape,
517 in boolean HasAngles,
518 in double_array Angles,
519 in boolean HasRefPoint,
520 in PointStruct RefPoint,
521 out Extrusion_Error Error);
523 Extrusion_Error ExtrusionAlongPathObject2D(in SMESH_IDSource theObject,
524 in SMESH_Mesh PathMesh,
525 in GEOM::GEOM_Object PathShape,
527 in boolean HasAngles,
528 in double_array Angles,
529 in boolean HasRefPoint,
530 in PointStruct RefPoint);
531 ListOfGroups ExtrusionAlongPathObject2DMakeGroups(in SMESH_IDSource theObject,
532 in SMESH_Mesh PathMesh,
533 in GEOM::GEOM_Object PathShape,
535 in boolean HasAngles,
536 in double_array Angles,
537 in boolean HasRefPoint,
538 in PointStruct RefPoint,
539 out Extrusion_Error Error);
542 * Compute rotation angles for ExtrusionAlongPath as linear variation
543 * of given angles along path steps
544 * param PathMesh mesh containing a 1D sub-mesh on the edge, along
545 * which proceeds the extrusion
546 * param PathShape is shape(edge); as the mesh can be complex, the edge
547 * is used to define the sub-mesh for the path
549 double_array LinearAnglesVariation(in SMESH_Mesh PathMesh,
550 in GEOM::GEOM_Object PathShape,
551 in double_array Angles);
553 enum MirrorType { POINT, AXIS, PLANE };
555 void Mirror (in long_array IDsOfElements,
556 in AxisStruct Mirror,
559 ListOfGroups MirrorMakeGroups (in long_array IDsOfElements,
560 in AxisStruct Mirror,
562 SMESH_Mesh MirrorMakeMesh (in long_array IDsOfElements,
563 in AxisStruct Mirror,
565 in boolean CopyGroups,
568 void MirrorObject (in SMESH_IDSource theObject,
569 in AxisStruct Mirror,
572 ListOfGroups MirrorObjectMakeGroups (in SMESH_IDSource theObject,
573 in AxisStruct Mirror,
575 SMESH_Mesh MirrorObjectMakeMesh (in SMESH_IDSource theObject,
576 in AxisStruct Mirror,
578 in boolean CopyGroups,
581 void Translate (in long_array IDsOfElements,
584 ListOfGroups TranslateMakeGroups (in long_array IDsOfElements,
585 in DirStruct Vector);
586 SMESH_Mesh TranslateMakeMesh (in long_array IDsOfElements,
588 in boolean CopyGroups,
591 void TranslateObject (in SMESH_IDSource theObject,
594 ListOfGroups TranslateObjectMakeGroups (in SMESH_IDSource theObject,
595 in DirStruct Vector);
596 SMESH_Mesh TranslateObjectMakeMesh (in SMESH_IDSource theObject,
598 in boolean CopyGroups,
601 void Scale (in SMESH_IDSource theObject,
602 in PointStruct thePoint,
603 in double_array theScaleFact,
605 ListOfGroups ScaleMakeGroups (in SMESH_IDSource theObject,
606 in PointStruct thePoint,
607 in double_array theScaleFact);
608 SMESH_Mesh ScaleMakeMesh (in SMESH_IDSource theObject,
609 in PointStruct thePoint,
610 in double_array theScaleFact,
611 in boolean CopyGroups,
614 void Rotate (in long_array IDsOfElements,
616 in double AngleInRadians,
618 ListOfGroups RotateMakeGroups (in long_array IDsOfElements,
620 in double AngleInRadians);
621 SMESH_Mesh RotateMakeMesh (in long_array IDsOfElements,
623 in double AngleInRadians,
624 in boolean CopyGroups,
627 void RotateObject (in SMESH_IDSource theObject,
629 in double AngleInRadians,
631 ListOfGroups RotateObjectMakeGroups (in SMESH_IDSource theObject,
633 in double AngleInRadians);
634 SMESH_Mesh RotateObjectMakeMesh (in SMESH_IDSource theObject,
636 in double AngleInRadians,
637 in boolean CopyGroups,
640 void FindCoincidentNodes (in double Tolerance,
641 out array_of_long_array GroupsOfNodes);
643 void FindCoincidentNodesOnPart (in SMESH_IDSource SubMeshOrGroup,
645 out array_of_long_array GroupsOfNodes);
647 void FindCoincidentNodesOnPartBut (in SMESH_IDSource SubMeshOrGroup,
649 out array_of_long_array GroupsOfNodes,
650 in ListOfIDSources ExceptSubMeshOrGroups);
652 void MergeNodes (in array_of_long_array GroupsOfNodes);
655 * \brief Find elements built on the same nodes.
656 * \param MeshOrSubMeshOrGroup Mesh or SubMesh, or Group of elements for searching.
657 * \return List of groups of equal elements.
659 void FindEqualElements (in SMESH_IDSource MeshOrSubMeshOrGroup,
660 out array_of_long_array GroupsOfElementsID);
663 * \brief Merge elements in each given group.
664 * \param GroupsOfElementsID Groups of elements for merging.
666 void MergeElements(in array_of_long_array GroupsOfElementsID);
669 * \brief Merge equal elements in the whole mesh.
671 void MergeEqualElements();
674 * If the given ID is a valid node ID (nodeID > 0), just move this node, else
675 * move the node closest to the point to point's location and return ID of the node
677 long MoveClosestNodeToPoint(in double x, in double y, in double z, in long nodeID);
680 * Return ID of node closest to a given point
682 long FindNodeClosestTo(in double x, in double y, in double z);
685 * Return elements of given type where the given point is IN or ON.
687 * 'ALL' type means elements of any type excluding nodes and 0D elements
689 long_array FindElementsByPoint(in double x, in double y, in double z, in ElementType type);
692 * Return point state in a closed 2D mesh in terms of TopAbs_State enumeration.
693 * TopAbs_UNKNOWN state means that either mesh is wrong or the analysis fails.
695 short GetPointState(in double x, in double y, in double z);
699 SEW_BORDER1_NOT_FOUND,
700 SEW_BORDER2_NOT_FOUND,
701 SEW_BOTH_BORDERS_NOT_FOUND,
703 SEW_VOLUMES_TO_SPLIT,
704 // for SewSideElements() only:
705 SEW_DIFF_NB_OF_ELEMENTS,
706 SEW_TOPO_DIFF_SETS_OF_ELEMENTS,
711 Sew_Error SewFreeBorders (in long FirstNodeID1,
712 in long SecondNodeID1,
714 in long FirstNodeID2,
715 in long SecondNodeID2,
717 in boolean CreatePolygons,
718 in boolean CreatePolyedrs);
720 Sew_Error SewConformFreeBorders (in long FirstNodeID1,
721 in long SecondNodeID1,
723 in long FirstNodeID2,
724 in long SecondNodeID2);
726 Sew_Error SewBorderToSide (in long FirstNodeIDOnFreeBorder,
727 in long SecondNodeIDOnFreeBorder,
728 in long LastNodeIDOnFreeBorder,
729 in long FirstNodeIDOnSide,
730 in long LastNodeIDOnSide,
731 in boolean CreatePolygons,
732 in boolean CreatePolyedrs);
734 Sew_Error SewSideElements (in long_array IDsOfSide1Elements,
735 in long_array IDsOfSide2Elements,
736 in long NodeID1OfSide1ToMerge,
737 in long NodeID1OfSide2ToMerge,
738 in long NodeID2OfSide1ToMerge,
739 in long NodeID2OfSide2ToMerge);
742 * Set new nodes for given element.
743 * If number of nodes is not corresponded to type of
744 * element - returns false
746 boolean ChangeElemNodes(in long ide, in long_array newIDs);
749 * Return data of mesh edition preview which is computed provided
750 * that the editor was obtained trough SMESH_Mesh::GetMeshEditPreviewer()
752 MeshPreviewStruct GetPreviewData();
755 * If during last operation of MeshEditor some nodes were
756 * created this method returns list of it's IDs, if new nodes
757 * not creared - returns empty list
759 long_array GetLastCreatedNodes();
762 * If during last operation of MeshEditor some elements were
763 * created this method returns list of it's IDs, if new elements
764 * not creared - returns empty list
766 long_array GetLastCreatedElems();
769 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
770 * \param theNodes - identifiers of nodes to be doubled
771 * \param theModifiedElems - identifiers of elements to be updated by the new (doubled)
772 * nodes. If list of element identifiers is empty then nodes are doubled but
773 * they not assigned to elements
774 * \return TRUE if operation has been completed successfully, FALSE otherwise
775 * \sa DoubleNode(), DoubleNodeGroup(), DoubleNodeGroups()
777 boolean DoubleNodes( in long_array theNodes, in long_array theModifiedElems );
780 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
781 * This method provided for convenience works as DoubleNodes() described above.
782 * \param theNodeId - identifier of node to be doubled.
783 * \param theModifiedElems - identifiers of elements to be updated.
784 * \return TRUE if operation has been completed successfully, FALSE otherwise
785 * \sa DoubleNodes(), DoubleNodeGroup(), DoubleNodeGroups()
787 boolean DoubleNode( in long theNodeId, in long_array theModifiedElems );
790 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
791 * This method provided for convenience works as DoubleNodes() described above.
792 * \param theNodes - group of nodes to be doubled.
793 * \param theModifiedElems - group of elements to be updated.
794 * \return TRUE if operation has been completed successfully, FALSE otherwise
795 * \sa DoubleNode(), DoubleNodes(), DoubleNodeGroups(), DoubleNodeGroupNew()
797 boolean DoubleNodeGroup( in SMESH_GroupBase theNodes,
798 in SMESH_GroupBase theModifiedElems );
801 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
802 * Works as DoubleNodeGroup() described above, but returns a new group with
803 * newly created nodes.
804 * \param theNodes - group of nodes to be doubled.
805 * \param theModifiedElems - group of elements to be updated.
806 * \return a new group with newly created nodes
807 * \sa DoubleNodeGroup()
809 SMESH_Group DoubleNodeGroupNew( in SMESH_GroupBase theNodes,
810 in SMESH_GroupBase theModifiedElems );
813 \brief Creates a hole in a mesh by doubling the nodes of some particular elements
814 This method provided for convenience works as DoubleNodes() described above.
815 \param theNodes - list of groups of nodes to be doubled
816 \param theModifiedElems - list of groups of elements to be updated.
817 \return TRUE if operation has been completed successfully, FALSE otherwise
818 \sa DoubleNode(), DoubleNodeGroup(), DoubleNodes()
820 boolean DoubleNodeGroups( in ListOfGroups theNodes,
821 in ListOfGroups theModifiedElems );
824 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
825 * \param theElems - the list of elements (edges or faces) to be replicated
826 * The nodes for duplication could be found from these elements
827 * \param theNodesNot - list of nodes to NOT replicate
828 * \param theAffectedElems - the list of elements (cells and edges) to which the
829 * replicated nodes should be associated to.
830 * \return TRUE if operation has been completed successfully, FALSE otherwise
831 * \sa DoubleNodeGroup(), DoubleNodeGroups()
833 boolean DoubleNodeElem( in long_array theElems,
834 in long_array theNodesNot,
835 in long_array theAffectedElems );
838 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
839 * \param theElems - the list of elements (edges or faces) to be replicated
840 * The nodes for duplication could be found from these elements
841 * \param theNodesNot - list of nodes to NOT replicate
842 * \param theShape - shape to detect affected elements (element which geometric center
843 * located on or inside shape).
844 * The replicated nodes should be associated to affected elements.
845 * \return TRUE if operation has been completed successfully, FALSE otherwise
846 * \sa DoubleNodeGroupInRegion(), DoubleNodeGroupsInRegion()
848 boolean DoubleNodeElemInRegion( in long_array theElems,
849 in long_array theNodesNot,
850 in GEOM::GEOM_Object theShape );
853 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
854 * This method provided for convenience works as DoubleNodes() described above.
855 * \param theElems - group of of elements (edges or faces) to be replicated
856 * \param theNodesNot - group of nodes not to replicated
857 * \param theAffectedElems - group of elements to which the replicated nodes
858 * should be associated to.
859 * \return TRUE if operation has been completed successfully, FALSE otherwise
860 * \sa DoubleNodes(), DoubleNodeGroups(), DoubleNodeElemGroupNew()
862 boolean DoubleNodeElemGroup( in SMESH_GroupBase theElems,
863 in SMESH_GroupBase theNodesNot,
864 in SMESH_GroupBase theAffectedElems );
867 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
868 * Works as DoubleNodeElemGroup() described above, but returns a new group with
869 * newly created elements.
870 * \param theElems - group of of elements (edges or faces) to be replicated
871 * \param theNodesNot - group of nodes not to replicated
872 * \param theAffectedElems - group of elements to which the replicated nodes
873 * should be associated to.
874 * \return a new group with newly created elements
875 * \sa DoubleNodeElemGroup()
877 SMESH_Group DoubleNodeElemGroupNew( in SMESH_GroupBase theElems,
878 in SMESH_GroupBase theNodesNot,
879 in SMESH_GroupBase theAffectedElems );
882 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
883 * This method provided for convenience works as DoubleNodes() described above.
884 * \param theElems - group of elements (edges or faces) to be replicated
885 * \param theNodesNot - group of nodes not to replicated
886 * \param theShape - shape to detect affected elements (element which geometric center
887 * located on or inside shape).
888 * The replicated nodes should be associated to affected elements.
889 * \return TRUE if operation has been completed successfully, FALSE otherwise
890 * \sa DoubleNodesInRegion(), DoubleNodeGroupsInRegion()
892 boolean DoubleNodeElemGroupInRegion( in SMESH_GroupBase theElems,
893 in SMESH_GroupBase theNodesNot,
894 in GEOM::GEOM_Object theShape );
897 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
898 * This method provided for convenience works as DoubleNodes() described above.
899 * \param theElems - list of groups of elements (edges or faces) to be replicated
900 * \param theNodesNot - list of groups of nodes not to replicated
901 * \param theAffectedElems - group of elements to which the replicated nodes
902 * should be associated to.
903 * \return TRUE if operation has been completed successfully, FALSE otherwise
904 * \sa DoubleNodeGroup(), DoubleNodes()
906 boolean DoubleNodeElemGroups( in ListOfGroups theElems,
907 in ListOfGroups theNodesNot,
908 in ListOfGroups theAffectedElems );
911 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
912 * This method provided for convenience works as DoubleNodes() described above.
913 * \param theElems - list of groups of elements (edges or faces) to be replicated
914 * \param theNodesNot - list of groups of nodes not to replicated
915 * \param theShape - shape to detect affected elements (element which geometric center
916 * located on or inside shape).
917 * The replicated nodes should be associated to affected elements.
918 * \return TRUE if operation has been completed successfully, FALSE otherwise
919 * \sa DoubleNodeGroupInRegion(), DoubleNodesInRegion()
921 boolean DoubleNodeElemGroupsInRegion( in ListOfGroups theElems,
922 in ListOfGroups theNodesNot,
923 in GEOM::GEOM_Object theShape );
926 * \brief Generates skin mesh (containing 2D cells) from 3D mesh
927 * The created 2D mesh elements based on nodes of free faces of boundary volumes
928 * \return TRUE if operation has been completed successfully, FALSE otherwise
930 boolean Make2DMeshFrom3D();
933 * \brief Double nodes on shared faces between groups of volumes and create flat elements on demand.
934 * The list of groups must describe a partition of the mesh volumes.
935 * The nodes of the internal faces at the boundaries of the groups are doubled.
936 * In option, the internal faces are replaced by flat elements.
937 * Triangles are transformed in prisms, and quadrangles in hexahedrons.
938 * \param theDomains - list of groups of volumes
939 * \param createJointElems - if TRUE, create the elements
940 * \return TRUE if operation has been completed successfully, FALSE otherwise
942 boolean DoubleNodesOnGroupBoundaries( in ListOfGroups theDomains,
943 in boolean createJointElems );
946 * \brief Creates missing boundary elements
947 * \param elements - elements whose boundary is to be checked
948 * \param dimension - defines type of boundary elements to create
949 * \param groupName - a name of group to store created boundary elements in,
950 * "" means not to create the group
951 * \param meshName - a name of new mesh to store created boundary elements in,
952 * "" means not to create the new mesh
953 * \param toCopyElements - if true, the checked elements will be copied into the new mesh
954 * \param toCopyExistingBondary - if true, not only new but also pre-existing
955 * boundary elements will be copied into the new mesh
956 * \param group - returns the create group, if any
957 * \retval SMESH::SMESH_Mesh - the mesh where elements were added to
959 SMESH::SMESH_Mesh MakeBoundaryMesh(in SMESH_IDSource elements,
960 in Bnd_Dimension dimension,
963 in boolean toCopyElements,
964 in boolean toCopyExistingBondary,
965 out SMESH_Group group);