1 // Copyright (C) 2007-2012 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 Genarate dim+1 elements by extrusion of elements along vector
393 * \param IDsOfElements - elements to sweep
394 * \param StepVector - vector giving direction and distance of an extrusion step
395 * \param NbOfSteps - number of elements to generate from one element
397 void ExtrusionSweep0D(in long_array IDsOfElements,
398 in DirStruct StepVector,
401 * \brief Same as previous but additionally create groups of elements
402 * generated from elements belonging to preexisting groups
404 ListOfGroups ExtrusionSweepMakeGroups(in long_array IDsOfElements,
405 in DirStruct StepVector,
408 * \brief Same as previous but elements are nodes
410 ListOfGroups ExtrusionSweepMakeGroups0D(in long_array IDsOfElements,
411 in DirStruct StepVector,
414 * Generate new elements by extrusion of theElements
415 * by StepVector by NbOfSteps
416 * param ExtrFlags set flags for performing extrusion
417 * param SewTolerance - uses for comparing locations of nodes if flag
418 * EXTRUSION_FLAG_SEW is set
420 void AdvancedExtrusion(in long_array IDsOfElements,
421 in DirStruct StepVector,
424 in double SewTolerance);
426 * \brief Same as previous but additionally create groups of elements
427 * generated from elements belonging to preexisting groups
429 ListOfGroups AdvancedExtrusionMakeGroups(in long_array IDsOfElements,
430 in DirStruct StepVector,
433 in double SewTolerance);
435 void ExtrusionSweepObject(in SMESH_IDSource theObject,
436 in DirStruct StepVector,
438 ListOfGroups ExtrusionSweepObjectMakeGroups(in SMESH_IDSource theObject,
439 in DirStruct StepVector,
442 void ExtrusionSweepObject0D(in SMESH_IDSource theObject,
443 in DirStruct StepVector,
445 ListOfGroups ExtrusionSweepObject0DMakeGroups(in SMESH_IDSource theObject,
446 in DirStruct StepVector,
449 void ExtrusionSweepObject1D(in SMESH_IDSource theObject,
450 in DirStruct StepVector,
452 ListOfGroups ExtrusionSweepObject1DMakeGroups(in SMESH_IDSource theObject,
453 in DirStruct StepVector,
456 void ExtrusionSweepObject2D(in SMESH_IDSource theObject,
457 in DirStruct StepVector,
459 ListOfGroups ExtrusionSweepObject2DMakeGroups(in SMESH_IDSource theObject,
460 in DirStruct StepVector,
463 enum Extrusion_Error {
468 EXTR_BAD_STARTING_NODE,
469 EXTR_BAD_ANGLES_NUMBER,
470 EXTR_CANT_GET_TANGENT
473 ListOfGroups ExtrusionAlongPathX(in long_array IDsOfElements,
474 in SMESH_IDSource Path,
476 in boolean HasAngles,
477 in double_array Angles,
478 in boolean LinearVariation,
479 in boolean HasRefPoint,
480 in PointStruct RefPoint,
481 in boolean MakeGroups,
482 in ElementType ElemType,
483 out Extrusion_Error Error);
485 ListOfGroups ExtrusionAlongPathObjX(in SMESH_IDSource theObject,
486 in SMESH_IDSource Path,
488 in boolean HasAngles,
489 in double_array Angles,
490 in boolean LinearVariation,
491 in boolean HasRefPoint,
492 in PointStruct RefPoint,
493 in boolean MakeGroups,
494 in ElementType ElemType,
495 out Extrusion_Error Error);
497 Extrusion_Error ExtrusionAlongPath(in long_array IDsOfElements,
498 in SMESH_Mesh PathMesh,
499 in GEOM::GEOM_Object PathShape,
501 in boolean HasAngles,
502 in double_array Angles,
503 in boolean HasRefPoint,
504 in PointStruct RefPoint);
505 ListOfGroups ExtrusionAlongPathMakeGroups(in long_array IDsOfElements,
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 out Extrusion_Error Error);
515 Extrusion_Error ExtrusionAlongPathObject(in SMESH_IDSource theObject,
516 in SMESH_Mesh PathMesh,
517 in GEOM::GEOM_Object PathShape,
519 in boolean HasAngles,
520 in double_array Angles,
521 in boolean HasRefPoint,
522 in PointStruct RefPoint);
523 ListOfGroups ExtrusionAlongPathObjectMakeGroups(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 out Extrusion_Error Error);
533 Extrusion_Error ExtrusionAlongPathObject1D(in SMESH_IDSource theObject,
534 in SMESH_Mesh PathMesh,
535 in GEOM::GEOM_Object PathShape,
537 in boolean HasAngles,
538 in double_array Angles,
539 in boolean HasRefPoint,
540 in PointStruct RefPoint);
541 ListOfGroups ExtrusionAlongPathObject1DMakeGroups(in SMESH_IDSource theObject,
542 in SMESH_Mesh PathMesh,
543 in GEOM::GEOM_Object PathShape,
545 in boolean HasAngles,
546 in double_array Angles,
547 in boolean HasRefPoint,
548 in PointStruct RefPoint,
549 out Extrusion_Error Error);
551 Extrusion_Error ExtrusionAlongPathObject2D(in SMESH_IDSource theObject,
552 in SMESH_Mesh PathMesh,
553 in GEOM::GEOM_Object PathShape,
555 in boolean HasAngles,
556 in double_array Angles,
557 in boolean HasRefPoint,
558 in PointStruct RefPoint);
559 ListOfGroups ExtrusionAlongPathObject2DMakeGroups(in SMESH_IDSource theObject,
560 in SMESH_Mesh PathMesh,
561 in GEOM::GEOM_Object PathShape,
563 in boolean HasAngles,
564 in double_array Angles,
565 in boolean HasRefPoint,
566 in PointStruct RefPoint,
567 out Extrusion_Error Error);
570 * Compute rotation angles for ExtrusionAlongPath as linear variation
571 * of given angles along path steps
572 * param PathMesh mesh containing a 1D sub-mesh on the edge, along
573 * which proceeds the extrusion
574 * param PathShape is shape(edge); as the mesh can be complex, the edge
575 * is used to define the sub-mesh for the path
577 double_array LinearAnglesVariation(in SMESH_Mesh PathMesh,
578 in GEOM::GEOM_Object PathShape,
579 in double_array Angles);
581 enum MirrorType { POINT, AXIS, PLANE };
583 void Mirror (in long_array IDsOfElements,
584 in AxisStruct Mirror,
587 ListOfGroups MirrorMakeGroups (in long_array IDsOfElements,
588 in AxisStruct Mirror,
590 SMESH_Mesh MirrorMakeMesh (in long_array IDsOfElements,
591 in AxisStruct Mirror,
593 in boolean CopyGroups,
596 void MirrorObject (in SMESH_IDSource theObject,
597 in AxisStruct Mirror,
600 ListOfGroups MirrorObjectMakeGroups (in SMESH_IDSource theObject,
601 in AxisStruct Mirror,
603 SMESH_Mesh MirrorObjectMakeMesh (in SMESH_IDSource theObject,
604 in AxisStruct Mirror,
606 in boolean CopyGroups,
609 void Translate (in long_array IDsOfElements,
612 ListOfGroups TranslateMakeGroups (in long_array IDsOfElements,
613 in DirStruct Vector);
614 SMESH_Mesh TranslateMakeMesh (in long_array IDsOfElements,
616 in boolean CopyGroups,
619 void TranslateObject (in SMESH_IDSource theObject,
622 ListOfGroups TranslateObjectMakeGroups (in SMESH_IDSource theObject,
623 in DirStruct Vector);
624 SMESH_Mesh TranslateObjectMakeMesh (in SMESH_IDSource theObject,
626 in boolean CopyGroups,
629 void Scale (in SMESH_IDSource theObject,
630 in PointStruct thePoint,
631 in double_array theScaleFact,
633 ListOfGroups ScaleMakeGroups (in SMESH_IDSource theObject,
634 in PointStruct thePoint,
635 in double_array theScaleFact);
636 SMESH_Mesh ScaleMakeMesh (in SMESH_IDSource theObject,
637 in PointStruct thePoint,
638 in double_array theScaleFact,
639 in boolean CopyGroups,
642 void Rotate (in long_array IDsOfElements,
644 in double AngleInRadians,
646 ListOfGroups RotateMakeGroups (in long_array IDsOfElements,
648 in double AngleInRadians);
649 SMESH_Mesh RotateMakeMesh (in long_array IDsOfElements,
651 in double AngleInRadians,
652 in boolean CopyGroups,
655 void RotateObject (in SMESH_IDSource theObject,
657 in double AngleInRadians,
659 ListOfGroups RotateObjectMakeGroups (in SMESH_IDSource theObject,
661 in double AngleInRadians);
662 SMESH_Mesh RotateObjectMakeMesh (in SMESH_IDSource theObject,
664 in double AngleInRadians,
665 in boolean CopyGroups,
668 void FindCoincidentNodes (in double Tolerance,
669 out array_of_long_array GroupsOfNodes);
671 void FindCoincidentNodesOnPart (in SMESH_IDSource SubMeshOrGroup,
673 out array_of_long_array GroupsOfNodes);
675 void FindCoincidentNodesOnPartBut (in SMESH_IDSource SubMeshOrGroup,
677 out array_of_long_array GroupsOfNodes,
678 in ListOfIDSources ExceptSubMeshOrGroups);
680 void MergeNodes (in array_of_long_array GroupsOfNodes);
683 * \brief Find elements built on the same nodes.
684 * \param MeshOrSubMeshOrGroup Mesh or SubMesh, or Group of elements for searching.
685 * \return List of groups of equal elements.
687 void FindEqualElements (in SMESH_IDSource MeshOrSubMeshOrGroup,
688 out array_of_long_array GroupsOfElementsID);
691 * \brief Merge elements in each given group.
692 * \param GroupsOfElementsID Groups of elements for merging.
694 void MergeElements(in array_of_long_array GroupsOfElementsID);
697 * \brief Merge equal elements in the whole mesh.
699 void MergeEqualElements();
702 * If the given ID is a valid node ID (nodeID > 0), just move this node, else
703 * move the node closest to the point to point's location and return ID of the node
705 long MoveClosestNodeToPoint(in double x, in double y, in double z, in long nodeID);
708 * Return ID of node closest to a given point
710 long FindNodeClosestTo(in double x, in double y, in double z);
713 * Return elements of given type where the given point is IN or ON.
715 * 'ALL' type means elements of any type excluding nodes and 0D elements
717 long_array FindElementsByPoint(in double x, in double y, in double z, in ElementType type);
720 * Searching among the given elements, return elements of given type
721 * where the given point is IN or ON.
723 * 'ALL' type means elements of any type excluding nodes and 0D elements
725 long_array FindAmongElementsByPoint(in SMESH_IDSource elements,
726 in double x, in double y, in double z,
727 in ElementType type);
730 * Return point state in a closed 2D mesh in terms of TopAbs_State enumeration.
731 * TopAbs_UNKNOWN state means that either mesh is wrong or the analysis fails.
733 short GetPointState(in double x, in double y, in double z);
737 SEW_BORDER1_NOT_FOUND,
738 SEW_BORDER2_NOT_FOUND,
739 SEW_BOTH_BORDERS_NOT_FOUND,
741 SEW_VOLUMES_TO_SPLIT,
742 // for SewSideElements() only:
743 SEW_DIFF_NB_OF_ELEMENTS,
744 SEW_TOPO_DIFF_SETS_OF_ELEMENTS,
749 Sew_Error SewFreeBorders (in long FirstNodeID1,
750 in long SecondNodeID1,
752 in long FirstNodeID2,
753 in long SecondNodeID2,
755 in boolean CreatePolygons,
756 in boolean CreatePolyedrs);
758 Sew_Error SewConformFreeBorders (in long FirstNodeID1,
759 in long SecondNodeID1,
761 in long FirstNodeID2,
762 in long SecondNodeID2);
764 Sew_Error SewBorderToSide (in long FirstNodeIDOnFreeBorder,
765 in long SecondNodeIDOnFreeBorder,
766 in long LastNodeIDOnFreeBorder,
767 in long FirstNodeIDOnSide,
768 in long LastNodeIDOnSide,
769 in boolean CreatePolygons,
770 in boolean CreatePolyedrs);
772 Sew_Error SewSideElements (in long_array IDsOfSide1Elements,
773 in long_array IDsOfSide2Elements,
774 in long NodeID1OfSide1ToMerge,
775 in long NodeID1OfSide2ToMerge,
776 in long NodeID2OfSide1ToMerge,
777 in long NodeID2OfSide2ToMerge);
780 * Set new nodes for given element.
781 * If number of nodes is not corresponded to type of
782 * element - returns false
784 boolean ChangeElemNodes(in long ide, in long_array newIDs);
787 * Return data of mesh edition preview which is computed provided
788 * that the editor was obtained trough SMESH_Mesh::GetMeshEditPreviewer()
790 MeshPreviewStruct GetPreviewData();
793 * If during last operation of MeshEditor some nodes were
794 * created this method returns list of it's IDs, if new nodes
795 * not creared - returns empty list
797 long_array GetLastCreatedNodes();
800 * If during last operation of MeshEditor some elements were
801 * created this method returns list of it's IDs, if new elements
802 * not creared - returns empty list
804 long_array GetLastCreatedElems();
807 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
808 * \param theNodes - identifiers of nodes to be doubled
809 * \param theModifiedElems - identifiers of elements to be updated by the new (doubled)
810 * nodes. If list of element identifiers is empty then nodes are doubled but
811 * they not assigned to elements
812 * \return TRUE if operation has been completed successfully, FALSE otherwise
813 * \sa DoubleNode(), DoubleNodeGroup(), DoubleNodeGroups()
815 boolean DoubleNodes( in long_array theNodes, in long_array theModifiedElems );
818 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
819 * This method provided for convenience works as DoubleNodes() described above.
820 * \param theNodeId - identifier of node to be doubled.
821 * \param theModifiedElems - identifiers of elements to be updated.
822 * \return TRUE if operation has been completed successfully, FALSE otherwise
823 * \sa DoubleNodes(), DoubleNodeGroup(), DoubleNodeGroups()
825 boolean DoubleNode( in long theNodeId, in long_array theModifiedElems );
828 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
829 * This method provided for convenience works as DoubleNodes() described above.
830 * \param theNodes - group of nodes to be doubled.
831 * \param theModifiedElems - group of elements to be updated.
832 * \return TRUE if operation has been completed successfully, FALSE otherwise
833 * \sa DoubleNode(), DoubleNodes(), DoubleNodeGroups(), DoubleNodeGroupNew()
835 boolean DoubleNodeGroup( in SMESH_GroupBase theNodes,
836 in SMESH_GroupBase theModifiedElems );
839 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
840 * Works as DoubleNodeGroup() described above, but returns a new group with
841 * newly created nodes.
842 * \param theNodes - group of nodes to be doubled.
843 * \param theModifiedElems - group of elements to be updated.
844 * \return a new group with newly created nodes
845 * \sa DoubleNodeGroup()
847 SMESH_Group DoubleNodeGroupNew( in SMESH_GroupBase theNodes,
848 in SMESH_GroupBase theModifiedElems );
851 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
852 * This method provided for convenience works as DoubleNodes() described above.
853 * \param theNodes - list of groups of nodes to be doubled
854 * \param theModifiedElems - list of groups of elements to be updated.
855 * \return TRUE if operation has been completed successfully, FALSE otherwise
856 * \sa DoubleNode(), DoubleNodeGroup(), DoubleNodes()
858 boolean DoubleNodeGroups( in ListOfGroups theNodes,
859 in ListOfGroups theModifiedElems );
862 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
863 * Works as DoubleNodeGroups() described above, but returns a new group with
864 * newly created nodes.
865 * \param theNodes - list of groups of nodes to be doubled
866 * \param theModifiedElems - list of groups of elements to be updated.
867 * \return a new group with newly created nodes
868 * \sa DoubleNodeGroups()
870 SMESH_Group DoubleNodeGroupsNew( in ListOfGroups theNodes,
871 in ListOfGroups theModifiedElems );
874 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
875 * \param theElems - the list of elements (edges or faces) to be replicated
876 * The nodes for duplication could be found from these elements
877 * \param theNodesNot - list of nodes to NOT replicate
878 * \param theAffectedElems - the list of elements (cells and edges) to which the
879 * replicated nodes should be associated to.
880 * \return TRUE if operation has been completed successfully, FALSE otherwise
881 * \sa DoubleNodeGroup(), DoubleNodeGroups()
883 boolean DoubleNodeElem( in long_array theElems,
884 in long_array theNodesNot,
885 in long_array theAffectedElems );
888 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
889 * \param theElems - the list of elements (edges or faces) to be replicated
890 * The nodes for duplication could be found from these elements
891 * \param theNodesNot - list of nodes to NOT replicate
892 * \param theShape - shape to detect affected elements (element which geometric center
893 * located on or inside shape).
894 * The replicated nodes should be associated to affected elements.
895 * \return TRUE if operation has been completed successfully, FALSE otherwise
896 * \sa DoubleNodeGroupInRegion(), DoubleNodeGroupsInRegion()
898 boolean DoubleNodeElemInRegion( in long_array theElems,
899 in long_array theNodesNot,
900 in GEOM::GEOM_Object theShape );
903 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
904 * This method provided for convenience works as DoubleNodes() described above.
905 * \param theElems - group of of elements (edges or faces) to be replicated
906 * \param theNodesNot - group of nodes not to replicated
907 * \param theAffectedElems - group of elements to which the replicated nodes
908 * should be associated to.
909 * \return TRUE if operation has been completed successfully, FALSE otherwise
910 * \sa DoubleNodes(), DoubleNodeGroups(), DoubleNodeElemGroupNew()
912 boolean DoubleNodeElemGroup( in SMESH_GroupBase theElems,
913 in SMESH_GroupBase theNodesNot,
914 in SMESH_GroupBase theAffectedElems );
917 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
918 * Works as DoubleNodeElemGroup() described above, but returns a new group with
919 * newly created elements.
920 * \param theElems - group of of elements (edges or faces) to be replicated
921 * \param theNodesNot - group of nodes not to replicated
922 * \param theAffectedElems - group of elements to which the replicated nodes
923 * should be associated to.
924 * \return a new group with newly created elements
925 * \sa DoubleNodeElemGroup()
927 SMESH_Group DoubleNodeElemGroupNew( in SMESH_GroupBase theElems,
928 in SMESH_GroupBase theNodesNot,
929 in SMESH_GroupBase theAffectedElems );
932 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
933 * This method provided for convenience works as DoubleNodes() described above.
934 * \param theElems - group of elements (edges or faces) to be replicated
935 * \param theNodesNot - group of nodes not to replicated
936 * \param theShape - shape to detect affected elements (element which geometric center
937 * located on or inside shape).
938 * The replicated nodes should be associated to affected elements.
939 * \return TRUE if operation has been completed successfully, FALSE otherwise
940 * \sa DoubleNodesInRegion(), DoubleNodeGroupsInRegion()
942 boolean DoubleNodeElemGroupInRegion( in SMESH_GroupBase theElems,
943 in SMESH_GroupBase theNodesNot,
944 in GEOM::GEOM_Object theShape );
947 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
948 * This method provided for convenience works as DoubleNodes() described above.
949 * \param theElems - list of groups of elements (edges or faces) to be replicated
950 * \param theNodesNot - list of groups of nodes not to replicated
951 * \param theAffectedElems - group of elements to which the replicated nodes
952 * should be associated to.
953 * \return TRUE if operation has been completed successfully, FALSE otherwise
954 * \sa DoubleNodeGroup(), DoubleNodes(), DoubleNodeElemGroupsNew()
956 boolean DoubleNodeElemGroups( in ListOfGroups theElems,
957 in ListOfGroups theNodesNot,
958 in ListOfGroups theAffectedElems );
961 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
962 * Works as DoubleNodeElemGroups() described above, but returns a new group with
963 * newly created elements.
964 * \param theElems - list of groups of elements (edges or faces) to be replicated
965 * \param theNodesNot - list of groups of nodes not to replicated
966 * \param theAffectedElems - group of elements to which the replicated nodes
967 * should be associated to.
968 * \return a new group with newly created elements
969 * \sa DoubleNodeElemGroups()
971 SMESH_Group DoubleNodeElemGroupsNew( in ListOfGroups theElems,
972 in ListOfGroups theNodesNot,
973 in ListOfGroups theAffectedElems );
976 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
977 * This method provided for convenience works as DoubleNodes() described above.
978 * \param theElems - list of groups of elements (edges or faces) to be replicated
979 * \param theNodesNot - list of groups of nodes not to replicated
980 * \param theShape - shape to detect affected elements (element which geometric center
981 * located on or inside shape).
982 * The replicated nodes should be associated to affected elements.
983 * \return TRUE if operation has been completed successfully, FALSE otherwise
984 * \sa DoubleNodeGroupInRegion(), DoubleNodesInRegion()
986 boolean DoubleNodeElemGroupsInRegion( in ListOfGroups theElems,
987 in ListOfGroups theNodesNot,
988 in GEOM::GEOM_Object theShape );
991 * \brief Generates skin mesh (containing 2D cells) from 3D mesh
992 * The created 2D mesh elements based on nodes of free faces of boundary volumes
993 * \return TRUE if operation has been completed successfully, FALSE otherwise
995 boolean Make2DMeshFrom3D();
998 * \brief Creates missing boundary elements
999 * \param elements - elements whose boundary is to be checked
1000 * \param dimension - defines type of boundary elements to create
1001 * BND_1DFROM3D creates mesh edges on all borders of free facets of 3D elements.
1002 * \param groupName - a name of group to store created boundary elements in,
1003 * "" means not to create the group
1004 * \param meshName - a name of new mesh to store created boundary elements in,
1005 * "" means not to create the new mesh
1006 * \param toCopyElements - if true, the checked elements will be copied into the new mesh
1007 * else only boundary elements will be copied into the new mesh
1008 * \param toCopyExistingBondary - if true, not only new but also pre-existing
1009 * boundary elements will be copied into the new mesh
1010 * \param group - returns the create group, if any
1011 * \retval SMESH::SMESH_Mesh - the mesh where elements were added to
1013 SMESH_Mesh MakeBoundaryMesh(in SMESH_IDSource elements,
1014 in Bnd_Dimension dimension,
1015 in string groupName,
1017 in boolean toCopyElements,
1018 in boolean toCopyExistingBondary,
1019 out SMESH_Group group);
1021 * \brief Creates missing boundary elements around either the whole mesh or
1022 * groups of 2D elements
1023 * \param dimension - defines type of boundary elements to create
1024 * \param groupName - a name of group to store all boundary elements in,
1025 * "" means not to create the group
1026 * \param meshName - a name of a new mesh, which is a copy of the initial
1027 * mesh + created boundary elements; "" means not to create the new mesh
1028 * \param toCopyAll - if true, the whole initial mesh will be copied into
1029 * the new mesh else only boundary elements will be copied into the new mesh
1030 * \param groups - optional groups of 2D elements to make boundary around
1031 * \param mesh - returns the mesh where elements were added to
1032 * \param group - returns the created group, if any
1033 * \retval long - number of added boundary elements
1035 long MakeBoundaryElements(in Bnd_Dimension dimension,
1036 in string groupName,
1038 in boolean toCopyAll,
1039 in ListOfIDSources groups,
1040 out SMESH_Mesh mesh,
1041 out SMESH_Group group) raises (SALOME::SALOME_Exception);
1044 * \brief Double nodes on shared faces between groups of volumes and create flat elements on demand.
1045 * Flat elements are mainly used by some types of mechanic calculations.
1047 * The list of groups must describe a partition of the mesh volumes.
1048 * The nodes of the internal faces at the boundaries of the groups are doubled.
1049 * In option, the internal faces are replaced by flat elements.
1050 * Triangles are transformed in prisms, and quadrangles in hexahedrons.
1051 * \param theDomains - list of groups of volumes
1052 * \param createJointElems - if TRUE, create the elements
1053 * \return TRUE if operation has been completed successfully, FALSE otherwise
1055 boolean DoubleNodesOnGroupBoundaries( in ListOfGroups theDomains,
1056 in boolean createJointElems )
1057 raises (SALOME::SALOME_Exception);
1060 * \brief Double nodes on some external faces and create flat elements.
1061 * Flat elements are mainly used by some types of mechanic calculations.
1063 * Each group of the list must be constituted of faces.
1064 * Triangles are transformed in prisms, and quadrangles in hexahedrons.
1065 * \param theGroupsOfFaces - list of groups of faces
1066 * \return TRUE if operation has been completed successfully, FALSE otherwise
1068 boolean CreateFlatElementsOnFacesGroups( in ListOfGroups theGroupsOfFaces );