X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHEXABLOCKGUI%2FHEXABLOCKGUI_SalomeTools.hxx;h=a8b47636ebfdb404b13c29d41539b5bbfded3616;hb=1674985cad0e3cdadc3298860a32848f3d155c03;hp=71738ccd5dbb32549f1c6eca6ea8366d28b8b470;hpb=8681e72f844274a0c2fc2cd64bbf2451bd8db77b;p=modules%2Fhexablock.git diff --git a/src/HEXABLOCKGUI/HEXABLOCKGUI_SalomeTools.hxx b/src/HEXABLOCKGUI/HEXABLOCKGUI_SalomeTools.hxx index 71738cc..a8b4763 100644 --- a/src/HEXABLOCKGUI/HEXABLOCKGUI_SalomeTools.hxx +++ b/src/HEXABLOCKGUI/HEXABLOCKGUI_SalomeTools.hxx @@ -1,9 +1,9 @@ -// Copyright (C) 2009-2012 CEA/DEN, EDF R&D +// Copyright (C) 2009-2019 CEA/DEN, 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 -// version 2.1 of the License. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -20,64 +20,68 @@ #ifndef _HEXABLOCKGUI_SALOMETOOLS_HXX_ #define _HEXABLOCKGUI_SALOMETOOLS_HXX_ +#include "HEXABLOCKGUI_Export.hxx" #include #include #include -#include - - -#include "GEOM_Client.hxx" -// #include "GEOMBase_Helper.h" -#include "GEOM_Displayer.h" - - - -#include +#include +#include +#include #include #include - +#include +#include +#include namespace HEXABLOCK { namespace GUI { - SALOME_Actor* findActorByEntry( SVTK_ViewWindow *theVtkViewWindow, const char* theEntry ); - _PTR(Study) GetActiveStudyDocument(); - CORBA::Object_var corbaObj( _PTR(SObject) theSO ); - CORBA::Object_var corbaObj( const Handle(SALOME_InteractiveObject)& theIO ); - int GetNameOfSelectedElements( SVTK_ViewWindow *theWindow,/* SVTK_Selector* theSelector,*/ +HEXABLOCK_EXPORT SALOME_Actor* findActorByEntry( SVTK_ViewWindow *theVtkViewWindow, const char* theEntry ); + _PTR(Study) getStudy(); + +HEXABLOCK_EXPORT int GetNameOfSelectedElements( SVTK_ViewWindow *theWindow,/* SVTK_Selector* theSelector,*/ const Handle(SALOME_InteractiveObject)& theIO, QString& theName ); - std::string shape2string( const TopoDS_Shape& aShape ); +HEXABLOCK_EXPORT std::string shape2string( const TopoDS_Shape& aShape ); - - class MyGEOM_Displayer : public GEOM_Displayer - { - public: - MyGEOM_Displayer( SalomeApp_Study* app ); - virtual ~MyGEOM_Displayer(); - +HEXABLOCK_EXPORT void getEntityOwners( const Handle(AIS_InteractiveObject)& theObj, + const Handle(AIS_InteractiveContext)& theIC, + SelectMgr_IndexedMapOfOwner& theMap ); - SALOME_Prs* BuildPrs( GEOM::GEOM_Object_ptr theObj ); +HEXABLOCK_EXPORT void indicesToOwners( const TColStd_IndexedMapOfInteger& aIndexMap, + const TopoDS_Shape& aMainShape, + const SelectMgr_IndexedMapOfOwner& anAllMap, + SelectMgr_IndexedMapOfOwner& aToHiliteMap ); -// int aPrevDispMode = getDisplayer()->SetDisplayMode( displayMode ); -// getDisplayer()->SetToActivate( activate ); -// getDisplayer()->SetName( objStr.in() ); -// SALOME_Prs* aPrs = getDisplayer()->BuildPrs( object ); +HEXABLOCK_EXPORT TopoDS_Shape getSubShape(const TopoDS_Shape& theShape, const int theIndex); +HEXABLOCK_EXPORT int getSubId(const TopoDS_Shape& theShape, const TopoDS_Shape& theSubShape); +HEXABLOCK_EXPORT Standard_Boolean getExtremaSolution(const gp_Pnt& theInitPnt, + const TopoDS_Shape& theRefShape, + gp_Pnt& thePnt); +HEXABLOCK_EXPORT TopoDS_Vertex makePoint(const double x, const double y, const double z); +HEXABLOCK_EXPORT TopoDS_Vertex makePointWithReference(const TopoDS_Shape& point, const double dx, + const double dy, + const double dz); - }; +HEXABLOCK_EXPORT TopoDS_Vertex makePointOnCurve(const TopoDS_Shape& edge, const double param); +HEXABLOCK_EXPORT TopoDS_Vertex makePointOnCurveByLength(const TopoDS_Shape& edge, const TopoDS_Shape& point, const double length); +HEXABLOCK_EXPORT TopoDS_Vertex makePointOnCurveByCoord(const TopoDS_Shape& edge, const double x, const double y, const double z); + TopoDS_Vertex makePointOnLinesIntersection(const TopoDS_Shape& line1, const TopoDS_Shape& line2); +HEXABLOCK_EXPORT TopoDS_Vertex makePointOnSurface(const TopoDS_Shape& face, const double param_u, const double param_v); +HEXABLOCK_EXPORT TopoDS_Vertex makePointOnSurfaceByCoord(const TopoDS_Shape& face, const double x, const double y, const double z); } }