1 // Copyright (C) 2007-2021 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
23 // File : SMESH_Mesh.idl
24 // Author : Paul RASCLE, EDF
26 #ifndef _SMESH_MESH_IDL_
27 #define _SMESH_MESH_IDL_
29 #include "SALOME_Exception.idl"
30 #include "SALOME_GenericObj.idl"
31 #include "GEOM_Gen.idl"
32 #include "SMESH_smIdType.idl"
36 interface SMESH_Hypothesis;
37 typedef sequence<SMESH_Hypothesis> ListOfHypothesis;
38 interface SMESH_GroupBase;
39 typedef sequence<SMESH_GroupBase> ListOfGroups;
40 interface SMESH_IDSource;
41 typedef sequence<SMESH_IDSource> ListOfIDSources;
43 typedef sequence<double > double_array ;
44 typedef sequence<long > long_array ;
45 typedef sequence<smIdType > smIdType_array ;
46 typedef sequence<string > string_array ;
47 typedef sequence<long_array> array_of_long_array ;
65 CHANGE_POLYHEDRON_NODES,
78 ADD_BIQUAD_QUADRANGLE,
91 typedef sequence<log_block> log_array;
93 struct PointStruct { double x;
97 typedef sequence<PointStruct> nodes_array;
99 struct DirStruct { PointStruct PS; }; // analog to OCCT gp_Vec
101 struct AxisStruct { double x;
108 * Node location on a shape
110 struct NodePosition {
112 GEOM::shape_type shapeType;
113 double_array params; // [U] on EDGE, [U,V] on FACE, [] on the rest shapes
117 * Element location on a shape
119 struct ElementPosition {
121 GEOM::shape_type shapeType;
125 * Enumeration for element type, like in SMDS
138 typedef sequence<ElementType> array_of_ElementType;
141 * Enumeration for element geometry type, like SMDSAbs_GeometryType in SMDSAbs_ElementType.hxx
148 Geom_QUADRANGLE, // when a new GeometryType is added, please
149 Geom_POLYGON, // update a corresponding list in SMESH_2smeshpy.cxx, ln 665
154 Geom_HEXAGONAL_PRISM,
161 * ElementOrder points out entities of what order are requested
164 ORDER_ANY, /*! entities of any order */
165 ORDER_LINEAR, /*! entities of 1st order */
166 ORDER_QUADRATIC /*! entities of 2nd order */
170 * Enumeration of entity type used in mesh info array,
171 * it should be synchronised with enum SMDSAbs_EntityType
180 Entity_Quad_Triangle,
181 Entity_BiQuad_Triangle,
183 Entity_Quad_Quadrangle,
184 Entity_BiQuad_Quadrangle,
197 Entity_Hexagonal_Prism,
199 Entity_Quad_Polyhedra,
205 * Enumeration for hypothesis status (used by AddHypothesis() and RemoveHypothesis() methods)
207 enum Hypothesis_Status // in the order of severity
210 HYP_MISSING, // algo misses a hypothesis
211 HYP_CONCURRENT, // several applicable hypotheses
212 HYP_BAD_PARAMETER,// hypothesis has a bad parameter value
213 HYP_HIDDEN_ALGO, // an algo is hidden by an upper dim algo generating all-dim elements
214 HYP_HIDING_ALGO, // an algo hides lower dim algos by generating all-dim elements
215 HYP_UNKNOWN_FATAL,// --- all statuses below should be considered as fatal
216 // for Add/RemoveHypothesis operations
217 HYP_INCOMPATIBLE, // hypothesis does not fit algo
218 HYP_NOTCONFORM, // not conform mesh is produced applying a hypothesis
219 HYP_ALREADY_EXIST,// such hypothesis already exist
220 HYP_BAD_DIM, // bad dimension
221 HYP_BAD_SUBSHAPE, // shape is neither the main one, nor its sub-shape, nor a group
222 HYP_BAD_GEOMETRY, // geometry mismatches algorithm's expectation
223 HYP_NEED_SHAPE, // algorithm can work on shape only
224 HYP_INCOMPAT_HYPS // several additional hypotheses are incompatible one with other
228 * Enumeration for mesh read status (used by SMESH_Gen::CreateMeshesFrom*() methods)
230 enum DriverMED_ReadStatus // in the order of severity
233 DRS_EMPTY, // a file contains no mesh with the given name
234 DRS_WARN_RENUMBER, // a MED file has overlapped ranges of element numbers,
235 // so the numbers from the file are ignored
236 DRS_WARN_SKIP_ELEM, // some elements were skipped due to incorrect file data
237 DRS_WARN_DESCENDING, // some elements were skipped due to descending connectivity
238 DRS_FAIL // general failure (exception etc.)
242 * \brief A structure containing information about MED file
246 string fileName; //!< name of file
247 long fileSize; //!< size of file
248 long major, minor, release; //!< MED file version
252 * Enumeration for CreateDimGroup()
254 enum NB_COMMON_NODES_ENUM
256 ALL_NODES, MAIN, AT_LEAST_ONE, MAJORITY
260 * Auxiliary flags for advanced extrusion.
261 * BOUNDARY: create or not boundary for result of extrusion
262 * SEW: try to use existing nodes or create new nodes in any case
264 const long EXTRUSION_FLAG_BOUNDARY = 1;
265 const long EXTRUSION_FLAG_SEW = 2;
268 * Structure used in mesh edit preview data (MeshPreviewStruct)
270 struct ElementSubType { ElementType SMDS_ElementType;
272 short nbNodesInElement; };
274 typedef sequence<ElementSubType> types_array;
277 * Structure containing mesh edit preview data
279 struct MeshPreviewStruct { nodes_array nodesXYZ;
280 long_array elementConnectivities;
281 types_array elementTypes; };
283 interface SMESH_Mesh;
285 interface SMESH_IDSource : SALOME::GenericObj
288 * Returns a sequence of all element IDs
290 smIdType_array GetIDs();
293 * Returns number of mesh elements of each \a EntityType
294 * @return array of number of elements per \a EntityType
296 smIdType_array GetMeshInfo();
299 * Returns number of mesh elements of each \a ElementType
300 * @return array of number of elements per \a ElementType
302 smIdType_array GetNbElementsByType();
305 * Returns types of elements it contains.
306 * It's empty if the SMESH_IDSource contains no IDs
308 array_of_ElementType GetTypes();
313 SMESH_Mesh GetMesh();
316 * Returns false if GetMeshInfo() returns incorrect information that may
317 * happen if mesh data is not yet fully loaded from the file of study.
319 boolean IsMeshInfoCorrect();
322 * Returns mesh unstructed grid information.
324 SALOMEDS::TMPFile GetVtkUgStream();
327 interface SMESH_Group;
328 interface SMESH_GroupOnGeom;
330 interface SMESH_GroupOnFilter;
331 interface SMESH_subMesh;
332 interface SMESH_MeshEditor;
334 typedef sequence<SMESH_subMesh> submesh_array;
335 typedef sequence<submesh_array> submesh_array_array;
337 interface SMESH_Mesh : SMESH_IDSource
340 * Return true if there is a geometry to be meshed
342 boolean HasShapeToMesh()
343 raises (SALOME::SALOME_Exception);
346 * Get geom shape to mesh. A result should not be nil. Use HasShapeToMesh()
347 * to know if a returned shape
349 GEOM::GEOM_Object GetShapeToMesh()
350 raises (SALOME::SALOME_Exception);
353 * Replaces a shape in the mesh
355 void ReplaceShape(in GEOM::GEOM_Object theNewGeom)
356 raises (SALOME::SALOME_Exception);
359 * Return false if the mesh is not yet fully loaded from the study file
362 raises (SALOME::SALOME_Exception);
365 * Load full mesh data from the study file
368 raises (SALOME::SALOME_Exception);
371 * Remove all nodes and elements
374 raises (SALOME::SALOME_Exception);
377 * Get the list of sub-meshes existing in the mesh
379 submesh_array GetSubMeshes()
380 raises (SALOME::SALOME_Exception);
383 * Remove all nodes and elements of submesh
385 void ClearSubMesh(in long ShapeID)
386 raises (SALOME::SALOME_Exception);
389 * Get the subMesh object associated to a Sub-shape. The subMesh object
390 * gives access to nodes and elements IDs.
391 * SubMesh will be used instead of Sub-shape in a next idl version to
392 * address a specific subMesh...
394 SMESH_subMesh GetSubMesh(in GEOM::GEOM_Object aSubObject, in string name)
395 raises (SALOME::SALOME_Exception);
400 void RemoveSubMesh(in SMESH_subMesh aSubMesh)
401 raises (SALOME::SALOME_Exception);
407 SMESH_Group CreateGroup( in ElementType elem_type,
409 raises (SALOME::SALOME_Exception);
412 * Create a group from geometry
414 SMESH_GroupOnGeom CreateGroupFromGEOM( in ElementType elemType,
416 in GEOM::GEOM_Object geomObject )
417 raises (SALOME::SALOME_Exception);
420 * Create a group from filter
422 SMESH_GroupOnFilter CreateGroupFromFilter( in ElementType elemType,
424 in SMESH::Filter filter )
425 raises (SALOME::SALOME_Exception);
430 void RemoveGroup(in SMESH_GroupBase aGroup)
431 raises (SALOME::SALOME_Exception);
434 * Remove group with its contents
436 void RemoveGroupWithContents( in SMESH_GroupBase aGroup )
437 raises (SALOME::SALOME_Exception);
440 * Get the list of groups existing in the mesh
442 ListOfGroups GetGroups()
443 raises (SALOME::SALOME_Exception);
446 * Get number of groups existing in the mesh
449 raises (SALOME::SALOME_Exception);
452 * Union of two groups
453 * New group is created. All mesh elements that are
454 * present in initial groups are added to the new one
456 SMESH_Group UnionGroups (in SMESH_GroupBase aGroup1,
457 in SMESH_GroupBase aGroup2,
459 raises (SALOME::SALOME_Exception);
462 * Union of list of groups
463 * New group is created. All mesh elements that are
464 * present in initial groups are added to the new one
466 SMESH_Group UnionListOfGroups (in ListOfGroups aListOfGroups,
468 raises (SALOME::SALOME_Exception);
471 * Intersection of two groups
472 * New group is created. All mesh elements that are
473 * present in both initial groups are added to the new one.
475 SMESH_Group IntersectGroups (in SMESH_GroupBase aGroup1,
476 in SMESH_GroupBase aGroup2,
478 raises (SALOME::SALOME_Exception);
481 * Intersection of list of groups
482 * New group is created. All mesh elements that are
483 * present in all initial groups simultaneously are added to the new one.
485 SMESH_Group IntersectListOfGroups (in ListOfGroups aListOfGroups,
487 raises (SALOME::SALOME_Exception);
491 * New group is created. All mesh elements that are present in
492 * main group but do not present in tool group are added to the new one
494 SMESH_Group CutGroups (in SMESH_GroupBase aMainGroup,
495 in SMESH_GroupBase aToolGroup,
497 raises (SALOME::SALOME_Exception);
500 * Cut of lists of groups
501 * New group is created. All mesh elements that are present in
502 * main groups but do not present in tool groups are added to the new one
504 SMESH_Group CutListOfGroups (in ListOfGroups aMainGroups,
505 in ListOfGroups aToolGroups,
507 raises (SALOME::SALOME_Exception);
510 * Create a group of entities basing on nodes of other groups.
511 * \param [in] aListOfGroups - list of either groups, sub-meshes or filters.
512 * \param [in] anElemType - a type of elements to include to the new group.
513 * \param [in] name - a name of the new group.
514 * \param [in] nbCommonNodes - criterion of inclusion of an element to the new group.
515 * \param [in] underlyingOnly - if \c True, an element is included to the
516 * new group provided that it is based on nodes of an element of
518 * \return SMESH_Group - the created group
520 SMESH_Group CreateDimGroup( in ListOfIDSources aListOfGroups,
521 in ElementType anElemType,
523 in NB_COMMON_NODES_ENUM nbCommonNodes,
524 in boolean underlyingOnly )
525 raises (SALOME::SALOME_Exception);
528 * Distribute all faces of the mesh among groups using sharp edges and optionally
529 * existing 1D elements as group boundaries.
530 * \param [in] sharpAngle - edge is considered sharp if an angle between normals of
531 * adjacent faces is more than \a sharpAngle in degrees.
532 * \param [in] createEdges - to create 1D elements for detected sharp edges.
533 * \param [in] useExistingEdges - to use existing edges as group boundaries
534 * \return ListOfGroups - the created groups
536 ListOfGroups FaceGroupsSeparatedByEdges( in double sharpAngle,
537 in boolean createEdges,
538 in boolean useExistingEdges )
539 raises (SALOME::SALOME_Exception);
542 * Convert group on geometry or on filter into standalone group
544 SMESH_Group ConvertToStandalone( in SMESH_GroupBase theGroupOn )
545 raises (SALOME::SALOME_Exception);
548 * Add hypothesis to the mesh, under a particular sub-shape
549 * (or the main shape itself)
550 * This method is only used to prepare the build of the mesh and store
551 * the algorithms and associated parameters.
552 * Actual job of meshing the shape is done by SMESH_Gen::Compute()
554 * - aSubObject : sub-shape obtained by a shape explode in GEOM
556 * - anHyp : an hypothesis object
558 * - An enum item explaining what's up
559 * - anErrorText: an optional textual description of a problem (if any)
561 Hypothesis_Status AddHypothesis(in GEOM::GEOM_Object aSubObject,
562 in SMESH_Hypothesis anHyp,
563 out string anErrorText)
564 raises (SALOME::SALOME_Exception);
567 * Remove an hypothesis previously added with AddHypothesis.
569 Hypothesis_Status RemoveHypothesis(in GEOM::GEOM_Object aSubObject,
570 in SMESH_Hypothesis anHyp)
571 raises (SALOME::SALOME_Exception);
574 * Get the list of hypothesis added on a sub-shape
576 ListOfHypothesis GetHypothesisList(in GEOM::GEOM_Object aSubObject)
577 raises (SALOME::SALOME_Exception);
580 * Get the log of nodes and elements added or removed since previous
583 * - clearAfterGet : log is emptied after Get (safe if concurrents access)
585 log_array GetLog(in boolean clearAfterGet)
586 raises (SALOME::SALOME_Exception);
589 * Clear the log of nodes and elements added or removed since previous
590 * clear. Must be used immediately after GetLog if clearAfterGet is false.
593 raises (SALOME::SALOME_Exception);
596 * Toggle auto color mode on the object.
598 * - theAutoColor : flag which toggles auto color mode.
600 void SetAutoColor(in boolean theAutoColor)
601 raises (SALOME::SALOME_Exception);
604 * Get flag of object's auto color mode.
606 boolean GetAutoColor()
607 raises (SALOME::SALOME_Exception);
610 * Get the internal Id
615 * Obtain instance of SMESH_MeshEditor
617 SMESH_MeshEditor GetMeshEditor()
618 raises (SALOME::SALOME_Exception);
621 * Return SMESH_MeshEditor that would not modify the mesh but
622 * fill MeshPreviewStruct
624 SMESH_MeshEditor GetMeshEditPreviewer()
625 raises (SALOME::SALOME_Exception);
628 * Return true if the mesh has been edited since a total re-compute
629 * and those modifications may prevent successful partial re-compute
631 boolean HasModificationsToDiscard()
632 raises (SALOME::SALOME_Exception);
634 /*! Check group names for duplications.
635 * Consider maximum group name length stored in MED file.
637 boolean HasDuplicatedGroupNamesMED();
640 * Export a Mesh to MED file.
642 * - fileName : name of the MED file
643 * - auto_groups : boolean parameter for creating/not creating
644 * the groups Group_On_All_Nodes, Group_On_All_Faces, ... ;
645 * the typical use is auto_groups=false.
646 * - overwrite : boolean parameter for overwriting/not overwriting the file, if it exists
647 * - version : define the version of MED file format, coded with major and minor digits (release digit not used)
648 * for instance med 3.2.1 is coded 3*10+2 = 32, med 4.0.0 is coded 4*10+0 = 40.
649 * The rules of compatibility to write a mesh in an older version than the current version
650 * depend on the current version. For instance, with med 4.0 it is possible to write/append
651 * med files in 4.0.0 (default format) or 3.2.1 or 3.3.1 formats.
652 * The minor must be between 0 and the current minor version of MED file library.
653 * If version is equal to -1, the version is not changed (default).
654 * - autoDimension : if @c true, a space dimension of a MED mesh can be either
655 * - 1D if all mesh nodes lie on OX coordinate axis, or
656 * - 2D if all mesh nodes lie on XOY coordinate plane, or
657 * - 3D in the rest cases.
658 * If @a autoDimension is @c false, the space dimension is always 3.
660 void ExportMED( in string fileName,
661 in boolean auto_groups,
663 in boolean overwrite,
664 in boolean autoDimension) raises (SALOME::SALOME_Exception);
666 long long ExportMEDCoupling(in boolean auto_groups,
667 in boolean autoDimension) raises (SALOME::SALOME_Exception);
670 * Export a [part of] Mesh into a MED file
672 * - meshPart : a part of mesh to store
673 * - fileName : name of the MED file
674 * - overwrite : boolean parameter for overwriting/not overwriting the file, if it exists
675 * - version : define the version of MED file format, coded with major and minor digits (release digit not used)
676 * for instance med 3.2.1 is coded 3*10+2 = 32, med 4.0.0 is coded 4*10+0 = 40.
677 * The rules of compatibility to write a mesh in an older version than the current version
678 * depend on the current version. For instance, with med 4.0 it is possible to write/append
679 * med files in 4.0.0 (default format) or 3.2.1 or 3.3.1 formats.
680 * The minor must be between 0 and the current minor version of MED file library.
681 * If version is equal to -1, the version is not changed (default).
682 * - autoDimension : if @c True, a space dimension for export is defined by mesh
683 * configuration; for example a planar mesh lying on XOY plane
684 * will be exported as a mesh in 2D space.
685 * If @a autoDimension == @c False, the space dimension is 3.
686 * - fields : list of GEOM fields defined on the shape to mesh.
687 * - geomAssocFields : each character of this string means a need to export a
688 * corresponding field; correspondence between fields and characters is following:
689 * - 'v' stands for _vertices_ field;
690 * - 'e' stands for _edges_ field;
691 * - 'f' stands for _faces_ field;
692 * - 's' stands for _solids_ field.
693 * - ZTolerance : tolerance in Z direction. If Z coordinate of a node is close to zero
694 * within a given tolerance, the coordinate is set to zero.
695 * If @a ZTolerance is negative, the node coordinates are kept as is.
696 * - saveNumbers : enable saving numbers of nodes and cells.
698 void ExportPartToMED( in SMESH_IDSource meshPart,
700 in boolean auto_groups,
702 in boolean overwrite,
703 in boolean autoDimension,
704 in GEOM::ListOfFields fields,
705 in string geomAssocFields,
706 in double ZTolerance,
707 in boolean saveNumbers) raises (SALOME::SALOME_Exception);
709 long long ExportPartToMEDCoupling( in SMESH_IDSource meshPart,
710 in boolean auto_groups,
711 in boolean autoDimension,
712 in GEOM::ListOfFields fields,
713 in string geomAssocFields,
714 in double ZTolerance,
715 in boolean saveNumbers) raises (SALOME::SALOME_Exception);
718 * Return string representation of a MED file version comprising nbDigits
720 string GetVersionString(in long minor, in short nbDigits);
723 * Return the list of med versions compatibles for write/append,
724 * encoded in 10*major+minor (for instance, code for med 3.2.1 is 32)
726 long_array GetMEDVersionsCompatibleForAppend();
729 * Export Mesh to different Formats
730 * (UNV supported version is I-DEAS 10)
732 void ExportDAT( in string file,
733 in boolean renumer) raises (SALOME::SALOME_Exception);
734 void ExportUNV( in string file,
735 in boolean renumer ) raises (SALOME::SALOME_Exception);
736 void ExportSTL( in string file,
737 in boolean isascii ) raises (SALOME::SALOME_Exception);
738 void ExportCGNS( in SMESH_IDSource meshPart,
740 in boolean overwrite,
741 in boolean groupElemsByType) raises (SALOME::SALOME_Exception);
742 void ExportGMF( in SMESH_IDSource meshPart,
744 in boolean withRequiredGroups) raises (SALOME::SALOME_Exception);
745 void ExportPartToDAT( in SMESH_IDSource meshPart,
747 in boolean renumer ) raises (SALOME::SALOME_Exception);
748 void ExportPartToUNV( in SMESH_IDSource meshPart,
750 in boolean renumer ) raises (SALOME::SALOME_Exception);
751 void ExportPartToSTL( in SMESH_IDSource meshPart,
753 in boolean isascii ) raises (SALOME::SALOME_Exception);
755 * Return computation progress [0.,1]
757 double GetComputeProgress();
760 * Get information about mesh contents
763 raises (SALOME::SALOME_Exception);
765 smIdType NbElements()
766 raises (SALOME::SALOME_Exception);
768 smIdType Nb0DElements()
769 raises (SALOME::SALOME_Exception);
772 raises (SALOME::SALOME_Exception);
775 raises (SALOME::SALOME_Exception);
777 smIdType NbEdgesOfOrder(in ElementOrder order)
778 raises (SALOME::SALOME_Exception);
781 raises (SALOME::SALOME_Exception);
783 smIdType NbFacesOfOrder(in ElementOrder order)
784 raises (SALOME::SALOME_Exception);
786 smIdType NbTriangles()
787 raises (SALOME::SALOME_Exception);
789 smIdType NbTrianglesOfOrder(in ElementOrder order)
790 raises (SALOME::SALOME_Exception);
792 smIdType NbBiQuadTriangles()
793 raises (SALOME::SALOME_Exception);
795 smIdType NbQuadrangles()
796 raises (SALOME::SALOME_Exception);
798 smIdType NbQuadranglesOfOrder(in ElementOrder order)
799 raises (SALOME::SALOME_Exception);
801 smIdType NbBiQuadQuadrangles()
802 raises (SALOME::SALOME_Exception);
804 smIdType NbPolygons()
805 raises (SALOME::SALOME_Exception);
807 smIdType NbPolygonsOfOrder(in ElementOrder order)
808 raises (SALOME::SALOME_Exception);
811 raises (SALOME::SALOME_Exception);
813 smIdType NbVolumesOfOrder(in ElementOrder order)
814 raises (SALOME::SALOME_Exception);
817 raises (SALOME::SALOME_Exception);
819 smIdType NbTetrasOfOrder(in ElementOrder order)
820 raises (SALOME::SALOME_Exception);
823 raises (SALOME::SALOME_Exception);
825 smIdType NbHexasOfOrder(in ElementOrder order)
826 raises (SALOME::SALOME_Exception);
828 smIdType NbTriQuadraticHexas()
829 raises (SALOME::SALOME_Exception);
831 smIdType NbPyramids()
832 raises (SALOME::SALOME_Exception);
834 smIdType NbPyramidsOfOrder(in ElementOrder order)
835 raises (SALOME::SALOME_Exception);
838 raises (SALOME::SALOME_Exception);
840 smIdType NbPrismsOfOrder(in ElementOrder order)
841 raises (SALOME::SALOME_Exception);
843 smIdType NbHexagonalPrisms()
844 raises (SALOME::SALOME_Exception);
846 smIdType NbPolyhedrons()
847 raises (SALOME::SALOME_Exception);
850 raises (SALOME::SALOME_Exception);
852 smIdType_array GetElementsId()
853 raises (SALOME::SALOME_Exception);
855 smIdType_array GetElementsByType( in ElementType theType )
856 raises (SALOME::SALOME_Exception);
858 smIdType_array GetNodesId()
859 raises (SALOME::SALOME_Exception);
862 * Returns type of mesh element
864 ElementType GetElementType( in smIdType id, in boolean iselem )
865 raises (SALOME::SALOME_Exception);
867 EntityType GetElementGeomType( in smIdType id )
868 raises (SALOME::SALOME_Exception);
870 GeometryType GetElementShape( in smIdType id )
871 raises (SALOME::SALOME_Exception);
873 smIdType_array GetSubMeshElementsId(in long ShapeID)
874 raises (SALOME::SALOME_Exception);
876 smIdType_array GetSubMeshNodesId(in long ShapeID, in boolean all )
877 raises (SALOME::SALOME_Exception);
879 ElementType GetSubMeshElementType(in long ShapeID)
880 raises (SALOME::SALOME_Exception);
884 * Methods to set meshing order of submeshes
888 * \brief Return \c true if a meshing order not yet set for a concurrent sub-mesh
890 boolean IsUnorderedSubMesh(in long submeshID);
893 * \brief Return submesh objects list in meshing order
895 submesh_array_array GetMeshOrder();
898 * \brief Set submesh object order
900 boolean SetMeshOrder(in submesh_array_array theSubMeshArray);
904 * Get mesh description
911 long long GetMeshPtr();
914 * Get XYZ coordinates of node as list of double
915 * If there is not node for given ID - returns empty list
917 double_array GetNodeXYZ(in smIdType id);
920 * For given node returns list of IDs of inverse elements
921 * If there is not node for given ID - returns empty list
923 smIdType_array GetNodeInverseElements(in smIdType id, in ElementType elemType);
926 * \brief Return position of a node on shape
928 NodePosition GetNodePosition(in smIdType NodeID);
931 * \brief Return position of an element on shape
933 ElementPosition GetElementPosition(in smIdType ElemID);
936 * If given element is node returns IDs of shape from position
937 * If there is not node for given ID - returns -1
939 long GetShapeID(in smIdType id);
942 * For given element returns ID of result shape after
943 * ::FindShape() from SMESH_MeshEditor
944 * If there is not element for given ID - returns -1
946 long GetShapeIDForElem(in smIdType id);
949 * Returns number of nodes for given element
950 * If there is not element for given ID - returns -1
952 short GetElemNbNodes(in smIdType id);
955 * Returns IDs of nodes of given element
957 smIdType_array GetElemNodes(in smIdType id);
960 * Returns ID of node by given index for given element
961 * If there is not element for given ID - returns -1
962 * If there is not node for given index - returns -2
964 smIdType GetElemNode(in smIdType id, in short index);
967 * Returns true if given node is medium node
968 * in given quadratic element
970 boolean IsMediumNode(in smIdType ide, in smIdType idn);
973 * Returns true if given node is medium node
974 * in one of quadratic elements
976 boolean IsMediumNodeOfAnyElem(in smIdType idn, in ElementType elem_type);
979 * Returns number of edges for given element
981 long ElemNbEdges(in smIdType id);
984 * Returns number of faces for given element
986 long ElemNbFaces(in smIdType id);
989 * Returns nodes of given face (counted from zero) for given volumic element.
991 smIdType_array GetElemFaceNodes(in smIdType elemId, in short faceIndex);
994 * Returns three components of normal of given mesh face (or an empty array in KO case)
996 double_array GetFaceNormal(in long faceId, in boolean normalized);
999 * Returns an element based on all given nodes.
1001 smIdType FindElementByNodes(in smIdType_array nodes);
1004 * Return elements including all given nodes.
1006 smIdType_array GetElementsByNodes(in smIdType_array nodes, in ElementType elem_type);
1009 * Returns true if given element is polygon
1011 boolean IsPoly(in smIdType id);
1014 * Returns true if given element is quadratic
1016 boolean IsQuadratic(in smIdType id);
1019 * Returns diameter of a ball discrete element or zero in case of an invalid \a id
1021 double GetBallDiameter(in smIdType id);
1024 * Returns XYZ coordinates of bary center for given element
1026 * If there is not element for given ID - returns empty list
1028 double_array BaryCenter(in smIdType id);
1030 /*! Gets information about imported MED file */
1031 MedFileInfo GetMEDFileInfo();
1034 * Sets list of notebook variables used for Mesh operations separated by ":" symbol
1035 * \param theParameters is a string containing the notebook variables
1037 void SetParameters (in string theParameters);
1040 * Returns list of notebook variables used for Mesh operations separated by ":" symbol
1042 string GetParameters();
1045 * Returns list of notebook variables used for last Mesh operation
1047 string_array GetLastParameters();
1050 interface SMESH_subMesh : SMESH_IDSource
1055 smIdType GetNumberOfElements()
1056 raises (SALOME::SALOME_Exception);
1061 smIdType GetNumberOfNodes( in boolean all )
1062 raises (SALOME::SALOME_Exception);
1067 smIdType_array GetElementsId()
1068 raises (SALOME::SALOME_Exception);
1073 smIdType_array GetElementsByType( in ElementType theType )
1074 raises (SALOME::SALOME_Exception);
1077 * Returns type of mesh element (same as SMESH_Mesh::GetElementType() )
1079 ElementType GetElementType( in smIdType id, in boolean iselem )
1080 raises (SALOME::SALOME_Exception);
1085 smIdType_array GetNodesId()
1086 raises (SALOME::SALOME_Exception);
1089 * Get geom shape the submesh is dedicated to
1091 GEOM::GEOM_Object GetSubShape()
1092 raises (SALOME::SALOME_Exception);
1095 * Get SMESH_Mesh which stores nodes coordinates & elements definition
1097 SMESH_Mesh GetFather()
1098 raises (SALOME::SALOME_Exception);
1101 * Get the internal persisten Id