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 SMESH_Mesh Offset(in SMESH_IDSource theObject,
675 in boolean CopyGroups,
677 out ListOfGroups Groups)
678 raises (SALOME::SALOME_Exception);
680 void FindCoincidentNodes (in double Tolerance,
681 out array_of_long_array GroupsOfNodes,
682 in boolean SeparateCornersAndMedium)
683 raises (SALOME::SALOME_Exception);
685 void FindCoincidentNodesOnPart (in SMESH_IDSource SubMeshOrGroup,
687 out array_of_long_array GroupsOfNodes,
688 in boolean SeparateCornersAndMedium)
689 raises (SALOME::SALOME_Exception);
691 void FindCoincidentNodesOnPartBut (in SMESH_IDSource SubMeshOrGroup,
693 out array_of_long_array GroupsOfNodes,
694 in ListOfIDSources ExceptSubMeshOrGroups,
695 in boolean SeparateCornersAndMedium)
696 raises (SALOME::SALOME_Exception);
698 void MergeNodes (in array_of_long_array GroupsOfNodes,
699 in SMESH::ListOfIDSources NodesToKeep)
700 raises (SALOME::SALOME_Exception);
703 * \brief Find elements built on the same nodes.
704 * \param MeshOrSubMeshOrGroup Mesh or SubMesh, or Group of elements for searching.
705 * \return List of groups of equal elements.
707 void FindEqualElements (in SMESH_IDSource MeshOrSubMeshOrGroup,
708 out array_of_long_array GroupsOfElementsID)
709 raises (SALOME::SALOME_Exception);
712 * \brief Merge elements in each given group.
713 * \param GroupsOfElementsID Groups of elements for merging.
715 void MergeElements(in array_of_long_array GroupsOfElementsID)
716 raises (SALOME::SALOME_Exception);
719 * \brief Merge equal elements in the whole mesh.
721 void MergeEqualElements()
722 raises (SALOME::SALOME_Exception);
725 * If the given ID is a valid node ID (nodeID > 0), just move this node, else
726 * move the node closest to the point to point's location and return ID of the node
728 long MoveClosestNodeToPoint(in double x, in double y, in double z, in long nodeID)
729 raises (SALOME::SALOME_Exception);
732 * Return ID of node closest to a given point
734 long FindNodeClosestTo(in double x, in double y, in double z)
735 raises (SALOME::SALOME_Exception);
738 * Return elements of given type where the given point is IN or ON.
740 * 'ALL' type means elements of any type excluding nodes and 0D elements
742 long_array FindElementsByPoint(in double x, in double y, in double z, in ElementType type)
743 raises (SALOME::SALOME_Exception);
746 * Searching among the given elements, return elements of given type
747 * where the given point is IN or ON.
749 * 'ALL' type means elements of any type excluding nodes and 0D elements
751 long_array FindAmongElementsByPoint(in SMESH_IDSource elements,
752 in double x, in double y, in double z,
754 raises (SALOME::SALOME_Exception);
757 * Return point state in a closed 2D mesh in terms of TopAbs_State enumeration.
758 * TopAbs_UNKNOWN state means that either mesh is wrong or the analysis fails.
760 short GetPointState(in double x, in double y, in double z)
761 raises (SALOME::SALOME_Exception);
764 * Check if a 2D mesh is manifold
767 raises (SALOME::SALOME_Exception);
770 * Check if orientation of 2D elements is coherent
772 boolean IsCoherentOrientation2D()
773 raises (SALOME::SALOME_Exception);
776 * Returns all or only closed FreeBorder's.
778 ListOfFreeBorders FindFreeBorders(in boolean closedOnly)
779 raises (SALOME::SALOME_Exception);
782 * Fill with 2D elements a hole defined by a FreeBorder.
784 void FillHole(in FreeBorder hole)
785 raises (SALOME::SALOME_Exception);
788 * Returns groups of FreeBorder's coincident within the given tolerance.
789 * If the tolerance <= 0.0 then one tenth of an average size of elements adjacent
790 * to free borders being compared is used.
792 CoincidentFreeBorders FindCoincidentFreeBorders(in double tolerance);
795 * Sew FreeBorder's of each group
797 short SewCoincidentFreeBorders (in CoincidentFreeBorders freeBorders,
798 in boolean createPolygons,
799 in boolean createPolyedrs)
800 raises (SALOME::SALOME_Exception);
804 SEW_BORDER1_NOT_FOUND,
805 SEW_BORDER2_NOT_FOUND,
806 SEW_BOTH_BORDERS_NOT_FOUND,
808 SEW_VOLUMES_TO_SPLIT,
809 // for SewSideElements() only:
810 SEW_DIFF_NB_OF_ELEMENTS,
811 SEW_TOPO_DIFF_SETS_OF_ELEMENTS,
817 Sew_Error SewFreeBorders (in long FirstNodeID1,
818 in long SecondNodeID1,
820 in long FirstNodeID2,
821 in long SecondNodeID2,
823 in boolean CreatePolygons,
824 in boolean CreatePolyedrs)
825 raises (SALOME::SALOME_Exception);
827 Sew_Error SewConformFreeBorders (in long FirstNodeID1,
828 in long SecondNodeID1,
830 in long FirstNodeID2,
831 in long SecondNodeID2)
832 raises (SALOME::SALOME_Exception);
834 Sew_Error SewBorderToSide (in long FirstNodeIDOnFreeBorder,
835 in long SecondNodeIDOnFreeBorder,
836 in long LastNodeIDOnFreeBorder,
837 in long FirstNodeIDOnSide,
838 in long LastNodeIDOnSide,
839 in boolean CreatePolygons,
840 in boolean CreatePolyedrs)
841 raises (SALOME::SALOME_Exception);
843 Sew_Error SewSideElements (in long_array IDsOfSide1Elements,
844 in long_array IDsOfSide2Elements,
845 in long NodeID1OfSide1ToMerge,
846 in long NodeID1OfSide2ToMerge,
847 in long NodeID2OfSide1ToMerge,
848 in long NodeID2OfSide2ToMerge)
849 raises (SALOME::SALOME_Exception);
852 * Set new nodes for given element.
853 * If number of nodes is not corresponded to type of
854 * element - returns false
856 boolean ChangeElemNodes(in long ide, in long_array newIDs)
857 raises (SALOME::SALOME_Exception);
860 * \brief Duplicates given elements, i.e. creates new elements based on the
861 * same nodes as the given ones.
862 * \param theElements - container of elements to duplicate.
863 * \param theGroupName - a name of group to contain the generated elements.
864 * If a group with such a name already exists, the new elements
865 * are added to the existing group, else a new group is created.
866 * If \a theGroupName is empty, new elements are not added
868 * \return a group where the new elements are added. NULL if theGroupName == "".
871 SMESH_Group DoubleElements( in SMESH_IDSource theElements,
872 in string theGroupName )
873 raises (SALOME::SALOME_Exception);
876 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
877 * \param theNodes - identifiers of nodes to be doubled
878 * \param theModifiedElems - identifiers of elements to be updated by the new (doubled)
879 * nodes. If list of element identifiers is empty then nodes are doubled but
880 * they not assigned to elements
881 * \return TRUE if operation has been completed successfully, FALSE otherwise
882 * \sa DoubleNode(), DoubleNodeGroup(), DoubleNodeGroups()
884 boolean DoubleNodes( in long_array theNodes, in long_array theModifiedElems )
885 raises (SALOME::SALOME_Exception);
888 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
889 * This method provided for convenience works as DoubleNodes() described above.
890 * \param theNodeId - identifier of node to be doubled.
891 * \param theModifiedElems - identifiers of elements to be updated.
892 * \return TRUE if operation has been completed successfully, FALSE otherwise
893 * \sa DoubleNodes(), DoubleNodeGroup(), DoubleNodeGroups()
895 boolean DoubleNode( in long theNodeId, in long_array theModifiedElems )
896 raises (SALOME::SALOME_Exception);
899 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
900 * This method provided for convenience works as DoubleNodes() described above.
901 * \param theNodes - group of nodes to be doubled.
902 * \param theModifiedElems - group of elements to be updated.
903 * \return TRUE if operation has been completed successfully, FALSE otherwise
904 * \sa DoubleNode(), DoubleNodes(), DoubleNodeGroups(), DoubleNodeGroupNew()
906 boolean DoubleNodeGroup( in SMESH_GroupBase theNodes,
907 in SMESH_GroupBase theModifiedElems )
908 raises (SALOME::SALOME_Exception);
910 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
911 * Works as DoubleNodeGroup() described above, but returns a new group with
912 * newly created nodes.
913 * \param theNodes - group of nodes to be doubled.
914 * \param theModifiedElems - group of elements to be updated.
915 * \return a new group with newly created nodes
916 * \sa DoubleNodeGroup()
918 SMESH_Group DoubleNodeGroupNew( in SMESH_GroupBase theNodes,
919 in SMESH_GroupBase theModifiedElems )
920 raises (SALOME::SALOME_Exception);
923 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
924 * This method provided for convenience works as DoubleNodes() described above.
925 * \param theNodes - list of groups of nodes to be doubled
926 * \param theModifiedElems - list of groups of elements to be updated.
927 * \return TRUE if operation has been completed successfully, FALSE otherwise
928 * \sa DoubleNode(), DoubleNodeGroup(), DoubleNodes()
930 boolean DoubleNodeGroups( in ListOfGroups theNodes,
931 in ListOfGroups theModifiedElems )
932 raises (SALOME::SALOME_Exception);
934 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
935 * Works as DoubleNodeGroups() described above, but returns a new group with
936 * newly created nodes.
937 * \param theNodes - list of groups of nodes to be doubled
938 * \param theModifiedElems - list of groups of elements to be updated.
939 * \return a new group with newly created nodes
940 * \sa DoubleNodeGroups()
942 SMESH_Group DoubleNodeGroupsNew( in ListOfGroups theNodes,
943 in ListOfGroups theModifiedElems )
944 raises (SALOME::SALOME_Exception);
947 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
948 * \param theElems - the list of elements (edges or faces) to be replicated
949 * The nodes for duplication could be found from these elements
950 * \param theNodesNot - list of nodes to NOT replicate
951 * \param theAffectedElems - the list of elements (cells and edges) to which the
952 * replicated nodes should be associated to.
953 * \return TRUE if operation has been completed successfully, FALSE otherwise
954 * \sa DoubleNodeGroup(), DoubleNodeGroups()
956 boolean DoubleNodeElem( in long_array theElems,
957 in long_array theNodesNot,
958 in long_array theAffectedElems )
959 raises (SALOME::SALOME_Exception);
962 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
963 * \param theElems - the list of elements (edges or faces) to be replicated
964 * The nodes for duplication could be found from these elements
965 * \param theNodesNot - list of nodes to NOT replicate
966 * \param theShape - shape to detect affected elements (element which geometric center
967 * located on or inside shape).
968 * The replicated nodes should be associated to affected elements.
969 * \return TRUE if operation has been completed successfully, FALSE otherwise
970 * \sa DoubleNodeGroupInRegion(), DoubleNodeGroupsInRegion()
972 boolean DoubleNodeElemInRegion( in long_array theElems,
973 in long_array theNodesNot,
974 in GEOM::GEOM_Object theShape )
975 raises (SALOME::SALOME_Exception);
978 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
979 * This method provided for convenience works as DoubleNodes() described above.
980 * \param theElems - group of of elements (edges or faces) to be replicated
981 * \param theNodesNot - group of nodes not to replicated
982 * \param theAffectedElems - group of elements to which the replicated nodes
983 * should be associated to.
984 * \return TRUE if operation has been completed successfully, FALSE otherwise
985 * \sa DoubleNodes(), DoubleNodeGroups(), DoubleNodeElemGroupNew()
987 boolean DoubleNodeElemGroup( in SMESH_GroupBase theElems,
988 in SMESH_GroupBase theNodesNot,
989 in SMESH_GroupBase theAffectedElems )
990 raises (SALOME::SALOME_Exception);
992 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
993 * Works as DoubleNodeElemGroup() described above, but returns a new group with
994 * newly created elements.
995 * \param theElems - group of of elements (edges or faces) to be replicated
996 * \param theNodesNot - group of nodes not to replicated
997 * \param theAffectedElems - group of elements to which the replicated nodes
998 * should be associated to.
999 * \return a new group with newly created elements
1000 * \sa DoubleNodeElemGroup()
1002 SMESH_Group DoubleNodeElemGroupNew( in SMESH_GroupBase theElems,
1003 in SMESH_GroupBase theNodesNot,
1004 in SMESH_GroupBase theAffectedElems )
1005 raises (SALOME::SALOME_Exception);
1007 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
1008 * Works as DoubleNodeElemGroup() described above, but returns two new groups:
1009 * a group of newly created elements and a group of newly created nodes
1010 * \param theElems - group of of elements (edges or faces) to be replicated
1011 * \param theNodesNot - group of nodes not to replicated
1012 * \param theAffectedElems - group of elements to which the replicated nodes
1013 * should be associated to.
1014 * \param theElemGroupNeeded - to create group of new elements or not
1015 * \param theNodeGroupNeeded - to create group of new nodes or not
1016 * \return two new groups of newly created elements (1st) and nodes (2nd)
1017 * \sa DoubleNodeElemGroup()
1019 ListOfGroups DoubleNodeElemGroup2New( in SMESH_GroupBase theElems,
1020 in SMESH_GroupBase theNodesNot,
1021 in SMESH_GroupBase theAffectedElems,
1022 in boolean theElemGroupNeeded,
1023 in boolean theNodeGroupNeeded)
1024 raises (SALOME::SALOME_Exception);
1027 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
1028 * This method provided for convenience works as DoubleNodes() described above.
1029 * \param theElems - group of elements (edges or faces) to be replicated
1030 * \param theNodesNot - group of nodes not to replicated
1031 * \param theShape - shape to detect affected elements (element which geometric center
1032 * located on or inside shape).
1033 * The replicated nodes should be associated to affected elements.
1034 * \return TRUE if operation has been completed successfully, FALSE otherwise
1035 * \sa DoubleNodesInRegion(), DoubleNodeGroupsInRegion()
1037 boolean DoubleNodeElemGroupInRegion( in SMESH_GroupBase theElems,
1038 in SMESH_GroupBase theNodesNot,
1039 in GEOM::GEOM_Object theShape )
1040 raises (SALOME::SALOME_Exception);
1043 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
1044 * This method provided for convenience works as DoubleNodes() described above.
1045 * \param theElems - list of groups of elements (edges or faces) to be replicated
1046 * \param theNodesNot - list of groups of nodes not to replicated
1047 * \param theAffectedElems - group of elements to which the replicated nodes
1048 * should be associated to.
1049 * \return TRUE if operation has been completed successfully, FALSE otherwise
1050 * \sa DoubleNodeGroup(), DoubleNodes(), DoubleNodeElemGroupsNew()
1052 boolean DoubleNodeElemGroups( in ListOfGroups theElems,
1053 in ListOfGroups theNodesNot,
1054 in ListOfGroups theAffectedElems )
1055 raises (SALOME::SALOME_Exception);
1057 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
1058 * Works as DoubleNodeElemGroups() described above, but returns a new group with
1059 * newly created elements.
1060 * \param theElems - list of groups of elements (edges or faces) to be replicated
1061 * \param theNodesNot - list of groups of nodes not to replicated
1062 * \param theAffectedElems - group of elements to which the replicated nodes
1063 * should be associated to.
1064 * \return a new group with newly created elements
1065 * \sa DoubleNodeElemGroups()
1067 SMESH_Group DoubleNodeElemGroupsNew( in ListOfGroups theElems,
1068 in ListOfGroups theNodesNot,
1069 in ListOfGroups theAffectedElems )
1070 raises (SALOME::SALOME_Exception);
1072 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements.
1073 * Works as DoubleNodeElemGroups() described above, but returns two new groups:
1074 * a group of newly created elements and a group of newly created nodes.
1075 * \param theElems - list of groups of elements (edges or faces) to be replicated
1076 * \param theNodesNot - list of groups of nodes not to replicated
1077 * \param theAffectedElems - group of elements to which the replicated nodes
1078 * should be associated to.
1079 * \param theElemGroupNeeded - to create group of new elements or not
1080 * \param theNodeGroupNeeded - to create group of new nodes or not
1081 * \return two new groups of newly created elements (1st) and nodes (2nd)
1082 * \sa DoubleNodeElemGroups()
1084 ListOfGroups DoubleNodeElemGroups2New( in ListOfGroups theElems,
1085 in ListOfGroups theNodesNot,
1086 in ListOfGroups theAffectedElems,
1087 in boolean theElemGroupNeeded,
1088 in boolean theNodeGroupNeeded )
1089 raises (SALOME::SALOME_Exception);
1092 * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
1093 * This method provided for convenience works as DoubleNodes() described above.
1094 * \param theElems - list of groups of elements (edges or faces) to be replicated
1095 * \param theNodesNot - list of groups of nodes not to replicated
1096 * \param theShape - shape to detect affected elements (element which geometric center
1097 * located on or inside shape).
1098 * The replicated nodes should be associated to affected elements.
1099 * \return TRUE if operation has been completed successfully, FALSE otherwise
1100 * \sa DoubleNodeGroupInRegion(), DoubleNodesInRegion()
1102 boolean DoubleNodeElemGroupsInRegion( in ListOfGroups theElems,
1103 in ListOfGroups theNodesNot,
1104 in GEOM::GEOM_Object theShape )
1105 raises (SALOME::SALOME_Exception);
1108 * \brief Identify the elements that will be affected by node duplication (actual duplication is not performed).
1109 * This method is the first step of DoubleNodeElemGroupsInRegion.
1110 * \param theElems - list of groups of elements (edges or faces) to be replicated
1111 * \param theNodesNot - list of groups of nodes not to replicated
1112 * \param theShape - shape to detect affected elements (element which geometric center
1113 * located on or inside shape).
1114 * The replicated nodes should be associated to affected elements.
1115 * \return groups of affected elements
1116 * \sa DoubleNodeElemGroupsInRegion()
1118 ListOfGroups AffectedElemGroupsInRegion( in ListOfGroups theElems,
1119 in ListOfGroups theNodesNot,
1120 in GEOM::GEOM_Object theShape )
1121 raises (SALOME::SALOME_Exception);
1124 * \brief Generates skin mesh (containing 2D cells) from 3D mesh
1125 * The created 2D mesh elements based on nodes of free faces of boundary volumes
1126 * \return TRUE if operation has been completed successfully, FALSE otherwise
1128 boolean Make2DMeshFrom3D() raises (SALOME::SALOME_Exception);
1131 * \brief Creates missing boundary elements
1132 * \param elements - elements whose boundary is to be checked
1133 * \param dimension - defines type of boundary elements to create
1134 * BND_1DFROM3D creates mesh edges on all borders of free facets of 3D elements.
1135 * \param groupName - a name of group to store created boundary elements in,
1136 * "" means not to create the group
1137 * \param meshName - a name of new mesh to store created boundary elements in,
1138 * "" means not to create the new mesh
1139 * \param toCopyElements - if true, the checked elements will be copied into the new mesh
1140 * else only boundary elements will be copied into the new mesh
1141 * \param toCopyExistingBondary - if true, not only new but also pre-existing
1142 * boundary elements will be copied into the new mesh
1143 * \param group - returns the create group, if any
1144 * \retval SMESH::SMESH_Mesh - the mesh where elements were added to
1146 SMESH_Mesh MakeBoundaryMesh(in SMESH_IDSource elements,
1147 in Bnd_Dimension dimension,
1148 in string groupName,
1150 in boolean toCopyElements,
1151 in boolean toCopyExistingBondary,
1152 out SMESH_Group group) raises (SALOME::SALOME_Exception);
1154 * \brief Creates missing boundary elements around either the whole mesh or
1155 * groups of 2D elements
1156 * \param dimension - defines type of boundary elements to create
1157 * \param groupName - a name of group to store all boundary elements in,
1158 * "" means not to create the group
1159 * \param meshName - a name of a new mesh, which is a copy of the initial
1160 * mesh + created boundary elements; "" means not to create the new mesh
1161 * \param toCopyAll - if true, the whole initial mesh will be copied into
1162 * the new mesh else only boundary elements will be copied into the new mesh
1163 * \param groups - optional groups of 2D elements to make boundary around
1164 * \param mesh - returns the mesh where elements were added to
1165 * \param group - returns the created group, if any
1166 * \retval long - number of added boundary elements
1168 long MakeBoundaryElements(in Bnd_Dimension dimension,
1169 in string groupName,
1171 in boolean toCopyAll,
1172 in ListOfIDSources groups,
1173 out SMESH_Mesh mesh,
1174 out SMESH_Group group) raises (SALOME::SALOME_Exception);
1177 * \brief Double nodes on shared faces between groups of volumes and create flat elements on demand.
1178 * Flat elements are mainly used by some types of mechanic calculations.
1180 * The list of groups must describe a partition of the mesh volumes.
1181 * The nodes of the internal faces at the boundaries of the groups are doubled.
1182 * In option, the internal faces are replaced by flat elements.
1183 * Triangles are transformed in prisms, and quadrangles in hexahedrons.
1184 * \param theDomains - list of groups of volumes
1185 * \param createJointElems - if TRUE, create the elements
1186 * \param onAllBoundaries - if TRUE, the nodes and elements are also created on
1187 * the boundary between \a theDomains and the rest mesh
1188 * \return TRUE if operation has been completed successfully, FALSE otherwise
1190 boolean DoubleNodesOnGroupBoundaries( in ListOfGroups theDomains,
1191 in boolean createJointElems,
1192 in boolean onAllBoundaries)
1193 raises (SALOME::SALOME_Exception);
1196 * \brief Double nodes on some external faces and create flat elements.
1197 * Flat elements are mainly used by some types of mechanic calculations.
1199 * Each group of the list must be constituted of faces.
1200 * Triangles are transformed in prisms, and quadrangles in hexahedrons.
1201 * \param theGroupsOfFaces - list of groups of faces
1202 * \return TRUE if operation has been completed successfully, FALSE otherwise
1204 boolean CreateFlatElementsOnFacesGroups( in ListOfGroups theGroupsOfFaces )
1205 raises (SALOME::SALOME_Exception);
1208 * \brief identify all the elements around a geom shape, get the faces delimiting the hole
1209 * Build groups of volume to remove, groups of faces to replace on the skin of the object,
1210 * groups of faces to remove insidethe object, (idem edges).
1211 * Build ordered list of nodes at the border of each group of faces to replace (to be used to build a geom subshape)
1213 void CreateHoleSkin(in double radius,
1214 in GEOM::GEOM_Object theShape,
1215 in string groupName,
1216 in double_array theNodesCoords,
1217 out array_of_long_array GroupsOfNodes)
1218 raises (SALOME::SALOME_Exception);