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
Initial merge of branch 'BR_HYDRO_IMPS_2016' into BR_PORTING_OCCT_7
[modules/hydro.git]
/
src
/
HYDROData
/
HYDROData_Document.cxx
diff --git
a/src/HYDROData/HYDROData_Document.cxx
b/src/HYDROData/HYDROData_Document.cxx
index 653ddb8e2dd0686962afd0c40b8858d3f85cd8e1..6a8f7376402874535a0698799b981a0a1c76ccc6 100644
(file)
--- a/
src/HYDROData/HYDROData_Document.cxx
+++ b/
src/HYDROData/HYDROData_Document.cxx
@@
-37,7
+37,6
@@
#include <QTextStream>
#include <QColor>
#include <QTextStream>
#include <QColor>
-IMPLEMENT_STANDARD_HANDLE(HYDROData_Document,MMgt_TShared)
IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Document,MMgt_TShared)
#define PYTHON_DOC_NAME "hydro_doc"
IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Document,MMgt_TShared)
#define PYTHON_DOC_NAME "hydro_doc"
@@
-54,8
+53,8
@@
static const gp_Pnt2d DEFAULT_LOCAL_CS( 0, 0 );
using namespace std;
using namespace std;
-typedef QMap<Standard_Integer,
Handle_HYDROData_Entity
> MapOfOrdered;
-typedef QMap<QString,
Handle_HYDROData_Entity
> MapOfUnordered;
+typedef QMap<Standard_Integer,
Handle(HYDROData_Entity)
> MapOfOrdered;
+typedef QMap<QString,
Handle(HYDROData_Entity)
> MapOfUnordered;
Handle(HYDROData_Document) HYDROData_Document::Document(const int theStudyID)
{
Handle(HYDROData_Document) HYDROData_Document::Document(const int theStudyID)
{
@@
-237,7
+236,7
@@
bool HYDROData_Document::DumpToPython( const QString& thePyScriptPath,
{
// Try to open the file
QFile aFile( thePyScriptPath );
{
// Try to open the file
QFile aFile( thePyScriptPath );
- if ( !aFile.open( QIODevice::WriteOnly ) )
+ if ( !aFile.open( QIODevice::WriteOnly
| QFile::Text
) )
return false;
MapOfTreatedObjects aTreatedObjects;
return false;
MapOfTreatedObjects aTreatedObjects;
@@
-253,7
+252,7
@@
bool HYDROData_Document::DumpToPython( const QString& thePyScriptPath,
// Dump the local CS data to Python
UpdateLCSFields();
// Dump the local CS data to Python
UpdateLCSFields();
- QString aLCS = QString( "%1.SetLocalCS( %2, %3 )" ).arg( GetDocPyName() ).arg( myLX
).arg( myLY
);
+ QString aLCS = QString( "%1.SetLocalCS( %2, %3 )" ).arg( GetDocPyName() ).arg( myLX
, 0, 'f', 3 ).arg( myLY, 0, 'f', 3
);
if( theIsMultiFile )
aLCS.prepend( " " );
HYDROData_Tool::WriteStringsToFile( aFile, QStringList() << aLCS );
if( theIsMultiFile )
aLCS.prepend( " " );
HYDROData_Tool::WriteStringsToFile( aFile, QStringList() << aLCS );
@@
-322,12
+321,12
@@
QStringList HYDROData_Document::DumpToPython( const QString& thePyScriptPath,
aResScript << QString( "import salome" );
aResScript << QString( "" );
aResScript << QString( "def RebuildData( theStudy ):" );
aResScript << QString( "import salome" );
aResScript << QString( "" );
aResScript << QString( "def RebuildData( theStudy ):" );
- aResScript << QString( " %1 = HYDROData_Document.Document( theStudy._get_StudyId() )
;
" ).arg( aDocName );
+ aResScript << QString( " %1 = HYDROData_Document.Document( theStudy._get_StudyId() )" ).arg( aDocName );
}
else
{
aResScript << QString( "" );
}
else
{
aResScript << QString( "" );
- aResScript << QString( "%1 = HYDROData_Document.Document( theStudy._get_StudyId() )
;
" ).arg( aDocName );
+ aResScript << QString( "%1 = HYDROData_Document.Document( theStudy._get_StudyId() )" ).arg( aDocName );
}
return aResScript;
}
return aResScript;
@@
-483,7
+482,7
@@
void HYDROData_Document::SetObjectsLayerOrder( const HYDROData_SequenceOfObjects
}
}
}
}
-void HYDROData_Document::Show( const Handle
_HYDROData_Entity
& theObject )
+void HYDROData_Document::Show( const Handle
(HYDROData_Entity)
& theObject )
{
HYDROData_SequenceOfObjects anOrder;
anOrder.Append( theObject );
{
HYDROData_SequenceOfObjects anOrder;
anOrder.Append( theObject );
@@
-831,6
+830,11
@@
void HYDROData_Document::Transform( gp_XYZ& thePnt, bool IsToLocalCS ) const
thePnt = gp_XYZ( X, Y, Z );
}
thePnt = gp_XYZ( X, Y, Z );
}
+void HYDROData_Document::Transform( double& X, double& Y, double& Z, bool IsToLocalCS ) const
+{
+ Transform( X, Y, IsToLocalCS );
+}
+
void HYDROData_Document::Transform( gp_XY& thePnt, bool IsToLocalCS ) const
{
double X = thePnt.X();
void HYDROData_Document::Transform( gp_XY& thePnt, bool IsToLocalCS ) const
{
double X = thePnt.X();