X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROData%2FHYDROData_Obstacle.cxx;h=60b4143a4213c96d8a25deb0ebe0b4343b25d69a;hb=cde2ec476486fcd7c9b7b38ce814c648d73e7fd3;hp=f9e53b44a4060f48cce2d0fbb5f68d48624dff25;hpb=474c2cd65280d793f1c81ca528bc92e1cff988e6;p=modules%2Fhydro.git diff --git a/src/HYDROData/HYDROData_Obstacle.cxx b/src/HYDROData/HYDROData_Obstacle.cxx index f9e53b44..60b4143a 100644 --- a/src/HYDROData/HYDROData_Obstacle.cxx +++ b/src/HYDROData/HYDROData_Obstacle.cxx @@ -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 @@ -28,7 +24,17 @@ #include "HYDROData_Tool.h" #include "HYDROData_GeomTool.h" +#ifdef WIN32 + #pragma warning ( disable: 4251 ) +#endif + +#ifndef LIGHT_MODE #include +#endif + +#ifdef WIN32 + #pragma warning ( default: 4251 ) +#endif #include #include @@ -52,21 +58,32 @@ #include +#ifdef WIN32 + #pragma warning ( disable: 4251 ) +#endif + #include #include #include #include +#ifdef WIN32 + #pragma warning ( default: 4251 ) +#endif + #include // CAREFUL ! position of this file is critic #include +#define _DEVDEBUG_ +#include "HYDRO_trace.hxx" + IMPLEMENT_STANDARD_HANDLE(HYDROData_Obstacle,HYDROData_ArtificialObject) IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Obstacle,HYDROData_ArtificialObject) HYDROData_Obstacle::HYDROData_Obstacle() -: HYDROData_ArtificialObject() +: HYDROData_ArtificialObject( Geom_3d ) { } @@ -74,7 +91,8 @@ HYDROData_Obstacle::~HYDROData_Obstacle() { } -QStringList HYDROData_Obstacle::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const +QStringList HYDROData_Obstacle::DumpToPython( const QString& thePyScriptPath, + MapOfTreatedObjects& theTreatedObjects ) const { QStringList aResList = dumpObjectCreation( theTreatedObjects ); @@ -125,7 +143,7 @@ QStringList HYDROData_Obstacle::DumpToPython( MapOfTreatedObjects& theTreatedObj void HYDROData_Obstacle::Update() { - removeGroupObjects(); + RemoveGroupObjects(); createGroupObjects(); checkAndSetAltitudeObject(); @@ -137,16 +155,6 @@ bool HYDROData_Obstacle::IsHas2dPrs() const return true; } -TopoDS_Shape HYDROData_Obstacle::GetTopShape() const -{ - return getTopShape(); -} - -TopoDS_Shape HYDROData_Obstacle::GetShape3D() const -{ - return getShape3D(); -} - void HYDROData_Obstacle::SetShape3D( const TopoDS_Shape& theShape ) { TopoDS_Face aShape2d = HYDROData_Projection::MakeProjection( theShape ); @@ -154,12 +162,12 @@ void HYDROData_Obstacle::SetShape3D( const TopoDS_Shape& theShape ) HYDROData_ArtificialObject::SetTopShape( aShape2d ); } -QColor HYDROData_Obstacle::DefaultFillingColor() +QColor HYDROData_Obstacle::DefaultFillingColor() const { return QColor( Qt::yellow ); } -QColor HYDROData_Obstacle::DefaultBorderColor() +QColor HYDROData_Obstacle::DefaultBorderColor() const { return QColor( Qt::transparent ); } @@ -222,6 +230,7 @@ bool HYDROData_Obstacle::ImportFromGeomIOR( const TCollection_AsciiString& theIO { bool aRes = false; +#ifndef LIGHT_MODE if ( theIOR.IsEmpty() ) { return aRes; } @@ -238,7 +247,8 @@ bool HYDROData_Obstacle::ImportFromGeomIOR( const TCollection_AsciiString& theIO SetShape3D( aShape ); aRes = true; } - +#endif + return aRes; } @@ -271,6 +281,7 @@ TCollection_AsciiString HYDROData_Obstacle::GetGeomObjectName() const return aRes; } +#ifndef LIGHT_MODE SALOMEDS::Study_var aDSStudy = HYDROData_GeomTool::GetStudyByID( aDocId ); if ( !aDSStudy->_is_nil() ) { @@ -280,7 +291,7 @@ TCollection_AsciiString HYDROData_Obstacle::GetGeomObjectName() const aRes = TCollection_AsciiString( aSObject->GetName() ); } } - +#endif return aRes; } @@ -313,6 +324,7 @@ TopoDS_Shape HYDROData_Obstacle::ImportIGES( const QString& theFilePath ) const { TopoDS_Shape aResShape; +#ifndef LIGHT_MODE // Set "C" numeric locale to save numbers correctly Kernel_Utils::Localizer loc; @@ -347,6 +359,7 @@ TopoDS_Shape HYDROData_Obstacle::ImportIGES( const QString& theFilePath ) const catch(Standard_Failure) { aResShape.Nullify(); } +#endif return aResShape; } @@ -355,6 +368,7 @@ TopoDS_Shape HYDROData_Obstacle::ImportSTEP( const QString& theFilePath ) const { TopoDS_Shape aResShape; +#ifndef LIGHT_MODE // Set "C" numeric locale to save numbers correctly Kernel_Utils::Localizer loc; @@ -458,22 +472,14 @@ TopoDS_Shape HYDROData_Obstacle::ImportSTEP( const QString& theFilePath ) const catch (Standard_Failure) { aResShape.Nullify(); } +#endif return aResShape; } -QColor HYDROData_Obstacle::getDefaultFillingColor() const -{ - return DefaultFillingColor(); -} - -QColor HYDROData_Obstacle::getDefaultBorderColor() const -{ - return DefaultBorderColor(); -} - ObjectKind HYDROData_Obstacle::getAltitudeObjectType() const { + DEBTRACE("HYDROData_Obstacle::getAltitudeObjectType"); return KIND_OBSTACLE_ALTITUDE; }