# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
- #ADD_SUBDIRECTORY(HYDRO)
+ ADD_SUBDIRECTORY(HYDRO)
+
- SALOME_CONFIGURE_FILE(doxyfile.in doxyfile)
- #SALOME_CONFIGURE_FILE(static/header.html.in static/header.html)
-
- ADD_CUSTOM_TARGET(usr_docs ${DOXYGEN_EXECUTABLE})
-
- ADD_DEPENDENCIES(usr_docs html_docs)
-
- INSTALL(CODE "EXECUTE_PROCESS(COMMAND \"${CMAKE_COMMAND}\" --build ${PROJECT_BINARY_DIR} --target usr_docs)")
- INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/HYDRO DESTINATION ${SALOME_INSTALL_DOC}/gui)
- #INSTALL(FILES images/head.png DESTINATION ${SALOME_INSTALL_DOC}/gui/HYDRO)
-
- SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES GUI)
++# SALOME_CONFIGURE_FILE(doxyfile.in doxyfile)
++# #SALOME_CONFIGURE_FILE(static/header.html.in static/header.html)
++#
++# ADD_CUSTOM_TARGET(usr_docs ${DOXYGEN_EXECUTABLE})
++#
++# ADD_DEPENDENCIES(usr_docs html_docs)
++#
++# INSTALL(CODE "EXECUTE_PROCESS(COMMAND \"${CMAKE_COMMAND}\" --build ${PROJECT_BINARY_DIR} --target usr_docs)")
++# INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/HYDRO DESTINATION ${SALOME_INSTALL_DOC}/gui)
++# #INSTALL(FILES images/head.png DESTINATION ${SALOME_INSTALL_DOC}/gui/HYDRO)
++#
++# SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES GUI)
--- /dev/null
+
+ /**
+ @file
+ \brief Help for the main page of the HYDROGUI module
+ */
+
+ /**
+ @mainpage
+
++ <b>The HYDRO documentation is divided in two parts:</b>
++ - <b>the reference documentation below </b>
++ - <b>a Tutorial in French:</b> <A HREF="../HYDRO_tutorial/index.html">Here </A>
++
++
+ The HYDRO GUI project has been developed for a hydrodynamic laboratory in the EDF R&D company
+ in the domain of the landscape modelling (construction of channels, dams, changing the course of the rivers etc).
+ It represents a pre-processor for the geometry modelling of the natural and artificial objects on the landscape.
+ The user starts work with raster maps where he can create analytic curves and regions describing the existing natural objects,
+ such as banks, coasts, lakes, rivers etc. Also he can create artificial objects (channel, dam) using the algorithms of the geometry modelling.
+ The objects are referenced to the real territory using the geodesic coordinates.
+ Finally the constructed landscape study is prepared for the further meshing and using in the hydrodynamic solvers.
+
+ The HYDRO module is implemented on the base of the SALOME platform and powered by the OpenCascade and SALOME platforms.
+
+ It supports the following features:
+ - raster maps (import from files and georeferencement by geodesic coordinates);
+ - geometry curves (creation on the map and import from SALOME GEOM module);
+ - geometry objects (creation and import from SALOME GEOM module);
+ - support of natural objects (immersible zones, lakes, rivers) and artificial objects (obstacles, channels, dams);
+ - georeferencement of the objects when the objects are connected with points on real territory using the geodesic coordinates;
+ - geometry algorithms on analytic objects (extrusion, partition) for complex objects construction;
+ - support of the results of the territory level measurement (bathymetry);
+ - partition of objects on zones of intersection and specifying the properties for these zones;
+
+ In the perspective the pre-processor can be completed by the post-processor showing the calculated results.
+
+ The HYDROGUI module supports the following objects:
+ - \ref imzone "Immersible zone"
+ - \ref p_profile "Profile"
+ - \ref create_profile "Create profile"
+ - \ref import_profile "Import profile"
+ - \ref georeferencement_profile "Profile georeferencement"
+ - \ref art_digue "Digue"
+ - \ref art_channel "Channel"
+ - \ref obstacle "Obstacle"
+ - \ref box_obstacle "Create Box obstacle"
+ - \ref cylinder_obstacle "Create Cylinder obstacle"
+ - \ref import_obstacle_GEOM "Import obstacle from GEOMETRY"
+ - \ref import_obstacle "Import obstacle from file"
+ - \ref translate_obstacle "Translation of an obstacle"
+
+
+ - \ref polyline3d "Polyline 3D"
+ - \ref polyline "Polyline"
+ - \ref export_polyline "Export polyline"
+ - \ref import_polyline "Import polyline"
+ - \ref bathymetry "Bathymetry"
+ - \ref strickler_table "Strickler table"
+ - \ref export_strickler_table "Export strickler table"
+ - \ref import_strickler_table "Import strickler table"
+ - \ref stream "Stream"
+ - \ref impimage "Find bottom"
+ - \ref profilesinterpolation "Profiles interpolation"
+ - \ref image "Image"
+ - \ref impimage "Import image"
+ - \ref fuseimages "Fuse images"
+ - \ref cutimages "Cut images"
+ - \ref splitimage "Split image"
+ - \ref calculation_case "Calculation case"
+
+ The HYDROGUI module supports the following \ref general_services "services":<br>
+
+
+ - \ref general_services "General services"
+ - \ref preferences "Preferences"
+ - \ref save "Save file"
+ - \ref open "Open file"
+ - \ref dump_study "Dump study"
+ - \ref load_script "Load script"
+ - \ref undo_redo "Undo/Redo actions"
+ - \ref copy_paste "Copy/Paste object(s)"
+ - \ref delete "Delete object(s)"
+ - \ref color "Color object"
+ - \ref show_hide "Show/Hide object(s)"
+ - \ref update "Update object"
+ - \ref rename "Rename object"
+ - \ref submersible "Submersible"
+ - \ref copy_position "Copy position"
+ - \ref change_layer_order "Change layer order"
+ - \ref local_cs "Local CS"
+
+
+ */
- #include(../../CMake/Common.cmake)
+ include(../../CMake/Common.cmake)
set(PROJECT_HEADERS
+ HYDRO_trace.hxx
HYDROData.h
HYDROData_AltitudeObject.h
HYDROData_Application.h
HYDROData_Bathymetry::~HYDROData_Bathymetry()
{
+ //DEBTRACE("HYDROData_Bathymetry destructor start " << this);
+// if (myQuadtree)
+// delete myQuadtree;
+// Nodes_3D::iterator it = myListOfNodes.begin();
+// for( ; it != myListOfNodes.end(); ++it)
+// delete *it;
+// myListOfNodes.clear();
}
- QStringList HYDROData_Bathymetry::DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const
+ QStringList HYDROData_Bathymetry::DumpToPython( const QString& thePyScriptPath,
+ MapOfTreatedObjects& theTreatedObjects ) const
{
QStringList aResList = dumpObjectCreation( theTreatedObjects );
QString aBathymetryName = GetObjPyName();
#include <BRepBuilderAPI_MakeVertex.hxx>
#endif
- #ifdef WIN32
- #pragma warning ( default: 4251 )
- #endif
-
#define EXPORT_NAME "HYDRO_" + GetName()
+#include <SALOME_NamingService.hxx>
+#include <SALOME_LifeCycleCORBA.hxx>
+
+#define _DEVDEBUG_
+#include "HYDRO_trace.hxx"
+
IMPLEMENT_STANDARD_HANDLE(HYDROData_CalculationCase, HYDROData_Entity)
IMPLEMENT_STANDARD_RTTIEXT(HYDROData_CalculationCase, HYDROData_Entity)
}
void HYDROData_CalculationCase::CreateRegionsAuto( const Handle(HYDROData_Document)& theDoc,
- const HYDROData_SplitToZonesTool::SplitDataList& theZones,
- const bool theLandCover )
+ const HYDROData_SplitToZonesTool::SplitDataList& theZones )
{
+ DEBTRACE("HYDROData_CalculationCase::CreateRegionsAuto");
QMap<QString, Handle(HYDROData_Region)> aRegionsMap; //object name to region
QMap<QString, QString> aRegionNameToObjNameMap;
- QString aZonesPref = theLandCover ? CALCULATION_LANDCOVER_ZONES_PREF : CALCULATION_ZONES_PREF;
- HYDROData_PriorityQueue aPr( this, theLandCover ? DataTag_CustomLandCoverRules : DataTag_CustomRules );
+ QString aZonesPref = CALCULATION_ZONES_PREF;
+ HYDROData_PriorityQueue aPr( this, DataTag_CustomRules );
// 1. First we create a default region for each object included into the calculation case
- HYDROData_SequenceOfObjects anObjects = theLandCover ? GetLandCovers() : GetGeometryObjects();
+ HYDROData_SequenceOfObjects anObjects = GetGeometryObjects();
for( int i = anObjects.Lower(), n = anObjects.Upper(); i<=n; i++ )
{
Handle(HYDROData_Entity) anObj = anObjects.Value( i );
}
Handle(HYDROData_Entity) aMergeEntity = aRegObj;
- if ( !theLandCover ) {
- Handle(HYDROData_Object) aMergeObject = Handle(HYDROData_Object)::DownCast( aMergeEntity );
- if ( !aMergeObject.IsNull() ) {
- DEBTRACE("aMergeEntity " << aMergeEntity->GetName().toStdString());
- aMergeEntity = aMergeObject->GetAltitudeObject();
- }
+ Handle(HYDROData_Object) aMergeObject = Handle(HYDROData_Object)::DownCast( aMergeEntity );
+ if ( !aMergeObject.IsNull() ) {
++ DEBTRACE("aMergeEntity " << aMergeEntity->GetName().toStdString());
+ aMergeEntity = aMergeObject->GetAltitudeObject();
}
switch( aMergeType )
{
double aResAltitude = HYDROData_IAltitudeObject::GetInvalidAltitude();
- Handle(HYDROData_Zone) aZone = GetZoneFromPoint( thePoint, false );
+ Handle(HYDROData_Zone) aZone = GetZoneFromPoint( thePoint );
if ( !aZone.IsNull() )
{
+ //DEBTRACE("GetAltitudeForPoint Region " << theRegion->GetName().toStdString() << " Zone " << aZone->GetName().toStdString());
Handle(HYDROData_Region) aRefRegion = Handle(HYDROData_Region)::DownCast( aZone->GetFatherObject() );
if ( IsEqual( aRefRegion, theRegion ) )
aResAltitude = GetAltitudeForPoint( thePoint, aZone );
HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetAllReferenceObjects() const;
/**
- * Returns the top shape of the object.
+ * Returns the left edge of the channel.
*/
- HYDRODATA_EXPORT virtual TopoDS_Shape GetTopShape() const;
+ HYDRODATA_EXPORT virtual TopoDS_Shape GetLeftShape() const;
/**
- * Returns the 3d shape of the object.
+ * Returns the right edge of the channel.
*/
- HYDRODATA_EXPORT virtual TopoDS_Shape GetShape3D() const;
+ HYDRODATA_EXPORT virtual TopoDS_Shape GetRightShape() const;
+
+ /**
+ * Returns the left edge of the channel.
+ */
+ HYDRODATA_EXPORT virtual TopoDS_Shape GetLeftShape() const;
+
+ /**
+ * Returns the right edge of the channel.
+ */
+ HYDRODATA_EXPORT virtual TopoDS_Shape GetRightShape() const;
/**
* Update the shape presentations of stream.
#include <QStringList>
#include <QVariant>
- //static const Standard_GUID GUID_MUST_BE_UPDATED("80f2bb81-3873-4631-8ddd-940d2119f000");
+#define _DEVDEBUG_
+#include "HYDRO_trace.hxx"
+
+ HYDROData_SequenceOfObjects::HYDROData_SequenceOfObjects()
+ : NCollection_Sequence<Handle_HYDROData_Entity>()
+ {
+ }
+
+ HYDROData_SequenceOfObjects::HYDROData_SequenceOfObjects( const HYDROData_SequenceOfObjects& theSequence )
+ : NCollection_Sequence<Handle_HYDROData_Entity>( theSequence )
+ {
+ }
+
+ HYDROData_SequenceOfObjects::HYDROData_SequenceOfObjects( const NCollection_Sequence<Handle_HYDROData_Entity>& theSequence )
+ : NCollection_Sequence<Handle_HYDROData_Entity>( theSequence )
+ {
+ }
-
IMPLEMENT_STANDARD_HANDLE(HYDROData_Entity,MMgt_TShared)
IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Entity,MMgt_TShared)
case KIND_STREAM_ALTITUDE: return "KIND_STREAM_ALTITUDE";
case KIND_OBSTACLE_ALTITUDE: return "KIND_OBSTACLE_ALTITUDE";
case KIND_STRICKLER_TABLE: return "KIND_STRICKLER_TABLE";
- case KIND_LAND_COVER: return "KIND_LAND_COVER";
+ case KIND_LAND_COVER_OBSOLETE: return "";
+ case KIND_CHANNEL_ALTITUDE: return "KIND_CHANNEL_ALTITUDE";
+ case KIND_LAND_COVER_MAP: return "KIND_LAND_COVER_MAP";
default: return "KIND_UNKNOWN"; ///! Unrecognized object
}
}
///! Kind of an object in a document
typedef int ObjectKind;
- const ObjectKind KIND_UNKNOWN = 0; ///! Unrecognized object
- const ObjectKind KIND_IMAGE = 1;
- const ObjectKind KIND_POLYLINE = 2;
- const ObjectKind KIND_BATHYMETRY = 3;
- const ObjectKind KIND_ALTITUDE = 4;
- const ObjectKind KIND_IMMERSIBLE_ZONE = 5;
- const ObjectKind KIND_RIVER = 6;
- const ObjectKind KIND_STREAM = 7;
- const ObjectKind KIND_CONFLUENCE = 8;
- const ObjectKind KIND_CHANNEL = 9;
- const ObjectKind KIND_OBSTACLE = 10;
- const ObjectKind KIND_DIGUE = 11;
- const ObjectKind KIND_PROFILE = 12;
- const ObjectKind KIND_PROFILEUZ = 13;
- const ObjectKind KIND_POLYLINEXY = 14;
- const ObjectKind KIND_CALCULATION = 15;
- const ObjectKind KIND_ZONE = 16;
- const ObjectKind KIND_REGION = 17;
- const ObjectKind KIND_VISUAL_STATE = 18;
- const ObjectKind KIND_ARTIFICIAL_OBJECT = 19;
- const ObjectKind KIND_NATURAL_OBJECT = 20;
- const ObjectKind KIND_DUMMY_3D = 21;
- const ObjectKind KIND_SHAPES_GROUP = 22;
- const ObjectKind KIND_SPLITTED_GROUP = 23;
- const ObjectKind KIND_STREAM_ALTITUDE = 24;
- const ObjectKind KIND_OBSTACLE_ALTITUDE = 25;
- const ObjectKind KIND_STRICKLER_TABLE = 26;
- const ObjectKind KIND_LAND_COVER = 27;
- const ObjectKind KIND_CHANNEL_ALTITUDE = 28;
- const ObjectKind KIND_LAST = KIND_CHANNEL_ALTITUDE;
+ const ObjectKind KIND_UNKNOWN = 0; ///! Unrecognized object
+ const ObjectKind KIND_IMAGE = 1;
+ const ObjectKind KIND_POLYLINE = 2;
+ const ObjectKind KIND_BATHYMETRY = 3;
+ const ObjectKind KIND_ALTITUDE = 4;
+ const ObjectKind KIND_IMMERSIBLE_ZONE = 5;
+ const ObjectKind KIND_RIVER = 6;
+ const ObjectKind KIND_STREAM = 7;
+ const ObjectKind KIND_CONFLUENCE = 8;
+ const ObjectKind KIND_CHANNEL = 9;
+ const ObjectKind KIND_OBSTACLE = 10;
+ const ObjectKind KIND_DIGUE = 11;
+ const ObjectKind KIND_PROFILE = 12;
+ const ObjectKind KIND_PROFILEUZ = 13;
+ const ObjectKind KIND_POLYLINEXY = 14;
+ const ObjectKind KIND_CALCULATION = 15;
+ const ObjectKind KIND_ZONE = 16;
+ const ObjectKind KIND_REGION = 17;
+ const ObjectKind KIND_VISUAL_STATE = 18;
+ const ObjectKind KIND_ARTIFICIAL_OBJECT = 19;
+ const ObjectKind KIND_NATURAL_OBJECT = 20;
+ const ObjectKind KIND_DUMMY_3D = 21;
+ const ObjectKind KIND_SHAPES_GROUP = 22;
+ const ObjectKind KIND_SPLIT_GROUP = 23;
+ const ObjectKind KIND_STREAM_ALTITUDE = 24;
+ const ObjectKind KIND_OBSTACLE_ALTITUDE = 25;
+ const ObjectKind KIND_STRICKLER_TABLE = 26;
+ const ObjectKind KIND_LAND_COVER_OBSOLETE = 27;
-const ObjectKind KIND_LAND_COVER_MAP = 28;
++const ObjectKind KIND_CHANNEL_ALTITUDE = 28;
++const ObjectKind KIND_LAND_COVER_MAP = 29;
+ const ObjectKind KIND_LAST = KIND_LAND_COVER_MAP;
DEFINE_STANDARD_HANDLE(HYDROData_Entity, MMgt_TShared)
Handle(TDataStd_ReferenceList) getReferenceList( const int theTag,
const bool theIsCreate ) const;
+
+ void SetShape( int theTag, const TopoDS_Shape& theShape );
+ TopoDS_Shape GetShape( int theTag ) const;
+ int GetGeomChangeFlag() const;
+ int GetGeomChangeFlag() const;
+
protected:
/// Array of pointers to the properties of this object; index in this array is returned by \a AddProperty.
TDF_Label myLab; ///< label of this object
return myAltitudeObject;
}
- double HYDROData_IInterpolator::GetAltitudeForPoint(
- const double theCoordX, const double theCoordY ) const
+ double HYDROData_IInterpolator::GetAltitudeForPoint( const double theCoordX, const double theCoordY ) const
{
+ DEBTRACE("HYDROData_IInterpolator::GetAltitudeForPoint");
return myAltitudeObject.IsNull() ? HYDROData_IAltitudeObject::GetInvalidAltitude() :
myAltitudeObject->GetAltitudeForPoint( gp_XY( theCoordX, theCoordY ) );
}
#include "HYDROData_CalculationCase.h"
#include "HYDROData_Channel.h"
#include "HYDROData_Confluence.h"
- #include "HYDROData_DummyObject3D.h"
#include "HYDROData_Digue.h"
- #include "HYDROData_ShapesGroup.h"
+ #include "HYDROData_DummyObject3D.h"
#include "HYDROData_Image.h"
#include "HYDROData_ImmersibleZone.h"
+ #include "HYDROData_LandCoverMap.h"
#include "HYDROData_Obstacle.h"
#include "HYDROData_ObstacleAltitude.h"
+#include "HYDROData_ChannelAltitude.h"
#include "HYDROData_Polyline3D.h"
#include "HYDROData_PolylineXY.h"
#include "HYDROData_Profile.h"
case KIND_STREAM_ALTITUDE: aResult = new HYDROData_StreamAltitude(); break;
case KIND_OBSTACLE_ALTITUDE: aResult = new HYDROData_ObstacleAltitude(); break;
case KIND_STRICKLER_TABLE: aResult = new HYDROData_StricklerTable(); break;
- case KIND_LAND_COVER: aResult = new HYDROData_LandCover(); break;
- case KIND_LAND_COVER_MAP: aResult = new HYDROData_LandCoverMap(); break;
-
+ case KIND_LAND_COVER_OBSOLETE: break;
+ case KIND_CHANNEL_ALTITUDE: aResult = new HYDROData_ChannelAltitude(); break;
- default: break;
++ case KIND_LAND_COVER_MAP: aResult = new HYDROData_LandCoverMap(); break;
+ default: break;
}
if ( !aResult.IsNull() )
#include "HYDROData_Tool.h"
#include "HYDROData_Iterator.h"
#include "HYDROData_IAltitudeObject.h"
-
- #include <TNaming_Builder.hxx>
- #include <TNaming_NamedShape.hxx>
-
#include <TopoDS_Shape.hxx>
#include <TDataStd_Integer.hxx>
+#include <TDataStd_Real.hxx>
#include <QColor>
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;
}
#include "HYDROData_IAltitudeObject.h"
#include "HYDROData_Document.h"
#include "HYDROData_NaturalObject.h"
- #include "HYDROData_LandCover.h"
-
- #include <TNaming_Builder.hxx>
- #include <TNaming_NamedShape.hxx>
-
- #include <TopoDS_Shape.hxx>
-
#include <QStringList>
-
#include <TDataStd_Integer.hxx>
+ #include <TopoDS_Shape.hxx>
+#define _DEVDEBUG_
+#include "HYDRO_trace.hxx"
+
IMPLEMENT_STANDARD_HANDLE(HYDROData_Zone, HYDROData_Entity)
IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Zone, HYDROData_Entity)