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 * \brief Split bi-quadratic elements into linear ones without creation of additional nodes.
372 * - bi-quadratic triangle will be split into 3 linear quadrangles;
373 * - bi-quadratic quadrangle will be split into 4 linear quadrangles;
374 * - tri-quadratic hexahedron will be split into 8 linear hexahedra;
375 * Quadratic elements of lower dimension adjacent to the split bi-quadratic element
376 * will be split in order to keep the mesh conformal.
377 * \param elems - elements to split
379 void SplitBiQuadraticIntoLinear(in ListOfIDSources elems)
380 raises (SALOME::SALOME_Exception);
383 enum Smooth_Method { LAPLACIAN_SMOOTH, CENTROIDAL_SMOOTH };
385 boolean Smooth(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 SmoothObject(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 boolean SmoothParametric(in long_array IDsOfElements,
398 in long_array IDsOfFixedNodes,
399 in long MaxNbOfIterations,
400 in double MaxAspectRatio,
401 in Smooth_Method Method) raises (SALOME::SALOME_Exception);
403 boolean SmoothParametricObject(in SMESH_IDSource theObject,
404 in long_array IDsOfFixedNodes,
405 in long MaxNbOfIterations,
406 in double MaxAspectRatio,
407 in Smooth_Method Method) raises (SALOME::SALOME_Exception);
409 void ConvertToQuadratic(in boolean theForce3d)
410 raises (SALOME::SALOME_Exception);
411 void ConvertToQuadraticObject(in boolean theForce3d,
412 in SMESH_IDSource theObject)
413 raises (SALOME::SALOME_Exception);
415 boolean ConvertFromQuadratic()
416 raises (SALOME::SALOME_Exception);
417 void ConvertFromQuadraticObject(in SMESH_IDSource theObject)
418 raises (SALOME::SALOME_Exception);
420 void ConvertToBiQuadratic(in boolean theForce3d,
421 in SMESH_IDSource theObject)
422 raises (SALOME::SALOME_Exception);
424 void RenumberNodes() raises (SALOME::SALOME_Exception);
426 void RenumberElements() raises (SALOME::SALOME_Exception);
429 * \brief Generate dim+1 elements by rotation of the object around axis
430 * \param Nodes - nodes to revolve: a list including groups, sub-meshes or a mesh
431 * \param Edges - edges to revolve: a list including groups, sub-meshes or a mesh
432 * \param Faces - faces to revolve: a list including groups, sub-meshes or a mesh
433 * \param Axis - rotation axis
434 * \param AngleInRadians - rotation angle
435 * \param NbOfSteps - number of elements to generate from one element
436 * \param ToMakeGroups - if true, new elements will be included into new groups
437 * corresponding to groups the input elements included in.
438 * \return ListOfGroups - new groups craeted if \a ToMakeGroups is true
440 ListOfGroups RotationSweepObjects(in ListOfIDSources Nodes,
441 in ListOfIDSources Edges,
442 in ListOfIDSources Faces,
444 in double AngleInRadians,
447 in boolean ToMakeGroups)
448 raises (SALOME::SALOME_Exception);
451 * \brief Generate dim+1 elements by extrusion of elements along vector
452 * \param nodes - nodes to extrude: a list including groups, sub-meshes or a mesh
453 * \param edges - edges to extrude: a list including groups, sub-meshes or a mesh
454 * \param faces - faces to extrude: a list including groups, sub-meshes or a mesh
455 * \param stepVector - vector giving direction and distance of an extrusion step
456 * \param nbOfSteps - number of elements to generate from one element
457 * \param toMakeGroups - if true, new elements will be included into new groups
458 * corresponding to groups the input elements included in.
459 * \return ListOfGroups - new groups craeted if \a toMakeGroups is true
461 ListOfGroups ExtrusionSweepObjects(in ListOfIDSources nodes,
462 in ListOfIDSources edges,
463 in ListOfIDSources faces,
464 in DirStruct stepVector,
466 in boolean toMakeGroups)
467 raises (SALOME::SALOME_Exception);
469 /*! Generates new elements by extrusion along the normal to a discretized surface or wire
471 ListOfGroups ExtrusionByNormal(in ListOfIDSources theObjects,
474 in boolean byAverageNormal,
475 in boolean useInputElemsOnly,
476 in boolean makeGroups,
478 raises (SALOME::SALOME_Exception);
481 * Generate new elements by extrusion of theElements
482 * by StepVector by NbOfSteps
483 * \param ExtrFlags set flags for performing extrusion
484 * \param SewTolerance - uses for comparing locations of nodes if flag
485 * EXTRUSION_FLAG_SEW is set
486 * \param ToMakeGroups - if true, new elements will be included into new groups
487 * corresponding to groups the input elements included in.
488 * \return ListOfGroups - new groups craeted if \a ToMakeGroups is true
490 ListOfGroups AdvancedExtrusion(in long_array IDsOfElements,
491 in DirStruct StepVector,
494 in double SewTolerance,
495 in boolean ToMakeGroups)
496 raises (SALOME::SALOME_Exception);
498 enum Extrusion_Error {
503 EXTR_BAD_STARTING_NODE,
504 EXTR_BAD_ANGLES_NUMBER,
505 EXTR_CANT_GET_TANGENT
508 ListOfGroups ExtrusionAlongPathObjects(in ListOfIDSources Nodes,
509 in ListOfIDSources Edges,
510 in ListOfIDSources Faces,
511 in SMESH_IDSource Path,
512 in GEOM::GEOM_Object PathShape,
514 in boolean HasAngles,
515 in double_array Angles,
516 in boolean LinearVariation,
517 in boolean HasRefPoint,
518 in PointStruct RefPoint,
519 in boolean MakeGroups,
520 out Extrusion_Error Error)
521 raises (SALOME::SALOME_Exception);
524 * Compute rotation angles for ExtrusionAlongPath as linear variation
525 * of given angles along path steps
526 * param PathMesh mesh containing a 1D sub-mesh on the edge, along
527 * which proceeds the extrusion
528 * param PathShape is shape(edge); as the mesh can be complex, the edge
529 * is used to define the sub-mesh for the path
531 double_array LinearAnglesVariation(in SMESH_Mesh PathMesh,
532 in GEOM::GEOM_Object PathShape,
533 in double_array Angles);
535 enum MirrorType { POINT, AXIS, PLANE };
537 void Mirror (in long_array IDsOfElements,
538 in AxisStruct Mirror,
541 raises (SALOME::SALOME_Exception);
542 ListOfGroups MirrorMakeGroups (in long_array IDsOfElements,
543 in AxisStruct Mirror,
545 raises (SALOME::SALOME_Exception);
546 SMESH_Mesh MirrorMakeMesh (in long_array IDsOfElements,
547 in AxisStruct Mirror,
549 in boolean CopyGroups,
551 raises (SALOME::SALOME_Exception);
553 void MirrorObject (in SMESH_IDSource theObject,
554 in AxisStruct Mirror,
557 raises (SALOME::SALOME_Exception);
558 ListOfGroups MirrorObjectMakeGroups (in SMESH_IDSource theObject,
559 in AxisStruct Mirror,
561 raises (SALOME::SALOME_Exception);
562 SMESH_Mesh MirrorObjectMakeMesh (in SMESH_IDSource theObject,
563 in AxisStruct Mirror,
565 in boolean CopyGroups,
567 raises (SALOME::SALOME_Exception);
569 void Translate (in long_array IDsOfElements,
572 raises (SALOME::SALOME_Exception);
573 ListOfGroups TranslateMakeGroups (in long_array IDsOfElements,
575 raises (SALOME::SALOME_Exception);
576 SMESH_Mesh TranslateMakeMesh (in long_array IDsOfElements,
578 in boolean CopyGroups,
580 raises (SALOME::SALOME_Exception);
582 void TranslateObject (in SMESH_IDSource theObject,
585 raises (SALOME::SALOME_Exception);
586 ListOfGroups TranslateObjectMakeGroups (in SMESH_IDSource theObject,
588 raises (SALOME::SALOME_Exception);
589 SMESH_Mesh TranslateObjectMakeMesh (in SMESH_IDSource theObject,
591 in boolean CopyGroups,
593 raises (SALOME::SALOME_Exception);
595 void Scale (in SMESH_IDSource theObject,
596 in PointStruct thePoint,
597 in double_array theScaleFact,
599 raises (SALOME::SALOME_Exception);
600 ListOfGroups ScaleMakeGroups (in SMESH_IDSource theObject,
601 in PointStruct thePoint,
602 in double_array theScaleFact)
603 raises (SALOME::SALOME_Exception);
604 SMESH_Mesh ScaleMakeMesh (in SMESH_IDSource theObject,
605 in PointStruct thePoint,
606 in double_array theScaleFact,
607 in boolean CopyGroups,
609 raises (SALOME::SALOME_Exception);
611 void Rotate (in long_array IDsOfElements,
613 in double AngleInRadians,
615 raises (SALOME::SALOME_Exception);
616 ListOfGroups RotateMakeGroups (in long_array IDsOfElements,
618 in double AngleInRadians)
619 raises (SALOME::SALOME_Exception);
620 SMESH_Mesh RotateMakeMesh (in long_array IDsOfElements,
622 in double AngleInRadians,
623 in boolean CopyGroups,
625 raises (SALOME::SALOME_Exception);
627 void RotateObject (in SMESH_IDSource theObject,
629 in double AngleInRadians,
631 raises (SALOME::SALOME_Exception);
632 ListOfGroups RotateObjectMakeGroups (in SMESH_IDSource theObject,
634 in double AngleInRadians)
635 raises (SALOME::SALOME_Exception);
636 SMESH_Mesh RotateObjectMakeMesh (in SMESH_IDSource theObject,
638 in double AngleInRadians,
639 in boolean CopyGroups,
641 raises (SALOME::SALOME_Exception);
643 void FindCoincidentNodes (in double Tolerance,
644 out array_of_long_array GroupsOfNodes,
645 in boolean SeparateCornersAndMedium)
646 raises (SALOME::SALOME_Exception);
648 void FindCoincidentNodesOnPart (in SMESH_IDSource SubMeshOrGroup,
650 out array_of_long_array GroupsOfNodes,
651 in boolean SeparateCornersAndMedium)
652 raises (SALOME::SALOME_Exception);
654 void FindCoincidentNodesOnPartBut (in SMESH_IDSource SubMeshOrGroup,
656 out array_of_long_array GroupsOfNodes,
657 in ListOfIDSources ExceptSubMeshOrGroups,
658 in boolean SeparateCornersAndMedium)
659 raises (SALOME::SALOME_Exception);
661 void MergeNodes (in array_of_long_array GroupsOfNodes)
662 raises (SALOME::SALOME_Exception);
665 * \brief Find elements built on the same nodes.
666 * \param MeshOrSubMeshOrGroup Mesh or SubMesh, or Group of elements for searching.
667 * \return List of groups of equal elements.
669 void FindEqualElements (in SMESH_IDSource MeshOrSubMeshOrGroup,
670 out array_of_long_array GroupsOfElementsID)
671 raises (SALOME::SALOME_Exception);
674 * \brief Merge elements in each given group.
675 * \param GroupsOfElementsID Groups of elements for merging.
677 void MergeElements(in array_of_long_array GroupsOfElementsID)
678 raises (SALOME::SALOME_Exception);
681 * \brief Merge equal elements in the whole mesh.
683 void MergeEqualElements()
684 raises (SALOME::SALOME_Exception);
687 * If the given ID is a valid node ID (nodeID > 0), just move this node, else
688 * move the node closest to the point to point's location and return ID of the node
690 long MoveClosestNodeToPoint(in double x, in double y, in double z, in long nodeID)
691 raises (SALOME::SALOME_Exception);
694 * Return ID of node closest to a given point
696 long FindNodeClosestTo(in double x, in double y, in double z)
697 raises (SALOME::SALOME_Exception);
700 * Return elements of given type where the given point is IN or ON.
702 * 'ALL' type means elements of any type excluding nodes and 0D elements
704 long_array FindElementsByPoint(in double x, in double y, in double z, in ElementType type)
705 raises (SALOME::SALOME_Exception);
708 * Searching among the given elements, return elements of given type
709 * where the given point is IN or ON.
711 * 'ALL' type means elements of any type excluding nodes and 0D elements
713 long_array FindAmongElementsByPoint(in SMESH_IDSource elements,
714 in double x, in double y, in double z,
716 raises (SALOME::SALOME_Exception);
719 * Return point state in a closed 2D mesh in terms of TopAbs_State enumeration.
720 * TopAbs_UNKNOWN state means that either mesh is wrong or the analysis fails.
722 short GetPointState(in double x, in double y, in double z)
723 raises (SALOME::SALOME_Exception);
727 SEW_BORDER1_NOT_FOUND,
728 SEW_BORDER2_NOT_FOUND,
729 SEW_BOTH_BORDERS_NOT_FOUND,
731 SEW_VOLUMES_TO_SPLIT,
732 // for SewSideElements() only:
733 SEW_DIFF_NB_OF_ELEMENTS,
734 SEW_TOPO_DIFF_SETS_OF_ELEMENTS,
739 Sew_Error SewFreeBorders (in long FirstNodeID1,
740 in long SecondNodeID1,
742 in long FirstNodeID2,
743 in long SecondNodeID2,
745 in boolean CreatePolygons,
746 in boolean CreatePolyedrs)
747 raises (SALOME::SALOME_Exception);
749 Sew_Error SewConformFreeBorders (in long FirstNodeID1,
750 in long SecondNodeID1,
752 in long FirstNodeID2,
753 in long SecondNodeID2)
754 raises (SALOME::SALOME_Exception);
756 Sew_Error SewBorderToSide (in long FirstNodeIDOnFreeBorder,
757 in long SecondNodeIDOnFreeBorder,
758 in long LastNodeIDOnFreeBorder,
759 in long FirstNodeIDOnSide,
760 in long LastNodeIDOnSide,
761 in boolean CreatePolygons,
762 in boolean CreatePolyedrs)
763 raises (SALOME::SALOME_Exception);
765 Sew_Error SewSideElements (in long_array IDsOfSide1Elements,
766 in long_array IDsOfSide2Elements,
767 in long NodeID1OfSide1ToMerge,
768 in long NodeID1OfSide2ToMerge,
769 in long NodeID2OfSide1ToMerge,
770 in long NodeID2OfSide2ToMerge)
771 raises (SALOME::SALOME_Exception);
774 * Set new nodes for given element.
775 * If number of nodes is not corresponded to type of
776 * element - returns false
778 boolean ChangeElemNodes(in long ide, in long_array newIDs)
779 raises (SALOME::SALOME_Exception);
782 * \brief Duplicates given elements, i.e. creates new elements based on the
783 * same nodes as the given ones.
784 * \param theElements - container of elements to duplicate.
785 * \param theGroupName - a name of group to contain the generated elements.
786 * If a group with such a name already exists, the new elements
787 * are added to the existng group, else a new group is created.
788 * If \a theGroupName is empty, new elements are not added
790 * \return a group where the new elements are added. NULL if theGroupName == "".
793 SMESH_Group DoubleElements( in SMESH_IDSource theElements,
794 in string theGroupName )
795 raises (SALOME::SALOME_Exception);
798 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
799 * \param theNodes - identifiers of nodes to be doubled
800 * \param theModifiedElems - identifiers of elements to be updated by the new (doubled)
801 * nodes. If list of element identifiers is empty then nodes are doubled but
802 * they not assigned to elements
803 * \return TRUE if operation has been completed successfully, FALSE otherwise
804 * \sa DoubleNode(), DoubleNodeGroup(), DoubleNodeGroups()
806 boolean DoubleNodes( in long_array theNodes, in long_array theModifiedElems )
807 raises (SALOME::SALOME_Exception);
810 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
811 * This method provided for convenience works as DoubleNodes() described above.
812 * \param theNodeId - identifier of node to be doubled.
813 * \param theModifiedElems - identifiers of elements to be updated.
814 * \return TRUE if operation has been completed successfully, FALSE otherwise
815 * \sa DoubleNodes(), DoubleNodeGroup(), DoubleNodeGroups()
817 boolean DoubleNode( in long theNodeId, in long_array theModifiedElems )
818 raises (SALOME::SALOME_Exception);
821 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
822 * This method provided for convenience works as DoubleNodes() described above.
823 * \param theNodes - group of nodes to be doubled.
824 * \param theModifiedElems - group of elements to be updated.
825 * \return TRUE if operation has been completed successfully, FALSE otherwise
826 * \sa DoubleNode(), DoubleNodes(), DoubleNodeGroups(), DoubleNodeGroupNew()
828 boolean DoubleNodeGroup( in SMESH_GroupBase theNodes,
829 in SMESH_GroupBase theModifiedElems )
830 raises (SALOME::SALOME_Exception);
832 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
833 * Works as DoubleNodeGroup() described above, but returns a new group with
834 * newly created nodes.
835 * \param theNodes - group of nodes to be doubled.
836 * \param theModifiedElems - group of elements to be updated.
837 * \return a new group with newly created nodes
838 * \sa DoubleNodeGroup()
840 SMESH_Group DoubleNodeGroupNew( in SMESH_GroupBase theNodes,
841 in SMESH_GroupBase theModifiedElems )
842 raises (SALOME::SALOME_Exception);
845 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
846 * This method provided for convenience works as DoubleNodes() described above.
847 * \param theNodes - list of groups of nodes to be doubled
848 * \param theModifiedElems - list of groups of elements to be updated.
849 * \return TRUE if operation has been completed successfully, FALSE otherwise
850 * \sa DoubleNode(), DoubleNodeGroup(), DoubleNodes()
852 boolean DoubleNodeGroups( in ListOfGroups theNodes,
853 in ListOfGroups theModifiedElems )
854 raises (SALOME::SALOME_Exception);
856 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
857 * Works as DoubleNodeGroups() described above, but returns a new group with
858 * newly created nodes.
859 * \param theNodes - list of groups of nodes to be doubled
860 * \param theModifiedElems - list of groups of elements to be updated.
861 * \return a new group with newly created nodes
862 * \sa DoubleNodeGroups()
864 SMESH_Group DoubleNodeGroupsNew( in ListOfGroups theNodes,
865 in ListOfGroups theModifiedElems )
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 theAffectedElems - the list of elements (cells and edges) to which the
874 * replicated nodes should be associated to.
875 * \return TRUE if operation has been completed successfully, FALSE otherwise
876 * \sa DoubleNodeGroup(), DoubleNodeGroups()
878 boolean DoubleNodeElem( in long_array theElems,
879 in long_array theNodesNot,
880 in long_array theAffectedElems )
881 raises (SALOME::SALOME_Exception);
884 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
885 * \param theElems - the list of elements (edges or faces) to be replicated
886 * The nodes for duplication could be found from these elements
887 * \param theNodesNot - list of nodes to NOT replicate
888 * \param theShape - shape to detect affected elements (element which geometric center
889 * located on or inside shape).
890 * The replicated nodes should be associated to affected elements.
891 * \return TRUE if operation has been completed successfully, FALSE otherwise
892 * \sa DoubleNodeGroupInRegion(), DoubleNodeGroupsInRegion()
894 boolean DoubleNodeElemInRegion( in long_array theElems,
895 in long_array theNodesNot,
896 in GEOM::GEOM_Object theShape )
897 raises (SALOME::SALOME_Exception);
900 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
901 * This method provided for convenience works as DoubleNodes() described above.
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 TRUE if operation has been completed successfully, FALSE otherwise
907 * \sa DoubleNodes(), DoubleNodeGroups(), DoubleNodeElemGroupNew()
909 boolean DoubleNodeElemGroup( 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 a new group with
916 * newly created elements.
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 * \return a new group with newly created elements
922 * \sa DoubleNodeElemGroup()
924 SMESH_Group DoubleNodeElemGroupNew( in SMESH_GroupBase theElems,
925 in SMESH_GroupBase theNodesNot,
926 in SMESH_GroupBase theAffectedElems )
927 raises (SALOME::SALOME_Exception);
929 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
930 * Works as DoubleNodeElemGroup() described above, but returns two new groups:
931 * a group of newly created elements and a group of newly created nodes
932 * \param theElems - group of of elements (edges or faces) to be replicated
933 * \param theNodesNot - group of nodes not to replicated
934 * \param theAffectedElems - group of elements to which the replicated nodes
935 * should be associated to.
936 * \param theElemGroupNeeded - to create group of new elements or not
937 * \param theNodeGroupNeeded - to create group of new nodes or not
938 * \return two new groups of newly created elements (1st) and nodes (2nd)
939 * \sa DoubleNodeElemGroup()
941 ListOfGroups DoubleNodeElemGroup2New( in SMESH_GroupBase theElems,
942 in SMESH_GroupBase theNodesNot,
943 in SMESH_GroupBase theAffectedElems,
944 in boolean theElemGroupNeeded,
945 in boolean theNodeGroupNeeded)
946 raises (SALOME::SALOME_Exception);
949 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
950 * This method provided for convenience works as DoubleNodes() described above.
951 * \param theElems - group of elements (edges or faces) to be replicated
952 * \param theNodesNot - group of nodes not to replicated
953 * \param theShape - shape to detect affected elements (element which geometric center
954 * located on or inside shape).
955 * The replicated nodes should be associated to affected elements.
956 * \return TRUE if operation has been completed successfully, FALSE otherwise
957 * \sa DoubleNodesInRegion(), DoubleNodeGroupsInRegion()
959 boolean DoubleNodeElemGroupInRegion( in SMESH_GroupBase theElems,
960 in SMESH_GroupBase theNodesNot,
961 in GEOM::GEOM_Object theShape )
962 raises (SALOME::SALOME_Exception);
965 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
966 * This method provided for convenience works as DoubleNodes() described above.
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 TRUE if operation has been completed successfully, FALSE otherwise
972 * \sa DoubleNodeGroup(), DoubleNodes(), DoubleNodeElemGroupsNew()
974 boolean DoubleNodeElemGroups( 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 a new group with
981 * newly created elements.
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 * \return a new group with newly created elements
987 * \sa DoubleNodeElemGroups()
989 SMESH_Group DoubleNodeElemGroupsNew( in ListOfGroups theElems,
990 in ListOfGroups theNodesNot,
991 in ListOfGroups theAffectedElems )
992 raises (SALOME::SALOME_Exception);
994 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
995 * Works as DoubleNodeElemGroups() described above, but returns two new groups:
996 * a group of newly created elements and a group of newly created nodes.
997 * \param theElems - list of groups of elements (edges or faces) to be replicated
998 * \param theNodesNot - list of groups of nodes not to replicated
999 * \param theAffectedElems - group of elements to which the replicated nodes
1000 * should be associated to.
1001 * \param theElemGroupNeeded - to create group of new elements or not
1002 * \param theNodeGroupNeeded - to create group of new nodes or not
1003 * \return two new groups of newly created elements (1st) and nodes (2nd)
1004 * \sa DoubleNodeElemGroups()
1006 ListOfGroups DoubleNodeElemGroups2New( in ListOfGroups theElems,
1007 in ListOfGroups theNodesNot,
1008 in ListOfGroups theAffectedElems,
1009 in boolean theElemGroupNeeded,
1010 in boolean theNodeGroupNeeded )
1011 raises (SALOME::SALOME_Exception);
1014 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
1015 * This method provided for convenience works as DoubleNodes() described above.
1016 * \param theElems - list of groups of elements (edges or faces) to be replicated
1017 * \param theNodesNot - list of groups of nodes not to replicated
1018 * \param theShape - shape to detect affected elements (element which geometric center
1019 * located on or inside shape).
1020 * The replicated nodes should be associated to affected elements.
1021 * \return TRUE if operation has been completed successfully, FALSE otherwise
1022 * \sa DoubleNodeGroupInRegion(), DoubleNodesInRegion()
1024 boolean DoubleNodeElemGroupsInRegion( in ListOfGroups theElems,
1025 in ListOfGroups theNodesNot,
1026 in GEOM::GEOM_Object theShape )
1027 raises (SALOME::SALOME_Exception);
1030 * \brief Identify the elements that will be affected by node duplication (actual duplication is not performed).
1031 * This method is the first step of DoubleNodeElemGroupsInRegion.
1032 * \param theElems - list of groups of elements (edges or faces) to be replicated
1033 * \param theNodesNot - list of groups of nodes not to replicated
1034 * \param theShape - shape to detect affected elements (element which geometric center
1035 * located on or inside shape).
1036 * The replicated nodes should be associated to affected elements.
1037 * \return groups of affected elements
1038 * \sa DoubleNodeElemGroupsInRegion()
1040 ListOfGroups AffectedElemGroupsInRegion( in ListOfGroups theElems,
1041 in ListOfGroups theNodesNot,
1042 in GEOM::GEOM_Object theShape )
1043 raises (SALOME::SALOME_Exception);
1046 * \brief Generates skin mesh (containing 2D cells) from 3D mesh
1047 * The created 2D mesh elements based on nodes of free faces of boundary volumes
1048 * \return TRUE if operation has been completed successfully, FALSE otherwise
1050 boolean Make2DMeshFrom3D() raises (SALOME::SALOME_Exception);
1053 * \brief Creates missing boundary elements
1054 * \param elements - elements whose boundary is to be checked
1055 * \param dimension - defines type of boundary elements to create
1056 * BND_1DFROM3D creates mesh edges on all borders of free facets of 3D elements.
1057 * \param groupName - a name of group to store created boundary elements in,
1058 * "" means not to create the group
1059 * \param meshName - a name of new mesh to store created boundary elements in,
1060 * "" means not to create the new mesh
1061 * \param toCopyElements - if true, the checked elements will be copied into the new mesh
1062 * else only boundary elements will be copied into the new mesh
1063 * \param toCopyExistingBondary - if true, not only new but also pre-existing
1064 * boundary elements will be copied into the new mesh
1065 * \param group - returns the create group, if any
1066 * \retval SMESH::SMESH_Mesh - the mesh where elements were added to
1068 SMESH_Mesh MakeBoundaryMesh(in SMESH_IDSource elements,
1069 in Bnd_Dimension dimension,
1070 in string groupName,
1072 in boolean toCopyElements,
1073 in boolean toCopyExistingBondary,
1074 out SMESH_Group group) raises (SALOME::SALOME_Exception);
1076 * \brief Creates missing boundary elements around either the whole mesh or
1077 * groups of 2D elements
1078 * \param dimension - defines type of boundary elements to create
1079 * \param groupName - a name of group to store all boundary elements in,
1080 * "" means not to create the group
1081 * \param meshName - a name of a new mesh, which is a copy of the initial
1082 * mesh + created boundary elements; "" means not to create the new mesh
1083 * \param toCopyAll - if true, the whole initial mesh will be copied into
1084 * the new mesh else only boundary elements will be copied into the new mesh
1085 * \param groups - optional groups of 2D elements to make boundary around
1086 * \param mesh - returns the mesh where elements were added to
1087 * \param group - returns the created group, if any
1088 * \retval long - number of added boundary elements
1090 long MakeBoundaryElements(in Bnd_Dimension dimension,
1091 in string groupName,
1093 in boolean toCopyAll,
1094 in ListOfIDSources groups,
1095 out SMESH_Mesh mesh,
1096 out SMESH_Group group) raises (SALOME::SALOME_Exception);
1099 * \brief Double nodes on shared faces between groups of volumes and create flat elements on demand.
1100 * Flat elements are mainly used by some types of mechanic calculations.
1102 * The list of groups must describe a partition of the mesh volumes.
1103 * The nodes of the internal faces at the boundaries of the groups are doubled.
1104 * In option, the internal faces are replaced by flat elements.
1105 * Triangles are transformed in prisms, and quadrangles in hexahedrons.
1106 * \param theDomains - list of groups of volumes
1107 * \param createJointElems - if TRUE, create the elements
1108 * \param onAllBoundaries - if TRUE, the nodes and elements are also created on
1109 * the boundary between \a theDomains and the rest mesh
1110 * \return TRUE if operation has been completed successfully, FALSE otherwise
1112 boolean DoubleNodesOnGroupBoundaries( in ListOfGroups theDomains,
1113 in boolean createJointElems,
1114 in boolean onAllBoundaries)
1115 raises (SALOME::SALOME_Exception);
1118 * \brief Double nodes on some external faces and create flat elements.
1119 * Flat elements are mainly used by some types of mechanic calculations.
1121 * Each group of the list must be constituted of faces.
1122 * Triangles are transformed in prisms, and quadrangles in hexahedrons.
1123 * \param theGroupsOfFaces - list of groups of faces
1124 * \return TRUE if operation has been completed successfully, FALSE otherwise
1126 boolean CreateFlatElementsOnFacesGroups( in ListOfGroups theGroupsOfFaces )
1127 raises (SALOME::SALOME_Exception);
1130 * \brief identify all the elements around a geom shape, get the faces delimiting the hole
1131 * Build groups of volume to remove, groups of faces to replace on the skin of the object,
1132 * groups of faces to remove insidethe object, (idem edges).
1133 * Build ordered list of nodes at the border of each group of faces to replace (to be used to build a geom subshape)
1135 void CreateHoleSkin(in double radius,
1136 in GEOM::GEOM_Object theShape,
1137 in string groupName,
1138 in double_array theNodesCoords,
1139 out array_of_long_array GroupsOfNodes)
1140 raises (SALOME::SALOME_Exception);