Salome HOME
projects
/
modules
/
hydro.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
merge master
[modules/hydro.git]
/
src
/
HYDROData
/
HYDROData_Obstacle.cxx
diff --git
a/src/HYDROData/HYDROData_Obstacle.cxx
b/src/HYDROData/HYDROData_Obstacle.cxx
index 00f332b94b1c497d7ebecca0e5902b9d3c0595fd..60b4143a4213c96d8a25deb0ebe0b4343b25d69a 100644
(file)
--- a/
src/HYDROData/HYDROData_Obstacle.cxx
+++ b/
src/HYDROData/HYDROData_Obstacle.cxx
@@
-24,7
+24,17
@@
#include "HYDROData_Tool.h"
#include "HYDROData_GeomTool.h"
#include "HYDROData_Tool.h"
#include "HYDROData_GeomTool.h"
+#ifdef WIN32
+ #pragma warning ( disable: 4251 )
+#endif
+
+#ifndef LIGHT_MODE
#include <Basics_Utils.hxx>
#include <Basics_Utils.hxx>
+#endif
+
+#ifdef WIN32
+ #pragma warning ( default: 4251 )
+#endif
#include <BRepTools.hxx>
#include <BRep_Builder.hxx>
#include <BRepTools.hxx>
#include <BRep_Builder.hxx>
@@
-48,11
+58,19
@@
#include <TopExp_Explorer.hxx>
#include <TopExp_Explorer.hxx>
+#ifdef WIN32
+ #pragma warning ( disable: 4251 )
+#endif
+
#include <QColor>
#include <QFile>
#include <QFileInfo>
#include <QStringList>
#include <QColor>
#include <QFile>
#include <QFileInfo>
#include <QStringList>
+#ifdef WIN32
+ #pragma warning ( default: 4251 )
+#endif
+
#include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic
#include <HYDROData_Projection.h>
#include <Standard_ErrorHandler.hxx> // CAREFUL ! position of this file is critic
#include <HYDROData_Projection.h>
@@
-65,7
+83,7
@@
IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Obstacle,HYDROData_ArtificialObject)
HYDROData_Obstacle::HYDROData_Obstacle()
HYDROData_Obstacle::HYDROData_Obstacle()
-: HYDROData_ArtificialObject()
+: HYDROData_ArtificialObject(
Geom_3d
)
{
}
{
}
@@
-73,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 );
{
QStringList aResList = dumpObjectCreation( theTreatedObjects );
@@
-124,7
+143,7
@@
QStringList HYDROData_Obstacle::DumpToPython( MapOfTreatedObjects& theTreatedObj
void HYDROData_Obstacle::Update()
{
void HYDROData_Obstacle::Update()
{
-
r
emoveGroupObjects();
+
R
emoveGroupObjects();
createGroupObjects();
checkAndSetAltitudeObject();
createGroupObjects();
checkAndSetAltitudeObject();
@@
-136,16
+155,6
@@
bool HYDROData_Obstacle::IsHas2dPrs() const
return true;
}
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 );
void HYDROData_Obstacle::SetShape3D( const TopoDS_Shape& theShape )
{
TopoDS_Face aShape2d = HYDROData_Projection::MakeProjection( theShape );
@@
-153,12
+162,12
@@
void HYDROData_Obstacle::SetShape3D( const TopoDS_Shape& theShape )
HYDROData_ArtificialObject::SetTopShape( aShape2d );
}
HYDROData_ArtificialObject::SetTopShape( aShape2d );
}
-QColor HYDROData_Obstacle::DefaultFillingColor()
+QColor HYDROData_Obstacle::DefaultFillingColor()
const
{
return QColor( Qt::yellow );
}
{
return QColor( Qt::yellow );
}
-QColor HYDROData_Obstacle::DefaultBorderColor()
+QColor HYDROData_Obstacle::DefaultBorderColor()
const
{
return QColor( Qt::transparent );
}
{
return QColor( Qt::transparent );
}
@@
-221,6
+230,7
@@
bool HYDROData_Obstacle::ImportFromGeomIOR( const TCollection_AsciiString& theIO
{
bool aRes = false;
{
bool aRes = false;
+#ifndef LIGHT_MODE
if ( theIOR.IsEmpty() ) {
return aRes;
}
if ( theIOR.IsEmpty() ) {
return aRes;
}
@@
-237,7
+247,8
@@
bool HYDROData_Obstacle::ImportFromGeomIOR( const TCollection_AsciiString& theIO
SetShape3D( aShape );
aRes = true;
}
SetShape3D( aShape );
aRes = true;
}
-
+#endif
+
return aRes;
}
return aRes;
}
@@
-270,6
+281,7
@@
TCollection_AsciiString HYDROData_Obstacle::GetGeomObjectName() const
return aRes;
}
return aRes;
}
+#ifndef LIGHT_MODE
SALOMEDS::Study_var aDSStudy = HYDROData_GeomTool::GetStudyByID( aDocId );
if ( !aDSStudy->_is_nil() ) {
SALOMEDS::Study_var aDSStudy = HYDROData_GeomTool::GetStudyByID( aDocId );
if ( !aDSStudy->_is_nil() ) {
@@
-279,7
+291,7
@@
TCollection_AsciiString HYDROData_Obstacle::GetGeomObjectName() const
aRes = TCollection_AsciiString( aSObject->GetName() );
}
}
aRes = TCollection_AsciiString( aSObject->GetName() );
}
}
-
+#endif
return aRes;
}
return aRes;
}
@@
-312,6
+324,7
@@
TopoDS_Shape HYDROData_Obstacle::ImportIGES( const QString& theFilePath ) const
{
TopoDS_Shape aResShape;
{
TopoDS_Shape aResShape;
+#ifndef LIGHT_MODE
// Set "C" numeric locale to save numbers correctly
Kernel_Utils::Localizer loc;
// Set "C" numeric locale to save numbers correctly
Kernel_Utils::Localizer loc;
@@
-346,6
+359,7
@@
TopoDS_Shape HYDROData_Obstacle::ImportIGES( const QString& theFilePath ) const
catch(Standard_Failure) {
aResShape.Nullify();
}
catch(Standard_Failure) {
aResShape.Nullify();
}
+#endif
return aResShape;
}
return aResShape;
}
@@
-354,6
+368,7
@@
TopoDS_Shape HYDROData_Obstacle::ImportSTEP( const QString& theFilePath ) const
{
TopoDS_Shape aResShape;
{
TopoDS_Shape aResShape;
+#ifndef LIGHT_MODE
// Set "C" numeric locale to save numbers correctly
Kernel_Utils::Localizer loc;
// Set "C" numeric locale to save numbers correctly
Kernel_Utils::Localizer loc;
@@
-457,20
+472,11
@@
TopoDS_Shape HYDROData_Obstacle::ImportSTEP( const QString& theFilePath ) const
catch (Standard_Failure) {
aResShape.Nullify();
}
catch (Standard_Failure) {
aResShape.Nullify();
}
+#endif
return aResShape;
}
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");
ObjectKind HYDROData_Obstacle::getAltitudeObjectType() const
{
DEBTRACE("HYDROData_Obstacle::getAltitudeObjectType");