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 * Return data of mesh edition preview which is computed provided
43 * that the editor was obtained through SMESH_Mesh::GetMeshEditPreviewer()
45 MeshPreviewStruct GetPreviewData() raises (SALOME::SALOME_Exception);
48 * If during last operation of MeshEditor some nodes were
49 * created, this method returns list of their IDs, if new nodes
50 * not created - returns empty list
52 long_array GetLastCreatedNodes() raises (SALOME::SALOME_Exception);
55 * If during last operation of MeshEditor some elements were
56 * created, this method returns list of their IDs, if new elements
57 * not created - returns empty list
59 long_array GetLastCreatedElems() raises (SALOME::SALOME_Exception);
62 * \brief Clears sequences of last created elements and nodes
64 void ClearLastCreated() raises (SALOME::SALOME_Exception);
67 * \brief Returns description of an error/warning occured during the last operation
69 ComputeError GetLastError() raises (SALOME::SALOME_Exception);
72 * \brief Wrap a sequence of ids in a SMESH_IDSource
73 * \param IDsOfElements list of mesh elements identifiers
74 * \return new ID source object
76 SMESH_IDSource MakeIDSource(in long_array IDsOfElements, in ElementType type);
79 * \brief Remove mesh elements specified by their identifiers.
80 * \param IDsOfElements list of mesh elements identifiers
81 * \return \c true if elements are correctly removed or \c false otherwise
83 boolean RemoveElements(in long_array IDsOfElements) raises (SALOME::SALOME_Exception);
86 * \brief Remove mesh nodes specified by their identifiers.
87 * \param IDsOfNodes list of mesh nodes identifiers
88 * \return \c true if nodes are correctly removed or \c false otherwise
90 boolean RemoveNodes(in long_array IDsOfNodes) raises (SALOME::SALOME_Exception);
93 * \brief Remove all orphan nodes.
94 * \return number of removed nodes
96 long RemoveOrphanNodes() raises (SALOME::SALOME_Exception);
99 * \brief Add a new node.
100 * \param x X coordinate of new node
101 * \param y Y coordinate of new node
102 * \param z Z coordinate of new node
103 * \return integer identifier of new node
105 long AddNode(in double x, in double y, in double z) raises (SALOME::SALOME_Exception);
108 * Create a 0D element on the given node.
109 * \param IdOfNode Node IDs for creation of element.
111 long Add0DElement(in long IDOfNode) raises (SALOME::SALOME_Exception);
114 * Create a ball element on the given node.
115 * \param IdOfNode Node IDs for creation of element.
117 long AddBall(in long IDOfNode, in double diameter) raises (SALOME::SALOME_Exception);
120 * Create an edge, either linear and quadratic (this is determed
121 * by number of given nodes, two or three).
122 * \param IdsOfNodes List of node IDs for creation of element.
123 * Needed order of nodes in this list corresponds to description
124 * of MED. This description is located by the following link:
125 * http://www.salome-platform.org/salome2/web_med_internet/logiciels/medV2.2.2_doc_html/html/modele_de_donnees.html#3.
127 long AddEdge(in long_array IDsOfNodes) raises (SALOME::SALOME_Exception);
130 * Create face, either linear and quadratic (this is determed
131 * by number of given nodes).
132 * \param IdsOfNodes List of node IDs for creation of element.
133 * Needed order of nodes in this list corresponds to description
134 * of MED. This description is located by the following link:
135 * http://www.salome-platform.org/salome2/web_med_internet/logiciels/medV2.2.2_doc_html/html/modele_de_donnees.html#3.
137 long AddFace(in long_array IDsOfNodes) raises (SALOME::SALOME_Exception);
139 long AddPolygonalFace(in long_array IdsOfNodes) raises (SALOME::SALOME_Exception);
142 * Create volume, either linear and quadratic (this is determed
143 * by number of given nodes).
144 * \param IdsOfNodes List of node IDs for creation of element.
145 * Needed order of nodes in this list corresponds to description
146 * of MED. This description is located by the following link:
147 * http://www.salome-platform.org/salome2/web_med_internet/logiciels/medV2.2.2_doc_html/html/modele_de_donnees.html#3.
149 long AddVolume(in long_array IDsOfNodes) raises (SALOME::SALOME_Exception);
152 * Create volume of many faces, giving nodes for each face.
153 * \param IdsOfNodes List of node IDs for volume creation face by face.
154 * \param Quantities List of integer values, Quantities[i]
155 * gives quantity of nodes in face number i.
157 long AddPolyhedralVolume (in long_array IdsOfNodes,
158 in long_array Quantities) raises (SALOME::SALOME_Exception);
160 * Create volume of many faces, giving IDs of existing faces.
161 * \param IdsOfFaces List of face IDs for volume creation.
162 * \note The created volume will refer only to nodes
163 * of the given faces, not to the faces itself.
165 long AddPolyhedralVolumeByFaces (in long_array IdsOfFaces) raises (SALOME::SALOME_Exception);
168 * Create 0D elements on all nodes of the given object except those
169 * nodes on which a 0D element already exists.
170 * \param theObject object on whose nodes 0D elements will be created.
171 * \param theGroupName optional name of a group to add 0D elements created
172 * and/or found on nodes of \a theObject.
173 * \return an object (a new group or a temporary SMESH_IDSource) holding
174 * ids of new and/or found 0D elements.
176 SMESH_IDSource Create0DElementsOnAllNodes(in SMESH_IDSource theObject,
177 in string theGroupName)
178 raises (SALOME::SALOME_Exception);
181 * \brief Bind a node to a vertex
182 * \param NodeID - node ID
183 * \param VertexID - vertex ID available through GEOM_Object.GetSubShapeIndices()[0]
185 void SetNodeOnVertex(in long NodeID, in long VertexID)
186 raises (SALOME::SALOME_Exception);
188 * \brief Store node position on an edge
189 * \param NodeID - node ID
190 * \param EdgeID - edge ID available through GEOM_Object.GetSubShapeIndices()[0]
191 * \param paramOnEdge - parameter on edge where the node is located
193 void SetNodeOnEdge(in long NodeID, in long EdgeID, in double paramOnEdge)
194 raises (SALOME::SALOME_Exception);
196 * \brief Store node position on a face
197 * \param NodeID - node ID
198 * \param FaceID - face ID available through GEOM_Object.GetSubShapeIndices()[0]
199 * \param u - U parameter on face where the node is located
200 * \param v - V parameter on face where the node is located
202 void SetNodeOnFace(in long NodeID, in long FaceID, in double u, in double v)
203 raises (SALOME::SALOME_Exception);
205 * \brief Bind a node to a solid
206 * \param NodeID - node ID
207 * \param SolidID - vertex ID available through GEOM_Object.GetSubShapeIndices()[0]
209 void SetNodeInVolume(in long NodeID, in long SolidID)
210 raises (SALOME::SALOME_Exception);
212 * \brief Bind an element to a shape
213 * \param ElementID - element ID
214 * \param ShapeID - shape ID available through GEOM_Object.GetSubShapeIndices()[0]
216 void SetMeshElementOnShape(in long ElementID, in long ShapeID)
217 raises (SALOME::SALOME_Exception);
220 boolean MoveNode(in long NodeID, in double x, in double y, in double z)
221 raises (SALOME::SALOME_Exception);
223 boolean InverseDiag(in long NodeID1, in long NodeID2)
224 raises (SALOME::SALOME_Exception);
226 boolean DeleteDiag(in long NodeID1, in long NodeID2)
227 raises (SALOME::SALOME_Exception);
229 boolean Reorient(in long_array IDsOfElements)
230 raises (SALOME::SALOME_Exception);
232 boolean ReorientObject(in SMESH_IDSource theObject)
233 raises (SALOME::SALOME_Exception);
235 * \brief Reorient faces contained in \a the2Dgroup.
236 * \param the2Dgroup - the mesh or its part to reorient
237 * \param theDirection - desired direction of normal of \a theFace
238 * \param theFace - ID of face whose orientation is checked.
239 * It can be < 1 then \a thePoint is used to find a face.
240 * \param thePoint - is used to find a face if \a theFace < 1.
241 * \return number of reoriented faces.
243 long Reorient2D(in SMESH_IDSource the2Dgroup,
244 in DirStruct theDirection,
246 in PointStruct thePoint) raises (SALOME::SALOME_Exception);
248 * \brief Reorient faces basing on orientation of adjacent volumes.
249 * \param faces - a list of objects containing face to reorient
250 * \param volumes - an object containing volumes.
251 * \param outsideNormal - to orient faces to have their normal
252 * pointing either \a outside or \a inside the adjacent volumes.
253 * \return number of reoriented faces.
255 long Reorient2DBy3D(in ListOfIDSources faces,
256 in SMESH_IDSource volumes,
257 in boolean outsideNormal) raises (SALOME::SALOME_Exception);
260 * \brief Fuse neighbour triangles into quadrangles.
261 * \param IDsOfElements Ids of triangles to be fused.
262 * \param theCriterion Is used to choose a neighbour to fuse with.
263 * \param theMaxAngle Is a max angle between element normals at which fusion
264 * is still performed; theMaxAngle is mesured in radians.
265 * \return \c true in case of success, FALSE otherwise.
267 boolean TriToQuad (in long_array IDsOfElements,
268 in NumericalFunctor Criterion,
269 in double MaxAngle) raises (SALOME::SALOME_Exception);
271 * \brief Fuse neighbour triangles into quadrangles.
273 * Behaves like the above method, taking a list of elements from \a theObject
275 boolean TriToQuadObject (in SMESH_IDSource theObject,
276 in NumericalFunctor Criterion,
277 in double MaxAngle) raises (SALOME::SALOME_Exception);
280 * \brief Split quadrangles into triangles.
281 * \param IDsOfElements Ids of quadrangles to split.
282 * \param theCriterion Is used to choose a diagonal for splitting.
283 * \return TRUE in case of success, FALSE otherwise.
285 boolean QuadToTri (in long_array IDsOfElements,
286 in NumericalFunctor Criterion) raises (SALOME::SALOME_Exception);
288 * \brief Split quadrangles into triangles.
290 * Behaves like the above method, taking a list of elements from \a theObject
292 boolean QuadToTriObject (in SMESH_IDSource theObject,
293 in NumericalFunctor Criterion) raises (SALOME::SALOME_Exception);
295 * \brief Split each of quadrangles into 4 triangles.
296 * \param theQuads Container of quadrangles to split.
298 void QuadTo4Tri (in SMESH_IDSource theQuads) raises (SALOME::SALOME_Exception);
301 * \brief Split quadrangles into triangles.
302 * \param theElems The faces to be splitted.
303 * \param the13Diag Is used to choose a diagonal for splitting.
304 * \return TRUE in case of success, FALSE otherwise.
306 boolean SplitQuad (in long_array IDsOfElements,
307 in boolean Diag13) raises (SALOME::SALOME_Exception);
309 * \brief Split quadrangles into triangles.
311 * Behaves like the above method, taking list of elements from \a theObject
313 boolean SplitQuadObject (in SMESH_IDSource theObject,
314 in boolean Diag13) raises (SALOME::SALOME_Exception);
317 * Find better splitting of the given quadrangle.
318 * \param IDOfQuad ID of the quadrangle to be splitted.
319 * \param Criterion A criterion to choose a diagonal for splitting.
320 * \return 1 if 1-3 diagonal is better, 2 if 2-4
321 * diagonal is better, 0 if error occurs.
323 long BestSplit (in long IDOfQuad,
324 in NumericalFunctor Criterion) raises (SALOME::SALOME_Exception);
327 * \brief Split volumic elements into tetrahedrons
328 * \param elems - elements to split
329 * \param methodFlags - flags passing splitting method:
330 * 1 - split the hexahedron into 5 tetrahedrons
331 * 2 - split the hexahedron into 6 tetrahedrons
332 * 3 - split the hexahedron into 24 tetrahedrons
334 void SplitVolumesIntoTetra(in SMESH_IDSource elems, in short methodFlags)
335 raises (SALOME::SALOME_Exception);
338 * \brief Split hexahedra into triangular prisms
339 * \param elems - elements to split
340 * \param startHexPoint - a point used to find a hexahedron for which \a facetToSplitNormal
341 * gives a normal vector defining facets to split into triangles.
342 * \param facetToSplitNormal - normal used to find a facet of hexahedron
343 * to split into triangles.
344 * \param methodFlags - flags passing splitting method:
345 * 1 - split the hexahedron into 2 prisms
346 * 2 - split the hexahedron into 4 prisms
347 * \param allDomains - if \c False, only hexahedra adjacent to one closest
348 * to \a facetToSplitNormal location are split, else \a facetToSplitNormal
349 * is used to find the facet to split in all domains present in \a elems.
351 void SplitHexahedraIntoPrisms(in SMESH_IDSource elems,
352 in SMESH::PointStruct startHexPoint,
353 in SMESH::DirStruct facetToSplitNormal,
354 in short methodFlags,
355 in boolean allDomains)
356 raises (SALOME::SALOME_Exception);
359 enum Smooth_Method { LAPLACIAN_SMOOTH, CENTROIDAL_SMOOTH };
361 boolean Smooth(in long_array IDsOfElements,
362 in long_array IDsOfFixedNodes,
363 in long MaxNbOfIterations,
364 in double MaxAspectRatio,
365 in Smooth_Method Method) raises (SALOME::SALOME_Exception);
367 boolean SmoothObject(in SMESH_IDSource theObject,
368 in long_array IDsOfFixedNodes,
369 in long MaxNbOfIterations,
370 in double MaxAspectRatio,
371 in Smooth_Method Method) raises (SALOME::SALOME_Exception);
373 boolean SmoothParametric(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 SmoothParametricObject(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 void ConvertToQuadratic(in boolean theForce3d)
386 raises (SALOME::SALOME_Exception);
387 void ConvertToQuadraticObject(in boolean theForce3d,
388 in SMESH_IDSource theObject)
389 raises (SALOME::SALOME_Exception);
391 boolean ConvertFromQuadratic()
392 raises (SALOME::SALOME_Exception);
393 void ConvertFromQuadraticObject(in SMESH_IDSource theObject)
394 raises (SALOME::SALOME_Exception);
396 void ConvertToBiQuadratic(in boolean theForce3d,
397 in SMESH_IDSource theObject)
398 raises (SALOME::SALOME_Exception);
400 void RenumberNodes() raises (SALOME::SALOME_Exception);
402 void RenumberElements() raises (SALOME::SALOME_Exception);
405 * \brief Generate dim+1 elements by rotation of the object around axis
406 * \param Nodes - nodes to revolve: a list including groups, sub-meshes or a mesh
407 * \param Edges - edges to revolve: a list including groups, sub-meshes or a mesh
408 * \param Faces - faces to revolve: a list including groups, sub-meshes or a mesh
409 * \param Axis - rotation axis
410 * \param AngleInRadians - rotation angle
411 * \param NbOfSteps - number of elements to generate from one element
412 * \param ToMakeGroups - if true, new elements will be included into new groups
413 * corresponding to groups the input elements included in.
414 * \return ListOfGroups - new groups craeted if \a ToMakeGroups is true
416 ListOfGroups RotationSweepObjects(in ListOfIDSources Nodes,
417 in ListOfIDSources Edges,
418 in ListOfIDSources Faces,
420 in double AngleInRadians,
423 in boolean ToMakeGroups)
424 raises (SALOME::SALOME_Exception);
427 * \brief Generate dim+1 elements by extrusion of elements along vector
428 * \param nodes - nodes to extrude: a list including groups, sub-meshes or a mesh
429 * \param edges - edges to extrude: a list including groups, sub-meshes or a mesh
430 * \param faces - faces to extrude: a list including groups, sub-meshes or a mesh
431 * \param stepVector - vector giving direction and distance of an extrusion step
432 * \param nbOfSteps - number of elements to generate from one element
433 * \param toMakeGroups - if true, new elements will be included into new groups
434 * corresponding to groups the input elements included in.
435 * \return ListOfGroups - new groups craeted if \a toMakeGroups is true
437 ListOfGroups ExtrusionSweepObjects(in ListOfIDSources nodes,
438 in ListOfIDSources edges,
439 in ListOfIDSources faces,
440 in DirStruct stepVector,
442 in boolean toMakeGroups)
443 raises (SALOME::SALOME_Exception);
445 /*! Generates new elements by extrusion along the normal to a discretized surface or wire
447 ListOfGroups ExtrusionByNormal(in ListOfIDSources theObjects,
450 in boolean byAverageNormal,
451 in boolean useInputElemsOnly,
452 in boolean makeGroups,
454 raises (SALOME::SALOME_Exception);
457 * Generate new elements by extrusion of theElements
458 * by StepVector by NbOfSteps
459 * \param ExtrFlags set flags for performing extrusion
460 * \param SewTolerance - uses for comparing locations of nodes if flag
461 * EXTRUSION_FLAG_SEW is set
462 * \param ToMakeGroups - if true, new elements will be included into new groups
463 * corresponding to groups the input elements included in.
464 * \return ListOfGroups - new groups craeted if \a ToMakeGroups is true
466 ListOfGroups AdvancedExtrusion(in long_array IDsOfElements,
467 in DirStruct StepVector,
470 in double SewTolerance,
471 in boolean ToMakeGroups)
472 raises (SALOME::SALOME_Exception);
474 enum Extrusion_Error {
479 EXTR_BAD_STARTING_NODE,
480 EXTR_BAD_ANGLES_NUMBER,
481 EXTR_CANT_GET_TANGENT
484 ListOfGroups ExtrusionAlongPathObjects(in ListOfIDSources Nodes,
485 in ListOfIDSources Edges,
486 in ListOfIDSources Faces,
487 in SMESH_IDSource Path,
488 in GEOM::GEOM_Object PathShape,
490 in boolean HasAngles,
491 in double_array Angles,
492 in boolean LinearVariation,
493 in boolean HasRefPoint,
494 in PointStruct RefPoint,
495 in boolean MakeGroups,
496 out Extrusion_Error Error)
497 raises (SALOME::SALOME_Exception);
500 * Compute rotation angles for ExtrusionAlongPath as linear variation
501 * of given angles along path steps
502 * param PathMesh mesh containing a 1D sub-mesh on the edge, along
503 * which proceeds the extrusion
504 * param PathShape is shape(edge); as the mesh can be complex, the edge
505 * is used to define the sub-mesh for the path
507 double_array LinearAnglesVariation(in SMESH_Mesh PathMesh,
508 in GEOM::GEOM_Object PathShape,
509 in double_array Angles);
511 enum MirrorType { POINT, AXIS, PLANE };
513 void Mirror (in long_array IDsOfElements,
514 in AxisStruct Mirror,
517 raises (SALOME::SALOME_Exception);
518 ListOfGroups MirrorMakeGroups (in long_array IDsOfElements,
519 in AxisStruct Mirror,
521 raises (SALOME::SALOME_Exception);
522 SMESH_Mesh MirrorMakeMesh (in long_array IDsOfElements,
523 in AxisStruct Mirror,
525 in boolean CopyGroups,
527 raises (SALOME::SALOME_Exception);
529 void MirrorObject (in SMESH_IDSource theObject,
530 in AxisStruct Mirror,
533 raises (SALOME::SALOME_Exception);
534 ListOfGroups MirrorObjectMakeGroups (in SMESH_IDSource theObject,
535 in AxisStruct Mirror,
537 raises (SALOME::SALOME_Exception);
538 SMESH_Mesh MirrorObjectMakeMesh (in SMESH_IDSource theObject,
539 in AxisStruct Mirror,
541 in boolean CopyGroups,
543 raises (SALOME::SALOME_Exception);
545 void Translate (in long_array IDsOfElements,
548 raises (SALOME::SALOME_Exception);
549 ListOfGroups TranslateMakeGroups (in long_array IDsOfElements,
551 raises (SALOME::SALOME_Exception);
552 SMESH_Mesh TranslateMakeMesh (in long_array IDsOfElements,
554 in boolean CopyGroups,
556 raises (SALOME::SALOME_Exception);
558 void TranslateObject (in SMESH_IDSource theObject,
561 raises (SALOME::SALOME_Exception);
562 ListOfGroups TranslateObjectMakeGroups (in SMESH_IDSource theObject,
564 raises (SALOME::SALOME_Exception);
565 SMESH_Mesh TranslateObjectMakeMesh (in SMESH_IDSource theObject,
567 in boolean CopyGroups,
569 raises (SALOME::SALOME_Exception);
571 void Scale (in SMESH_IDSource theObject,
572 in PointStruct thePoint,
573 in double_array theScaleFact,
575 raises (SALOME::SALOME_Exception);
576 ListOfGroups ScaleMakeGroups (in SMESH_IDSource theObject,
577 in PointStruct thePoint,
578 in double_array theScaleFact)
579 raises (SALOME::SALOME_Exception);
580 SMESH_Mesh ScaleMakeMesh (in SMESH_IDSource theObject,
581 in PointStruct thePoint,
582 in double_array theScaleFact,
583 in boolean CopyGroups,
585 raises (SALOME::SALOME_Exception);
587 void Rotate (in long_array IDsOfElements,
589 in double AngleInRadians,
591 raises (SALOME::SALOME_Exception);
592 ListOfGroups RotateMakeGroups (in long_array IDsOfElements,
594 in double AngleInRadians)
595 raises (SALOME::SALOME_Exception);
596 SMESH_Mesh RotateMakeMesh (in long_array IDsOfElements,
598 in double AngleInRadians,
599 in boolean CopyGroups,
601 raises (SALOME::SALOME_Exception);
603 void RotateObject (in SMESH_IDSource theObject,
605 in double AngleInRadians,
607 raises (SALOME::SALOME_Exception);
608 ListOfGroups RotateObjectMakeGroups (in SMESH_IDSource theObject,
610 in double AngleInRadians)
611 raises (SALOME::SALOME_Exception);
612 SMESH_Mesh RotateObjectMakeMesh (in SMESH_IDSource theObject,
614 in double AngleInRadians,
615 in boolean CopyGroups,
617 raises (SALOME::SALOME_Exception);
619 void FindCoincidentNodes (in double Tolerance,
620 out array_of_long_array GroupsOfNodes)
621 raises (SALOME::SALOME_Exception);
623 void FindCoincidentNodesOnPart (in SMESH_IDSource SubMeshOrGroup,
625 out array_of_long_array GroupsOfNodes)
626 raises (SALOME::SALOME_Exception);
628 void FindCoincidentNodesOnPartBut (in SMESH_IDSource SubMeshOrGroup,
630 out array_of_long_array GroupsOfNodes,
631 in ListOfIDSources ExceptSubMeshOrGroups)
632 raises (SALOME::SALOME_Exception);
634 void MergeNodes (in array_of_long_array GroupsOfNodes)
635 raises (SALOME::SALOME_Exception);
638 * \brief Find elements built on the same nodes.
639 * \param MeshOrSubMeshOrGroup Mesh or SubMesh, or Group of elements for searching.
640 * \return List of groups of equal elements.
642 void FindEqualElements (in SMESH_IDSource MeshOrSubMeshOrGroup,
643 out array_of_long_array GroupsOfElementsID)
644 raises (SALOME::SALOME_Exception);
647 * \brief Merge elements in each given group.
648 * \param GroupsOfElementsID Groups of elements for merging.
650 void MergeElements(in array_of_long_array GroupsOfElementsID)
651 raises (SALOME::SALOME_Exception);
654 * \brief Merge equal elements in the whole mesh.
656 void MergeEqualElements()
657 raises (SALOME::SALOME_Exception);
660 * If the given ID is a valid node ID (nodeID > 0), just move this node, else
661 * move the node closest to the point to point's location and return ID of the node
663 long MoveClosestNodeToPoint(in double x, in double y, in double z, in long nodeID)
664 raises (SALOME::SALOME_Exception);
667 * Return ID of node closest to a given point
669 long FindNodeClosestTo(in double x, in double y, in double z)
670 raises (SALOME::SALOME_Exception);
673 * Return elements of given type where the given point is IN or ON.
675 * 'ALL' type means elements of any type excluding nodes and 0D elements
677 long_array FindElementsByPoint(in double x, in double y, in double z, in ElementType type)
678 raises (SALOME::SALOME_Exception);
681 * Searching among the given elements, return elements of given type
682 * where the given point is IN or ON.
684 * 'ALL' type means elements of any type excluding nodes and 0D elements
686 long_array FindAmongElementsByPoint(in SMESH_IDSource elements,
687 in double x, in double y, in double z,
689 raises (SALOME::SALOME_Exception);
692 * Return point state in a closed 2D mesh in terms of TopAbs_State enumeration.
693 * TopAbs_UNKNOWN state means that either mesh is wrong or the analysis fails.
695 short GetPointState(in double x, in double y, in double z)
696 raises (SALOME::SALOME_Exception);
700 SEW_BORDER1_NOT_FOUND,
701 SEW_BORDER2_NOT_FOUND,
702 SEW_BOTH_BORDERS_NOT_FOUND,
704 SEW_VOLUMES_TO_SPLIT,
705 // for SewSideElements() only:
706 SEW_DIFF_NB_OF_ELEMENTS,
707 SEW_TOPO_DIFF_SETS_OF_ELEMENTS,
712 Sew_Error SewFreeBorders (in long FirstNodeID1,
713 in long SecondNodeID1,
715 in long FirstNodeID2,
716 in long SecondNodeID2,
718 in boolean CreatePolygons,
719 in boolean CreatePolyedrs)
720 raises (SALOME::SALOME_Exception);
722 Sew_Error SewConformFreeBorders (in long FirstNodeID1,
723 in long SecondNodeID1,
725 in long FirstNodeID2,
726 in long SecondNodeID2)
727 raises (SALOME::SALOME_Exception);
729 Sew_Error SewBorderToSide (in long FirstNodeIDOnFreeBorder,
730 in long SecondNodeIDOnFreeBorder,
731 in long LastNodeIDOnFreeBorder,
732 in long FirstNodeIDOnSide,
733 in long LastNodeIDOnSide,
734 in boolean CreatePolygons,
735 in boolean CreatePolyedrs)
736 raises (SALOME::SALOME_Exception);
738 Sew_Error SewSideElements (in long_array IDsOfSide1Elements,
739 in long_array IDsOfSide2Elements,
740 in long NodeID1OfSide1ToMerge,
741 in long NodeID1OfSide2ToMerge,
742 in long NodeID2OfSide1ToMerge,
743 in long NodeID2OfSide2ToMerge)
744 raises (SALOME::SALOME_Exception);
747 * Set new nodes for given element.
748 * If number of nodes is not corresponded to type of
749 * element - returns false
751 boolean ChangeElemNodes(in long ide, in long_array newIDs)
752 raises (SALOME::SALOME_Exception);
755 * \brief Duplicates given elements, i.e. creates new elements based on the
756 * same nodes as the given ones.
757 * \param theElements - container of elements to duplicate.
758 * \param theGroupName - a name of group to contain the generated elements.
759 * If a group with such a name already exists, the new elements
760 * are added to the existng group, else a new group is created.
761 * If \a theGroupName is empty, new elements are not added
763 * \return a group where the new elements are added. NULL if theGroupName == "".
766 SMESH_Group DoubleElements( in SMESH_IDSource theElements,
767 in string theGroupName )
768 raises (SALOME::SALOME_Exception);
771 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
772 * \param theNodes - identifiers of nodes to be doubled
773 * \param theModifiedElems - identifiers of elements to be updated by the new (doubled)
774 * nodes. If list of element identifiers is empty then nodes are doubled but
775 * they not assigned to elements
776 * \return TRUE if operation has been completed successfully, FALSE otherwise
777 * \sa DoubleNode(), DoubleNodeGroup(), DoubleNodeGroups()
779 boolean DoubleNodes( in long_array theNodes, in long_array theModifiedElems )
780 raises (SALOME::SALOME_Exception);
783 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
784 * This method provided for convenience works as DoubleNodes() described above.
785 * \param theNodeId - identifier of node to be doubled.
786 * \param theModifiedElems - identifiers of elements to be updated.
787 * \return TRUE if operation has been completed successfully, FALSE otherwise
788 * \sa DoubleNodes(), DoubleNodeGroup(), DoubleNodeGroups()
790 boolean DoubleNode( in long theNodeId, in long_array theModifiedElems )
791 raises (SALOME::SALOME_Exception);
794 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
795 * This method provided for convenience works as DoubleNodes() described above.
796 * \param theNodes - group of nodes to be doubled.
797 * \param theModifiedElems - group of elements to be updated.
798 * \return TRUE if operation has been completed successfully, FALSE otherwise
799 * \sa DoubleNode(), DoubleNodes(), DoubleNodeGroups(), DoubleNodeGroupNew()
801 boolean DoubleNodeGroup( in SMESH_GroupBase theNodes,
802 in SMESH_GroupBase theModifiedElems )
803 raises (SALOME::SALOME_Exception);
805 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
806 * Works as DoubleNodeGroup() described above, but returns a new group with
807 * newly created nodes.
808 * \param theNodes - group of nodes to be doubled.
809 * \param theModifiedElems - group of elements to be updated.
810 * \return a new group with newly created nodes
811 * \sa DoubleNodeGroup()
813 SMESH_Group DoubleNodeGroupNew( in SMESH_GroupBase theNodes,
814 in SMESH_GroupBase theModifiedElems )
815 raises (SALOME::SALOME_Exception);
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 theNodes - list of groups of nodes to be doubled
821 * \param theModifiedElems - list of groups of elements to be updated.
822 * \return TRUE if operation has been completed successfully, FALSE otherwise
823 * \sa DoubleNode(), DoubleNodeGroup(), DoubleNodes()
825 boolean DoubleNodeGroups( in ListOfGroups theNodes,
826 in ListOfGroups theModifiedElems )
827 raises (SALOME::SALOME_Exception);
829 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
830 * Works as DoubleNodeGroups() described above, but returns a new group with
831 * newly created nodes.
832 * \param theNodes - list of groups of nodes to be doubled
833 * \param theModifiedElems - list of groups of elements to be updated.
834 * \return a new group with newly created nodes
835 * \sa DoubleNodeGroups()
837 SMESH_Group DoubleNodeGroupsNew( in ListOfGroups theNodes,
838 in ListOfGroups theModifiedElems )
839 raises (SALOME::SALOME_Exception);
842 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
843 * \param theElems - the list of elements (edges or faces) to be replicated
844 * The nodes for duplication could be found from these elements
845 * \param theNodesNot - list of nodes to NOT replicate
846 * \param theAffectedElems - the list of elements (cells and edges) to which the
847 * replicated nodes should be associated to.
848 * \return TRUE if operation has been completed successfully, FALSE otherwise
849 * \sa DoubleNodeGroup(), DoubleNodeGroups()
851 boolean DoubleNodeElem( in long_array theElems,
852 in long_array theNodesNot,
853 in long_array theAffectedElems )
854 raises (SALOME::SALOME_Exception);
857 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
858 * \param theElems - the list of elements (edges or faces) to be replicated
859 * The nodes for duplication could be found from these elements
860 * \param theNodesNot - list of nodes to NOT replicate
861 * \param theShape - shape to detect affected elements (element which geometric center
862 * located on or inside shape).
863 * The replicated nodes should be associated to affected elements.
864 * \return TRUE if operation has been completed successfully, FALSE otherwise
865 * \sa DoubleNodeGroupInRegion(), DoubleNodeGroupsInRegion()
867 boolean DoubleNodeElemInRegion( in long_array theElems,
868 in long_array theNodesNot,
869 in GEOM::GEOM_Object theShape )
870 raises (SALOME::SALOME_Exception);
873 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
874 * This method provided for convenience works as DoubleNodes() described above.
875 * \param theElems - group of of elements (edges or faces) to be replicated
876 * \param theNodesNot - group of nodes not to replicated
877 * \param theAffectedElems - group of elements to which the replicated nodes
878 * should be associated to.
879 * \return TRUE if operation has been completed successfully, FALSE otherwise
880 * \sa DoubleNodes(), DoubleNodeGroups(), DoubleNodeElemGroupNew()
882 boolean DoubleNodeElemGroup( in SMESH_GroupBase theElems,
883 in SMESH_GroupBase theNodesNot,
884 in SMESH_GroupBase theAffectedElems )
885 raises (SALOME::SALOME_Exception);
887 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
888 * Works as DoubleNodeElemGroup() described above, but returns a new group with
889 * newly created elements.
890 * \param theElems - group of of elements (edges or faces) to be replicated
891 * \param theNodesNot - group of nodes not to replicated
892 * \param theAffectedElems - group of elements to which the replicated nodes
893 * should be associated to.
894 * \return a new group with newly created elements
895 * \sa DoubleNodeElemGroup()
897 SMESH_Group DoubleNodeElemGroupNew( in SMESH_GroupBase theElems,
898 in SMESH_GroupBase theNodesNot,
899 in SMESH_GroupBase theAffectedElems )
900 raises (SALOME::SALOME_Exception);
902 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
903 * Works as DoubleNodeElemGroup() described above, but returns two new groups:
904 * a group of newly created elements and a group of newly created nodes
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 * \param theElemGroupNeeded - to create group of new elements or not
910 * \param theNodeGroupNeeded - to create group of new nodes or not
911 * \return two new groups of newly created elements (1st) and nodes (2nd)
912 * \sa DoubleNodeElemGroup()
914 ListOfGroups DoubleNodeElemGroup2New( in SMESH_GroupBase theElems,
915 in SMESH_GroupBase theNodesNot,
916 in SMESH_GroupBase theAffectedElems,
917 in boolean theElemGroupNeeded,
918 in boolean theNodeGroupNeeded)
919 raises (SALOME::SALOME_Exception);
922 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
923 * This method provided for convenience works as DoubleNodes() described above.
924 * \param theElems - group of elements (edges or faces) to be replicated
925 * \param theNodesNot - group of nodes not to replicated
926 * \param theShape - shape to detect affected elements (element which geometric center
927 * located on or inside shape).
928 * The replicated nodes should be associated to affected elements.
929 * \return TRUE if operation has been completed successfully, FALSE otherwise
930 * \sa DoubleNodesInRegion(), DoubleNodeGroupsInRegion()
932 boolean DoubleNodeElemGroupInRegion( in SMESH_GroupBase theElems,
933 in SMESH_GroupBase theNodesNot,
934 in GEOM::GEOM_Object theShape )
935 raises (SALOME::SALOME_Exception);
938 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
939 * This method provided for convenience works as DoubleNodes() described above.
940 * \param theElems - list of groups of elements (edges or faces) to be replicated
941 * \param theNodesNot - list of groups of nodes not to replicated
942 * \param theAffectedElems - group of elements to which the replicated nodes
943 * should be associated to.
944 * \return TRUE if operation has been completed successfully, FALSE otherwise
945 * \sa DoubleNodeGroup(), DoubleNodes(), DoubleNodeElemGroupsNew()
947 boolean DoubleNodeElemGroups( in ListOfGroups theElems,
948 in ListOfGroups theNodesNot,
949 in ListOfGroups theAffectedElems )
950 raises (SALOME::SALOME_Exception);
952 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
953 * Works as DoubleNodeElemGroups() described above, but returns a new group with
954 * newly created elements.
955 * \param theElems - list of groups of elements (edges or faces) to be replicated
956 * \param theNodesNot - list of groups of nodes not to replicated
957 * \param theAffectedElems - group of elements to which the replicated nodes
958 * should be associated to.
959 * \return a new group with newly created elements
960 * \sa DoubleNodeElemGroups()
962 SMESH_Group DoubleNodeElemGroupsNew( in ListOfGroups theElems,
963 in ListOfGroups theNodesNot,
964 in ListOfGroups theAffectedElems )
965 raises (SALOME::SALOME_Exception);
967 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
968 * Works as DoubleNodeElemGroups() described above, but returns two new groups:
969 * a group of newly created elements and a group of newly created nodes.
970 * \param theElems - list of groups of elements (edges or faces) to be replicated
971 * \param theNodesNot - list of groups of nodes not to replicated
972 * \param theAffectedElems - group of elements to which the replicated nodes
973 * should be associated to.
974 * \param theElemGroupNeeded - to create group of new elements or not
975 * \param theNodeGroupNeeded - to create group of new nodes or not
976 * \return two new groups of newly created elements (1st) and nodes (2nd)
977 * \sa DoubleNodeElemGroups()
979 ListOfGroups DoubleNodeElemGroups2New( in ListOfGroups theElems,
980 in ListOfGroups theNodesNot,
981 in ListOfGroups theAffectedElems,
982 in boolean theElemGroupNeeded,
983 in boolean theNodeGroupNeeded )
984 raises (SALOME::SALOME_Exception);
987 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
988 * This method provided for convenience works as DoubleNodes() described above.
989 * \param theElems - list of groups of elements (edges or faces) to be replicated
990 * \param theNodesNot - list of groups of nodes not to replicated
991 * \param theShape - shape to detect affected elements (element which geometric center
992 * located on or inside shape).
993 * The replicated nodes should be associated to affected elements.
994 * \return TRUE if operation has been completed successfully, FALSE otherwise
995 * \sa DoubleNodeGroupInRegion(), DoubleNodesInRegion()
997 boolean DoubleNodeElemGroupsInRegion( in ListOfGroups theElems,
998 in ListOfGroups theNodesNot,
999 in GEOM::GEOM_Object theShape )
1000 raises (SALOME::SALOME_Exception);
1003 * \brief Identify the elements that will be affected by node duplication (actual duplication is not performed).
1004 * This method is the first step of DoubleNodeElemGroupsInRegion.
1005 * \param theElems - list of groups of elements (edges or faces) to be replicated
1006 * \param theNodesNot - list of groups of nodes not to replicated
1007 * \param theShape - shape to detect affected elements (element which geometric center
1008 * located on or inside shape).
1009 * The replicated nodes should be associated to affected elements.
1010 * \return groups of affected elements
1011 * \sa DoubleNodeElemGroupsInRegion()
1013 ListOfGroups AffectedElemGroupsInRegion( in ListOfGroups theElems,
1014 in ListOfGroups theNodesNot,
1015 in GEOM::GEOM_Object theShape )
1016 raises (SALOME::SALOME_Exception);
1019 * \brief Generates skin mesh (containing 2D cells) from 3D mesh
1020 * The created 2D mesh elements based on nodes of free faces of boundary volumes
1021 * \return TRUE if operation has been completed successfully, FALSE otherwise
1023 boolean Make2DMeshFrom3D() raises (SALOME::SALOME_Exception);
1026 * \brief Creates missing boundary elements
1027 * \param elements - elements whose boundary is to be checked
1028 * \param dimension - defines type of boundary elements to create
1029 * BND_1DFROM3D creates mesh edges on all borders of free facets of 3D elements.
1030 * \param groupName - a name of group to store created boundary elements in,
1031 * "" means not to create the group
1032 * \param meshName - a name of new mesh to store created boundary elements in,
1033 * "" means not to create the new mesh
1034 * \param toCopyElements - if true, the checked elements will be copied into the new mesh
1035 * else only boundary elements will be copied into the new mesh
1036 * \param toCopyExistingBondary - if true, not only new but also pre-existing
1037 * boundary elements will be copied into the new mesh
1038 * \param group - returns the create group, if any
1039 * \retval SMESH::SMESH_Mesh - the mesh where elements were added to
1041 SMESH_Mesh MakeBoundaryMesh(in SMESH_IDSource elements,
1042 in Bnd_Dimension dimension,
1043 in string groupName,
1045 in boolean toCopyElements,
1046 in boolean toCopyExistingBondary,
1047 out SMESH_Group group) raises (SALOME::SALOME_Exception);
1049 * \brief Creates missing boundary elements around either the whole mesh or
1050 * groups of 2D elements
1051 * \param dimension - defines type of boundary elements to create
1052 * \param groupName - a name of group to store all boundary elements in,
1053 * "" means not to create the group
1054 * \param meshName - a name of a new mesh, which is a copy of the initial
1055 * mesh + created boundary elements; "" means not to create the new mesh
1056 * \param toCopyAll - if true, the whole initial mesh will be copied into
1057 * the new mesh else only boundary elements will be copied into the new mesh
1058 * \param groups - optional groups of 2D elements to make boundary around
1059 * \param mesh - returns the mesh where elements were added to
1060 * \param group - returns the created group, if any
1061 * \retval long - number of added boundary elements
1063 long MakeBoundaryElements(in Bnd_Dimension dimension,
1064 in string groupName,
1066 in boolean toCopyAll,
1067 in ListOfIDSources groups,
1068 out SMESH_Mesh mesh,
1069 out SMESH_Group group) raises (SALOME::SALOME_Exception);
1072 * \brief Double nodes on shared faces between groups of volumes and create flat elements on demand.
1073 * Flat elements are mainly used by some types of mechanic calculations.
1075 * The list of groups must describe a partition of the mesh volumes.
1076 * The nodes of the internal faces at the boundaries of the groups are doubled.
1077 * In option, the internal faces are replaced by flat elements.
1078 * Triangles are transformed in prisms, and quadrangles in hexahedrons.
1079 * \param theDomains - list of groups of volumes
1080 * \param createJointElems - if TRUE, create the elements
1081 * \param onAllBoundaries - if TRUE, the nodes and elements are also created on
1082 * the boundary between \a theDomains and the rest mesh
1083 * \return TRUE if operation has been completed successfully, FALSE otherwise
1085 boolean DoubleNodesOnGroupBoundaries( in ListOfGroups theDomains,
1086 in boolean createJointElems,
1087 in boolean onAllBoundaries)
1088 raises (SALOME::SALOME_Exception);
1091 * \brief Double nodes on some external faces and create flat elements.
1092 * Flat elements are mainly used by some types of mechanic calculations.
1094 * Each group of the list must be constituted of faces.
1095 * Triangles are transformed in prisms, and quadrangles in hexahedrons.
1096 * \param theGroupsOfFaces - list of groups of faces
1097 * \return TRUE if operation has been completed successfully, FALSE otherwise
1099 boolean CreateFlatElementsOnFacesGroups( in ListOfGroups theGroupsOfFaces )
1100 raises (SALOME::SALOME_Exception);
1103 * \brief identify all the elements around a geom shape, get the faces delimiting the hole
1104 * Build groups of volume to remove, groups of faces to replace on the skin of the object,
1105 * groups of faces to remove insidethe object, (idem edges).
1106 * Build ordered list of nodes at the border of each group of faces to replace (to be used to build a geom subshape)
1108 void CreateHoleSkin(in double radius,
1109 in GEOM::GEOM_Object theShape,
1110 in string groupName,
1111 in double_array theNodesCoords,
1112 out array_of_long_array GroupsOfNodes)
1113 raises (SALOME::SALOME_Exception);