geom/src/GEOM/GEOM_Solver.cxx

72 lines
2.5 KiB
C++
Raw Normal View History

2020-04-15 16:11:00 +03:00
// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
2005-12-05 16:23:52 +00:00
//
2012-08-09 07:58:02 +00:00
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
2005-12-05 16:23:52 +00:00
//
2012-08-09 07:58:02 +00:00
// 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
2014-02-18 10:44:41 +04:00
// version 2.1 of the License, or (at your option) any later version.
2009-02-13 12:16:39 +00:00
//
2012-08-09 07:58:02 +00:00
// 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.
2009-02-13 12:16:39 +00:00
//
2012-08-09 07:58:02 +00:00
// 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
2009-02-13 12:16:39 +00:00
//
2012-08-09 07:58:02 +00:00
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
2005-12-05 16:23:52 +00:00
//
2012-08-09 07:58:02 +00:00
2004-12-01 10:39:14 +00:00
#include "GEOM_Solver.hxx"
#include <TDF_Label.hxx>
#include <TFunction_Function.hxx>
#include <TFunction_Driver.hxx>
#include <TFunction_Logbook.hxx>
#include <TFunction_DriverTable.hxx>
#include "GEOM_Function.hxx"
#include <Standard_GUID.hxx>
//=============================================================================
/*!
* Update
*/
//=============================================================================
2020-10-06 12:07:19 +03:00
bool GEOM_Solver::Update(TDF_LabelSequence& /*theSeq*/)
2004-12-01 10:39:14 +00:00
{
return false;
}
//=============================================================================
/*!
* UpdateObject
*/
//=============================================================================
2020-10-06 12:07:19 +03:00
bool GEOM_Solver::UpdateObject(Handle(GEOM_Object) /*theObject*/, TDF_LabelSequence& /*theSeq*/)
2004-12-01 10:39:14 +00:00
{
return false;
}
//=============================================================================
/*!
* ComputeFunction
*/
//=============================================================================
bool GEOM_Solver::ComputeFunction(Handle(GEOM_Function) theFunction)
{
2016-02-24 16:45:13 +03:00
if(theFunction.IsNull()) return false;
2004-12-01 10:39:14 +00:00
Standard_GUID aGUID = theFunction->GetDriverGUID();
Handle(TFunction_Driver) aDriver;
if(!TFunction_DriverTable::Get()->FindDriver(aGUID, aDriver)) return false;
2012-08-09 07:58:02 +00:00
2004-12-01 10:39:14 +00:00
aDriver->Init(theFunction->GetEntry());
2016-02-24 16:45:13 +03:00
Handle(TFunction_Logbook) aLog = TFunction_Logbook::Set( aDriver->Label() );
2004-12-01 10:39:14 +00:00
if(aDriver->Execute(aLog) == 0) return false;
2012-08-09 07:58:02 +00:00
2004-12-01 10:39:14 +00:00
return true;
}