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 interface NumericalFunctor;
34 enum Bnd_Dimension { BND_2DFROM3D, BND_1DFROM3D, BND_1DFROM2D };
39 SMESH::long_array nodeIDs; // all nodes defining a free border
40 // 1st and last node is same in a closed border
44 short border; // border index within a sequence<FreeBorder>
45 long node1; // node index within the border-th FreeBorder
49 typedef sequence<FreeBorder> ListOfFreeBorders;
50 typedef sequence<FreeBorderPart> FreeBordersGroup;
51 typedef sequence<FreeBordersGroup> ListOfFreeBorderGroups;
53 struct CoincidentFreeBorders
55 ListOfFreeBorders borders; // nodes of all free borders
56 ListOfFreeBorderGroups coincidentGroups; // groups of coincident parts of borders
61 * This interface makes modifications on the Mesh - removing elements and nodes etc.
63 interface SMESH_MeshEditor
66 * Returns a mesh subject to edition
71 * Return data of mesh edition preview which is computed provided
72 * that the editor was obtained through SMESH_Mesh::GetMeshEditPreviewer()
74 MeshPreviewStruct GetPreviewData() raises (SALOME::SALOME_Exception);
77 * If during last operation of MeshEditor some nodes were
78 * created, this method returns list of their IDs, if new nodes
79 * not created - returns empty list
81 long_array GetLastCreatedNodes() raises (SALOME::SALOME_Exception);
84 * If during last operation of MeshEditor some elements were
85 * created, this method returns list of their IDs, if new elements
86 * not created - returns empty list
88 long_array GetLastCreatedElems() raises (SALOME::SALOME_Exception);
91 * \brief Clears sequences of last created elements and nodes
93 void ClearLastCreated() raises (SALOME::SALOME_Exception);
96 * \brief Returns description of an error/warning occured during the last operation
98 ComputeError GetLastError() raises (SALOME::SALOME_Exception);
101 * \brief Wrap a sequence of ids in a SMESH_IDSource
102 * \param IDsOfElements list of mesh elements identifiers
103 * \return new ID source object
105 SMESH_IDSource MakeIDSource(in long_array IDsOfElements, in ElementType type);
108 * \brief Remove mesh elements specified by their identifiers.
109 * \param IDsOfElements list of mesh elements identifiers
110 * \return \c true if elements are correctly removed or \c false otherwise
112 boolean RemoveElements(in long_array IDsOfElements) raises (SALOME::SALOME_Exception);
115 * \brief Remove mesh nodes specified by their identifiers.
116 * \param IDsOfNodes list of mesh nodes identifiers
117 * \return \c true if nodes are correctly removed or \c false otherwise
119 boolean RemoveNodes(in long_array IDsOfNodes) raises (SALOME::SALOME_Exception);
122 * \brief Remove all orphan nodes.
123 * \return number of removed nodes
125 long RemoveOrphanNodes() raises (SALOME::SALOME_Exception);
128 * \brief Add a new node.
129 * \param x X coordinate of new node
130 * \param y Y coordinate of new node
131 * \param z Z coordinate of new node
132 * \return integer identifier of new node
134 long AddNode(in double x, in double y, in double z) raises (SALOME::SALOME_Exception);
137 * Create a 0D element on the given node.
138 * \param IdOfNode Node IDs for creation of element.
140 long Add0DElement(in long IDOfNode) raises (SALOME::SALOME_Exception);
143 * Create a ball element on the given node.
144 * \param IdOfNode Node IDs for creation of element.
146 long AddBall(in long IDOfNode, in double diameter) raises (SALOME::SALOME_Exception);
149 * Create an edge, either linear and quadratic (this is determed
150 * by number of given nodes, two or three).
151 * \param IdsOfNodes List of node IDs for creation of element.
152 * Needed order of nodes in this list corresponds to description
153 * of MED. This description is located by the following link:
154 * http://www.salome-platform.org/salome2/web_med_internet/logiciels/medV2.2.2_doc_html/html/modele_de_donnees.html#3.
156 long AddEdge(in long_array IDsOfNodes) raises (SALOME::SALOME_Exception);
159 * Create face, either linear and quadratic (this is determed
160 * by number of given nodes).
161 * \param IdsOfNodes List of node IDs for creation of element.
162 * Needed order of nodes in this list corresponds to description
163 * of MED. This description is located by the following link:
164 * http://www.salome-platform.org/salome2/web_med_internet/logiciels/medV2.2.2_doc_html/html/modele_de_donnees.html#3.
166 long AddFace(in long_array IDsOfNodes) raises (SALOME::SALOME_Exception);
168 long AddPolygonalFace(in long_array IdsOfNodes) raises (SALOME::SALOME_Exception);
171 * Create a quadratic polygonal face
172 * \param IdsOfNodes - nodes of the polygon; corner nodes follow first
173 * \return long - ID of a new polygon
175 long AddQuadPolygonalFace(in long_array IdsOfNodes) raises (SALOME::SALOME_Exception);
178 * Create volume, either linear and quadratic (this is determed
179 * by number of given nodes).
180 * \param IdsOfNodes List of node IDs for creation of element.
181 * Needed order of nodes in this list corresponds to description
182 * of MED. This description is located by the following link:
183 * http://www.salome-platform.org/salome2/web_med_internet/logiciels/medV2.2.2_doc_html/html/modele_de_donnees.html#3.
185 long AddVolume(in long_array IDsOfNodes) raises (SALOME::SALOME_Exception);
188 * Create volume of many faces, giving nodes for each face.
189 * \param IdsOfNodes List of node IDs for volume creation face by face.
190 * \param Quantities List of integer values, Quantities[i]
191 * gives quantity of nodes in face number i.
193 long AddPolyhedralVolume (in long_array IdsOfNodes,
194 in long_array Quantities) raises (SALOME::SALOME_Exception);
196 * Create volume of many faces, giving IDs of existing faces.
197 * \param IdsOfFaces List of face IDs for volume creation.
198 * \note The created volume will refer only to nodes
199 * of the given faces, not to the faces itself.
201 long AddPolyhedralVolumeByFaces (in long_array IdsOfFaces) raises (SALOME::SALOME_Exception);
204 * Create 0D elements on all nodes of the given object except those
205 * nodes on which a 0D element already exists.
206 * \param theObject object on whose nodes 0D elements will be created.
207 * \param theGroupName optional name of a group to add 0D elements created
208 * and/or found on nodes of \a theObject.
209 * \return an object (a new group or a temporary SMESH_IDSource) holding
210 * ids of new and/or found 0D elements.
212 SMESH_IDSource Create0DElementsOnAllNodes(in SMESH_IDSource theObject,
213 in string theGroupName)
214 raises (SALOME::SALOME_Exception);
217 * \brief Bind a node to a vertex
218 * \param NodeID - node ID
219 * \param VertexID - vertex ID available through GEOM_Object.GetSubShapeIndices()[0]
221 void SetNodeOnVertex(in long NodeID, in long VertexID)
222 raises (SALOME::SALOME_Exception);
224 * \brief Store node position on an edge
225 * \param NodeID - node ID
226 * \param EdgeID - edge ID available through GEOM_Object.GetSubShapeIndices()[0]
227 * \param paramOnEdge - parameter on edge where the node is located
229 void SetNodeOnEdge(in long NodeID, in long EdgeID, in double paramOnEdge)
230 raises (SALOME::SALOME_Exception);
232 * \brief Store node position on a face
233 * \param NodeID - node ID
234 * \param FaceID - face ID available through GEOM_Object.GetSubShapeIndices()[0]
235 * \param u - U parameter on face where the node is located
236 * \param v - V parameter on face where the node is located
238 void SetNodeOnFace(in long NodeID, in long FaceID, in double u, in double v)
239 raises (SALOME::SALOME_Exception);
241 * \brief Bind a node to a solid
242 * \param NodeID - node ID
243 * \param SolidID - vertex ID available through GEOM_Object.GetSubShapeIndices()[0]
245 void SetNodeInVolume(in long NodeID, in long SolidID)
246 raises (SALOME::SALOME_Exception);
248 * \brief Bind an element to a shape
249 * \param ElementID - element ID
250 * \param ShapeID - shape ID available through GEOM_Object.GetSubShapeIndices()[0]
252 void SetMeshElementOnShape(in long ElementID, in long ShapeID)
253 raises (SALOME::SALOME_Exception);
256 boolean MoveNode(in long NodeID, in double x, in double y, in double z)
257 raises (SALOME::SALOME_Exception);
259 boolean InverseDiag(in long NodeID1, in long NodeID2)
260 raises (SALOME::SALOME_Exception);
262 boolean DeleteDiag(in long NodeID1, in long NodeID2)
263 raises (SALOME::SALOME_Exception);
265 boolean Reorient(in long_array IDsOfElements)
266 raises (SALOME::SALOME_Exception);
268 boolean ReorientObject(in SMESH_IDSource theObject)
269 raises (SALOME::SALOME_Exception);
271 * \brief Reorient faces contained in \a the2Dgroup.
272 * \param the2Dgroup - the mesh or its part to reorient
273 * \param theDirection - desired direction of normal of \a theFace
274 * \param theFace - ID of face whose orientation is checked.
275 * It can be < 1 then \a thePoint is used to find a face.
276 * \param thePoint - is used to find a face if \a theFace < 1.
277 * \return number of reoriented faces.
279 long Reorient2D(in SMESH_IDSource the2Dgroup,
280 in DirStruct theDirection,
282 in PointStruct thePoint) raises (SALOME::SALOME_Exception);
284 * \brief Reorient faces basing on orientation of adjacent volumes.
285 * \param faces - a list of objects containing face to reorient
286 * \param volumes - an object containing volumes.
287 * \param outsideNormal - to orient faces to have their normal
288 * pointing either \a outside or \a inside the adjacent volumes.
289 * \return number of reoriented faces.
291 long Reorient2DBy3D(in ListOfIDSources faces,
292 in SMESH_IDSource volumes,
293 in boolean outsideNormal) raises (SALOME::SALOME_Exception);
296 * \brief Fuse neighbour triangles into quadrangles.
297 * \param IDsOfElements Ids of triangles to be fused.
298 * \param theCriterion Is used to choose a neighbour to fuse with.
299 * \param theMaxAngle Is a max angle between element normals at which fusion
300 * is still performed; theMaxAngle is mesured in radians.
301 * \return \c true in case of success, FALSE otherwise.
303 boolean TriToQuad (in long_array IDsOfElements,
304 in NumericalFunctor Criterion,
305 in double MaxAngle) raises (SALOME::SALOME_Exception);
307 * \brief Fuse neighbour triangles into quadrangles.
309 * Behaves like the above method, taking a list of elements from \a theObject
311 boolean TriToQuadObject (in SMESH_IDSource theObject,
312 in NumericalFunctor Criterion,
313 in double MaxAngle) raises (SALOME::SALOME_Exception);
316 * \brief Split quadrangles into triangles.
317 * \param IDsOfElements Ids of quadrangles to split.
318 * \param theCriterion Is used to choose a diagonal for splitting.
319 * \return TRUE in case of success, FALSE otherwise.
321 boolean QuadToTri (in long_array IDsOfElements,
322 in NumericalFunctor Criterion) raises (SALOME::SALOME_Exception);
324 * \brief Split quadrangles into triangles.
326 * Behaves like the above method, taking a list of elements from \a theObject
328 boolean QuadToTriObject (in SMESH_IDSource theObject,
329 in NumericalFunctor Criterion) raises (SALOME::SALOME_Exception);
331 * \brief Split each of quadrangles into 4 triangles.
332 * \param theQuads Container of quadrangles to split.
334 void QuadTo4Tri (in SMESH_IDSource theQuads) raises (SALOME::SALOME_Exception);
337 * \brief Split quadrangles into triangles.
338 * \param theElems The faces to be splitted.
339 * \param the13Diag Is used to choose a diagonal for splitting.
340 * \return TRUE in case of success, FALSE otherwise.
342 boolean SplitQuad (in long_array IDsOfElements,
343 in boolean Diag13) raises (SALOME::SALOME_Exception);
345 * \brief Split quadrangles into triangles.
347 * Behaves like the above method, taking list of elements from \a theObject
349 boolean SplitQuadObject (in SMESH_IDSource theObject,
350 in boolean Diag13) raises (SALOME::SALOME_Exception);
353 * Find better splitting of the given quadrangle.
354 * \param IDOfQuad ID of the quadrangle to be splitted.
355 * \param Criterion A criterion to choose a diagonal for splitting.
356 * \return 1 if 1-3 diagonal is better, 2 if 2-4
357 * diagonal is better, 0 if error occurs.
359 long BestSplit (in long IDOfQuad,
360 in NumericalFunctor Criterion) raises (SALOME::SALOME_Exception);
363 * \brief Split volumic elements into tetrahedrons
364 * \param elems - elements to split
365 * \param methodFlags - flags passing splitting method:
366 * 1 - split the hexahedron into 5 tetrahedrons
367 * 2 - split the hexahedron into 6 tetrahedrons
368 * 3 - split the hexahedron into 24 tetrahedrons
370 void SplitVolumesIntoTetra(in SMESH_IDSource elems, in short methodFlags)
371 raises (SALOME::SALOME_Exception);
374 * \brief Split hexahedra into triangular prisms
375 * \param elems - elements to split
376 * \param startHexPoint - a point used to find a hexahedron for which \a facetToSplitNormal
377 * gives a normal vector defining facets to split into triangles.
378 * \param facetToSplitNormal - normal used to find a facet of hexahedron
379 * to split into triangles.
380 * \param methodFlags - flags passing splitting method:
381 * 1 - split the hexahedron into 2 prisms
382 * 2 - split the hexahedron into 4 prisms
383 * \param allDomains - if \c False, only hexahedra adjacent to one closest
384 * to \a facetToSplitNormal location are split, else \a facetToSplitNormal
385 * is used to find the facet to split in all domains present in \a elems.
387 void SplitHexahedraIntoPrisms(in SMESH_IDSource elems,
388 in SMESH::PointStruct startHexPoint,
389 in SMESH::DirStruct facetToSplitNormal,
390 in short methodFlags,
391 in boolean allDomains)
392 raises (SALOME::SALOME_Exception);
395 * \brief Split bi-quadratic elements into linear ones without creation of additional nodes.
396 * - bi-quadratic triangle will be split into 3 linear quadrangles;
397 * - bi-quadratic quadrangle will be split into 4 linear quadrangles;
398 * - tri-quadratic hexahedron will be split into 8 linear hexahedra;
399 * Quadratic elements of lower dimension adjacent to the split bi-quadratic element
400 * will be split in order to keep the mesh conformal.
401 * \param elems - elements to split
403 void SplitBiQuadraticIntoLinear(in ListOfIDSources elems)
404 raises (SALOME::SALOME_Exception);
407 enum Smooth_Method { LAPLACIAN_SMOOTH, CENTROIDAL_SMOOTH };
409 boolean Smooth(in long_array IDsOfElements,
410 in long_array IDsOfFixedNodes,
411 in long MaxNbOfIterations,
412 in double MaxAspectRatio,
413 in Smooth_Method Method) raises (SALOME::SALOME_Exception);
415 boolean SmoothObject(in SMESH_IDSource theObject,
416 in long_array IDsOfFixedNodes,
417 in long MaxNbOfIterations,
418 in double MaxAspectRatio,
419 in Smooth_Method Method) raises (SALOME::SALOME_Exception);
421 boolean SmoothParametric(in long_array IDsOfElements,
422 in long_array IDsOfFixedNodes,
423 in long MaxNbOfIterations,
424 in double MaxAspectRatio,
425 in Smooth_Method Method) raises (SALOME::SALOME_Exception);
427 boolean SmoothParametricObject(in SMESH_IDSource theObject,
428 in long_array IDsOfFixedNodes,
429 in long MaxNbOfIterations,
430 in double MaxAspectRatio,
431 in Smooth_Method Method) raises (SALOME::SALOME_Exception);
433 void ConvertToQuadratic(in boolean theForce3d)
434 raises (SALOME::SALOME_Exception);
435 void ConvertToQuadraticObject(in boolean theForce3d,
436 in SMESH_IDSource theObject)
437 raises (SALOME::SALOME_Exception);
439 boolean ConvertFromQuadratic()
440 raises (SALOME::SALOME_Exception);
441 void ConvertFromQuadraticObject(in SMESH_IDSource theObject)
442 raises (SALOME::SALOME_Exception);
444 void ConvertToBiQuadratic(in boolean theForce3d,
445 in SMESH_IDSource theObject)
446 raises (SALOME::SALOME_Exception);
448 void RenumberNodes() raises (SALOME::SALOME_Exception);
450 void RenumberElements() raises (SALOME::SALOME_Exception);
453 * \brief Generate dim+1 elements by rotation of the object around axis
454 * \param Nodes - nodes to revolve: a list including groups, sub-meshes or a mesh
455 * \param Edges - edges to revolve: a list including groups, sub-meshes or a mesh
456 * \param Faces - faces to revolve: a list including groups, sub-meshes or a mesh
457 * \param Axis - rotation axis
458 * \param AngleInRadians - rotation angle
459 * \param NbOfSteps - number of elements to generate from one element
460 * \param ToMakeGroups - if true, new elements will be included into new groups
461 * corresponding to groups the input elements included in.
462 * \return ListOfGroups - new groups craeted if \a ToMakeGroups is true
464 ListOfGroups RotationSweepObjects(in ListOfIDSources Nodes,
465 in ListOfIDSources Edges,
466 in ListOfIDSources Faces,
468 in double AngleInRadians,
471 in boolean ToMakeGroups)
472 raises (SALOME::SALOME_Exception);
475 * \brief Generate dim+1 elements by extrusion of elements along vector
476 * \param nodes - nodes to extrude: a list including groups, sub-meshes or a mesh
477 * \param edges - edges to extrude: a list including groups, sub-meshes or a mesh
478 * \param faces - faces to extrude: a list including groups, sub-meshes or a mesh
479 * \param stepVector - vector giving direction and distance of an extrusion step
480 * \param nbOfSteps - number of elements to generate from one element
481 * \param toMakeGroups - if true, new elements will be included into new groups
482 * corresponding to groups the input elements included in.
483 * \return ListOfGroups - new groups craeted if \a toMakeGroups is true
485 ListOfGroups ExtrusionSweepObjects(in ListOfIDSources nodes,
486 in ListOfIDSources edges,
487 in ListOfIDSources faces,
488 in DirStruct stepVector,
490 in boolean toMakeGroups)
491 raises (SALOME::SALOME_Exception);
493 /*! Generates new elements by extrusion along the normal to a discretized surface or wire
495 ListOfGroups ExtrusionByNormal(in ListOfIDSources theObjects,
498 in boolean byAverageNormal,
499 in boolean useInputElemsOnly,
500 in boolean makeGroups,
502 raises (SALOME::SALOME_Exception);
505 * Generate new elements by extrusion of theElements
506 * by StepVector by NbOfSteps
507 * \param ExtrFlags set flags for performing extrusion
508 * \param SewTolerance - uses for comparing locations of nodes if flag
509 * EXTRUSION_FLAG_SEW is set
510 * \param ToMakeGroups - if true, new elements will be included into new groups
511 * corresponding to groups the input elements included in.
512 * \return ListOfGroups - new groups craeted if \a ToMakeGroups is true
514 ListOfGroups AdvancedExtrusion(in long_array IDsOfElements,
515 in DirStruct StepVector,
518 in double SewTolerance,
519 in boolean ToMakeGroups)
520 raises (SALOME::SALOME_Exception);
522 enum Extrusion_Error {
527 EXTR_BAD_STARTING_NODE,
528 EXTR_BAD_ANGLES_NUMBER,
529 EXTR_CANT_GET_TANGENT
532 ListOfGroups ExtrusionAlongPathObjects(in ListOfIDSources Nodes,
533 in ListOfIDSources Edges,
534 in ListOfIDSources Faces,
535 in SMESH_IDSource Path,
536 in GEOM::GEOM_Object PathShape,
538 in boolean HasAngles,
539 in double_array Angles,
540 in boolean LinearVariation,
541 in boolean HasRefPoint,
542 in PointStruct RefPoint,
543 in boolean MakeGroups,
544 out Extrusion_Error Error)
545 raises (SALOME::SALOME_Exception);
548 * Compute rotation angles for ExtrusionAlongPath as linear variation
549 * of given angles along path steps
550 * param PathMesh mesh containing a 1D sub-mesh on the edge, along
551 * which proceeds the extrusion
552 * param PathShape is shape(edge); as the mesh can be complex, the edge
553 * is used to define the sub-mesh for the path
555 double_array LinearAnglesVariation(in SMESH_Mesh PathMesh,
556 in GEOM::GEOM_Object PathShape,
557 in double_array Angles);
559 enum MirrorType { POINT, AXIS, PLANE };
561 void Mirror (in long_array IDsOfElements,
562 in AxisStruct Mirror,
565 raises (SALOME::SALOME_Exception);
566 ListOfGroups MirrorMakeGroups (in long_array IDsOfElements,
567 in AxisStruct Mirror,
569 raises (SALOME::SALOME_Exception);
570 SMESH_Mesh MirrorMakeMesh (in long_array IDsOfElements,
571 in AxisStruct Mirror,
573 in boolean CopyGroups,
575 raises (SALOME::SALOME_Exception);
577 void MirrorObject (in SMESH_IDSource theObject,
578 in AxisStruct Mirror,
581 raises (SALOME::SALOME_Exception);
582 ListOfGroups MirrorObjectMakeGroups (in SMESH_IDSource theObject,
583 in AxisStruct Mirror,
585 raises (SALOME::SALOME_Exception);
586 SMESH_Mesh MirrorObjectMakeMesh (in SMESH_IDSource theObject,
587 in AxisStruct Mirror,
589 in boolean CopyGroups,
591 raises (SALOME::SALOME_Exception);
593 void Translate (in long_array IDsOfElements,
596 raises (SALOME::SALOME_Exception);
597 ListOfGroups TranslateMakeGroups (in long_array IDsOfElements,
599 raises (SALOME::SALOME_Exception);
600 SMESH_Mesh TranslateMakeMesh (in long_array IDsOfElements,
602 in boolean CopyGroups,
604 raises (SALOME::SALOME_Exception);
606 void TranslateObject (in SMESH_IDSource theObject,
609 raises (SALOME::SALOME_Exception);
610 ListOfGroups TranslateObjectMakeGroups (in SMESH_IDSource theObject,
612 raises (SALOME::SALOME_Exception);
613 SMESH_Mesh TranslateObjectMakeMesh (in SMESH_IDSource theObject,
615 in boolean CopyGroups,
617 raises (SALOME::SALOME_Exception);
619 void Scale (in SMESH_IDSource theObject,
620 in PointStruct thePoint,
621 in double_array theScaleFact,
623 raises (SALOME::SALOME_Exception);
624 ListOfGroups ScaleMakeGroups (in SMESH_IDSource theObject,
625 in PointStruct thePoint,
626 in double_array theScaleFact)
627 raises (SALOME::SALOME_Exception);
628 SMESH_Mesh ScaleMakeMesh (in SMESH_IDSource theObject,
629 in PointStruct thePoint,
630 in double_array theScaleFact,
631 in boolean CopyGroups,
633 raises (SALOME::SALOME_Exception);
635 void Rotate (in long_array IDsOfElements,
637 in double AngleInRadians,
639 raises (SALOME::SALOME_Exception);
640 ListOfGroups RotateMakeGroups (in long_array IDsOfElements,
642 in double AngleInRadians)
643 raises (SALOME::SALOME_Exception);
644 SMESH_Mesh RotateMakeMesh (in long_array IDsOfElements,
646 in double AngleInRadians,
647 in boolean CopyGroups,
649 raises (SALOME::SALOME_Exception);
651 void RotateObject (in SMESH_IDSource theObject,
653 in double AngleInRadians,
655 raises (SALOME::SALOME_Exception);
656 ListOfGroups RotateObjectMakeGroups (in SMESH_IDSource theObject,
658 in double AngleInRadians)
659 raises (SALOME::SALOME_Exception);
660 SMESH_Mesh RotateObjectMakeMesh (in SMESH_IDSource theObject,
662 in double AngleInRadians,
663 in boolean CopyGroups,
665 raises (SALOME::SALOME_Exception);
667 void FindCoincidentNodes (in double Tolerance,
668 out array_of_long_array GroupsOfNodes,
669 in boolean SeparateCornersAndMedium)
670 raises (SALOME::SALOME_Exception);
672 void FindCoincidentNodesOnPart (in SMESH_IDSource SubMeshOrGroup,
674 out array_of_long_array GroupsOfNodes,
675 in boolean SeparateCornersAndMedium)
676 raises (SALOME::SALOME_Exception);
678 void FindCoincidentNodesOnPartBut (in SMESH_IDSource SubMeshOrGroup,
680 out array_of_long_array GroupsOfNodes,
681 in ListOfIDSources ExceptSubMeshOrGroups,
682 in boolean SeparateCornersAndMedium)
683 raises (SALOME::SALOME_Exception);
685 void MergeNodes (in array_of_long_array GroupsOfNodes,
686 in SMESH::ListOfIDSources NodesToKeep)
687 raises (SALOME::SALOME_Exception);
690 * \brief Find elements built on the same nodes.
691 * \param MeshOrSubMeshOrGroup Mesh or SubMesh, or Group of elements for searching.
692 * \return List of groups of equal elements.
694 void FindEqualElements (in SMESH_IDSource MeshOrSubMeshOrGroup,
695 out array_of_long_array GroupsOfElementsID)
696 raises (SALOME::SALOME_Exception);
699 * \brief Merge elements in each given group.
700 * \param GroupsOfElementsID Groups of elements for merging.
702 void MergeElements(in array_of_long_array GroupsOfElementsID)
703 raises (SALOME::SALOME_Exception);
706 * \brief Merge equal elements in the whole mesh.
708 void MergeEqualElements()
709 raises (SALOME::SALOME_Exception);
712 * If the given ID is a valid node ID (nodeID > 0), just move this node, else
713 * move the node closest to the point to point's location and return ID of the node
715 long MoveClosestNodeToPoint(in double x, in double y, in double z, in long nodeID)
716 raises (SALOME::SALOME_Exception);
719 * Return ID of node closest to a given point
721 long FindNodeClosestTo(in double x, in double y, in double z)
722 raises (SALOME::SALOME_Exception);
725 * Return elements of given type where the given point is IN or ON.
727 * 'ALL' type means elements of any type excluding nodes and 0D elements
729 long_array FindElementsByPoint(in double x, in double y, in double z, in ElementType type)
730 raises (SALOME::SALOME_Exception);
733 * Searching among the given elements, return elements of given type
734 * where the given point is IN or ON.
736 * 'ALL' type means elements of any type excluding nodes and 0D elements
738 long_array FindAmongElementsByPoint(in SMESH_IDSource elements,
739 in double x, in double y, in double z,
741 raises (SALOME::SALOME_Exception);
744 * Return point state in a closed 2D mesh in terms of TopAbs_State enumeration.
745 * TopAbs_UNKNOWN state means that either mesh is wrong or the analysis fails.
747 short GetPointState(in double x, in double y, in double z)
748 raises (SALOME::SALOME_Exception);
751 * Returns groups of FreeBorder's coincident within the given tolerance.
752 * If the tolerance <= 0.0 then one tenth of an average size of elements adjacent
753 * to free borders being compared is used.
755 CoincidentFreeBorders FindCoincidentFreeBorders(in double tolerance);
758 * Sew FreeBorder's of each group
760 short SewCoincidentFreeBorders (in CoincidentFreeBorders freeBorders,
761 in boolean createPolygons,
762 in boolean createPolyedrs)
763 raises (SALOME::SALOME_Exception);
767 SEW_BORDER1_NOT_FOUND,
768 SEW_BORDER2_NOT_FOUND,
769 SEW_BOTH_BORDERS_NOT_FOUND,
771 SEW_VOLUMES_TO_SPLIT,
772 // for SewSideElements() only:
773 SEW_DIFF_NB_OF_ELEMENTS,
774 SEW_TOPO_DIFF_SETS_OF_ELEMENTS,
780 Sew_Error SewFreeBorders (in long FirstNodeID1,
781 in long SecondNodeID1,
783 in long FirstNodeID2,
784 in long SecondNodeID2,
786 in boolean CreatePolygons,
787 in boolean CreatePolyedrs)
788 raises (SALOME::SALOME_Exception);
790 Sew_Error SewConformFreeBorders (in long FirstNodeID1,
791 in long SecondNodeID1,
793 in long FirstNodeID2,
794 in long SecondNodeID2)
795 raises (SALOME::SALOME_Exception);
797 Sew_Error SewBorderToSide (in long FirstNodeIDOnFreeBorder,
798 in long SecondNodeIDOnFreeBorder,
799 in long LastNodeIDOnFreeBorder,
800 in long FirstNodeIDOnSide,
801 in long LastNodeIDOnSide,
802 in boolean CreatePolygons,
803 in boolean CreatePolyedrs)
804 raises (SALOME::SALOME_Exception);
806 Sew_Error SewSideElements (in long_array IDsOfSide1Elements,
807 in long_array IDsOfSide2Elements,
808 in long NodeID1OfSide1ToMerge,
809 in long NodeID1OfSide2ToMerge,
810 in long NodeID2OfSide1ToMerge,
811 in long NodeID2OfSide2ToMerge)
812 raises (SALOME::SALOME_Exception);
815 * Set new nodes for given element.
816 * If number of nodes is not corresponded to type of
817 * element - returns false
819 boolean ChangeElemNodes(in long ide, in long_array newIDs)
820 raises (SALOME::SALOME_Exception);
823 * \brief Duplicates given elements, i.e. creates new elements based on the
824 * same nodes as the given ones.
825 * \param theElements - container of elements to duplicate.
826 * \param theGroupName - a name of group to contain the generated elements.
827 * If a group with such a name already exists, the new elements
828 * are added to the existng group, else a new group is created.
829 * If \a theGroupName is empty, new elements are not added
831 * \return a group where the new elements are added. NULL if theGroupName == "".
834 SMESH_Group DoubleElements( in SMESH_IDSource theElements,
835 in string theGroupName )
836 raises (SALOME::SALOME_Exception);
839 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
840 * \param theNodes - identifiers of nodes to be doubled
841 * \param theModifiedElems - identifiers of elements to be updated by the new (doubled)
842 * nodes. If list of element identifiers is empty then nodes are doubled but
843 * they not assigned to elements
844 * \return TRUE if operation has been completed successfully, FALSE otherwise
845 * \sa DoubleNode(), DoubleNodeGroup(), DoubleNodeGroups()
847 boolean DoubleNodes( in long_array theNodes, in long_array theModifiedElems )
848 raises (SALOME::SALOME_Exception);
851 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
852 * This method provided for convenience works as DoubleNodes() described above.
853 * \param theNodeId - identifier of node to be doubled.
854 * \param theModifiedElems - identifiers of elements to be updated.
855 * \return TRUE if operation has been completed successfully, FALSE otherwise
856 * \sa DoubleNodes(), DoubleNodeGroup(), DoubleNodeGroups()
858 boolean DoubleNode( in long theNodeId, in long_array theModifiedElems )
859 raises (SALOME::SALOME_Exception);
862 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
863 * This method provided for convenience works as DoubleNodes() described above.
864 * \param theNodes - group of nodes to be doubled.
865 * \param theModifiedElems - group of elements to be updated.
866 * \return TRUE if operation has been completed successfully, FALSE otherwise
867 * \sa DoubleNode(), DoubleNodes(), DoubleNodeGroups(), DoubleNodeGroupNew()
869 boolean DoubleNodeGroup( in SMESH_GroupBase theNodes,
870 in SMESH_GroupBase theModifiedElems )
871 raises (SALOME::SALOME_Exception);
873 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
874 * Works as DoubleNodeGroup() described above, but returns a new group with
875 * newly created nodes.
876 * \param theNodes - group of nodes to be doubled.
877 * \param theModifiedElems - group of elements to be updated.
878 * \return a new group with newly created nodes
879 * \sa DoubleNodeGroup()
881 SMESH_Group DoubleNodeGroupNew( in SMESH_GroupBase theNodes,
882 in SMESH_GroupBase theModifiedElems )
883 raises (SALOME::SALOME_Exception);
886 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
887 * This method provided for convenience works as DoubleNodes() described above.
888 * \param theNodes - list of groups of nodes to be doubled
889 * \param theModifiedElems - list of groups of elements to be updated.
890 * \return TRUE if operation has been completed successfully, FALSE otherwise
891 * \sa DoubleNode(), DoubleNodeGroup(), DoubleNodes()
893 boolean DoubleNodeGroups( in ListOfGroups theNodes,
894 in ListOfGroups theModifiedElems )
895 raises (SALOME::SALOME_Exception);
897 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
898 * Works as DoubleNodeGroups() described above, but returns a new group with
899 * newly created nodes.
900 * \param theNodes - list of groups of nodes to be doubled
901 * \param theModifiedElems - list of groups of elements to be updated.
902 * \return a new group with newly created nodes
903 * \sa DoubleNodeGroups()
905 SMESH_Group DoubleNodeGroupsNew( in ListOfGroups theNodes,
906 in ListOfGroups theModifiedElems )
907 raises (SALOME::SALOME_Exception);
910 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
911 * \param theElems - the list of elements (edges or faces) to be replicated
912 * The nodes for duplication could be found from these elements
913 * \param theNodesNot - list of nodes to NOT replicate
914 * \param theAffectedElems - the list of elements (cells and edges) to which the
915 * replicated nodes should be associated to.
916 * \return TRUE if operation has been completed successfully, FALSE otherwise
917 * \sa DoubleNodeGroup(), DoubleNodeGroups()
919 boolean DoubleNodeElem( in long_array theElems,
920 in long_array theNodesNot,
921 in long_array theAffectedElems )
922 raises (SALOME::SALOME_Exception);
925 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
926 * \param theElems - the list of elements (edges or faces) to be replicated
927 * The nodes for duplication could be found from these elements
928 * \param theNodesNot - list of nodes to NOT replicate
929 * \param theShape - shape to detect affected elements (element which geometric center
930 * located on or inside shape).
931 * The replicated nodes should be associated to affected elements.
932 * \return TRUE if operation has been completed successfully, FALSE otherwise
933 * \sa DoubleNodeGroupInRegion(), DoubleNodeGroupsInRegion()
935 boolean DoubleNodeElemInRegion( in long_array theElems,
936 in long_array theNodesNot,
937 in GEOM::GEOM_Object theShape )
938 raises (SALOME::SALOME_Exception);
941 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
942 * This method provided for convenience works as DoubleNodes() described above.
943 * \param theElems - group of of elements (edges or faces) to be replicated
944 * \param theNodesNot - group of nodes not to replicated
945 * \param theAffectedElems - group of elements to which the replicated nodes
946 * should be associated to.
947 * \return TRUE if operation has been completed successfully, FALSE otherwise
948 * \sa DoubleNodes(), DoubleNodeGroups(), DoubleNodeElemGroupNew()
950 boolean DoubleNodeElemGroup( in SMESH_GroupBase theElems,
951 in SMESH_GroupBase theNodesNot,
952 in SMESH_GroupBase theAffectedElems )
953 raises (SALOME::SALOME_Exception);
955 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
956 * Works as DoubleNodeElemGroup() described above, but returns a new group with
957 * newly created elements.
958 * \param theElems - group of of elements (edges or faces) to be replicated
959 * \param theNodesNot - group of nodes not to replicated
960 * \param theAffectedElems - group of elements to which the replicated nodes
961 * should be associated to.
962 * \return a new group with newly created elements
963 * \sa DoubleNodeElemGroup()
965 SMESH_Group DoubleNodeElemGroupNew( in SMESH_GroupBase theElems,
966 in SMESH_GroupBase theNodesNot,
967 in SMESH_GroupBase theAffectedElems )
968 raises (SALOME::SALOME_Exception);
970 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
971 * Works as DoubleNodeElemGroup() described above, but returns two new groups:
972 * a group of newly created elements and a group of newly created nodes
973 * \param theElems - group of of elements (edges or faces) to be replicated
974 * \param theNodesNot - group of nodes not to replicated
975 * \param theAffectedElems - group of elements to which the replicated nodes
976 * should be associated to.
977 * \param theElemGroupNeeded - to create group of new elements or not
978 * \param theNodeGroupNeeded - to create group of new nodes or not
979 * \return two new groups of newly created elements (1st) and nodes (2nd)
980 * \sa DoubleNodeElemGroup()
982 ListOfGroups DoubleNodeElemGroup2New( in SMESH_GroupBase theElems,
983 in SMESH_GroupBase theNodesNot,
984 in SMESH_GroupBase theAffectedElems,
985 in boolean theElemGroupNeeded,
986 in boolean theNodeGroupNeeded)
987 raises (SALOME::SALOME_Exception);
990 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
991 * This method provided for convenience works as DoubleNodes() described above.
992 * \param theElems - group of elements (edges or faces) to be replicated
993 * \param theNodesNot - group of nodes not to replicated
994 * \param theShape - shape to detect affected elements (element which geometric center
995 * located on or inside shape).
996 * The replicated nodes should be associated to affected elements.
997 * \return TRUE if operation has been completed successfully, FALSE otherwise
998 * \sa DoubleNodesInRegion(), DoubleNodeGroupsInRegion()
1000 boolean DoubleNodeElemGroupInRegion( in SMESH_GroupBase theElems,
1001 in SMESH_GroupBase theNodesNot,
1002 in GEOM::GEOM_Object theShape )
1003 raises (SALOME::SALOME_Exception);
1006 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
1007 * This method provided for convenience works as DoubleNodes() described above.
1008 * \param theElems - list of groups of elements (edges or faces) to be replicated
1009 * \param theNodesNot - list of groups of nodes not to replicated
1010 * \param theAffectedElems - group of elements to which the replicated nodes
1011 * should be associated to.
1012 * \return TRUE if operation has been completed successfully, FALSE otherwise
1013 * \sa DoubleNodeGroup(), DoubleNodes(), DoubleNodeElemGroupsNew()
1015 boolean DoubleNodeElemGroups( in ListOfGroups theElems,
1016 in ListOfGroups theNodesNot,
1017 in ListOfGroups theAffectedElems )
1018 raises (SALOME::SALOME_Exception);
1020 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
1021 * Works as DoubleNodeElemGroups() described above, but returns a new group with
1022 * newly created elements.
1023 * \param theElems - list of groups of elements (edges or faces) to be replicated
1024 * \param theNodesNot - list of groups of nodes not to replicated
1025 * \param theAffectedElems - group of elements to which the replicated nodes
1026 * should be associated to.
1027 * \return a new group with newly created elements
1028 * \sa DoubleNodeElemGroups()
1030 SMESH_Group DoubleNodeElemGroupsNew( in ListOfGroups theElems,
1031 in ListOfGroups theNodesNot,
1032 in ListOfGroups theAffectedElems )
1033 raises (SALOME::SALOME_Exception);
1035 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
1036 * Works as DoubleNodeElemGroups() described above, but returns two new groups:
1037 * a group of newly created elements and a group of newly created nodes.
1038 * \param theElems - list of groups of elements (edges or faces) to be replicated
1039 * \param theNodesNot - list of groups of nodes not to replicated
1040 * \param theAffectedElems - group of elements to which the replicated nodes
1041 * should be associated to.
1042 * \param theElemGroupNeeded - to create group of new elements or not
1043 * \param theNodeGroupNeeded - to create group of new nodes or not
1044 * \return two new groups of newly created elements (1st) and nodes (2nd)
1045 * \sa DoubleNodeElemGroups()
1047 ListOfGroups DoubleNodeElemGroups2New( in ListOfGroups theElems,
1048 in ListOfGroups theNodesNot,
1049 in ListOfGroups theAffectedElems,
1050 in boolean theElemGroupNeeded,
1051 in boolean theNodeGroupNeeded )
1052 raises (SALOME::SALOME_Exception);
1055 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
1056 * This method provided for convenience works as DoubleNodes() described above.
1057 * \param theElems - list of groups of elements (edges or faces) to be replicated
1058 * \param theNodesNot - list of groups of nodes not to replicated
1059 * \param theShape - shape to detect affected elements (element which geometric center
1060 * located on or inside shape).
1061 * The replicated nodes should be associated to affected elements.
1062 * \return TRUE if operation has been completed successfully, FALSE otherwise
1063 * \sa DoubleNodeGroupInRegion(), DoubleNodesInRegion()
1065 boolean DoubleNodeElemGroupsInRegion( in ListOfGroups theElems,
1066 in ListOfGroups theNodesNot,
1067 in GEOM::GEOM_Object theShape )
1068 raises (SALOME::SALOME_Exception);
1071 * \brief Identify the elements that will be affected by node duplication (actual duplication is not performed).
1072 * This method is the first step of DoubleNodeElemGroupsInRegion.
1073 * \param theElems - list of groups of elements (edges or faces) to be replicated
1074 * \param theNodesNot - list of groups of nodes not to replicated
1075 * \param theShape - shape to detect affected elements (element which geometric center
1076 * located on or inside shape).
1077 * The replicated nodes should be associated to affected elements.
1078 * \return groups of affected elements
1079 * \sa DoubleNodeElemGroupsInRegion()
1081 ListOfGroups AffectedElemGroupsInRegion( in ListOfGroups theElems,
1082 in ListOfGroups theNodesNot,
1083 in GEOM::GEOM_Object theShape )
1084 raises (SALOME::SALOME_Exception);
1087 * \brief Generates skin mesh (containing 2D cells) from 3D mesh
1088 * The created 2D mesh elements based on nodes of free faces of boundary volumes
1089 * \return TRUE if operation has been completed successfully, FALSE otherwise
1091 boolean Make2DMeshFrom3D() raises (SALOME::SALOME_Exception);
1094 * \brief Creates missing boundary elements
1095 * \param elements - elements whose boundary is to be checked
1096 * \param dimension - defines type of boundary elements to create
1097 * BND_1DFROM3D creates mesh edges on all borders of free facets of 3D elements.
1098 * \param groupName - a name of group to store created boundary elements in,
1099 * "" means not to create the group
1100 * \param meshName - a name of new mesh to store created boundary elements in,
1101 * "" means not to create the new mesh
1102 * \param toCopyElements - if true, the checked elements will be copied into the new mesh
1103 * else only boundary elements will be copied into the new mesh
1104 * \param toCopyExistingBondary - if true, not only new but also pre-existing
1105 * boundary elements will be copied into the new mesh
1106 * \param group - returns the create group, if any
1107 * \retval SMESH::SMESH_Mesh - the mesh where elements were added to
1109 SMESH_Mesh MakeBoundaryMesh(in SMESH_IDSource elements,
1110 in Bnd_Dimension dimension,
1111 in string groupName,
1113 in boolean toCopyElements,
1114 in boolean toCopyExistingBondary,
1115 out SMESH_Group group) raises (SALOME::SALOME_Exception);
1117 * \brief Creates missing boundary elements around either the whole mesh or
1118 * groups of 2D elements
1119 * \param dimension - defines type of boundary elements to create
1120 * \param groupName - a name of group to store all boundary elements in,
1121 * "" means not to create the group
1122 * \param meshName - a name of a new mesh, which is a copy of the initial
1123 * mesh + created boundary elements; "" means not to create the new mesh
1124 * \param toCopyAll - if true, the whole initial mesh will be copied into
1125 * the new mesh else only boundary elements will be copied into the new mesh
1126 * \param groups - optional groups of 2D elements to make boundary around
1127 * \param mesh - returns the mesh where elements were added to
1128 * \param group - returns the created group, if any
1129 * \retval long - number of added boundary elements
1131 long MakeBoundaryElements(in Bnd_Dimension dimension,
1132 in string groupName,
1134 in boolean toCopyAll,
1135 in ListOfIDSources groups,
1136 out SMESH_Mesh mesh,
1137 out SMESH_Group group) raises (SALOME::SALOME_Exception);
1140 * \brief Double nodes on shared faces between groups of volumes and create flat elements on demand.
1141 * Flat elements are mainly used by some types of mechanic calculations.
1143 * The list of groups must describe a partition of the mesh volumes.
1144 * The nodes of the internal faces at the boundaries of the groups are doubled.
1145 * In option, the internal faces are replaced by flat elements.
1146 * Triangles are transformed in prisms, and quadrangles in hexahedrons.
1147 * \param theDomains - list of groups of volumes
1148 * \param createJointElems - if TRUE, create the elements
1149 * \param onAllBoundaries - if TRUE, the nodes and elements are also created on
1150 * the boundary between \a theDomains and the rest mesh
1151 * \return TRUE if operation has been completed successfully, FALSE otherwise
1153 boolean DoubleNodesOnGroupBoundaries( in ListOfGroups theDomains,
1154 in boolean createJointElems,
1155 in boolean onAllBoundaries)
1156 raises (SALOME::SALOME_Exception);
1159 * \brief Double nodes on some external faces and create flat elements.
1160 * Flat elements are mainly used by some types of mechanic calculations.
1162 * Each group of the list must be constituted of faces.
1163 * Triangles are transformed in prisms, and quadrangles in hexahedrons.
1164 * \param theGroupsOfFaces - list of groups of faces
1165 * \return TRUE if operation has been completed successfully, FALSE otherwise
1167 boolean CreateFlatElementsOnFacesGroups( in ListOfGroups theGroupsOfFaces )
1168 raises (SALOME::SALOME_Exception);
1171 * \brief identify all the elements around a geom shape, get the faces delimiting the hole
1172 * Build groups of volume to remove, groups of faces to replace on the skin of the object,
1173 * groups of faces to remove insidethe object, (idem edges).
1174 * Build ordered list of nodes at the border of each group of faces to replace (to be used to build a geom subshape)
1176 void CreateHoleSkin(in double radius,
1177 in GEOM::GEOM_Object theShape,
1178 in string groupName,
1179 in double_array theNodesCoords,
1180 out array_of_long_array GroupsOfNodes)
1181 raises (SALOME::SALOME_Exception);