X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModelAPI%2FModelAPI_Session.cpp;h=7755b7bf378185b2e877594db26b184207a4df6b;hb=c02fae5493cc6d56c9a1db3bdcf6d872f88fea07;hp=946096f28cd658795b5a0f204c3f3924e07247d5;hpb=b1eedc1c758fe498ba735720e355210dbb811ffe;p=modules%2Fshaper.git diff --git a/src/ModelAPI/ModelAPI_Session.cpp b/src/ModelAPI/ModelAPI_Session.cpp index 946096f28..7755b7bf3 100644 --- a/src/ModelAPI/ModelAPI_Session.cpp +++ b/src/ModelAPI/ModelAPI_Session.cpp @@ -1,8 +1,21 @@ -// Copyright (C) 2014-20xx CEA/DEN, EDF R&D - -// File: ModelAPI_Session.hxx -// Created: 20 Mar 2014 -// Author: Mikhail PONIKAROV +// Copyright (C) 2014-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, 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 +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// #include // to avoid unresolved ModelAPI_Document() @@ -28,8 +41,11 @@ #include #include #include +#include +#include #include +#include #ifdef WIN32 #include @@ -37,8 +53,6 @@ #include #endif -using namespace std; - #ifdef _DEBUG #include #endif @@ -55,11 +69,26 @@ std::shared_ptr ModelAPI_Session::get() { if (!MY_MANAGER) { // import Model library that implements this interface of ModelAPI Config_ModuleReader::loadLibrary("Model"); + + Config_PropManager::registerProp("Visualization", "body_deflection", + "Body deflection coefficient", + Config_Prop::Double, + ModelAPI_ResultBody::DEFAULT_DEFLECTION()); + + Config_PropManager::registerProp("Visualization", "construction_deflection", + "Construction deflection coefficient", + Config_Prop::Double, + ModelAPI_ResultConstruction::DEFAULT_DEFLECTION()); + + Config_PropManager::registerProp("Visualization", "shaper_default_transparency", + "Default transparency (%)", Config_Prop::IntSpin, "0", "0", "100"); + } return MY_MANAGER; } -const ModelAPI_EventCreator* MY_API_CREATOR = 0; ///< instance of the events creator, one pre application +/// instance of the events creator, one pre application +const ModelAPI_EventCreator* MY_API_CREATOR = 0; const ModelAPI_EventCreator* ModelAPI_EventCreator::get() {