]> SALOME platform Git repositories - modules/hydro.git/blob - src/HYDROData/HYDROData_Channel.cxx
Salome HOME
lot 12 p.2
[modules/hydro.git] / src / HYDROData / HYDROData_Channel.cxx
1 // Copyright (C) 2014-2015  EDF-R&D
2 // This library is free software; you can redistribute it and/or
3 // modify it under the terms of the GNU Lesser General Public
4 // License as published by the Free Software Foundation; either
5 // version 2.1 of the License, or (at your option) any later version.
6 //
7 // This library is distributed in the hope that it will be useful,
8 // but WITHOUT ANY WARRANTY; without even the implied warranty of
9 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
10 // Lesser General Public License for more details.
11 //
12 // You should have received a copy of the GNU Lesser General Public
13 // License along with this library; if not, write to the Free Software
14 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
15 //
16 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
17 //
18
19 #include "HYDROData_Channel.h"
20
21 #include "HYDROData_Document.h"
22 #include "HYDROData_Polyline3D.h"
23 #include "HYDROData_Profile.h"
24 #include "HYDROData_PolylineXY.h"
25 #include "HYDROData_Projection.h"
26 #include "HYDROData_ShapesGroup.h"
27 #include "HYDROData_ShapesTool.h"
28 #include "HYDROData_Stream.h"
29 #include "HYDROData_Tool.h"
30 #include "HYDROData_ChannelAltitude.h"
31
32 #include <BRepBuilderAPI_MakeWire.hxx>
33 #include <BRepLib_MakePolygon.hxx>
34
35 #include <BRepOffsetAPI_MakePipeShell.hxx>
36 #include <BRepOffsetAPI_MakePipe.hxx>
37 #include <BRepCheck_Analyzer.hxx>
38
39 #include <BRep_Tool.hxx>
40
41 #include <BRepBuilderAPI_Transform.hxx>
42
43 #include <BRepLib_MakeEdge.hxx>
44 #include <BRepLib_MakeWire.hxx>
45
46 #include <GeomAPI_ProjectPointOnCurve.hxx>
47
48 #include <gp_Ax1.hxx>
49
50 #include <TopExp.hxx>
51 #include <TopExp_Explorer.hxx>
52
53 #include <TColgp_HArray1OfPnt.hxx>
54 #include <TColgp_Array1OfDir.hxx>
55
56 #include <TColStd_Array1OfReal.hxx>
57
58 #include <TopTools_HArray1OfShape.hxx>
59 #include <TopTools_SequenceOfShape.hxx>
60
61 #include <TopoDS.hxx>
62 #include <TopoDS_Wire.hxx>
63 #include <TopoDS_Vertex.hxx>
64
65 #include <Quantity_Parameter.hxx>
66
67 #define DEB_CHANNEL 1
68 #ifdef DEB_CHANNEL
69 #include <BRepTools.hxx>
70 #endif
71
72 #include <QColor>
73 #include <QStringList>
74
75 #define _DEVDEBUG_
76 #include "HYDRO_trace.hxx"
77
78 IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Channel,HYDROData_ArtificialObject)
79
80
81 HYDROData_Channel::HYDROData_Channel()
82 : HYDROData_ArtificialObject( Geom_3d )
83 {
84 }
85
86 HYDROData_Channel::~HYDROData_Channel()
87 {
88 }
89
90 QStringList HYDROData_Channel::DumpToPython( const QString& thePyScriptPath,
91                                              MapOfTreatedObjects& theTreatedObjects ) const
92 {
93   QStringList aResList = dumpObjectCreation( theTreatedObjects );
94   QString aName = GetObjPyName();
95
96   Handle(HYDROData_Polyline3D) aRefGideLine = GetGuideLine();
97   setPythonReferenceObject( thePyScriptPath, theTreatedObjects, aResList, aRefGideLine, "SetGuideLine" );
98
99   Handle(HYDROData_Profile) aRefProfile = GetProfile();
100   setPythonReferenceObject( thePyScriptPath, theTreatedObjects, aResList, aRefProfile, "SetProfile" );
101
102   aResList << QString( "%1.SetEquiDistance( %2 )" ).arg( aName ).arg( GetEquiDistance() );
103
104   aResList << QString( "" );
105   aResList << QString( "%1.Update()" ).arg( aName );
106   aResList << QString( "" );
107
108   return aResList;
109 }
110
111 HYDROData_SequenceOfObjects HYDROData_Channel::GetAllReferenceObjects() const
112 {
113   HYDROData_SequenceOfObjects aResSeq = HYDROData_ArtificialObject::GetAllReferenceObjects();
114
115   Handle(HYDROData_Polyline3D) aGuideLine = GetGuideLine();
116   if ( !aGuideLine.IsNull() )
117     aResSeq.Append( aGuideLine );
118
119   Handle(HYDROData_Profile) aProfile = GetProfile();
120   if ( !aProfile.IsNull() )
121     aResSeq.Append( aProfile );
122
123   return aResSeq;
124 }
125
126 bool HYDROData_Channel::CreatePresentations( const Handle(HYDROData_Polyline3D)& theGuideLine,
127                                              const Handle(HYDROData_Profile)&    theProfile,
128                                              PrsDefinition&                      thePrs,
129                                              double                              theEquiDistance,
130                                              bool                                ReverseXCoord)
131 {
132   return internalCreatePresentations( true, theGuideLine, theProfile, TopoDS_Wire(), gp_Pnt(), thePrs, theEquiDistance, ReverseXCoord);
133 }
134
135 bool HYDROData_Channel::CreatePresentations( const Handle(HYDROData_Polyline3D)& theGuideLine,
136                                              double                              LC,
137                                              double                              deltaZ,
138                                              double                              coteZ,
139                                              PrsDefinition&                      thePrs,
140                                              double                              theEquiDistance,
141                                              bool                                ReverseXCoord)
142 {
143   Handle(HYDROData_Profile) theProfile;
144   TopoDS_Wire W;
145   gp_Pnt MP;
146
147   gp_Pnt2d A1(-0.75*LC, coteZ-LC/2.0), A2(0.75*LC, coteZ -LC/2.0), B1(-LC/2.0, coteZ), B2(LC/2.0, coteZ), C(0, coteZ+deltaZ);
148   gp_Pnt A1_3d(A1.X(), 0, A1.Y()), A2_3d(A2.X(), 0, A2.Y()), B1_3d(B1.X(), 0, B1.Y()), B2_3d(B2.X(), 0, B2.Y()), C_3d(C.X(), 0, C.Y());
149   BRepLib_MakePolygon PM;
150   PM.Add(A1_3d);
151   PM.Add(B1_3d);
152   PM.Add(C_3d);
153   PM.Add(B2_3d);
154   PM.Add(A2_3d);
155   W = PM.Wire();
156   return internalCreatePresentations( false, theGuideLine, theProfile, W, MP, thePrs, theEquiDistance, ReverseXCoord);
157 }
158
159 bool HYDROData_Channel::internalCreatePresentations( bool mode,
160                                                      const Handle(HYDROData_Polyline3D)& theGuideLine,
161                                                      const Handle(HYDROData_Profile)&    theProfile,
162                                                      const TopoDS_Wire&                  theProfWire,
163                                                      const gp_Pnt&                       theMiddlePnt,
164                                                      PrsDefinition&                      thePrs,
165                                                      double                              theEquiDistance,
166                                                      bool                                ReverseXCoord)
167 {
168   // Check input parameters
169   if ( theGuideLine.IsNull() )
170   {
171     return false;
172   }
173   if (mode && theProfile.IsNull() || !mode && theProfWire.IsNull() )
174     return false;
175
176   TopoDS_Wire aPathWire = TopoDS::Wire( theGuideLine->GetShape3D() );
177   TopoDS_Wire aProfileWire = theProfWire;
178   //ignore ReverseXCoord if mode is false
179   if (mode)
180   {
181     if (!ReverseXCoord)
182       aProfileWire = TopoDS::Wire( theProfile->GetShape3D(true, false) ); //temp force rebuild
183     else
184       aProfileWire = TopoDS::Wire( theProfile->GetShape3D(true, true));
185   }
186   if ( aPathWire.IsNull() || aProfileWire.IsNull() ) {
187     return false;
188   }
189
190 #ifdef DEB_CHANNEL
191   std::string brepName = "guideline_";
192   brepName += theGuideLine->GetName().toStdString();
193   brepName += ".brep";
194   BRepTools::Write( aPathWire, brepName.c_str() );
195   brepName = "profile_";
196   brepName += theGuideLine->GetName().toStdString();
197   brepName += ".brep";
198   BRepTools::Write( aProfileWire, brepName.c_str() );
199 #endif
200
201   // Pre-processing
202   Handle(HYDROData_PolylineXY) aPolylineXY = theGuideLine->GetPolylineXY();
203   if ( aPolylineXY.IsNull() ) {
204     return false;
205   }
206
207   /*
208   HYDROData_IPolyline::SectionType aSectionType = aPolylineXY->GetSectionType( 0 );
209   HYDROData_IPolyline::PointsList aPolylinePoints = aPolylineXY->GetPoints( 0 );
210   int aNbPoints = aPolylinePoints.Length();
211   */
212
213   HYDROData_Polyline3D::Polyline3DPoints aPolylinePoints3D = theGuideLine->GetPoints( theEquiDistance );
214   int aNbPoints = aPolylinePoints3D.Length();
215   if ( aNbPoints < 2 )
216     return false;
217   
218   // Get tangent in each point of the guide line ( 2D )
219   TColgp_Array1OfDir aTangents( 1, aNbPoints );
220
221   HYDROData_IPolyline::SectionType aSectionType = aPolylineXY->GetSectionType( 0 );
222   
223   if( aSectionType == HYDROData_IPolyline::SECTION_POLYLINE )
224   {
225     for ( int i = 1; i <= aNbPoints; ++i ) {
226       gp_XYZ aPnt = aPolylinePoints3D.Value( i );
227       aPnt.SetZ( 0. );
228       gp_XYZ aPrevPnt;
229       if ( i > 1 ) {
230         aPrevPnt = aPolylinePoints3D.Value( i - 1 );
231         aPrevPnt.SetZ( 0. );
232       }
233
234       gp_Vec aDir;
235       if ( i < aNbPoints ) {
236         gp_XYZ aNextPnt = aPolylinePoints3D.Value( i + 1 );
237         aNextPnt.SetZ( 0. );
238
239         gp_Vec anEdgeVec( aPnt, aNextPnt );
240
241         if ( i == 1 ) {
242           aDir = anEdgeVec;
243         } else {
244           gp_Vec aPrevVec( aPrevPnt, aPnt );
245           aDir = aPrevVec.Normalized() + anEdgeVec.Normalized();
246         }
247       } else {
248         aDir = gp_Vec( aPrevPnt, aPnt );
249       }
250             
251       aTangents.SetValue( i, aDir );
252     }
253   } else {
254     // Get curve from the first edge ( 2D )
255     TopTools_SequenceOfShape anEdges;
256     HYDROData_ShapesTool::ExploreShapeToShapes( aPolylineXY->GetShape(), TopAbs_EDGE, anEdges );
257     Standard_Real aStart, anEnd;
258
259     Handle(Geom_Curve) aCurve = BRep_Tool::Curve( TopoDS::Edge( anEdges.First() ), aStart, anEnd );
260     GeomAPI_ProjectPointOnCurve aProject;
261
262     // Get tangents
263     for ( int i = 1; i <= aNbPoints; ++i ) {
264       gp_XYZ aPointToTest = aPolylinePoints3D.Value( i );
265       aPointToTest.SetZ( 0. );
266
267       aProject.Init( aPointToTest, aCurve );
268       Quantity_Parameter aParam = aProject.LowerDistanceParameter();
269       gp_Pnt aPnt;
270       gp_Vec aDir;
271       aCurve->D1( aParam, aPnt, aDir);
272
273       aTangents.SetValue( i, aDir );
274     }
275   }
276
277   // Get the profile middle point ( 3D )
278   gp_Pnt aMiddlePoint = theMiddlePnt;
279   if (mode)
280   {
281     aMiddlePoint = theProfile->GetMiddlePoint( true );
282   }
283
284   // Translate the profile to each point on the guide line ( 3D )
285   Handle(TColgp_HArray1OfPnt) anArrayOfFPnt = new TColgp_HArray1OfPnt(1, aNbPoints );
286   Handle(TColgp_HArray1OfPnt) anArrayOfLPnt = new TColgp_HArray1OfPnt(1, aNbPoints );  
287   Handle(TopTools_HArray1OfShape) anArrOfProfiles = new TopTools_HArray1OfShape( 1, aNbPoints );
288
289   for ( int i = 1; i <= aNbPoints; ++i ) {
290     // Get point on the guide line
291     gp_Pnt aPointOnGuide( aPolylinePoints3D.Value( i ) );
292
293     // Define translation and rotation:
294     gp_Trsf Translation, Rotation;
295
296     // Translation
297     Translation.SetTranslation( aMiddlePoint, aPointOnGuide );
298     TopoDS_Wire aTransformedProfile = 
299       TopoDS::Wire( BRepBuilderAPI_Transform( aProfileWire, Translation, Standard_True ) );
300
301     // Rotation
302     gp_Vec aVertical( 0., 0., 1. );
303     TopoDS_Vertex aLeftVertex, aRightVertex;
304     TopExp::Vertices( aTransformedProfile, aLeftVertex, aRightVertex );
305     gp_Pnt aLeftPoint  = BRep_Tool::Pnt( aLeftVertex );
306     gp_Pnt aRightPoint = BRep_Tool::Pnt( aRightVertex );
307     gp_Vec aLeftToRight( aLeftPoint, aRightPoint);
308     gp_Vec NormalToProfile = aVertical ^ aLeftToRight;
309
310     gp_Vec aDir = aTangents.Value( i );
311     gp_Vec AxisOfRotation = NormalToProfile ^ aDir;
312     if (AxisOfRotation.Magnitude() <= gp::Resolution()) {
313       if ( aVertical * aLeftToRight < 0. ) {
314         gp_Ax1 theVertical(aPointOnGuide, gp::DZ() );
315         Rotation.SetRotation(theVertical, M_PI);
316       }
317     } else {
318       gp_Ax1 theAxis(aPointOnGuide, AxisOfRotation);
319       Standard_Real theAngle = NormalToProfile.AngleWithRef(aDir, AxisOfRotation);
320       Rotation.SetRotation(theAxis, theAngle);
321     }
322
323     aTransformedProfile = TopoDS::Wire(BRepBuilderAPI_Transform( aTransformedProfile, Rotation, Standard_True) );
324
325     // Get the first and the last points of the transformed profile
326     TopoDS_Vertex V1, V2;
327     TopExp::Vertices( aTransformedProfile, V1, V2 );
328
329     // Fill the data
330     anArrayOfFPnt->SetValue( i, BRep_Tool::Pnt( V1 ) );
331     anArrayOfLPnt->SetValue( i, BRep_Tool::Pnt( V2 ) );
332        
333     anArrOfProfiles->SetValue( i, aTransformedProfile );
334   }
335
336   // Create presentation
337   HYDROData_Stream::PrsDefinition aPrs;
338   Handle(TopTools_HArray1OfShape) anArrOf2DProfiles; // we don't need 2D profiles for channel/digue presentation
339
340   HYDROData_Stream::CreatePresentations( anArrayOfFPnt, anArrayOfLPnt, anArrOfProfiles, aPrs );
341   thePrs.myInlet =  aPrs.myInlet;       
342   thePrs.myOutlet =  aPrs.myOutlet; 
343   thePrs.myLeftBank = aPrs.myLeftBank; 
344   thePrs.myRightBank = aPrs.myRightBank;
345   thePrs.myPrs2D = TopoDS::Face(aPrs.myPrs2D); 
346   thePrs.myPrs3D = aPrs.myPrs3D; 
347
348   //thePrs.myPrs2D = TopoDS::Face( aPrs.myPrs2D );
349   //BRepBuilderAPI_MakeWire aMakeWire( aPrs.myLeftBank ) ;
350   //thePrs.myLeftBank = aMakeWire.Wire();
351   //aMakeWire = BRepBuilderAPI_MakeWire( aPrs.myRightBank );
352   //thePrs.myRightBank = aMakeWire.Wire();
353   //aMakeWire = BRepBuilderAPI_MakeWire( aPrs.myInlet );
354   //thePrs.myInlet = aMakeWire.Wire();
355   //aMakeWire = BRepBuilderAPI_MakeWire( aPrs.myOutlet );
356   //thePrs.myOutlet = aMakeWire.Wire();
357
358   return true;
359 }
360
361 void HYDROData_Channel::Update()
362 {
363   HYDROData_ArtificialObject::Update();
364
365   Handle(HYDROData_Polyline3D) aGuideLine = GetGuideLine();
366
367   PrsDefinition aResultPrs;
368   double anEquiDistance = GetEquiDistance();
369
370   bool invDirection = false;
371   Handle(HYDROData_IAltitudeObject) anObjAltitude = GetAltitudeObject();
372   Handle(HYDROData_ChannelAltitude) aChannelAlt = Handle(HYDROData_ChannelAltitude)::DownCast(anObjAltitude);
373   if (!aChannelAlt.IsNull())
374     invDirection = aChannelAlt->GetInvertDirection();
375
376   if (GetProfileMode())
377   {
378     Handle(HYDROData_Profile) aProfile = GetProfile();
379     if ( !CreatePresentations( aGuideLine, aProfile, aResultPrs, anEquiDistance, invDirection ) )
380       return;
381   }
382   else
383   {
384     double lc = GetLCValue();
385     double deltaz = GetDeltaZValue();
386     double cotez = GetCoteZValue();
387     if ( !CreatePresentations( aGuideLine, lc, deltaz, cotez, aResultPrs, anEquiDistance, invDirection ) )
388       return;
389   }
390
391   SetShape3D( aResultPrs.myPrs3D );
392   SetTopShape( aResultPrs.myPrs2D );
393
394   // Create groups for channel
395   TopTools_SequenceOfShape aLeftBankEdges;
396   HYDROData_ShapesTool::ExploreShapeToShapes( aResultPrs.myLeftBank, TopAbs_EDGE, aLeftBankEdges );
397
398   TopTools_SequenceOfShape aRightBankEdges;
399   HYDROData_ShapesTool::ExploreShapeToShapes( aResultPrs.myRightBank, TopAbs_EDGE, aRightBankEdges );
400
401   TopTools_SequenceOfShape anInletEdges;
402   HYDROData_ShapesTool::ExploreShapeToShapes( aResultPrs.myInlet, TopAbs_EDGE, anInletEdges );
403
404   TopTools_SequenceOfShape anOutletEdges;
405   HYDROData_ShapesTool::ExploreShapeToShapes( aResultPrs.myOutlet, TopAbs_EDGE, anOutletEdges );
406     
407   RemoveGroupObjects();
408   QString aLeftGroupName = GetName() + "_Left_Bank";
409   Handle(HYDROData_ShapesGroup) aLeftGroup = createGroupObject();
410   aLeftGroup->SetName( aLeftGroupName );
411   aLeftGroup->SetShapes( aLeftBankEdges );
412
413   QString aRightGroupName = GetName() + "_Right_Bank";
414
415   Handle(HYDROData_ShapesGroup) aRightGroup = createGroupObject();
416   aRightGroup->SetName( aRightGroupName );
417   aRightGroup->SetShapes( aRightBankEdges );
418
419   QString anInGroupName = GetName() + "_Inlet";
420
421   Handle(HYDROData_ShapesGroup) anInGroup = createGroupObject();
422   anInGroup->SetName( anInGroupName );
423   anInGroup->SetShapes( anInletEdges );
424
425   QString anOutGroupName = GetName() + "_Outlet";
426
427   Handle(HYDROData_ShapesGroup) anOutGroup = createGroupObject();
428   anOutGroup->SetName( anOutGroupName );
429   anOutGroup->SetShapes( anOutletEdges );
430 }
431
432 bool HYDROData_Channel::IsHas2dPrs() const
433 {
434   return true;
435 }
436
437 QColor HYDROData_Channel::DefaultFillingColor() const
438 {
439   return QColor( Qt::blue );
440 }
441
442 QColor HYDROData_Channel::DefaultBorderColor() const
443 {
444   return QColor( Qt::transparent );
445 }
446
447 bool HYDROData_Channel::SetGuideLine( const Handle(HYDROData_Polyline3D)& theGuideLine )
448 {
449   Handle(HYDROData_Polyline3D) aPrevGuideLine = GetGuideLine();
450
451   if ( theGuideLine.IsNull() )
452   {
453     RemoveGuideLine();
454     return !aPrevGuideLine.IsNull();
455   }
456
457   if ( IsEqual( aPrevGuideLine, theGuideLine ) )
458     return false;
459
460   TopoDS_Wire aHydraulicWire = TopoDS::Wire( theGuideLine->GetTopShape() );
461   if ( aHydraulicWire.IsNull() )
462     return false; // The polyline must be a single wire
463
464   SetReferenceObject( theGuideLine, DataTag_GuideLine );
465
466   // Indicate model of the need to update the chanel presentation
467   Changed( Geom_3d );
468
469   return true;
470 }
471
472 Handle(HYDROData_Polyline3D) HYDROData_Channel::GetGuideLine() const
473 {
474   return Handle(HYDROData_Polyline3D)::DownCast( 
475            GetReferenceObject( DataTag_GuideLine ) );
476 }
477
478 void HYDROData_Channel::RemoveGuideLine()
479 {
480   Handle(HYDROData_Polyline3D) aPrevGuideLine = GetGuideLine();
481   if ( aPrevGuideLine.IsNull() )
482     return;
483
484   ClearReferenceObjects( DataTag_GuideLine );
485
486   // Indicate model of the need to update the chanel presentation
487   Changed( Geom_3d );
488 }
489
490 bool HYDROData_Channel::SetProfile( const Handle(HYDROData_Profile)& theProfile )
491 {
492   Handle(HYDROData_Profile) aPrevProfile = GetProfile();
493
494   if ( theProfile.IsNull() )
495   {
496     RemoveProfile();
497     return !aPrevProfile.IsNull();
498   }
499
500   if ( IsEqual( aPrevProfile, theProfile ) )
501     return false;
502
503   SetReferenceObject( theProfile, DataTag_Profile );
504
505   // Indicate model of the need to update the chanel presentation
506   Changed( Geom_3d );
507
508   return true;
509 }
510
511 Handle(HYDROData_Profile) HYDROData_Channel::GetProfile() const
512 {
513   return Handle(HYDROData_Profile)::DownCast( 
514            GetReferenceObject( DataTag_Profile ) );
515 }
516
517 void HYDROData_Channel::RemoveProfile()
518 {
519   Handle(HYDROData_Profile) aPrevProfile = GetProfile();
520   if ( aPrevProfile.IsNull() )
521     return;
522
523   ClearReferenceObjects( DataTag_Profile );
524
525   // Indicate model of the need to update the chanel presentation
526   Changed( Geom_3d );
527 }
528
529 ObjectKind HYDROData_Channel::getAltitudeObjectType() const
530 {
531   //DEBTRACE("HYDROData_Channel::getAltitudeObjectType");
532   return KIND_CHANNEL_ALTITUDE;
533   //return KIND_STREAM_ALTITUDE;
534 }
535
536 TopoDS_Shape HYDROData_Channel::GetLeftShape() const
537 {
538   HYDROData_SequenceOfObjects aGroups = GetGroups();
539   return HYDROData_Tool::getFirstShapeFromGroup( aGroups, 1);
540 }
541
542 TopoDS_Shape HYDROData_Channel::GetRightShape() const
543 {
544   HYDROData_SequenceOfObjects aGroups = GetGroups();
545   return HYDROData_Tool::getFirstShapeFromGroup( aGroups, 2);
546 }
547
548 void HYDROData_Channel::SetEquiDistance( double theEquiDistance )
549 {
550   double anEquiDistance = theEquiDistance > 0 ? theEquiDistance : 1E-3;
551   SetDouble( DataTag_EquiDistance, theEquiDistance );
552 }
553
554 double HYDROData_Channel::GetEquiDistance() const
555 {
556   return GetDouble( DataTag_EquiDistance, 1.0 );
557 }
558
559 void HYDROData_Channel::SetLCValue( double val )
560 {
561   SetDouble( DataTag_LC, val );
562 }
563
564 double HYDROData_Channel::GetLCValue() const
565 {
566   return GetDouble( DataTag_LC, 1.0 );
567 }
568
569 void HYDROData_Channel::SetDeltaZValue( double val )
570 {
571   SetDouble( DataTag_DeltaZ, val );
572 }
573
574 double HYDROData_Channel::GetDeltaZValue() const
575 {
576   return GetDouble( DataTag_DeltaZ, 1.0 );
577 }
578
579 void HYDROData_Channel::SetCoteZValue( double val )
580 {
581   SetDouble( DataTag_CoteZ, val );
582 }
583
584 double HYDROData_Channel::GetCoteZValue() const
585 {
586   return GetDouble( DataTag_CoteZ, 1.0 );
587 }
588
589 void HYDROData_Channel::SetProfileMode( bool mode )
590 {
591   SetInteger( DataTag_ProfileMode, (bool)mode );
592 }
593
594 bool HYDROData_Channel::GetProfileMode() const
595 {
596   return (bool)GetInteger( DataTag_ProfileMode, 1 );
597 }