1 // Copyright (C) 2007-2016 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.
139 * \param DuplicateElements to add one more 0D element to a node or not
141 long Add0DElement(in long IDOfNode,
142 in boolean DuplicateElements) raises (SALOME::SALOME_Exception);
145 * Create a ball element on the given node.
146 * \param IdOfNode Node IDs for creation of element.
148 long AddBall(in long IDOfNode, in double diameter) raises (SALOME::SALOME_Exception);
151 * Create an edge, either linear and quadratic (this is determed
152 * by number of given nodes, two or three).
153 * \param IdsOfNodes List of node IDs for creation of element.
154 * Needed order of nodes in this list corresponds to description
155 * of MED. This description is located by the following link:
156 * http://www.salome-platform.org/salome2/web_med_internet/logiciels/medV2.2.2_doc_html/html/modele_de_donnees.html#3.
158 long AddEdge(in long_array IDsOfNodes) raises (SALOME::SALOME_Exception);
161 * Create face, either linear and quadratic (this is determed
162 * by number of given nodes).
163 * \param IdsOfNodes List of node IDs for creation of element.
164 * Needed order of nodes in this list corresponds to description
165 * of MED. This description is located by the following link:
166 * http://www.salome-platform.org/salome2/web_med_internet/logiciels/medV2.2.2_doc_html/html/modele_de_donnees.html#3.
168 long AddFace(in long_array IDsOfNodes) raises (SALOME::SALOME_Exception);
170 long AddPolygonalFace(in long_array IdsOfNodes) raises (SALOME::SALOME_Exception);
173 * Create a quadratic polygonal face
174 * \param IdsOfNodes - nodes of the polygon; corner nodes follow first
175 * \return long - ID of a new polygon
177 long AddQuadPolygonalFace(in long_array IdsOfNodes) raises (SALOME::SALOME_Exception);
180 * Create volume, either linear and quadratic (this is determed
181 * by number of given nodes).
182 * \param IdsOfNodes List of node IDs for creation of element.
183 * Needed order of nodes in this list corresponds to description
184 * of MED. This description is located by the following link:
185 * http://www.salome-platform.org/salome2/web_med_internet/logiciels/medV2.2.2_doc_html/html/modele_de_donnees.html#3.
187 long AddVolume(in long_array IDsOfNodes) raises (SALOME::SALOME_Exception);
190 * Create volume of many faces, giving nodes for each face.
191 * \param IdsOfNodes List of node IDs for volume creation face by face.
192 * \param Quantities List of integer values, Quantities[i]
193 * gives quantity of nodes in face number i.
195 long AddPolyhedralVolume (in long_array IdsOfNodes,
196 in long_array Quantities) raises (SALOME::SALOME_Exception);
198 * Create volume of many faces, giving IDs of existing faces.
199 * \param IdsOfFaces List of face IDs for volume creation.
200 * \note The created volume will refer only to nodes
201 * of the given faces, not to the faces itself.
203 long AddPolyhedralVolumeByFaces (in long_array IdsOfFaces) raises (SALOME::SALOME_Exception);
206 * Create 0D elements on all nodes of the given object.
207 * \param theObject object on whose nodes 0D elements will be created.
208 * \param theGroupName optional name of a group to add 0D elements created
209 * and/or found on nodes of \a theObject.
210 * \param theDuplicateElements to add one more 0D element to a node or not
211 * \return an object (a new group or a temporary SMESH_IDSource) holding
212 * ids of new and/or found 0D elements.
214 SMESH_IDSource Create0DElementsOnAllNodes(in SMESH_IDSource theObject,
215 in string theGroupName,
216 in boolean theDuplicateElements)
217 raises (SALOME::SALOME_Exception);
220 * \brief Bind a node to a vertex
221 * \param NodeID - node ID
222 * \param VertexID - vertex ID available through GEOM_Object.GetSubShapeIndices()[0]
224 void SetNodeOnVertex(in long NodeID, in long VertexID)
225 raises (SALOME::SALOME_Exception);
227 * \brief Store node position on an edge
228 * \param NodeID - node ID
229 * \param EdgeID - edge ID available through GEOM_Object.GetSubShapeIndices()[0]
230 * \param paramOnEdge - parameter on edge where the node is located
232 void SetNodeOnEdge(in long NodeID, in long EdgeID, in double paramOnEdge)
233 raises (SALOME::SALOME_Exception);
235 * \brief Store node position on a face
236 * \param NodeID - node ID
237 * \param FaceID - face ID available through GEOM_Object.GetSubShapeIndices()[0]
238 * \param u - U parameter on face where the node is located
239 * \param v - V parameter on face where the node is located
241 void SetNodeOnFace(in long NodeID, in long FaceID, in double u, in double v)
242 raises (SALOME::SALOME_Exception);
244 * \brief Bind a node to a solid
245 * \param NodeID - node ID
246 * \param SolidID - vertex ID available through GEOM_Object.GetSubShapeIndices()[0]
248 void SetNodeInVolume(in long NodeID, in long SolidID)
249 raises (SALOME::SALOME_Exception);
251 * \brief Bind an element to a shape
252 * \param ElementID - element ID
253 * \param ShapeID - shape ID available through GEOM_Object.GetSubShapeIndices()[0]
255 void SetMeshElementOnShape(in long ElementID, in long ShapeID)
256 raises (SALOME::SALOME_Exception);
259 boolean MoveNode(in long NodeID, in double x, in double y, in double z)
260 raises (SALOME::SALOME_Exception);
262 boolean InverseDiag(in long NodeID1, in long NodeID2)
263 raises (SALOME::SALOME_Exception);
265 boolean DeleteDiag(in long NodeID1, in long NodeID2)
266 raises (SALOME::SALOME_Exception);
268 boolean Reorient(in long_array IDsOfElements)
269 raises (SALOME::SALOME_Exception);
271 boolean ReorientObject(in SMESH_IDSource theObject)
272 raises (SALOME::SALOME_Exception);
274 * \brief Reorient faces contained in \a the2Dgroup.
275 * \param the2Dgroup - the mesh or its part to reorient
276 * \param theDirection - desired direction of normal of \a theFace
277 * \param theFace - ID of face whose orientation is checked.
278 * It can be < 1 then \a thePoint is used to find a face.
279 * \param thePoint - is used to find a face if \a theFace < 1.
280 * \return number of reoriented faces.
282 long Reorient2D(in SMESH_IDSource the2Dgroup,
283 in DirStruct theDirection,
285 in PointStruct thePoint) raises (SALOME::SALOME_Exception);
287 * \brief Reorient faces basing on orientation of adjacent volumes.
288 * \param faces - a list of objects containing face to reorient
289 * \param volumes - an object containing volumes.
290 * \param outsideNormal - to orient faces to have their normal
291 * pointing either \a outside or \a inside the adjacent volumes.
292 * \return number of reoriented faces.
294 long Reorient2DBy3D(in ListOfIDSources faces,
295 in SMESH_IDSource volumes,
296 in boolean outsideNormal) raises (SALOME::SALOME_Exception);
299 * \brief Fuse neighbour triangles into quadrangles.
300 * \param IDsOfElements Ids of triangles to be fused.
301 * \param theCriterion Is used to choose a neighbour to fuse with.
302 * \param theMaxAngle Is a max angle between element normals at which fusion
303 * is still performed; theMaxAngle is mesured in radians.
304 * \return \c true in case of success, FALSE otherwise.
306 boolean TriToQuad (in long_array IDsOfElements,
307 in NumericalFunctor Criterion,
308 in double MaxAngle) raises (SALOME::SALOME_Exception);
310 * \brief Fuse neighbour triangles into quadrangles.
312 * Behaves like the above method, taking a list of elements from \a theObject
314 boolean TriToQuadObject (in SMESH_IDSource theObject,
315 in NumericalFunctor Criterion,
316 in double MaxAngle) raises (SALOME::SALOME_Exception);
319 * \brief Split quadrangles into triangles.
320 * \param IDsOfElements Ids of quadrangles to split.
321 * \param theCriterion Is used to choose a diagonal for splitting.
322 * \return TRUE in case of success, FALSE otherwise.
324 boolean QuadToTri (in long_array IDsOfElements,
325 in NumericalFunctor Criterion) raises (SALOME::SALOME_Exception);
327 * \brief Split quadrangles into triangles.
329 * Behaves like the above method, taking a list of elements from \a theObject
331 boolean QuadToTriObject (in SMESH_IDSource theObject,
332 in NumericalFunctor Criterion) raises (SALOME::SALOME_Exception);
334 * \brief Split each of quadrangles into 4 triangles.
335 * \param theQuads Container of quadrangles to split.
337 void QuadTo4Tri (in SMESH_IDSource theQuads) raises (SALOME::SALOME_Exception);
340 * \brief Split quadrangles into triangles.
341 * \param theElems The faces to be splitted.
342 * \param the13Diag Is used to choose a diagonal for splitting.
343 * \return TRUE in case of success, FALSE otherwise.
345 boolean SplitQuad (in long_array IDsOfElements,
346 in boolean Diag13) raises (SALOME::SALOME_Exception);
348 * \brief Split quadrangles into triangles.
350 * Behaves like the above method, taking list of elements from \a theObject
352 boolean SplitQuadObject (in SMESH_IDSource theObject,
353 in boolean Diag13) raises (SALOME::SALOME_Exception);
356 * Find better splitting of the given quadrangle.
357 * \param IDOfQuad ID of the quadrangle to be splitted.
358 * \param Criterion A criterion to choose a diagonal for splitting.
359 * \return 1 if 1-3 diagonal is better, 2 if 2-4
360 * diagonal is better, 0 if error occurs.
362 long BestSplit (in long IDOfQuad,
363 in NumericalFunctor Criterion) raises (SALOME::SALOME_Exception);
366 * \brief Split volumic elements into tetrahedrons
367 * \param elems - elements to split
368 * \param methodFlags - flags passing splitting method:
369 * 1 - split the hexahedron into 5 tetrahedrons
370 * 2 - split the hexahedron into 6 tetrahedrons
371 * 3 - split the hexahedron into 24 tetrahedrons
373 void SplitVolumesIntoTetra(in SMESH_IDSource elems, in short methodFlags)
374 raises (SALOME::SALOME_Exception);
377 * \brief Split hexahedra into triangular prisms
378 * \param elems - elements to split
379 * \param startHexPoint - a point used to find a hexahedron for which \a facetToSplitNormal
380 * gives a normal vector defining facets to split into triangles.
381 * \param facetToSplitNormal - normal used to find a facet of hexahedron
382 * to split into triangles.
383 * \param methodFlags - flags passing splitting method:
384 * 1 - split the hexahedron into 2 prisms
385 * 2 - split the hexahedron into 4 prisms
386 * \param allDomains - if \c False, only hexahedra adjacent to one closest
387 * to \a facetToSplitNormal location are split, else \a facetToSplitNormal
388 * is used to find the facet to split in all domains present in \a elems.
390 void SplitHexahedraIntoPrisms(in SMESH_IDSource elems,
391 in SMESH::PointStruct startHexPoint,
392 in SMESH::DirStruct facetToSplitNormal,
393 in short methodFlags,
394 in boolean allDomains)
395 raises (SALOME::SALOME_Exception);
398 * \brief Split bi-quadratic elements into linear ones without creation of additional nodes.
399 * - bi-quadratic triangle will be split into 3 linear quadrangles;
400 * - bi-quadratic quadrangle will be split into 4 linear quadrangles;
401 * - tri-quadratic hexahedron will be split into 8 linear hexahedra;
402 * Quadratic elements of lower dimension adjacent to the split bi-quadratic element
403 * will be split in order to keep the mesh conformal.
404 * \param elems - elements to split
406 void SplitBiQuadraticIntoLinear(in ListOfIDSources elems)
407 raises (SALOME::SALOME_Exception);
410 enum Smooth_Method { LAPLACIAN_SMOOTH, CENTROIDAL_SMOOTH };
412 boolean Smooth(in long_array IDsOfElements,
413 in long_array IDsOfFixedNodes,
414 in long MaxNbOfIterations,
415 in double MaxAspectRatio,
416 in Smooth_Method Method) raises (SALOME::SALOME_Exception);
418 boolean SmoothObject(in SMESH_IDSource theObject,
419 in long_array IDsOfFixedNodes,
420 in long MaxNbOfIterations,
421 in double MaxAspectRatio,
422 in Smooth_Method Method) raises (SALOME::SALOME_Exception);
424 boolean SmoothParametric(in long_array IDsOfElements,
425 in long_array IDsOfFixedNodes,
426 in long MaxNbOfIterations,
427 in double MaxAspectRatio,
428 in Smooth_Method Method) raises (SALOME::SALOME_Exception);
430 boolean SmoothParametricObject(in SMESH_IDSource theObject,
431 in long_array IDsOfFixedNodes,
432 in long MaxNbOfIterations,
433 in double MaxAspectRatio,
434 in Smooth_Method Method) raises (SALOME::SALOME_Exception);
436 void ConvertToQuadratic(in boolean theForce3d)
437 raises (SALOME::SALOME_Exception);
438 void ConvertToQuadraticObject(in boolean theForce3d,
439 in SMESH_IDSource theObject)
440 raises (SALOME::SALOME_Exception);
442 boolean ConvertFromQuadratic()
443 raises (SALOME::SALOME_Exception);
444 void ConvertFromQuadraticObject(in SMESH_IDSource theObject)
445 raises (SALOME::SALOME_Exception);
447 void ConvertToBiQuadratic(in boolean theForce3d,
448 in SMESH_IDSource theObject)
449 raises (SALOME::SALOME_Exception);
451 void RenumberNodes() raises (SALOME::SALOME_Exception);
453 void RenumberElements() raises (SALOME::SALOME_Exception);
456 * \brief Generate dim+1 elements by rotation of the object around axis
457 * \param Nodes - nodes to revolve: a list including groups, sub-meshes or a mesh
458 * \param Edges - edges to revolve: a list including groups, sub-meshes or a mesh
459 * \param Faces - faces to revolve: a list including groups, sub-meshes or a mesh
460 * \param Axis - rotation axis
461 * \param AngleInRadians - rotation angle
462 * \param NbOfSteps - number of elements to generate from one element
463 * \param ToMakeGroups - if true, new elements will be included into new groups
464 * corresponding to groups the input elements included in.
465 * \return ListOfGroups - new groups craeted if \a ToMakeGroups is true
467 ListOfGroups RotationSweepObjects(in ListOfIDSources Nodes,
468 in ListOfIDSources Edges,
469 in ListOfIDSources Faces,
471 in double AngleInRadians,
474 in boolean ToMakeGroups)
475 raises (SALOME::SALOME_Exception);
478 * \brief Generate dim+1 elements by extrusion of elements along vector
479 * \param nodes - nodes to extrude: a list including groups, sub-meshes or a mesh
480 * \param edges - edges to extrude: a list including groups, sub-meshes or a mesh
481 * \param faces - faces to extrude: a list including groups, sub-meshes or a mesh
482 * \param stepVector - vector giving direction and distance of an extrusion step
483 * \param nbOfSteps - number of elements to generate from one element
484 * \param toMakeGroups - if true, new elements will be included into new groups
485 * corresponding to groups the input elements included in.
486 * \return ListOfGroups - new groups craeted if \a toMakeGroups is true
488 ListOfGroups ExtrusionSweepObjects(in ListOfIDSources nodes,
489 in ListOfIDSources edges,
490 in ListOfIDSources faces,
491 in DirStruct stepVector,
493 in double_array scaleFactors,
494 in boolean linearVariation,
495 in double_array basePoint,
496 in boolean toMakeGroups)
497 raises (SALOME::SALOME_Exception);
499 /*! Generates new elements by extrusion along the normal to a discretized surface or wire
501 ListOfGroups ExtrusionByNormal(in ListOfIDSources theObjects,
504 in boolean byAverageNormal,
505 in boolean useInputElemsOnly,
506 in boolean makeGroups,
508 raises (SALOME::SALOME_Exception);
511 * Generate new elements by extrusion of theElements
512 * by StepVector by NbOfSteps
513 * \param ExtrFlags set flags for performing extrusion
514 * \param SewTolerance - uses for comparing locations of nodes if flag
515 * EXTRUSION_FLAG_SEW is set
516 * \param ToMakeGroups - if true, new elements will be included into new groups
517 * corresponding to groups the input elements included in.
518 * \return ListOfGroups - new groups craeted if \a ToMakeGroups is true
520 ListOfGroups AdvancedExtrusion(in long_array IDsOfElements,
521 in DirStruct StepVector,
524 in double SewTolerance,
525 in boolean ToMakeGroups)
526 raises (SALOME::SALOME_Exception);
528 enum Extrusion_Error {
533 EXTR_BAD_STARTING_NODE,
534 EXTR_BAD_ANGLES_NUMBER,
535 EXTR_CANT_GET_TANGENT
538 ListOfGroups ExtrusionAlongPathObjects(in ListOfIDSources Nodes,
539 in ListOfIDSources Edges,
540 in ListOfIDSources Faces,
541 in SMESH_IDSource Path,
542 in GEOM::GEOM_Object PathShape,
544 in boolean HasAngles,
545 in double_array Angles,
546 in boolean LinearVariation,
547 in boolean HasRefPoint,
548 in PointStruct RefPoint,
549 in boolean MakeGroups,
550 out Extrusion_Error Error)
551 raises (SALOME::SALOME_Exception);
554 * Compute rotation angles for ExtrusionAlongPath as linear variation
555 * of given angles along path steps
556 * param PathMesh mesh containing a 1D sub-mesh on the edge, along
557 * which proceeds the extrusion
558 * param PathShape is shape(edge); as the mesh can be complex, the edge
559 * is used to define the sub-mesh for the path
561 double_array LinearAnglesVariation(in SMESH_Mesh PathMesh,
562 in GEOM::GEOM_Object PathShape,
563 in double_array Angles);
565 enum MirrorType { POINT, AXIS, PLANE };
567 void Mirror (in long_array IDsOfElements,
568 in AxisStruct Mirror,
571 raises (SALOME::SALOME_Exception);
572 ListOfGroups MirrorMakeGroups (in long_array IDsOfElements,
573 in AxisStruct Mirror,
575 raises (SALOME::SALOME_Exception);
576 SMESH_Mesh MirrorMakeMesh (in long_array IDsOfElements,
577 in AxisStruct Mirror,
579 in boolean CopyGroups,
581 raises (SALOME::SALOME_Exception);
583 void MirrorObject (in SMESH_IDSource theObject,
584 in AxisStruct Mirror,
587 raises (SALOME::SALOME_Exception);
588 ListOfGroups MirrorObjectMakeGroups (in SMESH_IDSource theObject,
589 in AxisStruct Mirror,
591 raises (SALOME::SALOME_Exception);
592 SMESH_Mesh MirrorObjectMakeMesh (in SMESH_IDSource theObject,
593 in AxisStruct Mirror,
595 in boolean CopyGroups,
597 raises (SALOME::SALOME_Exception);
599 void Translate (in long_array IDsOfElements,
602 raises (SALOME::SALOME_Exception);
603 ListOfGroups TranslateMakeGroups (in long_array IDsOfElements,
605 raises (SALOME::SALOME_Exception);
606 SMESH_Mesh TranslateMakeMesh (in long_array IDsOfElements,
608 in boolean CopyGroups,
610 raises (SALOME::SALOME_Exception);
612 void TranslateObject (in SMESH_IDSource theObject,
615 raises (SALOME::SALOME_Exception);
616 ListOfGroups TranslateObjectMakeGroups (in SMESH_IDSource theObject,
618 raises (SALOME::SALOME_Exception);
619 SMESH_Mesh TranslateObjectMakeMesh (in SMESH_IDSource theObject,
621 in boolean CopyGroups,
623 raises (SALOME::SALOME_Exception);
625 void Scale (in SMESH_IDSource theObject,
626 in PointStruct thePoint,
627 in double_array theScaleFact,
629 raises (SALOME::SALOME_Exception);
630 ListOfGroups ScaleMakeGroups (in SMESH_IDSource theObject,
631 in PointStruct thePoint,
632 in double_array theScaleFact)
633 raises (SALOME::SALOME_Exception);
634 SMESH_Mesh ScaleMakeMesh (in SMESH_IDSource theObject,
635 in PointStruct thePoint,
636 in double_array theScaleFact,
637 in boolean CopyGroups,
639 raises (SALOME::SALOME_Exception);
641 void Rotate (in long_array IDsOfElements,
643 in double AngleInRadians,
645 raises (SALOME::SALOME_Exception);
646 ListOfGroups RotateMakeGroups (in long_array IDsOfElements,
648 in double AngleInRadians)
649 raises (SALOME::SALOME_Exception);
650 SMESH_Mesh RotateMakeMesh (in long_array IDsOfElements,
652 in double AngleInRadians,
653 in boolean CopyGroups,
655 raises (SALOME::SALOME_Exception);
657 void RotateObject (in SMESH_IDSource theObject,
659 in double AngleInRadians,
661 raises (SALOME::SALOME_Exception);
662 ListOfGroups RotateObjectMakeGroups (in SMESH_IDSource theObject,
664 in double AngleInRadians)
665 raises (SALOME::SALOME_Exception);
666 SMESH_Mesh RotateObjectMakeMesh (in SMESH_IDSource theObject,
668 in double AngleInRadians,
669 in boolean CopyGroups,
671 raises (SALOME::SALOME_Exception);
673 void FindCoincidentNodes (in double Tolerance,
674 out array_of_long_array GroupsOfNodes,
675 in boolean SeparateCornersAndMedium)
676 raises (SALOME::SALOME_Exception);
678 void FindCoincidentNodesOnPart (in SMESH_IDSource SubMeshOrGroup,
680 out array_of_long_array GroupsOfNodes,
681 in boolean SeparateCornersAndMedium)
682 raises (SALOME::SALOME_Exception);
684 void FindCoincidentNodesOnPartBut (in SMESH_IDSource SubMeshOrGroup,
686 out array_of_long_array GroupsOfNodes,
687 in ListOfIDSources ExceptSubMeshOrGroups,
688 in boolean SeparateCornersAndMedium)
689 raises (SALOME::SALOME_Exception);
691 void MergeNodes (in array_of_long_array GroupsOfNodes,
692 in SMESH::ListOfIDSources NodesToKeep)
693 raises (SALOME::SALOME_Exception);
696 * \brief Find elements built on the same nodes.
697 * \param MeshOrSubMeshOrGroup Mesh or SubMesh, or Group of elements for searching.
698 * \return List of groups of equal elements.
700 void FindEqualElements (in SMESH_IDSource MeshOrSubMeshOrGroup,
701 out array_of_long_array GroupsOfElementsID)
702 raises (SALOME::SALOME_Exception);
705 * \brief Merge elements in each given group.
706 * \param GroupsOfElementsID Groups of elements for merging.
708 void MergeElements(in array_of_long_array GroupsOfElementsID)
709 raises (SALOME::SALOME_Exception);
712 * \brief Merge equal elements in the whole mesh.
714 void MergeEqualElements()
715 raises (SALOME::SALOME_Exception);
718 * If the given ID is a valid node ID (nodeID > 0), just move this node, else
719 * move the node closest to the point to point's location and return ID of the node
721 long MoveClosestNodeToPoint(in double x, in double y, in double z, in long nodeID)
722 raises (SALOME::SALOME_Exception);
725 * Return ID of node closest to a given point
727 long FindNodeClosestTo(in double x, in double y, in double z)
728 raises (SALOME::SALOME_Exception);
731 * Return elements of given type where the given point is IN or ON.
733 * 'ALL' type means elements of any type excluding nodes and 0D elements
735 long_array FindElementsByPoint(in double x, in double y, in double z, in ElementType type)
736 raises (SALOME::SALOME_Exception);
739 * Searching among the given elements, return elements of given type
740 * where the given point is IN or ON.
742 * 'ALL' type means elements of any type excluding nodes and 0D elements
744 long_array FindAmongElementsByPoint(in SMESH_IDSource elements,
745 in double x, in double y, in double z,
747 raises (SALOME::SALOME_Exception);
750 * Return point state in a closed 2D mesh in terms of TopAbs_State enumeration.
751 * TopAbs_UNKNOWN state means that either mesh is wrong or the analysis fails.
753 short GetPointState(in double x, in double y, in double z)
754 raises (SALOME::SALOME_Exception);
757 * Check if a 2D mesh is manifold
760 raises (SALOME::SALOME_Exception);
763 * Check if orientation of 2D elements is coherent
765 boolean IsCoherentOrientation2D()
766 raises (SALOME::SALOME_Exception);
769 * Returns all or only closed FreeBorder's.
771 ListOfFreeBorders FindFreeBorders(in boolean closedOnly)
772 raises (SALOME::SALOME_Exception);
775 * Fill with 2D elements a hole defined by a FreeBorder.
777 void FillHole(in FreeBorder hole)
778 raises (SALOME::SALOME_Exception);
781 * Returns groups of FreeBorder's coincident within the given tolerance.
782 * If the tolerance <= 0.0 then one tenth of an average size of elements adjacent
783 * to free borders being compared is used.
785 CoincidentFreeBorders FindCoincidentFreeBorders(in double tolerance);
788 * Sew FreeBorder's of each group
790 short SewCoincidentFreeBorders (in CoincidentFreeBorders freeBorders,
791 in boolean createPolygons,
792 in boolean createPolyedrs)
793 raises (SALOME::SALOME_Exception);
797 SEW_BORDER1_NOT_FOUND,
798 SEW_BORDER2_NOT_FOUND,
799 SEW_BOTH_BORDERS_NOT_FOUND,
801 SEW_VOLUMES_TO_SPLIT,
802 // for SewSideElements() only:
803 SEW_DIFF_NB_OF_ELEMENTS,
804 SEW_TOPO_DIFF_SETS_OF_ELEMENTS,
810 Sew_Error SewFreeBorders (in long FirstNodeID1,
811 in long SecondNodeID1,
813 in long FirstNodeID2,
814 in long SecondNodeID2,
816 in boolean CreatePolygons,
817 in boolean CreatePolyedrs)
818 raises (SALOME::SALOME_Exception);
820 Sew_Error SewConformFreeBorders (in long FirstNodeID1,
821 in long SecondNodeID1,
823 in long FirstNodeID2,
824 in long SecondNodeID2)
825 raises (SALOME::SALOME_Exception);
827 Sew_Error SewBorderToSide (in long FirstNodeIDOnFreeBorder,
828 in long SecondNodeIDOnFreeBorder,
829 in long LastNodeIDOnFreeBorder,
830 in long FirstNodeIDOnSide,
831 in long LastNodeIDOnSide,
832 in boolean CreatePolygons,
833 in boolean CreatePolyedrs)
834 raises (SALOME::SALOME_Exception);
836 Sew_Error SewSideElements (in long_array IDsOfSide1Elements,
837 in long_array IDsOfSide2Elements,
838 in long NodeID1OfSide1ToMerge,
839 in long NodeID1OfSide2ToMerge,
840 in long NodeID2OfSide1ToMerge,
841 in long NodeID2OfSide2ToMerge)
842 raises (SALOME::SALOME_Exception);
845 * Set new nodes for given element.
846 * If number of nodes is not corresponded to type of
847 * element - returns false
849 boolean ChangeElemNodes(in long ide, in long_array newIDs)
850 raises (SALOME::SALOME_Exception);
853 * \brief Duplicates given elements, i.e. creates new elements based on the
854 * same nodes as the given ones.
855 * \param theElements - container of elements to duplicate.
856 * \param theGroupName - a name of group to contain the generated elements.
857 * If a group with such a name already exists, the new elements
858 * are added to the existng group, else a new group is created.
859 * If \a theGroupName is empty, new elements are not added
861 * \return a group where the new elements are added. NULL if theGroupName == "".
864 SMESH_Group DoubleElements( in SMESH_IDSource theElements,
865 in string theGroupName )
866 raises (SALOME::SALOME_Exception);
869 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
870 * \param theNodes - identifiers of nodes to be doubled
871 * \param theModifiedElems - identifiers of elements to be updated by the new (doubled)
872 * nodes. If list of element identifiers is empty then nodes are doubled but
873 * they not assigned to elements
874 * \return TRUE if operation has been completed successfully, FALSE otherwise
875 * \sa DoubleNode(), DoubleNodeGroup(), DoubleNodeGroups()
877 boolean DoubleNodes( in long_array theNodes, in long_array theModifiedElems )
878 raises (SALOME::SALOME_Exception);
881 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
882 * This method provided for convenience works as DoubleNodes() described above.
883 * \param theNodeId - identifier of node to be doubled.
884 * \param theModifiedElems - identifiers of elements to be updated.
885 * \return TRUE if operation has been completed successfully, FALSE otherwise
886 * \sa DoubleNodes(), DoubleNodeGroup(), DoubleNodeGroups()
888 boolean DoubleNode( in long theNodeId, in long_array theModifiedElems )
889 raises (SALOME::SALOME_Exception);
892 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
893 * This method provided for convenience works as DoubleNodes() described above.
894 * \param theNodes - group of nodes to be doubled.
895 * \param theModifiedElems - group of elements to be updated.
896 * \return TRUE if operation has been completed successfully, FALSE otherwise
897 * \sa DoubleNode(), DoubleNodes(), DoubleNodeGroups(), DoubleNodeGroupNew()
899 boolean DoubleNodeGroup( in SMESH_GroupBase theNodes,
900 in SMESH_GroupBase theModifiedElems )
901 raises (SALOME::SALOME_Exception);
903 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
904 * Works as DoubleNodeGroup() described above, but returns a new group with
905 * newly created nodes.
906 * \param theNodes - group of nodes to be doubled.
907 * \param theModifiedElems - group of elements to be updated.
908 * \return a new group with newly created nodes
909 * \sa DoubleNodeGroup()
911 SMESH_Group DoubleNodeGroupNew( in SMESH_GroupBase theNodes,
912 in SMESH_GroupBase theModifiedElems )
913 raises (SALOME::SALOME_Exception);
916 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
917 * This method provided for convenience works as DoubleNodes() described above.
918 * \param theNodes - list of groups of nodes to be doubled
919 * \param theModifiedElems - list of groups of elements to be updated.
920 * \return TRUE if operation has been completed successfully, FALSE otherwise
921 * \sa DoubleNode(), DoubleNodeGroup(), DoubleNodes()
923 boolean DoubleNodeGroups( in ListOfGroups theNodes,
924 in ListOfGroups theModifiedElems )
925 raises (SALOME::SALOME_Exception);
927 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
928 * Works as DoubleNodeGroups() described above, but returns a new group with
929 * newly created nodes.
930 * \param theNodes - list of groups of nodes to be doubled
931 * \param theModifiedElems - list of groups of elements to be updated.
932 * \return a new group with newly created nodes
933 * \sa DoubleNodeGroups()
935 SMESH_Group DoubleNodeGroupsNew( in ListOfGroups theNodes,
936 in ListOfGroups theModifiedElems )
937 raises (SALOME::SALOME_Exception);
940 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
941 * \param theElems - the list of elements (edges or faces) to be replicated
942 * The nodes for duplication could be found from these elements
943 * \param theNodesNot - list of nodes to NOT replicate
944 * \param theAffectedElems - the list of elements (cells and edges) to which the
945 * replicated nodes should be associated to.
946 * \return TRUE if operation has been completed successfully, FALSE otherwise
947 * \sa DoubleNodeGroup(), DoubleNodeGroups()
949 boolean DoubleNodeElem( in long_array theElems,
950 in long_array theNodesNot,
951 in long_array theAffectedElems )
952 raises (SALOME::SALOME_Exception);
955 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
956 * \param theElems - the list of elements (edges or faces) to be replicated
957 * The nodes for duplication could be found from these elements
958 * \param theNodesNot - list of nodes to NOT replicate
959 * \param theShape - shape to detect affected elements (element which geometric center
960 * located on or inside shape).
961 * The replicated nodes should be associated to affected elements.
962 * \return TRUE if operation has been completed successfully, FALSE otherwise
963 * \sa DoubleNodeGroupInRegion(), DoubleNodeGroupsInRegion()
965 boolean DoubleNodeElemInRegion( in long_array theElems,
966 in long_array theNodesNot,
967 in GEOM::GEOM_Object theShape )
968 raises (SALOME::SALOME_Exception);
971 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
972 * This method provided for convenience works as DoubleNodes() described above.
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 * \return TRUE if operation has been completed successfully, FALSE otherwise
978 * \sa DoubleNodes(), DoubleNodeGroups(), DoubleNodeElemGroupNew()
980 boolean DoubleNodeElemGroup( in SMESH_GroupBase theElems,
981 in SMESH_GroupBase theNodesNot,
982 in SMESH_GroupBase theAffectedElems )
983 raises (SALOME::SALOME_Exception);
985 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
986 * Works as DoubleNodeElemGroup() described above, but returns a new group with
987 * newly created elements.
988 * \param theElems - group of of elements (edges or faces) to be replicated
989 * \param theNodesNot - group of nodes not to replicated
990 * \param theAffectedElems - group of elements to which the replicated nodes
991 * should be associated to.
992 * \return a new group with newly created elements
993 * \sa DoubleNodeElemGroup()
995 SMESH_Group DoubleNodeElemGroupNew( in SMESH_GroupBase theElems,
996 in SMESH_GroupBase theNodesNot,
997 in SMESH_GroupBase theAffectedElems )
998 raises (SALOME::SALOME_Exception);
1000 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
1001 * Works as DoubleNodeElemGroup() described above, but returns two new groups:
1002 * a group of newly created elements and a group of newly created nodes
1003 * \param theElems - group of of elements (edges or faces) to be replicated
1004 * \param theNodesNot - group of nodes not to replicated
1005 * \param theAffectedElems - group of elements to which the replicated nodes
1006 * should be associated to.
1007 * \param theElemGroupNeeded - to create group of new elements or not
1008 * \param theNodeGroupNeeded - to create group of new nodes or not
1009 * \return two new groups of newly created elements (1st) and nodes (2nd)
1010 * \sa DoubleNodeElemGroup()
1012 ListOfGroups DoubleNodeElemGroup2New( in SMESH_GroupBase theElems,
1013 in SMESH_GroupBase theNodesNot,
1014 in SMESH_GroupBase theAffectedElems,
1015 in boolean theElemGroupNeeded,
1016 in boolean theNodeGroupNeeded)
1017 raises (SALOME::SALOME_Exception);
1020 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
1021 * This method provided for convenience works as DoubleNodes() described above.
1022 * \param theElems - group of elements (edges or faces) to be replicated
1023 * \param theNodesNot - group of nodes not to replicated
1024 * \param theShape - shape to detect affected elements (element which geometric center
1025 * located on or inside shape).
1026 * The replicated nodes should be associated to affected elements.
1027 * \return TRUE if operation has been completed successfully, FALSE otherwise
1028 * \sa DoubleNodesInRegion(), DoubleNodeGroupsInRegion()
1030 boolean DoubleNodeElemGroupInRegion( in SMESH_GroupBase theElems,
1031 in SMESH_GroupBase theNodesNot,
1032 in GEOM::GEOM_Object theShape )
1033 raises (SALOME::SALOME_Exception);
1036 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
1037 * This method provided for convenience works as DoubleNodes() described above.
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 * \return TRUE if operation has been completed successfully, FALSE otherwise
1043 * \sa DoubleNodeGroup(), DoubleNodes(), DoubleNodeElemGroupsNew()
1045 boolean DoubleNodeElemGroups( in ListOfGroups theElems,
1046 in ListOfGroups theNodesNot,
1047 in ListOfGroups theAffectedElems )
1048 raises (SALOME::SALOME_Exception);
1050 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
1051 * Works as DoubleNodeElemGroups() described above, but returns a new group with
1052 * newly created elements.
1053 * \param theElems - list of groups of elements (edges or faces) to be replicated
1054 * \param theNodesNot - list of groups of nodes not to replicated
1055 * \param theAffectedElems - group of elements to which the replicated nodes
1056 * should be associated to.
1057 * \return a new group with newly created elements
1058 * \sa DoubleNodeElemGroups()
1060 SMESH_Group DoubleNodeElemGroupsNew( in ListOfGroups theElems,
1061 in ListOfGroups theNodesNot,
1062 in ListOfGroups theAffectedElems )
1063 raises (SALOME::SALOME_Exception);
1065 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
1066 * Works as DoubleNodeElemGroups() described above, but returns two new groups:
1067 * a group of newly created elements and a group of newly created nodes.
1068 * \param theElems - list of groups of elements (edges or faces) to be replicated
1069 * \param theNodesNot - list of groups of nodes not to replicated
1070 * \param theAffectedElems - group of elements to which the replicated nodes
1071 * should be associated to.
1072 * \param theElemGroupNeeded - to create group of new elements or not
1073 * \param theNodeGroupNeeded - to create group of new nodes or not
1074 * \return two new groups of newly created elements (1st) and nodes (2nd)
1075 * \sa DoubleNodeElemGroups()
1077 ListOfGroups DoubleNodeElemGroups2New( in ListOfGroups theElems,
1078 in ListOfGroups theNodesNot,
1079 in ListOfGroups theAffectedElems,
1080 in boolean theElemGroupNeeded,
1081 in boolean theNodeGroupNeeded )
1082 raises (SALOME::SALOME_Exception);
1085 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
1086 * This method provided for convenience works as DoubleNodes() described above.
1087 * \param theElems - list of groups of elements (edges or faces) to be replicated
1088 * \param theNodesNot - list of groups of nodes not to replicated
1089 * \param theShape - shape to detect affected elements (element which geometric center
1090 * located on or inside shape).
1091 * The replicated nodes should be associated to affected elements.
1092 * \return TRUE if operation has been completed successfully, FALSE otherwise
1093 * \sa DoubleNodeGroupInRegion(), DoubleNodesInRegion()
1095 boolean DoubleNodeElemGroupsInRegion( in ListOfGroups theElems,
1096 in ListOfGroups theNodesNot,
1097 in GEOM::GEOM_Object theShape )
1098 raises (SALOME::SALOME_Exception);
1101 * \brief Identify the elements that will be affected by node duplication (actual duplication is not performed).
1102 * This method is the first step of DoubleNodeElemGroupsInRegion.
1103 * \param theElems - list of groups of elements (edges or faces) to be replicated
1104 * \param theNodesNot - list of groups of nodes not to replicated
1105 * \param theShape - shape to detect affected elements (element which geometric center
1106 * located on or inside shape).
1107 * The replicated nodes should be associated to affected elements.
1108 * \return groups of affected elements
1109 * \sa DoubleNodeElemGroupsInRegion()
1111 ListOfGroups AffectedElemGroupsInRegion( in ListOfGroups theElems,
1112 in ListOfGroups theNodesNot,
1113 in GEOM::GEOM_Object theShape )
1114 raises (SALOME::SALOME_Exception);
1117 * \brief Generates skin mesh (containing 2D cells) from 3D mesh
1118 * The created 2D mesh elements based on nodes of free faces of boundary volumes
1119 * \return TRUE if operation has been completed successfully, FALSE otherwise
1121 boolean Make2DMeshFrom3D() raises (SALOME::SALOME_Exception);
1124 * \brief Creates missing boundary elements
1125 * \param elements - elements whose boundary is to be checked
1126 * \param dimension - defines type of boundary elements to create
1127 * BND_1DFROM3D creates mesh edges on all borders of free facets of 3D elements.
1128 * \param groupName - a name of group to store created boundary elements in,
1129 * "" means not to create the group
1130 * \param meshName - a name of new mesh to store created boundary elements in,
1131 * "" means not to create the new mesh
1132 * \param toCopyElements - if true, the checked elements will be copied into the new mesh
1133 * else only boundary elements will be copied into the new mesh
1134 * \param toCopyExistingBondary - if true, not only new but also pre-existing
1135 * boundary elements will be copied into the new mesh
1136 * \param group - returns the create group, if any
1137 * \retval SMESH::SMESH_Mesh - the mesh where elements were added to
1139 SMESH_Mesh MakeBoundaryMesh(in SMESH_IDSource elements,
1140 in Bnd_Dimension dimension,
1141 in string groupName,
1143 in boolean toCopyElements,
1144 in boolean toCopyExistingBondary,
1145 out SMESH_Group group) raises (SALOME::SALOME_Exception);
1147 * \brief Creates missing boundary elements around either the whole mesh or
1148 * groups of 2D elements
1149 * \param dimension - defines type of boundary elements to create
1150 * \param groupName - a name of group to store all boundary elements in,
1151 * "" means not to create the group
1152 * \param meshName - a name of a new mesh, which is a copy of the initial
1153 * mesh + created boundary elements; "" means not to create the new mesh
1154 * \param toCopyAll - if true, the whole initial mesh will be copied into
1155 * the new mesh else only boundary elements will be copied into the new mesh
1156 * \param groups - optional groups of 2D elements to make boundary around
1157 * \param mesh - returns the mesh where elements were added to
1158 * \param group - returns the created group, if any
1159 * \retval long - number of added boundary elements
1161 long MakeBoundaryElements(in Bnd_Dimension dimension,
1162 in string groupName,
1164 in boolean toCopyAll,
1165 in ListOfIDSources groups,
1166 out SMESH_Mesh mesh,
1167 out SMESH_Group group) raises (SALOME::SALOME_Exception);
1170 * \brief Double nodes on shared faces between groups of volumes and create flat elements on demand.
1171 * Flat elements are mainly used by some types of mechanic calculations.
1173 * The list of groups must describe a partition of the mesh volumes.
1174 * The nodes of the internal faces at the boundaries of the groups are doubled.
1175 * In option, the internal faces are replaced by flat elements.
1176 * Triangles are transformed in prisms, and quadrangles in hexahedrons.
1177 * \param theDomains - list of groups of volumes
1178 * \param createJointElems - if TRUE, create the elements
1179 * \param onAllBoundaries - if TRUE, the nodes and elements are also created on
1180 * the boundary between \a theDomains and the rest mesh
1181 * \return TRUE if operation has been completed successfully, FALSE otherwise
1183 boolean DoubleNodesOnGroupBoundaries( in ListOfGroups theDomains,
1184 in boolean createJointElems,
1185 in boolean onAllBoundaries)
1186 raises (SALOME::SALOME_Exception);
1189 * \brief Double nodes on some external faces and create flat elements.
1190 * Flat elements are mainly used by some types of mechanic calculations.
1192 * Each group of the list must be constituted of faces.
1193 * Triangles are transformed in prisms, and quadrangles in hexahedrons.
1194 * \param theGroupsOfFaces - list of groups of faces
1195 * \return TRUE if operation has been completed successfully, FALSE otherwise
1197 boolean CreateFlatElementsOnFacesGroups( in ListOfGroups theGroupsOfFaces )
1198 raises (SALOME::SALOME_Exception);
1201 * \brief identify all the elements around a geom shape, get the faces delimiting the hole
1202 * Build groups of volume to remove, groups of faces to replace on the skin of the object,
1203 * groups of faces to remove insidethe object, (idem edges).
1204 * Build ordered list of nodes at the border of each group of faces to replace (to be used to build a geom subshape)
1206 void CreateHoleSkin(in double radius,
1207 in GEOM::GEOM_Object theShape,
1208 in string groupName,
1209 in double_array theNodesCoords,
1210 out array_of_long_array GroupsOfNodes)
1211 raises (SALOME::SALOME_Exception);