Version: 6.3.1

idl/SMESH_Mesh.idl

Go to the documentation of this file.
00001 // Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 
00023 //  File   : SMESH_Mesh.idl
00024 //  Author : Paul RASCLE, EDF
00025 //
00026 #ifndef _SMESH_MESH_IDL_
00027 #define _SMESH_MESH_IDL_
00028 
00029 #include "SALOME_Exception.idl"
00030 #include "SALOME_GenericObj.idl"
00031 #include "GEOM_Gen.idl"
00032 #include "MED.idl"
00033 
00034 module SMESH
00035 {
00036   interface SMESH_Hypothesis;
00037   typedef sequence<SMESH_Hypothesis> ListOfHypothesis;
00038   interface SMESH_GroupBase;
00039   typedef sequence<SMESH_GroupBase> ListOfGroups;
00040   interface SMESH_IDSource;
00041   typedef sequence<SMESH_IDSource> ListOfIDSources;
00042 
00043   typedef sequence<double    > double_array ;
00044   typedef sequence<long      > long_array ;
00045   typedef sequence<string    > string_array ;
00046   typedef sequence<long_array> array_of_long_array ;
00047 
00048   enum log_command
00049     {
00050       ADD_NODE,
00051       ADD_EDGE,
00052       ADD_TRIANGLE,
00053       ADD_QUADRANGLE,
00054       ADD_POLYGON,
00055       ADD_TETRAHEDRON,
00056       ADD_PYRAMID,
00057       ADD_PRISM,
00058       ADD_HEXAHEDRON,
00059       ADD_POLYHEDRON,
00060       REMOVE_NODE,
00061       REMOVE_ELEMENT,
00062       MOVE_NODE,
00063       CHANGE_ELEMENT_NODES,
00064       CHANGE_POLYHEDRON_NODES,
00065       RENUMBER,
00066       CLEAR_MESH,
00067       ADD_QUADEDGE,
00068       ADD_QUADTRIANGLE,
00069       ADD_QUADQUADRANGLE,
00070       ADD_QUADTETRAHEDRON,
00071       ADD_QUADPYRAMID,
00072       ADD_QUADPENTAHEDRON,
00073       ADD_QUADHEXAHEDRON,
00074       ADD_ELEM0D
00075     };
00076 
00077   struct log_block
00078   {
00079     long commandType;
00080     long number;
00081     double_array coords;
00082     long_array indexes;
00083   };
00084 
00085   struct PointStruct { double x;
00086                  double y;
00087                  double z; } ;
00088 
00089   typedef sequence<PointStruct> nodes_array;
00090 
00091   struct DirStruct   { PointStruct PS ; } ;          // analog to Occ Direction
00092 
00093   struct AxisStruct  { double x;
00094                  double y;
00095                  double z;
00096                  double vx;
00097                  double vy;
00098                  double vz; } ;
00099 
00103   struct NodePosition {
00104     long             shapeID;
00105     GEOM::shape_type shapeType;
00106     double_array     params; // [U] on EDGE, [U,V] on FACE, [] on the rest shapes
00107   };
00108 
00112   enum ElementType
00113   {
00114     ALL,
00115     NODE,
00116     EDGE,
00117     FACE,
00118     VOLUME,
00119     ELEM0D
00120   };
00121   typedef sequence<ElementType> array_of_ElementType ;
00122 
00126   enum GeometryType
00127   {
00128     Geom_POINT,
00129     Geom_EDGE,
00130     Geom_TRIANGLE,
00131     Geom_QUADRANGLE,
00132     Geom_POLYGON,
00133     Geom_TETRA,
00134     Geom_PYRAMID,
00135     Geom_HEXA,
00136     Geom_PENTA,
00137     Geom_POLYHEDRA
00138   };
00139   
00143   enum ElementOrder {
00144     ORDER_ANY,          
00145     ORDER_LINEAR,       
00146     ORDER_QUADRATIC     
00147   };
00148 
00149 
00154   enum EntityType
00155   {
00156     Entity_Node,
00157     Entity_0D,
00158     Entity_Edge,
00159     Entity_Quad_Edge,
00160     Entity_Triangle,
00161     Entity_Quad_Triangle,
00162     Entity_Quadrangle,
00163     Entity_Quad_Quadrangle,
00164     Entity_Polygon,
00165     Entity_Quad_Polygon,
00166     Entity_Tetra,
00167     Entity_Quad_Tetra,
00168     Entity_Pyramid,
00169     Entity_Quad_Pyramid,
00170     Entity_Hexa,
00171     Entity_Quad_Hexa,
00172     Entity_Penta,
00173     Entity_Quad_Penta,
00174     Entity_Polyhedra,
00175     Entity_Quad_Polyhedra,
00176     Entity_Last
00177   };
00178 
00179 
00183   enum Hypothesis_Status // in the order of severity
00184   {
00185     HYP_OK,
00186     HYP_MISSING,      // algo misses a hypothesis
00187     HYP_CONCURENT,    // several applicable hypotheses
00188     HYP_BAD_PARAMETER,// hypothesis has a bad parameter value
00189     HYP_HIDDEN_ALGO,  // an algo is hidden by an upper dim algo generating all-dim elements
00190     HYP_HIDING_ALGO,  // an algo hides lower dim algos by generating all-dim elements
00191     HYP_UNKNOWN_FATAL,//  --- all statuses below should be considered as fatal
00192                       //      for Add/RemoveHypothesis operations
00193     HYP_INCOMPATIBLE, // hypothesis does not fit algo
00194     HYP_NOTCONFORM,   // not conform mesh is produced appling a hypothesis
00195     HYP_ALREADY_EXIST,// such hypothesis already exist
00196     HYP_BAD_DIM,      // bad dimension
00197     HYP_BAD_SUBSHAPE, // shape is neither the main one, nor its subshape, nor a group
00198     HYP_BAD_GEOMETRY, // geometry mismatches algorithm's expectation
00199     HYP_NEED_SHAPE    // algorithm can work on shape only
00200   };
00201 
00205   enum DriverMED_ReadStatus // in the order of severity
00206   {
00207     DRS_OK,
00208     DRS_EMPTY,          // a MED file contains no mesh with the given name
00209     DRS_WARN_RENUMBER,  // a MED file has overlapped ranges of element numbers,
00210                         // so the numbers from the file are ignored
00211     DRS_WARN_SKIP_ELEM, // some elements were skipped due to incorrect file data
00212     DRS_FAIL            // general failure (exception etc.)
00213   };
00214 
00218   enum MED_VERSION // in the order of severity
00219   {
00220     MED_V2_1,
00221     MED_V2_2
00222   };
00223 
00224   typedef sequence<log_block> log_array;
00225 
00226 
00232   const long EXTRUSION_FLAG_BOUNDARY = 1;
00233   const long EXTRUSION_FLAG_SEW = 2;
00234   
00238   struct ElementSubType { ElementType SMDS_ElementType;
00239                           boolean     isPoly;
00240                           long        nbNodesInElement; };
00241 
00242   typedef sequence<ElementSubType> types_array;
00243 
00247   struct MeshPreviewStruct { nodes_array nodesXYZ;
00248                              long_array  elementConnectivities;
00249                              types_array elementTypes; };
00250 
00251   interface SMESH_Mesh;
00252 
00253   interface SMESH_IDSource
00254   {
00258     long_array GetIDs();
00259 
00264     long_array GetMeshInfo();
00265 
00270     array_of_ElementType GetTypes();
00271 
00275     SMESH_Mesh GetMesh();
00276   };
00277 
00278   interface SMESH_Group;
00279   interface SMESH_GroupOnGeom;
00280   interface SMESH_subMesh;
00281   interface SMESH_MeshEditor;
00282 
00283   typedef sequence<SMESH_subMesh>     submesh_array;
00284   typedef sequence<submesh_array>     submesh_array_array;
00285 
00286   interface SMESH_Mesh : SALOME::GenericObj, SMESH_IDSource
00287   {
00291     boolean HasShapeToMesh()
00292       raises (SALOME::SALOME_Exception);
00293 
00298     GEOM::GEOM_Object GetShapeToMesh()
00299       raises (SALOME::SALOME_Exception);
00300 
00304     void Clear()
00305       raises (SALOME::SALOME_Exception);
00306 
00310     void ClearSubMesh(in long ShapeID)
00311       raises (SALOME::SALOME_Exception);
00312 
00319     SMESH_subMesh GetSubMesh(in GEOM::GEOM_Object aSubObject, in string name)
00320       raises (SALOME::SALOME_Exception);
00321 
00325     void RemoveSubMesh(in SMESH_subMesh aSubMesh)
00326       raises (SALOME::SALOME_Exception);
00327 
00328 
00332     SMESH_Group CreateGroup( in ElementType elem_type,
00333                     in string name )
00334       raises (SALOME::SALOME_Exception);
00335 
00339     SMESH_GroupOnGeom CreateGroupFromGEOM( in ElementType elem_type,
00340                                           in string name,
00341                                           in GEOM::GEOM_Object theGeomObject )
00342       raises (SALOME::SALOME_Exception);
00343 
00347     void RemoveGroup(in SMESH_GroupBase aGroup)
00348       raises (SALOME::SALOME_Exception);
00349 
00353     void RemoveGroupWithContents( in SMESH_GroupBase aGroup )
00354       raises (SALOME::SALOME_Exception);
00355 
00359     ListOfGroups GetGroups()
00360       raises (SALOME::SALOME_Exception);
00361 
00365     long NbGroups()
00366       raises (SALOME::SALOME_Exception);
00367 
00373     SMESH_Group UnionGroups (in SMESH_GroupBase aGroup1,
00374                              in SMESH_GroupBase aGroup2,
00375                              in string          name )
00376       raises (SALOME::SALOME_Exception);
00377       
00383     SMESH_Group UnionListOfGroups (in ListOfGroups aListOfGroups,
00384                                    in string       name )
00385       raises (SALOME::SALOME_Exception);
00386 
00392     SMESH_Group IntersectGroups (in SMESH_GroupBase aGroup1,
00393                                  in SMESH_GroupBase aGroup2,
00394                                  in string          name )
00395       raises (SALOME::SALOME_Exception);
00396       
00402     SMESH_Group IntersectListOfGroups (in ListOfGroups aListOfGroups,
00403                                        in string       name)
00404       raises (SALOME::SALOME_Exception);
00405 
00411     SMESH_Group CutGroups (in SMESH_GroupBase aMainGroup,
00412                            in SMESH_GroupBase aToolGroup,
00413                            in string          name )
00414       raises (SALOME::SALOME_Exception);
00415       
00421     SMESH_Group CutListOfGroups (in ListOfGroups aMainGroups,
00422                                  in ListOfGroups aToolGroups,
00423                                  in string       name)
00424       raises (SALOME::SALOME_Exception);
00425       
00432     SMESH_Group CreateDimGroup( in ListOfGroups aListOfGroups,
00433                                 in ElementType  anElemType,
00434                                 in string       name )
00435       raises (SALOME::SALOME_Exception);
00436 
00440     SMESH_Group ConvertToStandalone( in SMESH_GroupOnGeom theGeomGroup )
00441       raises (SALOME::SALOME_Exception);
00442 
00460     Hypothesis_Status AddHypothesis(in GEOM::GEOM_Object aSubObject,
00461                         in SMESH_Hypothesis anHyp)
00462       raises (SALOME::SALOME_Exception);
00463 //     boolean AddHypothesis(in SMESH_subMesh aSubMesh, in SMESH_Hypothesis anHyp)
00464 //       raises (SALOME::SALOME_Exception);
00465 
00469     Hypothesis_Status RemoveHypothesis(in GEOM::GEOM_Object aSubObject,
00470                            in SMESH_Hypothesis anHyp)
00471       raises (SALOME::SALOME_Exception);
00472 //     boolean RemoveHypothesis(in SMESH_subMesh aSubMesh,
00473 //                  in SMESH_Hypothesis anHyp)
00474 //       raises (SALOME::SALOME_Exception);
00475 
00479     ListOfHypothesis GetHypothesisList(in GEOM::GEOM_Object aSubObject)
00480       raises (SALOME::SALOME_Exception);
00481 //     ListOfHypothesis GetHypothesisList(in SMESH_subMesh aSubMesh)
00482 //       raises (SALOME::SALOME_Exception);
00483 
00490     //    string_array GetLog(in boolean clearAfterGet)
00491     //      raises (SALOME::SALOME_Exception);
00492     log_array GetLog(in boolean clearAfterGet)
00493       raises (SALOME::SALOME_Exception);
00494 
00499     void ClearLog()
00500       raises (SALOME::SALOME_Exception);
00501 
00507     void SetAutoColor(in boolean theAutoColor)
00508       raises (SALOME::SALOME_Exception);
00509 
00513     boolean GetAutoColor()
00514       raises (SALOME::SALOME_Exception);
00515 
00519     long GetId();
00520 
00524     long GetStudyId();
00525 
00529     SMESH_MeshEditor GetMeshEditor()
00530       raises (SALOME::SALOME_Exception);
00531 
00536     SMESH_MeshEditor GetMeshEditPreviewer()
00537       raises (SALOME::SALOME_Exception);
00538 
00543     boolean HasModificationsToDiscard()
00544       raises (SALOME::SALOME_Exception);
00545 
00549     boolean HasDuplicatedGroupNamesMED();
00550 
00560     void ExportToMEDX( in string file, in boolean auto_groups, in MED_VERSION theVersion, in boolean overwrite )
00561       raises (SALOME::SALOME_Exception);
00562 
00568     void ExportToMED( in string file, in boolean auto_groups, in MED_VERSION theVersion )
00569       raises (SALOME::SALOME_Exception);
00570 
00577     void ExportMED( in string file, in boolean auto_groups )
00578       raises (SALOME::SALOME_Exception);
00579 
00583     string GetVersionString(in MED_VERSION version, in short nbDigits);
00584 
00589     void ExportDAT( in string file )
00590       raises (SALOME::SALOME_Exception);
00591     void ExportUNV( in string file )
00592       raises (SALOME::SALOME_Exception);
00593     void ExportSTL( in string file, in boolean isascii )
00594       raises (SALOME::SALOME_Exception);
00595 
00599     SALOME_MED::MESH GetMEDMesh()
00600       raises (SALOME::SALOME_Exception);
00601 
00605     long NbNodes()
00606       raises (SALOME::SALOME_Exception);
00607 
00608     long NbElements()
00609       raises (SALOME::SALOME_Exception);
00610 
00611     long Nb0DElements()
00612       raises (SALOME::SALOME_Exception);
00613 
00614     long NbEdges()
00615       raises (SALOME::SALOME_Exception);
00616 
00617     long NbEdgesOfOrder(in ElementOrder order)
00618       raises (SALOME::SALOME_Exception);
00619 
00620     long NbFaces()
00621       raises (SALOME::SALOME_Exception);
00622 
00623     long NbFacesOfOrder(in ElementOrder order)
00624       raises (SALOME::SALOME_Exception);
00625 
00626     long NbTriangles()
00627       raises (SALOME::SALOME_Exception);
00628 
00629     long NbTrianglesOfOrder(in ElementOrder order)
00630       raises (SALOME::SALOME_Exception);
00631 
00632     long NbQuadrangles()
00633       raises (SALOME::SALOME_Exception);
00634 
00635     long NbQuadranglesOfOrder(in ElementOrder order)
00636       raises (SALOME::SALOME_Exception);
00637 
00638     long NbPolygons()
00639       raises (SALOME::SALOME_Exception);
00640 
00641     long NbVolumes()
00642       raises (SALOME::SALOME_Exception);
00643 
00644     long NbVolumesOfOrder(in ElementOrder order)
00645       raises (SALOME::SALOME_Exception);
00646 
00647     long NbTetras()
00648       raises (SALOME::SALOME_Exception);
00649 
00650     long NbTetrasOfOrder(in ElementOrder order)
00651       raises (SALOME::SALOME_Exception);
00652 
00653     long NbHexas()
00654       raises (SALOME::SALOME_Exception);
00655 
00656     long NbHexasOfOrder(in ElementOrder order)
00657       raises (SALOME::SALOME_Exception);
00658 
00659     long NbPyramids()
00660       raises (SALOME::SALOME_Exception);
00661 
00662     long NbPyramidsOfOrder(in ElementOrder order)
00663       raises (SALOME::SALOME_Exception);
00664 
00665     long NbPrisms()
00666       raises (SALOME::SALOME_Exception);
00667 
00668     long NbPrismsOfOrder(in ElementOrder order)
00669       raises (SALOME::SALOME_Exception);
00670 
00671     long NbPolyhedrons()
00672       raises (SALOME::SALOME_Exception);
00673 
00674     long NbSubMesh()
00675       raises (SALOME::SALOME_Exception);
00676 
00677     long_array GetElementsId()
00678       raises (SALOME::SALOME_Exception);
00679 
00680     long_array GetElementsByType( in ElementType theType )
00681       raises (SALOME::SALOME_Exception);
00682 
00683     long_array GetNodesId()
00684       raises (SALOME::SALOME_Exception);
00685     
00689     ElementType GetElementType( in long id, in boolean iselem )
00690       raises (SALOME::SALOME_Exception);
00691 
00692     EntityType GetElementGeomType( in long id )
00693       raises (SALOME::SALOME_Exception);
00694 
00695     long_array GetSubMeshElementsId(in long ShapeID)
00696       raises (SALOME::SALOME_Exception);
00697 
00698     long_array GetSubMeshNodesId(in long ShapeID, in boolean all )
00699       raises (SALOME::SALOME_Exception);
00700     
00701     ElementType GetSubMeshElementType(in long ShapeID)
00702       raises (SALOME::SALOME_Exception);
00703 
00704 
00712     submesh_array_array GetMeshOrder();
00713 
00717     boolean SetMeshOrder(in submesh_array_array theSubMeshArray);
00718 
00719 
00723     string Dump();
00724 
00728     long long GetMeshPtr();
00729 
00734     double_array GetNodeXYZ(in long id);
00735 
00740     long_array GetNodeInverseElements(in long id);
00741 
00745     NodePosition GetNodePosition(in long NodeID);
00746 
00751     long GetShapeID(in long id);
00752 
00758     long GetShapeIDForElem(in long id);
00759 
00764     long GetElemNbNodes(in long id);
00765 
00769     long_array GetElemNodes(in long id);
00770 
00776     long GetElemNode(in long id, in long index);
00777 
00782     boolean IsMediumNode(in long ide, in long idn);
00783 
00788     boolean IsMediumNodeOfAnyElem(in long idn, in ElementType elem_type);
00789 
00793     long ElemNbEdges(in long id);
00794 
00798     long ElemNbFaces(in long id);
00799 
00803     long_array GetElemFaceNodes(in long elemId, in short faceIndex);
00804 
00808     long FindElementByNodes(in long_array nodes);
00809 
00813     boolean IsPoly(in long id);
00814 
00818     boolean IsQuadratic(in long id);
00819 
00825     double_array BaryCenter(in long id);
00826 
00828     SALOME_MED::MedFileInfo GetMEDFileInfo();
00829 
00834     void SetParameters (in string theParameters);
00835 
00839     string GetParameters();
00840 
00844     string_array GetLastParameters();
00845   };
00846 
00847   interface SMESH_subMesh : SALOME::GenericObj, SMESH_IDSource
00848   {
00852     long GetNumberOfElements()
00853       raises (SALOME::SALOME_Exception);
00854 
00858     long GetNumberOfNodes( in boolean all )
00859       raises (SALOME::SALOME_Exception);
00860 
00864     long_array GetElementsId()
00865       raises (SALOME::SALOME_Exception);
00866 
00870     long_array GetElementsByType( in ElementType theType )
00871       raises (SALOME::SALOME_Exception);
00872     
00876     ElementType GetElementType( in long id, in boolean iselem )
00877       raises (SALOME::SALOME_Exception);
00878 
00882     long_array GetNodesId()
00883       raises (SALOME::SALOME_Exception);
00884 
00888     GEOM::GEOM_Object GetSubShape()
00889       raises (SALOME::SALOME_Exception);
00890 
00894     SMESH_Mesh GetFather()
00895       raises (SALOME::SALOME_Exception);
00896 
00900     long GetId();
00901 
00905     SALOME_MED::FAMILY GetFamily()
00906       raises (SALOME::SALOME_Exception);
00907   };
00908 
00909 };
00910 
00911 #endif
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS