X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROData%2FHYDROData_GeomTool.h;h=17d48314b19a630540a087552ff36c7d0957c5b4;hb=e35b4caf3341d2cece2b7921f349acd17fb89351;hp=322374a4d695afba1f8df2fc58de45c2a7485d0b;hpb=474c2cd65280d793f1c81ca528bc92e1cff988e6;p=modules%2Fhydro.git diff --git a/src/HYDROData/HYDROData_GeomTool.h b/src/HYDROData/HYDROData_GeomTool.h index 322374a4..17d48314 100644 --- a/src/HYDROData/HYDROData_GeomTool.h +++ b/src/HYDROData/HYDROData_GeomTool.h @@ -1,8 +1,4 @@ -// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// +// Copyright (C) 2014-2015 EDF-R&D // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either @@ -24,9 +20,20 @@ #define HYDROData_GeomTool_HeaderFile #include "HYDROData.h" +#include +#include +#ifdef WIN32 + #pragma warning ( disable: 4251 ) +#endif + +#ifndef LIGHT_MODE #include +#ifdef WIN32 + #pragma warning ( default: 4251 ) +#endif + class TopoDS_Shape; class QString; @@ -62,8 +69,63 @@ public: * \return the default name */ static QString GetFreeName( SALOMEDS::Study_ptr theStudy, const QString& theBaseName ); + + /** + * Publish the given shape in GEOM as a GEOM object. + * \param theGeomEngine GEOM module engine + * \param theStudy SALOMEDS study, used for publishing of the shape + * \param theShape the shape to publish as a GEOM object + * \param theName the name of the published object + * \param theGeomObjEntry the entry of the published object + * \return the published GEOM object + */ + static GEOM::GEOM_Object_ptr publishShapeInGEOM( GEOM::GEOM_Gen_var theGeomEngine, + SALOMEDS::Study_ptr theStudy, + const TopoDS_Shape& theShape, + const QString& theName, + QString& theGeomObjEntry ); + + /** + * Create and publish face in GEOM as a GEOM object. + * \param theGeomEngine GEOM module engine + * \param theStudy SALOMEDS study, used for publishing of the face + * \param theWidth the face width + * \param theHeight the face height + * \param theName the name of the published face + * \param theFaceEntry the entry of the published face + * \return the published GEOM object + */ + static GEOM::GEOM_Object_ptr createFaceInGEOM( GEOM::GEOM_Gen_var theGeomEngine, + SALOMEDS::Study_ptr theStudy, + const int theWidth, + const int theHeight, + const QString& theName, + QString& theFaceEntry ); + + /** + * Publish the given GEOM object in the study. + * \param theGeomEngine GEOM module engine + * \param theStudy SALOMEDS study, used for publishing of the object + * \param theGeomObj the GEOM object + * \param theName the object name + * \return the entry of the published object (empty string in case of fail) + */ + static QString publishGEOMObject( GEOM::GEOM_Gen_var theGeomEngine, + SALOMEDS::Study_ptr theStudy, + GEOM::GEOM_Object_ptr theGeomObj, + const QString& theName ); + + static GEOM::GEOM_Object_ptr ExplodeShapeInGEOMandPublish( GEOM::GEOM_Gen_var theGeomEngine, + SALOMEDS::Study_ptr theStudy, + const TopoDS_Shape& theShape, + const NCollection_IndexedDataMap& aShToNameModif, + const QString& theName, + QString& theGeomObjEntry); + }; #endif +#endif +