1 // Copyright (C) 2007-2011 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 ConvertToQuadraticObject(in boolean theForce3d,
288 in SMESH_IDSource theObject)
289 raises (SALOME::SALOME_Exception);
291 void ConvertFromQuadraticObject(in SMESH_IDSource theObject)
292 raises (SALOME::SALOME_Exception);
294 void RenumberNodes();
296 void RenumberElements();
299 * \brief Genarate dim+1 elements by rotation of given elements around axis
300 * \param IDsOfElements - elements to ratate
301 * \param Axix - rotation axis
302 * \param AngleInRadians - rotation angle
303 * \param NbOfSteps - number of elements to generate from one element
305 void RotationSweep(in long_array IDsOfElements,
307 in double AngleInRadians,
309 in double Tolerance);
311 * \brief Same as previous but additionally create groups of elements
312 * generated from elements belonging to preexisting groups
314 ListOfGroups RotationSweepMakeGroups(in long_array IDsOfElements,
316 in double AngleInRadians,
318 in double Tolerance);
320 * \brief Genarate dim+1 elements by rotation of the object around axis
321 * \param theObject - object containing elements to ratate
322 * \param Axix - rotation axis
323 * \param AngleInRadians - rotation angle
324 * \param NbOfSteps - number of elements to generate from one element
326 void RotationSweepObject(in SMESH_IDSource theObject,
328 in double AngleInRadians,
330 in double Tolerance);
332 * \brief Same as previous but additionally create groups of elements
333 * generated from elements belonging to preexisting groups
335 ListOfGroups RotationSweepObjectMakeGroups(in SMESH_IDSource theObject,
337 in double AngleInRadians,
339 in double Tolerance);
341 * \brief Genarate dim+1 elements by rotation of the object around axis
342 * \param theObject - object containing elements to ratate
343 * \param Axix - rotation axis
344 * \param AngleInRadians - rotation angle
345 * \param NbOfSteps - number of elements to generate from one element
347 void RotationSweepObject1D(in SMESH_IDSource theObject,
349 in double AngleInRadians,
351 in double Tolerance);
353 * \brief Same as previous but additionally create groups of elements
354 * generated from elements belonging to preexisting groups
356 ListOfGroups RotationSweepObject1DMakeGroups(in SMESH_IDSource theObject,
358 in double AngleInRadians,
360 in double Tolerance);
362 * \brief Genarate dim+1 elements by rotation of the object around axis
363 * \param theObject - object containing elements to ratate
364 * \param Axix - rotation axis
365 * \param AngleInRadians - rotation angle
366 * \param NbOfSteps - number of elements to generate from one element
368 void RotationSweepObject2D(in SMESH_IDSource theObject,
370 in double AngleInRadians,
372 in double Tolerance);
374 * \brief Same as previous but additionally create groups of elements
375 * generated from elements belonging to preexisting groups
377 ListOfGroups RotationSweepObject2DMakeGroups(in SMESH_IDSource theObject,
379 in double AngleInRadians,
381 in double Tolerance);
383 * \brief Genarate dim+1 elements by extrusion of elements along vector
384 * \param IDsOfElements - elements to sweep
385 * \param StepVector - vector giving direction and distance of an extrusion step
386 * \param NbOfSteps - number of elements to generate from one element
388 void ExtrusionSweep(in long_array IDsOfElements,
389 in DirStruct StepVector,
392 * \brief Same as previous but additionally create groups of elements
393 * generated from elements belonging to preexisting groups
395 ListOfGroups ExtrusionSweepMakeGroups(in long_array IDsOfElements,
396 in DirStruct StepVector,
399 * Generate new elements by extrusion of theElements
400 * by StepVector by NbOfSteps
401 * param ExtrFlags set flags for performing extrusion
402 * param SewTolerance - uses for comparing locations of nodes if flag
403 * EXTRUSION_FLAG_SEW is set
405 void AdvancedExtrusion(in long_array IDsOfElements,
406 in DirStruct StepVector,
409 in double SewTolerance);
411 * \brief Same as previous but additionally create groups of elements
412 * generated from elements belonging to preexisting groups
414 ListOfGroups AdvancedExtrusionMakeGroups(in long_array IDsOfElements,
415 in DirStruct StepVector,
418 in double SewTolerance);
420 void ExtrusionSweepObject(in SMESH_IDSource theObject,
421 in DirStruct StepVector,
423 ListOfGroups ExtrusionSweepObjectMakeGroups(in SMESH_IDSource theObject,
424 in DirStruct StepVector,
427 void ExtrusionSweepObject1D(in SMESH_IDSource theObject,
428 in DirStruct StepVector,
430 ListOfGroups ExtrusionSweepObject1DMakeGroups(in SMESH_IDSource theObject,
431 in DirStruct StepVector,
434 void ExtrusionSweepObject2D(in SMESH_IDSource theObject,
435 in DirStruct StepVector,
437 ListOfGroups ExtrusionSweepObject2DMakeGroups(in SMESH_IDSource theObject,
438 in DirStruct StepVector,
441 enum Extrusion_Error {
446 EXTR_BAD_STARTING_NODE,
447 EXTR_BAD_ANGLES_NUMBER,
448 EXTR_CANT_GET_TANGENT
451 ListOfGroups ExtrusionAlongPathX(in long_array IDsOfElements,
452 in SMESH_IDSource Path,
454 in boolean HasAngles,
455 in double_array Angles,
456 in boolean LinearVariation,
457 in boolean HasRefPoint,
458 in PointStruct RefPoint,
459 in boolean MakeGroups,
460 in ElementType ElemType,
461 out Extrusion_Error Error);
463 ListOfGroups ExtrusionAlongPathObjX(in SMESH_IDSource theObject,
464 in SMESH_IDSource Path,
466 in boolean HasAngles,
467 in double_array Angles,
468 in boolean LinearVariation,
469 in boolean HasRefPoint,
470 in PointStruct RefPoint,
471 in boolean MakeGroups,
472 in ElementType ElemType,
473 out Extrusion_Error Error);
475 Extrusion_Error ExtrusionAlongPath(in long_array IDsOfElements,
476 in SMESH_Mesh PathMesh,
477 in GEOM::GEOM_Object PathShape,
479 in boolean HasAngles,
480 in double_array Angles,
481 in boolean HasRefPoint,
482 in PointStruct RefPoint);
483 ListOfGroups ExtrusionAlongPathMakeGroups(in long_array IDsOfElements,
484 in SMESH_Mesh PathMesh,
485 in GEOM::GEOM_Object PathShape,
487 in boolean HasAngles,
488 in double_array Angles,
489 in boolean HasRefPoint,
490 in PointStruct RefPoint,
491 out Extrusion_Error Error);
493 Extrusion_Error ExtrusionAlongPathObject(in SMESH_IDSource theObject,
494 in SMESH_Mesh PathMesh,
495 in GEOM::GEOM_Object PathShape,
497 in boolean HasAngles,
498 in double_array Angles,
499 in boolean HasRefPoint,
500 in PointStruct RefPoint);
501 ListOfGroups ExtrusionAlongPathObjectMakeGroups(in SMESH_IDSource theObject,
502 in SMESH_Mesh PathMesh,
503 in GEOM::GEOM_Object PathShape,
505 in boolean HasAngles,
506 in double_array Angles,
507 in boolean HasRefPoint,
508 in PointStruct RefPoint,
509 out Extrusion_Error Error);
511 Extrusion_Error ExtrusionAlongPathObject1D(in SMESH_IDSource theObject,
512 in SMESH_Mesh PathMesh,
513 in GEOM::GEOM_Object PathShape,
515 in boolean HasAngles,
516 in double_array Angles,
517 in boolean HasRefPoint,
518 in PointStruct RefPoint);
519 ListOfGroups ExtrusionAlongPathObject1DMakeGroups(in SMESH_IDSource theObject,
520 in SMESH_Mesh PathMesh,
521 in GEOM::GEOM_Object PathShape,
523 in boolean HasAngles,
524 in double_array Angles,
525 in boolean HasRefPoint,
526 in PointStruct RefPoint,
527 out Extrusion_Error Error);
529 Extrusion_Error ExtrusionAlongPathObject2D(in SMESH_IDSource theObject,
530 in SMESH_Mesh PathMesh,
531 in GEOM::GEOM_Object PathShape,
533 in boolean HasAngles,
534 in double_array Angles,
535 in boolean HasRefPoint,
536 in PointStruct RefPoint);
537 ListOfGroups ExtrusionAlongPathObject2DMakeGroups(in SMESH_IDSource theObject,
538 in SMESH_Mesh PathMesh,
539 in GEOM::GEOM_Object PathShape,
541 in boolean HasAngles,
542 in double_array Angles,
543 in boolean HasRefPoint,
544 in PointStruct RefPoint,
545 out Extrusion_Error Error);
548 * Compute rotation angles for ExtrusionAlongPath as linear variation
549 * of given angles along path steps
550 * param PathMesh mesh containing a 1D sub-mesh on the edge, along
551 * which proceeds the extrusion
552 * param PathShape is shape(edge); as the mesh can be complex, the edge
553 * is used to define the sub-mesh for the path
555 double_array LinearAnglesVariation(in SMESH_Mesh PathMesh,
556 in GEOM::GEOM_Object PathShape,
557 in double_array Angles);
559 enum MirrorType { POINT, AXIS, PLANE };
561 void Mirror (in long_array IDsOfElements,
562 in AxisStruct Mirror,
565 ListOfGroups MirrorMakeGroups (in long_array IDsOfElements,
566 in AxisStruct Mirror,
568 SMESH_Mesh MirrorMakeMesh (in long_array IDsOfElements,
569 in AxisStruct Mirror,
571 in boolean CopyGroups,
574 void MirrorObject (in SMESH_IDSource theObject,
575 in AxisStruct Mirror,
578 ListOfGroups MirrorObjectMakeGroups (in SMESH_IDSource theObject,
579 in AxisStruct Mirror,
581 SMESH_Mesh MirrorObjectMakeMesh (in SMESH_IDSource theObject,
582 in AxisStruct Mirror,
584 in boolean CopyGroups,
587 void Translate (in long_array IDsOfElements,
590 ListOfGroups TranslateMakeGroups (in long_array IDsOfElements,
591 in DirStruct Vector);
592 SMESH_Mesh TranslateMakeMesh (in long_array IDsOfElements,
594 in boolean CopyGroups,
597 void TranslateObject (in SMESH_IDSource theObject,
600 ListOfGroups TranslateObjectMakeGroups (in SMESH_IDSource theObject,
601 in DirStruct Vector);
602 SMESH_Mesh TranslateObjectMakeMesh (in SMESH_IDSource theObject,
604 in boolean CopyGroups,
607 void Scale (in SMESH_IDSource theObject,
608 in PointStruct thePoint,
609 in double_array theScaleFact,
611 ListOfGroups ScaleMakeGroups (in SMESH_IDSource theObject,
612 in PointStruct thePoint,
613 in double_array theScaleFact);
614 SMESH_Mesh ScaleMakeMesh (in SMESH_IDSource theObject,
615 in PointStruct thePoint,
616 in double_array theScaleFact,
617 in boolean CopyGroups,
620 void Rotate (in long_array IDsOfElements,
622 in double AngleInRadians,
624 ListOfGroups RotateMakeGroups (in long_array IDsOfElements,
626 in double AngleInRadians);
627 SMESH_Mesh RotateMakeMesh (in long_array IDsOfElements,
629 in double AngleInRadians,
630 in boolean CopyGroups,
633 void RotateObject (in SMESH_IDSource theObject,
635 in double AngleInRadians,
637 ListOfGroups RotateObjectMakeGroups (in SMESH_IDSource theObject,
639 in double AngleInRadians);
640 SMESH_Mesh RotateObjectMakeMesh (in SMESH_IDSource theObject,
642 in double AngleInRadians,
643 in boolean CopyGroups,
646 void FindCoincidentNodes (in double Tolerance,
647 out array_of_long_array GroupsOfNodes);
649 void FindCoincidentNodesOnPart (in SMESH_IDSource SubMeshOrGroup,
651 out array_of_long_array GroupsOfNodes);
653 void FindCoincidentNodesOnPartBut (in SMESH_IDSource SubMeshOrGroup,
655 out array_of_long_array GroupsOfNodes,
656 in ListOfIDSources ExceptSubMeshOrGroups);
658 void MergeNodes (in array_of_long_array GroupsOfNodes);
661 * \brief Find elements built on the same nodes.
662 * \param MeshOrSubMeshOrGroup Mesh or SubMesh, or Group of elements for searching.
663 * \return List of groups of equal elements.
665 void FindEqualElements (in SMESH_IDSource MeshOrSubMeshOrGroup,
666 out array_of_long_array GroupsOfElementsID);
669 * \brief Merge elements in each given group.
670 * \param GroupsOfElementsID Groups of elements for merging.
672 void MergeElements(in array_of_long_array GroupsOfElementsID);
675 * \brief Merge equal elements in the whole mesh.
677 void MergeEqualElements();
680 * If the given ID is a valid node ID (nodeID > 0), just move this node, else
681 * move the node closest to the point to point's location and return ID of the node
683 long MoveClosestNodeToPoint(in double x, in double y, in double z, in long nodeID);
686 * Return ID of node closest to a given point
688 long FindNodeClosestTo(in double x, in double y, in double z);
691 * Return elements of given type where the given point is IN or ON.
693 * 'ALL' type means elements of any type excluding nodes and 0D elements
695 long_array FindElementsByPoint(in double x, in double y, in double z, in ElementType type);
698 * Searching among the given elements, return elements of given type
699 * where the given point is IN or ON.
701 * 'ALL' type means elements of any type excluding nodes and 0D elements
703 long_array FindAmongElementsByPoint(in SMESH_IDSource elements,
704 in double x, in double y, in double z,
705 in ElementType type);
708 * Return point state in a closed 2D mesh in terms of TopAbs_State enumeration.
709 * TopAbs_UNKNOWN state means that either mesh is wrong or the analysis fails.
711 short GetPointState(in double x, in double y, in double z);
715 SEW_BORDER1_NOT_FOUND,
716 SEW_BORDER2_NOT_FOUND,
717 SEW_BOTH_BORDERS_NOT_FOUND,
719 SEW_VOLUMES_TO_SPLIT,
720 // for SewSideElements() only:
721 SEW_DIFF_NB_OF_ELEMENTS,
722 SEW_TOPO_DIFF_SETS_OF_ELEMENTS,
727 Sew_Error SewFreeBorders (in long FirstNodeID1,
728 in long SecondNodeID1,
730 in long FirstNodeID2,
731 in long SecondNodeID2,
733 in boolean CreatePolygons,
734 in boolean CreatePolyedrs);
736 Sew_Error SewConformFreeBorders (in long FirstNodeID1,
737 in long SecondNodeID1,
739 in long FirstNodeID2,
740 in long SecondNodeID2);
742 Sew_Error SewBorderToSide (in long FirstNodeIDOnFreeBorder,
743 in long SecondNodeIDOnFreeBorder,
744 in long LastNodeIDOnFreeBorder,
745 in long FirstNodeIDOnSide,
746 in long LastNodeIDOnSide,
747 in boolean CreatePolygons,
748 in boolean CreatePolyedrs);
750 Sew_Error SewSideElements (in long_array IDsOfSide1Elements,
751 in long_array IDsOfSide2Elements,
752 in long NodeID1OfSide1ToMerge,
753 in long NodeID1OfSide2ToMerge,
754 in long NodeID2OfSide1ToMerge,
755 in long NodeID2OfSide2ToMerge);
758 * Set new nodes for given element.
759 * If number of nodes is not corresponded to type of
760 * element - returns false
762 boolean ChangeElemNodes(in long ide, in long_array newIDs);
765 * Return data of mesh edition preview which is computed provided
766 * that the editor was obtained trough SMESH_Mesh::GetMeshEditPreviewer()
768 MeshPreviewStruct GetPreviewData();
771 * If during last operation of MeshEditor some nodes were
772 * created this method returns list of it's IDs, if new nodes
773 * not creared - returns empty list
775 long_array GetLastCreatedNodes();
778 * If during last operation of MeshEditor some elements were
779 * created this method returns list of it's IDs, if new elements
780 * not creared - returns empty list
782 long_array GetLastCreatedElems();
785 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
786 * \param theNodes - identifiers of nodes to be doubled
787 * \param theModifiedElems - identifiers of elements to be updated by the new (doubled)
788 * nodes. If list of element identifiers is empty then nodes are doubled but
789 * they not assigned to elements
790 * \return TRUE if operation has been completed successfully, FALSE otherwise
791 * \sa DoubleNode(), DoubleNodeGroup(), DoubleNodeGroups()
793 boolean DoubleNodes( in long_array theNodes, in long_array theModifiedElems );
796 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
797 * This method provided for convenience works as DoubleNodes() described above.
798 * \param theNodeId - identifier of node to be doubled.
799 * \param theModifiedElems - identifiers of elements to be updated.
800 * \return TRUE if operation has been completed successfully, FALSE otherwise
801 * \sa DoubleNodes(), DoubleNodeGroup(), DoubleNodeGroups()
803 boolean DoubleNode( in long theNodeId, in long_array theModifiedElems );
806 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
807 * This method provided for convenience works as DoubleNodes() described above.
808 * \param theNodes - group of nodes to be doubled.
809 * \param theModifiedElems - group of elements to be updated.
810 * \return TRUE if operation has been completed successfully, FALSE otherwise
811 * \sa DoubleNode(), DoubleNodes(), DoubleNodeGroups(), DoubleNodeGroupNew()
813 boolean DoubleNodeGroup( in SMESH_GroupBase theNodes,
814 in SMESH_GroupBase theModifiedElems );
817 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
818 * Works as DoubleNodeGroup() described above, but returns a new group with
819 * newly created nodes.
820 * \param theNodes - group of nodes to be doubled.
821 * \param theModifiedElems - group of elements to be updated.
822 * \return a new group with newly created nodes
823 * \sa DoubleNodeGroup()
825 SMESH_Group DoubleNodeGroupNew( in SMESH_GroupBase theNodes,
826 in SMESH_GroupBase theModifiedElems );
829 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
830 * This method provided for convenience works as DoubleNodes() described above.
831 * \param theNodes - list of groups of nodes to be doubled
832 * \param theModifiedElems - list of groups of elements to be updated.
833 * \return TRUE if operation has been completed successfully, FALSE otherwise
834 * \sa DoubleNode(), DoubleNodeGroup(), DoubleNodes()
836 boolean DoubleNodeGroups( in ListOfGroups theNodes,
837 in ListOfGroups theModifiedElems );
840 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
841 * Works as DoubleNodeGroups() described above, but returns a new group with
842 * newly created nodes.
843 * \param theNodes - list of groups of nodes to be doubled
844 * \param theModifiedElems - list of groups of elements to be updated.
845 * \return a new group with newly created nodes
846 * \sa DoubleNodeGroups()
848 SMESH_Group DoubleNodeGroupsNew( in ListOfGroups theNodes,
849 in ListOfGroups theModifiedElems );
852 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
853 * \param theElems - the list of elements (edges or faces) to be replicated
854 * The nodes for duplication could be found from these elements
855 * \param theNodesNot - list of nodes to NOT replicate
856 * \param theAffectedElems - the list of elements (cells and edges) to which the
857 * replicated nodes should be associated to.
858 * \return TRUE if operation has been completed successfully, FALSE otherwise
859 * \sa DoubleNodeGroup(), DoubleNodeGroups()
861 boolean DoubleNodeElem( in long_array theElems,
862 in long_array theNodesNot,
863 in long_array theAffectedElems );
866 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
867 * \param theElems - the list of elements (edges or faces) to be replicated
868 * The nodes for duplication could be found from these elements
869 * \param theNodesNot - list of nodes to NOT replicate
870 * \param theShape - shape to detect affected elements (element which geometric center
871 * located on or inside shape).
872 * The replicated nodes should be associated to affected elements.
873 * \return TRUE if operation has been completed successfully, FALSE otherwise
874 * \sa DoubleNodeGroupInRegion(), DoubleNodeGroupsInRegion()
876 boolean DoubleNodeElemInRegion( in long_array theElems,
877 in long_array theNodesNot,
878 in GEOM::GEOM_Object theShape );
881 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
882 * This method provided for convenience works as DoubleNodes() described above.
883 * \param theElems - group of of elements (edges or faces) to be replicated
884 * \param theNodesNot - group of nodes not to replicated
885 * \param theAffectedElems - group of elements to which the replicated nodes
886 * should be associated to.
887 * \return TRUE if operation has been completed successfully, FALSE otherwise
888 * \sa DoubleNodes(), DoubleNodeGroups(), DoubleNodeElemGroupNew()
890 boolean DoubleNodeElemGroup( in SMESH_GroupBase theElems,
891 in SMESH_GroupBase theNodesNot,
892 in SMESH_GroupBase theAffectedElems );
895 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
896 * Works as DoubleNodeElemGroup() described above, but returns a new group with
897 * newly created elements.
898 * \param theElems - group of of elements (edges or faces) to be replicated
899 * \param theNodesNot - group of nodes not to replicated
900 * \param theAffectedElems - group of elements to which the replicated nodes
901 * should be associated to.
902 * \return a new group with newly created elements
903 * \sa DoubleNodeElemGroup()
905 SMESH_Group DoubleNodeElemGroupNew( in SMESH_GroupBase theElems,
906 in SMESH_GroupBase theNodesNot,
907 in SMESH_GroupBase theAffectedElems );
910 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
911 * This method provided for convenience works as DoubleNodes() described above.
912 * \param theElems - group of elements (edges or faces) to be replicated
913 * \param theNodesNot - group of nodes not to replicated
914 * \param theShape - shape to detect affected elements (element which geometric center
915 * located on or inside shape).
916 * The replicated nodes should be associated to affected elements.
917 * \return TRUE if operation has been completed successfully, FALSE otherwise
918 * \sa DoubleNodesInRegion(), DoubleNodeGroupsInRegion()
920 boolean DoubleNodeElemGroupInRegion( in SMESH_GroupBase theElems,
921 in SMESH_GroupBase theNodesNot,
922 in GEOM::GEOM_Object theShape );
925 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
926 * This method provided for convenience works as DoubleNodes() described above.
927 * \param theElems - list of groups of elements (edges or faces) to be replicated
928 * \param theNodesNot - list of groups of nodes not to replicated
929 * \param theAffectedElems - group of elements to which the replicated nodes
930 * should be associated to.
931 * \return TRUE if operation has been completed successfully, FALSE otherwise
932 * \sa DoubleNodeGroup(), DoubleNodes(), DoubleNodeElemGroupsNew()
934 boolean DoubleNodeElemGroups( in ListOfGroups theElems,
935 in ListOfGroups theNodesNot,
936 in ListOfGroups theAffectedElems );
939 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
940 * Works as DoubleNodeElemGroups() described above, but returns a new group with
941 * newly created elements.
942 * \param theElems - list of groups of elements (edges or faces) to be replicated
943 * \param theNodesNot - list of groups of nodes not to replicated
944 * \param theAffectedElems - group of elements to which the replicated nodes
945 * should be associated to.
946 * \return a new group with newly created elements
947 * \sa DoubleNodeElemGroups()
949 SMESH_Group DoubleNodeElemGroupsNew( in ListOfGroups theElems,
950 in ListOfGroups theNodesNot,
951 in ListOfGroups theAffectedElems );
954 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
955 * This method provided for convenience works as DoubleNodes() described above.
956 * \param theElems - list of groups of elements (edges or faces) to be replicated
957 * \param theNodesNot - list of groups of nodes not to replicated
958 * \param theShape - shape to detect affected elements (element which geometric center
959 * located on or inside shape).
960 * The replicated nodes should be associated to affected elements.
961 * \return TRUE if operation has been completed successfully, FALSE otherwise
962 * \sa DoubleNodeGroupInRegion(), DoubleNodesInRegion()
964 boolean DoubleNodeElemGroupsInRegion( in ListOfGroups theElems,
965 in ListOfGroups theNodesNot,
966 in GEOM::GEOM_Object theShape );
969 * \brief Generates skin mesh (containing 2D cells) from 3D mesh
970 * The created 2D mesh elements based on nodes of free faces of boundary volumes
971 * \return TRUE if operation has been completed successfully, FALSE otherwise
973 boolean Make2DMeshFrom3D();
976 * \brief Creates missing boundary elements
977 * \param elements - elements whose boundary is to be checked
978 * \param dimension - defines type of boundary elements to create
979 * BND_1DFROM3D creates mesh edges on all borders of free facets of 3D elements.
980 * \param groupName - a name of group to store created boundary elements in,
981 * "" means not to create the group
982 * \param meshName - a name of new mesh to store created boundary elements in,
983 * "" means not to create the new mesh
984 * \param toCopyElements - if true, the checked elements will be copied into the new mesh
985 * else only boundary elements will be copied into the new mesh
986 * \param toCopyExistingBondary - if true, not only new but also pre-existing
987 * boundary elements will be copied into the new mesh
988 * \param group - returns the create group, if any
989 * \retval SMESH::SMESH_Mesh - the mesh where elements were added to
991 SMESH_Mesh MakeBoundaryMesh(in SMESH_IDSource elements,
992 in Bnd_Dimension dimension,
995 in boolean toCopyElements,
996 in boolean toCopyExistingBondary,
997 out SMESH_Group group);
999 * \brief Creates missing boundary elements around either the whole mesh or
1000 * groups of 2D elements
1001 * \param dimension - defines type of boundary elements to create
1002 * \param groupName - a name of group to store all boundary elements in,
1003 * "" means not to create the group
1004 * \param meshName - a name of a new mesh, which is a copy of the initial
1005 * mesh + created boundary elements; "" means not to create the new mesh
1006 * \param toCopyAll - if true, the whole initial mesh will be copied into
1007 * the new mesh else only boundary elements will be copied into the new mesh
1008 * \param groups - optional groups of 2D elements to make boundary around
1009 * \param mesh - returns the mesh where elements were added to
1010 * \param group - returns the created group, if any
1011 * \retval long - number of added boundary elements
1013 long MakeBoundaryElements(in Bnd_Dimension dimension,
1014 in string groupName,
1016 in boolean toCopyAll,
1017 in ListOfIDSources groups,
1018 out SMESH_Mesh mesh,
1019 out SMESH_Group group) raises (SALOME::SALOME_Exception);
1022 * \brief Double nodes on shared faces between groups of volumes and create flat elements on demand.
1023 * Flat elements are mainly used by some types of mechanic calculations.
1025 * The list of groups must describe a partition of the mesh volumes.
1026 * The nodes of the internal faces at the boundaries of the groups are doubled.
1027 * In option, the internal faces are replaced by flat elements.
1028 * Triangles are transformed in prisms, and quadrangles in hexahedrons.
1029 * \param theDomains - list of groups of volumes
1030 * \param createJointElems - if TRUE, create the elements
1031 * \return TRUE if operation has been completed successfully, FALSE otherwise
1033 boolean DoubleNodesOnGroupBoundaries( in ListOfGroups theDomains,
1034 in boolean createJointElems );
1037 * \brief Double nodes on some external faces and create flat elements.
1038 * Flat elements are mainly used by some types of mechanic calculations.
1040 * Each group of the list must be constituted of faces.
1041 * Triangles are transformed in prisms, and quadrangles in hexahedrons.
1042 * \param theGroupsOfFaces - list of groups of faces
1043 * \return TRUE if operation has been completed successfully, FALSE otherwise
1045 boolean CreateFlatElementsOnFacesGroups( in ListOfGroups theGroupsOfFaces );