1 // Copyright (C) 2007-2015 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, or (at your option) any later version.
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"
28 #include "SMESH_Gen.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;
39 interface SMESH_MeshEditor
42 * Returns a mesh subject to edition
47 * Return data of mesh edition preview which is computed provided
48 * that the editor was obtained through SMESH_Mesh::GetMeshEditPreviewer()
50 MeshPreviewStruct GetPreviewData() raises (SALOME::SALOME_Exception);
53 * If during last operation of MeshEditor some nodes were
54 * created, this method returns list of their IDs, if new nodes
55 * not created - returns empty list
57 long_array GetLastCreatedNodes() raises (SALOME::SALOME_Exception);
60 * If during last operation of MeshEditor some elements were
61 * created, this method returns list of their IDs, if new elements
62 * not created - returns empty list
64 long_array GetLastCreatedElems() raises (SALOME::SALOME_Exception);
67 * \brief Clears sequences of last created elements and nodes
69 void ClearLastCreated() raises (SALOME::SALOME_Exception);
72 * \brief Returns description of an error/warning occured during the last operation
74 ComputeError GetLastError() raises (SALOME::SALOME_Exception);
77 * \brief Wrap a sequence of ids in a SMESH_IDSource
78 * \param IDsOfElements list of mesh elements identifiers
79 * \return new ID source object
81 SMESH_IDSource MakeIDSource(in long_array IDsOfElements, in ElementType type);
84 * \brief Remove mesh elements specified by their identifiers.
85 * \param IDsOfElements list of mesh elements identifiers
86 * \return \c true if elements are correctly removed or \c false otherwise
88 boolean RemoveElements(in long_array IDsOfElements) raises (SALOME::SALOME_Exception);
91 * \brief Remove mesh nodes specified by their identifiers.
92 * \param IDsOfNodes list of mesh nodes identifiers
93 * \return \c true if nodes are correctly removed or \c false otherwise
95 boolean RemoveNodes(in long_array IDsOfNodes) raises (SALOME::SALOME_Exception);
98 * \brief Remove all orphan nodes.
99 * \return number of removed nodes
101 long RemoveOrphanNodes() raises (SALOME::SALOME_Exception);
104 * \brief Add a new node.
105 * \param x X coordinate of new node
106 * \param y Y coordinate of new node
107 * \param z Z coordinate of new node
108 * \return integer identifier of new node
110 long AddNode(in double x, in double y, in double z) raises (SALOME::SALOME_Exception);
113 * Create a 0D element on the given node.
114 * \param IdOfNode Node IDs for creation of element.
116 long Add0DElement(in long IDOfNode) raises (SALOME::SALOME_Exception);
119 * Create a ball element on the given node.
120 * \param IdOfNode Node IDs for creation of element.
122 long AddBall(in long IDOfNode, in double diameter) raises (SALOME::SALOME_Exception);
125 * Create an edge, either linear and quadratic (this is determed
126 * by number of given nodes, two or three).
127 * \param IdsOfNodes List of node IDs for creation of element.
128 * Needed order of nodes in this list corresponds to description
129 * of MED. This description is located by the following link:
130 * http://www.salome-platform.org/salome2/web_med_internet/logiciels/medV2.2.2_doc_html/html/modele_de_donnees.html#3.
132 long AddEdge(in long_array IDsOfNodes) raises (SALOME::SALOME_Exception);
135 * Create face, either linear and quadratic (this is determed
136 * by number of given nodes).
137 * \param IdsOfNodes List of node IDs for creation of element.
138 * Needed order of nodes in this list corresponds to description
139 * of MED. This description is located by the following link:
140 * http://www.salome-platform.org/salome2/web_med_internet/logiciels/medV2.2.2_doc_html/html/modele_de_donnees.html#3.
142 long AddFace(in long_array IDsOfNodes) raises (SALOME::SALOME_Exception);
144 long AddPolygonalFace(in long_array IdsOfNodes) raises (SALOME::SALOME_Exception);
147 * Create a quadratic polygonal face
148 * \param IdsOfNodes - nodes of the polygon; corner nodes follow first
149 * \return long - ID of a new polygon
151 long AddQuadPolygonalFace(in long_array IdsOfNodes) raises (SALOME::SALOME_Exception);
154 * Create volume, either linear and quadratic (this is determed
155 * by number of given nodes).
156 * \param IdsOfNodes List of node IDs for creation of element.
157 * Needed order of nodes in this list corresponds to description
158 * of MED. This description is located by the following link:
159 * http://www.salome-platform.org/salome2/web_med_internet/logiciels/medV2.2.2_doc_html/html/modele_de_donnees.html#3.
161 long AddVolume(in long_array IDsOfNodes) raises (SALOME::SALOME_Exception);
164 * Create volume of many faces, giving nodes for each face.
165 * \param IdsOfNodes List of node IDs for volume creation face by face.
166 * \param Quantities List of integer values, Quantities[i]
167 * gives quantity of nodes in face number i.
169 long AddPolyhedralVolume (in long_array IdsOfNodes,
170 in long_array Quantities) raises (SALOME::SALOME_Exception);
172 * Create volume of many faces, giving IDs of existing faces.
173 * \param IdsOfFaces List of face IDs for volume creation.
174 * \note The created volume will refer only to nodes
175 * of the given faces, not to the faces itself.
177 long AddPolyhedralVolumeByFaces (in long_array IdsOfFaces) raises (SALOME::SALOME_Exception);
180 * Create 0D elements on all nodes of the given object except those
181 * nodes on which a 0D element already exists.
182 * \param theObject object on whose nodes 0D elements will be created.
183 * \param theGroupName optional name of a group to add 0D elements created
184 * and/or found on nodes of \a theObject.
185 * \return an object (a new group or a temporary SMESH_IDSource) holding
186 * ids of new and/or found 0D elements.
188 SMESH_IDSource Create0DElementsOnAllNodes(in SMESH_IDSource theObject,
189 in string theGroupName)
190 raises (SALOME::SALOME_Exception);
193 * \brief Bind a node to a vertex
194 * \param NodeID - node ID
195 * \param VertexID - vertex ID available through GEOM_Object.GetSubShapeIndices()[0]
197 void SetNodeOnVertex(in long NodeID, in long VertexID)
198 raises (SALOME::SALOME_Exception);
200 * \brief Store node position on an edge
201 * \param NodeID - node ID
202 * \param EdgeID - edge ID available through GEOM_Object.GetSubShapeIndices()[0]
203 * \param paramOnEdge - parameter on edge where the node is located
205 void SetNodeOnEdge(in long NodeID, in long EdgeID, in double paramOnEdge)
206 raises (SALOME::SALOME_Exception);
208 * \brief Store node position on a face
209 * \param NodeID - node ID
210 * \param FaceID - face ID available through GEOM_Object.GetSubShapeIndices()[0]
211 * \param u - U parameter on face where the node is located
212 * \param v - V parameter on face where the node is located
214 void SetNodeOnFace(in long NodeID, in long FaceID, in double u, in double v)
215 raises (SALOME::SALOME_Exception);
217 * \brief Bind a node to a solid
218 * \param NodeID - node ID
219 * \param SolidID - vertex ID available through GEOM_Object.GetSubShapeIndices()[0]
221 void SetNodeInVolume(in long NodeID, in long SolidID)
222 raises (SALOME::SALOME_Exception);
224 * \brief Bind an element to a shape
225 * \param ElementID - element ID
226 * \param ShapeID - shape ID available through GEOM_Object.GetSubShapeIndices()[0]
228 void SetMeshElementOnShape(in long ElementID, in long ShapeID)
229 raises (SALOME::SALOME_Exception);
232 boolean MoveNode(in long NodeID, in double x, in double y, in double z)
233 raises (SALOME::SALOME_Exception);
235 boolean InverseDiag(in long NodeID1, in long NodeID2)
236 raises (SALOME::SALOME_Exception);
238 boolean DeleteDiag(in long NodeID1, in long NodeID2)
239 raises (SALOME::SALOME_Exception);
241 boolean Reorient(in long_array IDsOfElements)
242 raises (SALOME::SALOME_Exception);
244 boolean ReorientObject(in SMESH_IDSource theObject)
245 raises (SALOME::SALOME_Exception);
247 * \brief Reorient faces contained in \a the2Dgroup.
248 * \param the2Dgroup - the mesh or its part to reorient
249 * \param theDirection - desired direction of normal of \a theFace
250 * \param theFace - ID of face whose orientation is checked.
251 * It can be < 1 then \a thePoint is used to find a face.
252 * \param thePoint - is used to find a face if \a theFace < 1.
253 * \return number of reoriented faces.
255 long Reorient2D(in SMESH_IDSource the2Dgroup,
256 in DirStruct theDirection,
258 in PointStruct thePoint) raises (SALOME::SALOME_Exception);
260 * \brief Reorient faces basing on orientation of adjacent volumes.
261 * \param faces - a list of objects containing face to reorient
262 * \param volumes - an object containing volumes.
263 * \param outsideNormal - to orient faces to have their normal
264 * pointing either \a outside or \a inside the adjacent volumes.
265 * \return number of reoriented faces.
267 long Reorient2DBy3D(in ListOfIDSources faces,
268 in SMESH_IDSource volumes,
269 in boolean outsideNormal) raises (SALOME::SALOME_Exception);
272 * \brief Fuse neighbour triangles into quadrangles.
273 * \param IDsOfElements Ids of triangles to be fused.
274 * \param theCriterion Is used to choose a neighbour to fuse with.
275 * \param theMaxAngle Is a max angle between element normals at which fusion
276 * is still performed; theMaxAngle is mesured in radians.
277 * \return \c true in case of success, FALSE otherwise.
279 boolean TriToQuad (in long_array IDsOfElements,
280 in NumericalFunctor Criterion,
281 in double MaxAngle) raises (SALOME::SALOME_Exception);
283 * \brief Fuse neighbour triangles into quadrangles.
285 * Behaves like the above method, taking a list of elements from \a theObject
287 boolean TriToQuadObject (in SMESH_IDSource theObject,
288 in NumericalFunctor Criterion,
289 in double MaxAngle) raises (SALOME::SALOME_Exception);
292 * \brief Split quadrangles into triangles.
293 * \param IDsOfElements Ids of quadrangles to split.
294 * \param theCriterion Is used to choose a diagonal for splitting.
295 * \return TRUE in case of success, FALSE otherwise.
297 boolean QuadToTri (in long_array IDsOfElements,
298 in NumericalFunctor Criterion) raises (SALOME::SALOME_Exception);
300 * \brief Split quadrangles into triangles.
302 * Behaves like the above method, taking a list of elements from \a theObject
304 boolean QuadToTriObject (in SMESH_IDSource theObject,
305 in NumericalFunctor Criterion) raises (SALOME::SALOME_Exception);
307 * \brief Split each of quadrangles into 4 triangles.
308 * \param theQuads Container of quadrangles to split.
310 void QuadTo4Tri (in SMESH_IDSource theQuads) raises (SALOME::SALOME_Exception);
313 * \brief Split quadrangles into triangles.
314 * \param theElems The faces to be splitted.
315 * \param the13Diag Is used to choose a diagonal for splitting.
316 * \return TRUE in case of success, FALSE otherwise.
318 boolean SplitQuad (in long_array IDsOfElements,
319 in boolean Diag13) raises (SALOME::SALOME_Exception);
321 * \brief Split quadrangles into triangles.
323 * Behaves like the above method, taking list of elements from \a theObject
325 boolean SplitQuadObject (in SMESH_IDSource theObject,
326 in boolean Diag13) raises (SALOME::SALOME_Exception);
329 * Find better splitting of the given quadrangle.
330 * \param IDOfQuad ID of the quadrangle to be splitted.
331 * \param Criterion A criterion to choose a diagonal for splitting.
332 * \return 1 if 1-3 diagonal is better, 2 if 2-4
333 * diagonal is better, 0 if error occurs.
335 long BestSplit (in long IDOfQuad,
336 in NumericalFunctor Criterion) raises (SALOME::SALOME_Exception);
339 * \brief Split volumic elements into tetrahedrons
340 * \param elems - elements to split
341 * \param methodFlags - flags passing splitting method:
342 * 1 - split the hexahedron into 5 tetrahedrons
343 * 2 - split the hexahedron into 6 tetrahedrons
344 * 3 - split the hexahedron into 24 tetrahedrons
346 void SplitVolumesIntoTetra(in SMESH_IDSource elems, in short methodFlags)
347 raises (SALOME::SALOME_Exception);
350 * \brief Split hexahedra into triangular prisms
351 * \param elems - elements to split
352 * \param startHexPoint - a point used to find a hexahedron for which \a facetToSplitNormal
353 * gives a normal vector defining facets to split into triangles.
354 * \param facetToSplitNormal - normal used to find a facet of hexahedron
355 * to split into triangles.
356 * \param methodFlags - flags passing splitting method:
357 * 1 - split the hexahedron into 2 prisms
358 * 2 - split the hexahedron into 4 prisms
359 * \param allDomains - if \c False, only hexahedra adjacent to one closest
360 * to \a facetToSplitNormal location are split, else \a facetToSplitNormal
361 * is used to find the facet to split in all domains present in \a elems.
363 void SplitHexahedraIntoPrisms(in SMESH_IDSource elems,
364 in SMESH::PointStruct startHexPoint,
365 in SMESH::DirStruct facetToSplitNormal,
366 in short methodFlags,
367 in boolean allDomains)
368 raises (SALOME::SALOME_Exception);
371 enum Smooth_Method { LAPLACIAN_SMOOTH, CENTROIDAL_SMOOTH };
373 boolean Smooth(in long_array IDsOfElements,
374 in long_array IDsOfFixedNodes,
375 in long MaxNbOfIterations,
376 in double MaxAspectRatio,
377 in Smooth_Method Method) raises (SALOME::SALOME_Exception);
379 boolean SmoothObject(in SMESH_IDSource theObject,
380 in long_array IDsOfFixedNodes,
381 in long MaxNbOfIterations,
382 in double MaxAspectRatio,
383 in Smooth_Method Method) raises (SALOME::SALOME_Exception);
385 boolean SmoothParametric(in long_array IDsOfElements,
386 in long_array IDsOfFixedNodes,
387 in long MaxNbOfIterations,
388 in double MaxAspectRatio,
389 in Smooth_Method Method) raises (SALOME::SALOME_Exception);
391 boolean SmoothParametricObject(in SMESH_IDSource theObject,
392 in long_array IDsOfFixedNodes,
393 in long MaxNbOfIterations,
394 in double MaxAspectRatio,
395 in Smooth_Method Method) raises (SALOME::SALOME_Exception);
397 void ConvertToQuadratic(in boolean theForce3d)
398 raises (SALOME::SALOME_Exception);
399 void ConvertToQuadraticObject(in boolean theForce3d,
400 in SMESH_IDSource theObject)
401 raises (SALOME::SALOME_Exception);
403 boolean ConvertFromQuadratic()
404 raises (SALOME::SALOME_Exception);
405 void ConvertFromQuadraticObject(in SMESH_IDSource theObject)
406 raises (SALOME::SALOME_Exception);
408 void ConvertToBiQuadratic(in boolean theForce3d,
409 in SMESH_IDSource theObject)
410 raises (SALOME::SALOME_Exception);
412 void RenumberNodes() raises (SALOME::SALOME_Exception);
414 void RenumberElements() raises (SALOME::SALOME_Exception);
417 * \brief Generate dim+1 elements by rotation of the object around axis
418 * \param Nodes - nodes to revolve: a list including groups, sub-meshes or a mesh
419 * \param Edges - edges to revolve: a list including groups, sub-meshes or a mesh
420 * \param Faces - faces to revolve: a list including groups, sub-meshes or a mesh
421 * \param Axis - rotation axis
422 * \param AngleInRadians - rotation angle
423 * \param NbOfSteps - number of elements to generate from one element
424 * \param ToMakeGroups - if true, new elements will be included into new groups
425 * corresponding to groups the input elements included in.
426 * \return ListOfGroups - new groups craeted if \a ToMakeGroups is true
428 ListOfGroups RotationSweepObjects(in ListOfIDSources Nodes,
429 in ListOfIDSources Edges,
430 in ListOfIDSources Faces,
432 in double AngleInRadians,
435 in boolean ToMakeGroups)
436 raises (SALOME::SALOME_Exception);
439 * \brief Generate dim+1 elements by extrusion of elements along vector
440 * \param nodes - nodes to extrude: a list including groups, sub-meshes or a mesh
441 * \param edges - edges to extrude: a list including groups, sub-meshes or a mesh
442 * \param faces - faces to extrude: a list including groups, sub-meshes or a mesh
443 * \param stepVector - vector giving direction and distance of an extrusion step
444 * \param nbOfSteps - number of elements to generate from one element
445 * \param toMakeGroups - if true, new elements will be included into new groups
446 * corresponding to groups the input elements included in.
447 * \return ListOfGroups - new groups craeted if \a toMakeGroups is true
449 ListOfGroups ExtrusionSweepObjects(in ListOfIDSources nodes,
450 in ListOfIDSources edges,
451 in ListOfIDSources faces,
452 in DirStruct stepVector,
454 in boolean toMakeGroups)
455 raises (SALOME::SALOME_Exception);
457 /*! Generates new elements by extrusion along the normal to a discretized surface or wire
459 ListOfGroups ExtrusionByNormal(in ListOfIDSources theObjects,
462 in boolean byAverageNormal,
463 in boolean useInputElemsOnly,
464 in boolean makeGroups,
466 raises (SALOME::SALOME_Exception);
469 * Generate new elements by extrusion of theElements
470 * by StepVector by NbOfSteps
471 * \param ExtrFlags set flags for performing extrusion
472 * \param SewTolerance - uses for comparing locations of nodes if flag
473 * EXTRUSION_FLAG_SEW is set
474 * \param ToMakeGroups - if true, new elements will be included into new groups
475 * corresponding to groups the input elements included in.
476 * \return ListOfGroups - new groups craeted if \a ToMakeGroups is true
478 ListOfGroups AdvancedExtrusion(in long_array IDsOfElements,
479 in DirStruct StepVector,
482 in double SewTolerance,
483 in boolean ToMakeGroups)
484 raises (SALOME::SALOME_Exception);
486 enum Extrusion_Error {
491 EXTR_BAD_STARTING_NODE,
492 EXTR_BAD_ANGLES_NUMBER,
493 EXTR_CANT_GET_TANGENT
496 ListOfGroups ExtrusionAlongPathObjects(in ListOfIDSources Nodes,
497 in ListOfIDSources Edges,
498 in ListOfIDSources Faces,
499 in SMESH_IDSource Path,
500 in GEOM::GEOM_Object PathShape,
502 in boolean HasAngles,
503 in double_array Angles,
504 in boolean LinearVariation,
505 in boolean HasRefPoint,
506 in PointStruct RefPoint,
507 in boolean MakeGroups,
508 out Extrusion_Error Error)
509 raises (SALOME::SALOME_Exception);
512 * Compute rotation angles for ExtrusionAlongPath as linear variation
513 * of given angles along path steps
514 * param PathMesh mesh containing a 1D sub-mesh on the edge, along
515 * which proceeds the extrusion
516 * param PathShape is shape(edge); as the mesh can be complex, the edge
517 * is used to define the sub-mesh for the path
519 double_array LinearAnglesVariation(in SMESH_Mesh PathMesh,
520 in GEOM::GEOM_Object PathShape,
521 in double_array Angles);
523 enum MirrorType { POINT, AXIS, PLANE };
525 void Mirror (in long_array IDsOfElements,
526 in AxisStruct Mirror,
529 raises (SALOME::SALOME_Exception);
530 ListOfGroups MirrorMakeGroups (in long_array IDsOfElements,
531 in AxisStruct Mirror,
533 raises (SALOME::SALOME_Exception);
534 SMESH_Mesh MirrorMakeMesh (in long_array IDsOfElements,
535 in AxisStruct Mirror,
537 in boolean CopyGroups,
539 raises (SALOME::SALOME_Exception);
541 void MirrorObject (in SMESH_IDSource theObject,
542 in AxisStruct Mirror,
545 raises (SALOME::SALOME_Exception);
546 ListOfGroups MirrorObjectMakeGroups (in SMESH_IDSource theObject,
547 in AxisStruct Mirror,
549 raises (SALOME::SALOME_Exception);
550 SMESH_Mesh MirrorObjectMakeMesh (in SMESH_IDSource theObject,
551 in AxisStruct Mirror,
553 in boolean CopyGroups,
555 raises (SALOME::SALOME_Exception);
557 void Translate (in long_array IDsOfElements,
560 raises (SALOME::SALOME_Exception);
561 ListOfGroups TranslateMakeGroups (in long_array IDsOfElements,
563 raises (SALOME::SALOME_Exception);
564 SMESH_Mesh TranslateMakeMesh (in long_array IDsOfElements,
566 in boolean CopyGroups,
568 raises (SALOME::SALOME_Exception);
570 void TranslateObject (in SMESH_IDSource theObject,
573 raises (SALOME::SALOME_Exception);
574 ListOfGroups TranslateObjectMakeGroups (in SMESH_IDSource theObject,
576 raises (SALOME::SALOME_Exception);
577 SMESH_Mesh TranslateObjectMakeMesh (in SMESH_IDSource theObject,
579 in boolean CopyGroups,
581 raises (SALOME::SALOME_Exception);
583 void Scale (in SMESH_IDSource theObject,
584 in PointStruct thePoint,
585 in double_array theScaleFact,
587 raises (SALOME::SALOME_Exception);
588 ListOfGroups ScaleMakeGroups (in SMESH_IDSource theObject,
589 in PointStruct thePoint,
590 in double_array theScaleFact)
591 raises (SALOME::SALOME_Exception);
592 SMESH_Mesh ScaleMakeMesh (in SMESH_IDSource theObject,
593 in PointStruct thePoint,
594 in double_array theScaleFact,
595 in boolean CopyGroups,
597 raises (SALOME::SALOME_Exception);
599 void Rotate (in long_array IDsOfElements,
601 in double AngleInRadians,
603 raises (SALOME::SALOME_Exception);
604 ListOfGroups RotateMakeGroups (in long_array IDsOfElements,
606 in double AngleInRadians)
607 raises (SALOME::SALOME_Exception);
608 SMESH_Mesh RotateMakeMesh (in long_array IDsOfElements,
610 in double AngleInRadians,
611 in boolean CopyGroups,
613 raises (SALOME::SALOME_Exception);
615 void RotateObject (in SMESH_IDSource theObject,
617 in double AngleInRadians,
619 raises (SALOME::SALOME_Exception);
620 ListOfGroups RotateObjectMakeGroups (in SMESH_IDSource theObject,
622 in double AngleInRadians)
623 raises (SALOME::SALOME_Exception);
624 SMESH_Mesh RotateObjectMakeMesh (in SMESH_IDSource theObject,
626 in double AngleInRadians,
627 in boolean CopyGroups,
629 raises (SALOME::SALOME_Exception);
631 void FindCoincidentNodes (in double Tolerance,
632 out array_of_long_array GroupsOfNodes)
633 raises (SALOME::SALOME_Exception);
635 void FindCoincidentNodesOnPart (in SMESH_IDSource SubMeshOrGroup,
637 out array_of_long_array GroupsOfNodes)
638 raises (SALOME::SALOME_Exception);
640 void FindCoincidentNodesOnPartBut (in SMESH_IDSource SubMeshOrGroup,
642 out array_of_long_array GroupsOfNodes,
643 in ListOfIDSources ExceptSubMeshOrGroups)
644 raises (SALOME::SALOME_Exception);
646 void MergeNodes (in array_of_long_array GroupsOfNodes)
647 raises (SALOME::SALOME_Exception);
650 * \brief Find elements built on the same nodes.
651 * \param MeshOrSubMeshOrGroup Mesh or SubMesh, or Group of elements for searching.
652 * \return List of groups of equal elements.
654 void FindEqualElements (in SMESH_IDSource MeshOrSubMeshOrGroup,
655 out array_of_long_array GroupsOfElementsID)
656 raises (SALOME::SALOME_Exception);
659 * \brief Merge elements in each given group.
660 * \param GroupsOfElementsID Groups of elements for merging.
662 void MergeElements(in array_of_long_array GroupsOfElementsID)
663 raises (SALOME::SALOME_Exception);
666 * \brief Merge equal elements in the whole mesh.
668 void MergeEqualElements()
669 raises (SALOME::SALOME_Exception);
672 * If the given ID is a valid node ID (nodeID > 0), just move this node, else
673 * move the node closest to the point to point's location and return ID of the node
675 long MoveClosestNodeToPoint(in double x, in double y, in double z, in long nodeID)
676 raises (SALOME::SALOME_Exception);
679 * Return ID of node closest to a given point
681 long FindNodeClosestTo(in double x, in double y, in double z)
682 raises (SALOME::SALOME_Exception);
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)
690 raises (SALOME::SALOME_Exception);
693 * Searching among the given elements, return elements of given type
694 * where the given point is IN or ON.
696 * 'ALL' type means elements of any type excluding nodes and 0D elements
698 long_array FindAmongElementsByPoint(in SMESH_IDSource elements,
699 in double x, in double y, in double z,
701 raises (SALOME::SALOME_Exception);
704 * Return point state in a closed 2D mesh in terms of TopAbs_State enumeration.
705 * TopAbs_UNKNOWN state means that either mesh is wrong or the analysis fails.
707 short GetPointState(in double x, in double y, in double z)
708 raises (SALOME::SALOME_Exception);
712 SEW_BORDER1_NOT_FOUND,
713 SEW_BORDER2_NOT_FOUND,
714 SEW_BOTH_BORDERS_NOT_FOUND,
716 SEW_VOLUMES_TO_SPLIT,
717 // for SewSideElements() only:
718 SEW_DIFF_NB_OF_ELEMENTS,
719 SEW_TOPO_DIFF_SETS_OF_ELEMENTS,
724 Sew_Error SewFreeBorders (in long FirstNodeID1,
725 in long SecondNodeID1,
727 in long FirstNodeID2,
728 in long SecondNodeID2,
730 in boolean CreatePolygons,
731 in boolean CreatePolyedrs)
732 raises (SALOME::SALOME_Exception);
734 Sew_Error SewConformFreeBorders (in long FirstNodeID1,
735 in long SecondNodeID1,
737 in long FirstNodeID2,
738 in long SecondNodeID2)
739 raises (SALOME::SALOME_Exception);
741 Sew_Error SewBorderToSide (in long FirstNodeIDOnFreeBorder,
742 in long SecondNodeIDOnFreeBorder,
743 in long LastNodeIDOnFreeBorder,
744 in long FirstNodeIDOnSide,
745 in long LastNodeIDOnSide,
746 in boolean CreatePolygons,
747 in boolean CreatePolyedrs)
748 raises (SALOME::SALOME_Exception);
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)
756 raises (SALOME::SALOME_Exception);
759 * Set new nodes for given element.
760 * If number of nodes is not corresponded to type of
761 * element - returns false
763 boolean ChangeElemNodes(in long ide, in long_array newIDs)
764 raises (SALOME::SALOME_Exception);
767 * \brief Duplicates given elements, i.e. creates new elements based on the
768 * same nodes as the given ones.
769 * \param theElements - container of elements to duplicate.
770 * \param theGroupName - a name of group to contain the generated elements.
771 * If a group with such a name already exists, the new elements
772 * are added to the existng group, else a new group is created.
773 * If \a theGroupName is empty, new elements are not added
775 * \return a group where the new elements are added. NULL if theGroupName == "".
778 SMESH_Group DoubleElements( in SMESH_IDSource theElements,
779 in string theGroupName )
780 raises (SALOME::SALOME_Exception);
783 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
784 * \param theNodes - identifiers of nodes to be doubled
785 * \param theModifiedElems - identifiers of elements to be updated by the new (doubled)
786 * nodes. If list of element identifiers is empty then nodes are doubled but
787 * they not assigned to elements
788 * \return TRUE if operation has been completed successfully, FALSE otherwise
789 * \sa DoubleNode(), DoubleNodeGroup(), DoubleNodeGroups()
791 boolean DoubleNodes( in long_array theNodes, in long_array theModifiedElems )
792 raises (SALOME::SALOME_Exception);
795 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
796 * This method provided for convenience works as DoubleNodes() described above.
797 * \param theNodeId - identifier of node to be doubled.
798 * \param theModifiedElems - identifiers of elements to be updated.
799 * \return TRUE if operation has been completed successfully, FALSE otherwise
800 * \sa DoubleNodes(), DoubleNodeGroup(), DoubleNodeGroups()
802 boolean DoubleNode( in long theNodeId, in long_array theModifiedElems )
803 raises (SALOME::SALOME_Exception);
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 )
815 raises (SALOME::SALOME_Exception);
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 )
827 raises (SALOME::SALOME_Exception);
830 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
831 * This method provided for convenience works as DoubleNodes() described above.
832 * \param theNodes - list of groups of nodes to be doubled
833 * \param theModifiedElems - list of groups of elements to be updated.
834 * \return TRUE if operation has been completed successfully, FALSE otherwise
835 * \sa DoubleNode(), DoubleNodeGroup(), DoubleNodes()
837 boolean DoubleNodeGroups( in ListOfGroups theNodes,
838 in ListOfGroups theModifiedElems )
839 raises (SALOME::SALOME_Exception);
841 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
842 * Works as DoubleNodeGroups() described above, but returns a new group with
843 * newly created nodes.
844 * \param theNodes - list of groups of nodes to be doubled
845 * \param theModifiedElems - list of groups of elements to be updated.
846 * \return a new group with newly created nodes
847 * \sa DoubleNodeGroups()
849 SMESH_Group DoubleNodeGroupsNew( in ListOfGroups theNodes,
850 in ListOfGroups theModifiedElems )
851 raises (SALOME::SALOME_Exception);
854 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
855 * \param theElems - the list of elements (edges or faces) to be replicated
856 * The nodes for duplication could be found from these elements
857 * \param theNodesNot - list of nodes to NOT replicate
858 * \param theAffectedElems - the list of elements (cells and edges) to which the
859 * replicated nodes should be associated to.
860 * \return TRUE if operation has been completed successfully, FALSE otherwise
861 * \sa DoubleNodeGroup(), DoubleNodeGroups()
863 boolean DoubleNodeElem( in long_array theElems,
864 in long_array theNodesNot,
865 in long_array theAffectedElems )
866 raises (SALOME::SALOME_Exception);
869 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
870 * \param theElems - the list of elements (edges or faces) to be replicated
871 * The nodes for duplication could be found from these elements
872 * \param theNodesNot - list of nodes to NOT replicate
873 * \param theShape - shape to detect affected elements (element which geometric center
874 * located on or inside shape).
875 * The replicated nodes should be associated to affected elements.
876 * \return TRUE if operation has been completed successfully, FALSE otherwise
877 * \sa DoubleNodeGroupInRegion(), DoubleNodeGroupsInRegion()
879 boolean DoubleNodeElemInRegion( in long_array theElems,
880 in long_array theNodesNot,
881 in GEOM::GEOM_Object theShape )
882 raises (SALOME::SALOME_Exception);
885 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
886 * This method provided for convenience works as DoubleNodes() described above.
887 * \param theElems - group of of elements (edges or faces) to be replicated
888 * \param theNodesNot - group of nodes not to replicated
889 * \param theAffectedElems - group of elements to which the replicated nodes
890 * should be associated to.
891 * \return TRUE if operation has been completed successfully, FALSE otherwise
892 * \sa DoubleNodes(), DoubleNodeGroups(), DoubleNodeElemGroupNew()
894 boolean DoubleNodeElemGroup( in SMESH_GroupBase theElems,
895 in SMESH_GroupBase theNodesNot,
896 in SMESH_GroupBase theAffectedElems )
897 raises (SALOME::SALOME_Exception);
899 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
900 * Works as DoubleNodeElemGroup() described above, but returns a new group with
901 * newly created elements.
902 * \param theElems - group of of elements (edges or faces) to be replicated
903 * \param theNodesNot - group of nodes not to replicated
904 * \param theAffectedElems - group of elements to which the replicated nodes
905 * should be associated to.
906 * \return a new group with newly created elements
907 * \sa DoubleNodeElemGroup()
909 SMESH_Group DoubleNodeElemGroupNew( in SMESH_GroupBase theElems,
910 in SMESH_GroupBase theNodesNot,
911 in SMESH_GroupBase theAffectedElems )
912 raises (SALOME::SALOME_Exception);
914 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
915 * Works as DoubleNodeElemGroup() described above, but returns two new groups:
916 * a group of newly created elements and a group of newly created nodes
917 * \param theElems - group of of elements (edges or faces) to be replicated
918 * \param theNodesNot - group of nodes not to replicated
919 * \param theAffectedElems - group of elements to which the replicated nodes
920 * should be associated to.
921 * \param theElemGroupNeeded - to create group of new elements or not
922 * \param theNodeGroupNeeded - to create group of new nodes or not
923 * \return two new groups of newly created elements (1st) and nodes (2nd)
924 * \sa DoubleNodeElemGroup()
926 ListOfGroups DoubleNodeElemGroup2New( in SMESH_GroupBase theElems,
927 in SMESH_GroupBase theNodesNot,
928 in SMESH_GroupBase theAffectedElems,
929 in boolean theElemGroupNeeded,
930 in boolean theNodeGroupNeeded)
931 raises (SALOME::SALOME_Exception);
934 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
935 * This method provided for convenience works as DoubleNodes() described above.
936 * \param theElems - group of elements (edges or faces) to be replicated
937 * \param theNodesNot - group of nodes not to replicated
938 * \param theShape - shape to detect affected elements (element which geometric center
939 * located on or inside shape).
940 * The replicated nodes should be associated to affected elements.
941 * \return TRUE if operation has been completed successfully, FALSE otherwise
942 * \sa DoubleNodesInRegion(), DoubleNodeGroupsInRegion()
944 boolean DoubleNodeElemGroupInRegion( in SMESH_GroupBase theElems,
945 in SMESH_GroupBase theNodesNot,
946 in GEOM::GEOM_Object theShape )
947 raises (SALOME::SALOME_Exception);
950 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
951 * This method provided for convenience works as DoubleNodes() described above.
952 * \param theElems - list of groups of elements (edges or faces) to be replicated
953 * \param theNodesNot - list of groups of nodes not to replicated
954 * \param theAffectedElems - group of elements to which the replicated nodes
955 * should be associated to.
956 * \return TRUE if operation has been completed successfully, FALSE otherwise
957 * \sa DoubleNodeGroup(), DoubleNodes(), DoubleNodeElemGroupsNew()
959 boolean DoubleNodeElemGroups( in ListOfGroups theElems,
960 in ListOfGroups theNodesNot,
961 in ListOfGroups theAffectedElems )
962 raises (SALOME::SALOME_Exception);
964 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
965 * Works as DoubleNodeElemGroups() described above, but returns a new group with
966 * newly created elements.
967 * \param theElems - list of groups of elements (edges or faces) to be replicated
968 * \param theNodesNot - list of groups of nodes not to replicated
969 * \param theAffectedElems - group of elements to which the replicated nodes
970 * should be associated to.
971 * \return a new group with newly created elements
972 * \sa DoubleNodeElemGroups()
974 SMESH_Group DoubleNodeElemGroupsNew( in ListOfGroups theElems,
975 in ListOfGroups theNodesNot,
976 in ListOfGroups theAffectedElems )
977 raises (SALOME::SALOME_Exception);
979 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
980 * Works as DoubleNodeElemGroups() described above, but returns two new groups:
981 * a group of newly created elements and a group of newly created nodes.
982 * \param theElems - list of groups of elements (edges or faces) to be replicated
983 * \param theNodesNot - list of groups of nodes not to replicated
984 * \param theAffectedElems - group of elements to which the replicated nodes
985 * should be associated to.
986 * \param theElemGroupNeeded - to create group of new elements or not
987 * \param theNodeGroupNeeded - to create group of new nodes or not
988 * \return two new groups of newly created elements (1st) and nodes (2nd)
989 * \sa DoubleNodeElemGroups()
991 ListOfGroups DoubleNodeElemGroups2New( in ListOfGroups theElems,
992 in ListOfGroups theNodesNot,
993 in ListOfGroups theAffectedElems,
994 in boolean theElemGroupNeeded,
995 in boolean theNodeGroupNeeded )
996 raises (SALOME::SALOME_Exception);
999 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
1000 * This method provided for convenience works as DoubleNodes() described above.
1001 * \param theElems - list of groups of elements (edges or faces) to be replicated
1002 * \param theNodesNot - list of groups of nodes not to replicated
1003 * \param theShape - shape to detect affected elements (element which geometric center
1004 * located on or inside shape).
1005 * The replicated nodes should be associated to affected elements.
1006 * \return TRUE if operation has been completed successfully, FALSE otherwise
1007 * \sa DoubleNodeGroupInRegion(), DoubleNodesInRegion()
1009 boolean DoubleNodeElemGroupsInRegion( in ListOfGroups theElems,
1010 in ListOfGroups theNodesNot,
1011 in GEOM::GEOM_Object theShape )
1012 raises (SALOME::SALOME_Exception);
1015 * \brief Identify the elements that will be affected by node duplication (actual duplication is not performed).
1016 * This method is the first step of DoubleNodeElemGroupsInRegion.
1017 * \param theElems - list of groups of elements (edges or faces) to be replicated
1018 * \param theNodesNot - list of groups of nodes not to replicated
1019 * \param theShape - shape to detect affected elements (element which geometric center
1020 * located on or inside shape).
1021 * The replicated nodes should be associated to affected elements.
1022 * \return groups of affected elements
1023 * \sa DoubleNodeElemGroupsInRegion()
1025 ListOfGroups AffectedElemGroupsInRegion( in ListOfGroups theElems,
1026 in ListOfGroups theNodesNot,
1027 in GEOM::GEOM_Object theShape )
1028 raises (SALOME::SALOME_Exception);
1031 * \brief Generates skin mesh (containing 2D cells) from 3D mesh
1032 * The created 2D mesh elements based on nodes of free faces of boundary volumes
1033 * \return TRUE if operation has been completed successfully, FALSE otherwise
1035 boolean Make2DMeshFrom3D() raises (SALOME::SALOME_Exception);
1038 * \brief Creates missing boundary elements
1039 * \param elements - elements whose boundary is to be checked
1040 * \param dimension - defines type of boundary elements to create
1041 * BND_1DFROM3D creates mesh edges on all borders of free facets of 3D elements.
1042 * \param groupName - a name of group to store created boundary elements in,
1043 * "" means not to create the group
1044 * \param meshName - a name of new mesh to store created boundary elements in,
1045 * "" means not to create the new mesh
1046 * \param toCopyElements - if true, the checked elements will be copied into the new mesh
1047 * else only boundary elements will be copied into the new mesh
1048 * \param toCopyExistingBondary - if true, not only new but also pre-existing
1049 * boundary elements will be copied into the new mesh
1050 * \param group - returns the create group, if any
1051 * \retval SMESH::SMESH_Mesh - the mesh where elements were added to
1053 SMESH_Mesh MakeBoundaryMesh(in SMESH_IDSource elements,
1054 in Bnd_Dimension dimension,
1055 in string groupName,
1057 in boolean toCopyElements,
1058 in boolean toCopyExistingBondary,
1059 out SMESH_Group group) raises (SALOME::SALOME_Exception);
1061 * \brief Creates missing boundary elements around either the whole mesh or
1062 * groups of 2D elements
1063 * \param dimension - defines type of boundary elements to create
1064 * \param groupName - a name of group to store all boundary elements in,
1065 * "" means not to create the group
1066 * \param meshName - a name of a new mesh, which is a copy of the initial
1067 * mesh + created boundary elements; "" means not to create the new mesh
1068 * \param toCopyAll - if true, the whole initial mesh will be copied into
1069 * the new mesh else only boundary elements will be copied into the new mesh
1070 * \param groups - optional groups of 2D elements to make boundary around
1071 * \param mesh - returns the mesh where elements were added to
1072 * \param group - returns the created group, if any
1073 * \retval long - number of added boundary elements
1075 long MakeBoundaryElements(in Bnd_Dimension dimension,
1076 in string groupName,
1078 in boolean toCopyAll,
1079 in ListOfIDSources groups,
1080 out SMESH_Mesh mesh,
1081 out SMESH_Group group) raises (SALOME::SALOME_Exception);
1084 * \brief Double nodes on shared faces between groups of volumes and create flat elements on demand.
1085 * Flat elements are mainly used by some types of mechanic calculations.
1087 * The list of groups must describe a partition of the mesh volumes.
1088 * The nodes of the internal faces at the boundaries of the groups are doubled.
1089 * In option, the internal faces are replaced by flat elements.
1090 * Triangles are transformed in prisms, and quadrangles in hexahedrons.
1091 * \param theDomains - list of groups of volumes
1092 * \param createJointElems - if TRUE, create the elements
1093 * \param onAllBoundaries - if TRUE, the nodes and elements are also created on
1094 * the boundary between \a theDomains and the rest mesh
1095 * \return TRUE if operation has been completed successfully, FALSE otherwise
1097 boolean DoubleNodesOnGroupBoundaries( in ListOfGroups theDomains,
1098 in boolean createJointElems,
1099 in boolean onAllBoundaries)
1100 raises (SALOME::SALOME_Exception);
1103 * \brief Double nodes on some external faces and create flat elements.
1104 * Flat elements are mainly used by some types of mechanic calculations.
1106 * Each group of the list must be constituted of faces.
1107 * Triangles are transformed in prisms, and quadrangles in hexahedrons.
1108 * \param theGroupsOfFaces - list of groups of faces
1109 * \return TRUE if operation has been completed successfully, FALSE otherwise
1111 boolean CreateFlatElementsOnFacesGroups( in ListOfGroups theGroupsOfFaces )
1112 raises (SALOME::SALOME_Exception);
1115 * \brief identify all the elements around a geom shape, get the faces delimiting the hole
1116 * Build groups of volume to remove, groups of faces to replace on the skin of the object,
1117 * groups of faces to remove insidethe object, (idem edges).
1118 * Build ordered list of nodes at the border of each group of faces to replace (to be used to build a geom subshape)
1120 void CreateHoleSkin(in double radius,
1121 in GEOM::GEOM_Object theShape,
1122 in string groupName,
1123 in double_array theNodesCoords,
1124 out array_of_long_array GroupsOfNodes)
1125 raises (SALOME::SALOME_Exception);