+ SMESH::ComputeError* ImportGMFFile( const char* theFileName,
+ bool theMakeRequiredGroups);
+
+ /*!
+ * consult DriverMED_R_SMESHDS_Mesh::ReadStatus for returned value
+ */
+ SMESH::DriverMED_ReadStatus ImportMEDFile( const char* theFileName, const char* theMeshName );
+
+ SMESH::DriverMED_ReadStatus ImportCGNSFile( const char* theFileName,
+ const int theMeshIndex,
+ std::string& theMeshName);
+
+ /*!
+ * Auto color
+ */
+ void SetAutoColor(CORBA::Boolean theAutoColor);
+
+ CORBA::Boolean GetAutoColor();
+
+ /*! Check group names for duplications.
+ * Consider maximum group name length stored in MED file.
+ */
+ CORBA::Boolean HasDuplicatedGroupNamesMED();
+
+ /*!
+ * Return string representation of a MED file version comprising nbDigits
+ */
+ char* GetVersionString(CORBA::Long minor, CORBA::Short nbDigits);
+
+ /*!
+ * Return the list of med versions compatibles for write/append,
+ * encoded in 10*major+minor (for instance, code for med 3.2.1 is 32)
+ */
+ SMESH::long_array* GetMEDVersionsCompatibleForAppend();
+
+ void ExportMED( const char* file,
+ CORBA::Boolean auto_groups,
+ CORBA::Long version,
+ CORBA::Boolean overwrite,
+ CORBA::Boolean autoDimension = true);
+
+ void ExportSAUV( const char* file, CORBA::Boolean auto_groups );
+
+ void ExportDAT( const char* file );
+ void ExportUNV( const char* file );
+ void ExportSTL( const char* file, bool isascii );
+ void ExportCGNS(SMESH::SMESH_IDSource_ptr meshPart,
+ const char* file,
+ CORBA::Boolean overwrite,
+ CORBA::Boolean groupElemsByType);
+ void ExportGMF(SMESH::SMESH_IDSource_ptr meshPart,
+ const char* file,
+ CORBA::Boolean withRequiredGroups);
+
+ void ExportPartToMED(SMESH::SMESH_IDSource_ptr meshPart,
+ const char* file,
+ CORBA::Boolean auto_groups,
+ CORBA::Long version,
+ CORBA::Boolean overwrite,
+ CORBA::Boolean autoDim,
+ const GEOM::ListOfFields& fields,
+ const char* geomAssocFields,
+ CORBA::Double ZTolerance);
+ void ExportPartToDAT(SMESH::SMESH_IDSource_ptr meshPart,
+ const char* file);
+ void ExportPartToUNV(SMESH::SMESH_IDSource_ptr meshPart,
+ const char* file);
+ void ExportPartToSTL(SMESH::SMESH_IDSource_ptr meshPart,
+ const char* file,
+ CORBA::Boolean isascii);
+
+ CORBA::Double GetComputeProgress();
+
+ SMESH::smIdType NbNodes();
+
+ SMESH::smIdType NbElements();
+
+ SMESH::smIdType Nb0DElements();
+
+ SMESH::smIdType NbBalls();
+
+ SMESH::smIdType NbEdges();
+
+ SMESH::smIdType NbEdgesOfOrder(SMESH::ElementOrder order);
+
+ SMESH::smIdType NbFaces();
+
+ SMESH::smIdType NbFacesOfOrder(SMESH::ElementOrder order);
+
+ SMESH::smIdType NbTriangles();
+
+ SMESH::smIdType NbTrianglesOfOrder(SMESH::ElementOrder order);
+
+ SMESH::smIdType NbBiQuadTriangles();
+
+ SMESH::smIdType NbQuadrangles();
+
+ SMESH::smIdType NbQuadranglesOfOrder(SMESH::ElementOrder order);
+
+ SMESH::smIdType NbBiQuadQuadrangles();
+
+ SMESH::smIdType NbPolygons();
+
+ SMESH::smIdType NbPolygonsOfOrder(SMESH::ElementOrder order = SMESH::ORDER_ANY);
+
+ SMESH::smIdType NbVolumes();
+
+ SMESH::smIdType NbVolumesOfOrder(SMESH::ElementOrder order);
+
+ SMESH::smIdType NbTetras();
+
+ SMESH::smIdType NbTetrasOfOrder(SMESH::ElementOrder order);
+
+ SMESH::smIdType NbHexas();
+
+ SMESH::smIdType NbHexasOfOrder(SMESH::ElementOrder order);
+
+ SMESH::smIdType NbTriQuadraticHexas();
+
+ SMESH::smIdType NbPyramids();
+
+ SMESH::smIdType NbPyramidsOfOrder(SMESH::ElementOrder order);
+
+ SMESH::smIdType NbPrisms();
+
+ SMESH::smIdType NbPrismsOfOrder(SMESH::ElementOrder order);
+
+ SMESH::smIdType NbHexagonalPrisms();
+
+ SMESH::smIdType NbPolyhedrons();
+
+ SMESH::smIdType NbSubMesh();
+
+ SMESH::smIdType_array* GetElementsId();
+
+ SMESH::smIdType_array* GetElementsByType( SMESH::ElementType theElemType );
+
+ SMESH::smIdType_array* GetNodesId();
+
+ SMESH::ElementType GetElementType( SMESH::smIdType id, bool iselem );
+
+ SMESH::EntityType GetElementGeomType( SMESH::smIdType id );
+
+ SMESH::GeometryType GetElementShape( SMESH::smIdType id );
+
+ /*!
+ * Returns ID of elements for given submesh
+ */
+ SMESH::smIdType_array* GetSubMeshElementsId(CORBA::Long ShapeID);
+
+ /*!
+ * Returns ID of nodes for given submesh
+ * If param all==true - returns all nodes, else -
+ * returns only nodes on shapes.
+ */
+ SMESH::smIdType_array* GetSubMeshNodesId(CORBA::Long ShapeID, CORBA::Boolean all);
+
+ /*!
+ * Returns type of elements for given submesh
+ */
+ SMESH::ElementType GetSubMeshElementType(CORBA::Long ShapeID);
+
+ char* Dump();
+
+ // Create groups of elements preventing computation of a sub-shape
+ SMESH::ListOfGroups* MakeGroupsOfBadInputElements( int theSubShapeID,
+ const char* theGroupName);
+
+ // ===================================================
+ // Internal methods not available through CORBA
+ // They are called by corresponding interface methods
+ // ===================================================
+
+ SMESH_Hypothesis::Hypothesis_Status addHypothesis(GEOM::GEOM_Object_ptr aSubShape,
+ SMESH::SMESH_Hypothesis_ptr anHyp,
+ std::string* anErrorText=0);
+
+ SMESH_Hypothesis::Hypothesis_Status removeHypothesis(GEOM::GEOM_Object_ptr aSubShape,
+ SMESH::SMESH_Hypothesis_ptr anHyp);
+
+ static SMESH::Hypothesis_Status
+ ConvertHypothesisStatus (SMESH_Hypothesis::Hypothesis_Status theStatus);
+
+ static void PrepareForWriting (const char* file, bool overwrite = true);
+
+ //int importMEDFile( const char* theFileName, const char* theMeshName );
+
+ SMESH::SMESH_subMesh_ptr createSubMesh( GEOM::GEOM_Object_ptr theSubShapeObject );
+
+ bool removeSubMesh(SMESH::SMESH_subMesh_ptr theSubMesh,
+ GEOM::GEOM_Object_ptr theSubShapeObject );
+
+ SMESH::SMESH_GroupBase_ptr createGroup(SMESH::ElementType theElemType,
+ const char* theName,
+ const int theID = -1,
+ const TopoDS_Shape& theShape = TopoDS_Shape(),
+ const SMESH_PredicatePtr& thePred = SMESH_PredicatePtr());
+
+ void removeGroup( const int theId );
+
+ SMESH::SMESH_subMesh_ptr getSubMesh(int shapeID);
+ // return an existing subMesh object for the shapeID. shapeID == submeshID.
+
+ const std::map<int, SMESH::SMESH_GroupBase_ptr>& getGroups() { return _mapGroups; }
+ // return existing group objects
+
+ void onHypothesisModified(int theHypID, bool updateIcons);
+ // callback from _impl to forget not loaded mesh data (issue 0021208)
+
+ /*!
+ * \brief Update data if geometry changes
+ *
+ * Issue 0022501
+ */
+ void CheckGeomModif( bool isBreakLink = false );
+ /*!
+ * \brief Update hypotheses assigned to geom groups if the latter change
+ *
+ * NPAL16168: "geometrical group edition from a submesh don't modify mesh computation"
+ */
+ void CheckGeomGroupModif();
+
+ CORBA::LongLong GetMeshPtr();
+
+ /*!
+ * \brief Assure that all groups are published
+ */
+ void CreateGroupServants();
+
+ /*!
+ * \brief Return true if all sub-meshes are computed OK - to update an icon
+ */
+ bool IsComputedOK();
+
+
+ // ====================================
+ // SMESH_Mesh interface (continuation)
+ // ====================================
+
+ /*!
+ * \brief Return groups cantained in _mapGroups by their IDs
+ */
+ SMESH::ListOfGroups* GetGroups(const std::list<int>& groupIDs) const;
+
+ /*!
+ * Get XYZ coordinates of node as list of double
+ * If there is not node for given ID - returns empty list
+ */
+ SMESH::double_array* GetNodeXYZ(SMESH::smIdType id);
+
+ /*!
+ * For given node returns list of IDs of inverse elements
+ * If there is not node for given ID - returns empty list
+ */
+ SMESH::smIdType_array* GetNodeInverseElements(SMESH::smIdType id,
+ SMESH::ElementType elemType);
+
+ /*!
+ * \brief Return position of a node on shape
+ */
+ SMESH::NodePosition* GetNodePosition(SMESH::smIdType NodeID);
+
+ /*!
+ * \brief Return position of an element on shape
+ */
+ SMESH::ElementPosition GetElementPosition(SMESH::smIdType ElemID);
+
+ /*!
+ * If given element is node returns IDs of shape from position
+ * If there is not node for given ID - returns -1
+ */
+ CORBA::Long GetShapeID(SMESH::smIdType id);
+
+ /*!
+ * For given element returns ID of result shape after
+ * ::FindShape() from SMESH_MeshEditor
+ * If there is not element for given ID - returns -1
+ */
+ CORBA::Long GetShapeIDForElem(SMESH::smIdType id);
+
+ /*!
+ * Returns number of nodes for given element
+ * If there is not element for given ID - returns -1
+ */
+ CORBA::Short GetElemNbNodes(SMESH::smIdType id);
+
+ /*!
+ * Returns IDs of nodes of given element
+ */
+ SMESH::smIdType_array* GetElemNodes(SMESH::smIdType id);
+
+ /*!
+ * Returns ID of node by given index for given element
+ * If there is not element for given ID - returns -1
+ * If there is not node for given index - returns -2
+ */
+ SMESH::smIdType GetElemNode(SMESH::smIdType id, CORBA::Short index);
+
+ /*!
+ * Returns true if given node is medium node
+ * in given quadratic element
+ */
+ CORBA::Boolean IsMediumNode(SMESH::smIdType ide, SMESH::smIdType idn);
+
+ /*!
+ * Returns true if given node is medium node
+ * in one of quadratic elements
+ */
+ CORBA::Boolean IsMediumNodeOfAnyElem(SMESH::smIdType idn,
+ SMESH::ElementType elemType);
+
+ /*!
+ * Returns number of edges for given element
+ */
+ CORBA::Long ElemNbEdges(SMESH::smIdType id);
+
+ /*!
+ * Returns number of faces for given element
+ */
+ CORBA::Long ElemNbFaces(SMESH::smIdType id);
+ /*!
+ * Returns nodes of given face (counted from zero) for given element.
+ */
+ SMESH::smIdType_array* GetElemFaceNodes(SMESH::smIdType elemId, CORBA::Short faceIndex);
+
+ /*!
+ * Returns three components of normal of given mesh face (or an empty array in KO case)
+ */
+ SMESH::double_array* GetFaceNormal(CORBA::Long faceId, CORBA::Boolean normalized);
+
+ /*!
+ * Returns an element based on all given nodes.
+ */
+ SMESH::smIdType FindElementByNodes(const SMESH::smIdType_array& nodes);
+
+ /*!
+ * Return elements including all given nodes.
+ */
+ SMESH::smIdType_array* GetElementsByNodes(const SMESH::smIdType_array& nodes,
+ SMESH::ElementType elemType);
+
+ /*!
+ * Returns true if given element is polygon
+ */
+ CORBA::Boolean IsPoly(SMESH::smIdType id);
+
+ /*!
+ * Returns true if given element is quadratic
+ */
+ CORBA::Boolean IsQuadratic(SMESH::smIdType id);
+
+ /*!
+ * Returns diameter of ball discrete element or zero in case of an invalid \a id
+ */
+ CORBA::Double GetBallDiameter(SMESH::smIdType id);
+
+ /*!
+ * Returns bary center for given element
+ */
+ SMESH::double_array* BaryCenter(SMESH::smIdType id);
+
+ /*!
+ * Returns information about imported MED file
+ */
+ virtual SMESH::MedFileInfo* GetMEDFileInfo();
+
+ /*!
+ * Persistence of file info
+ */
+ std::string FileInfoToString();
+ void FileInfoFromString(const std::string& info);
+
+ /*!
+ * Persistence of geometry tick
+ */
+ int& MainShapeTick() { return _mainShapeTick; }