Salome HOME
merge BR_v14_rc
[modules/hydro.git] / src / HYDROData / HYDROData_Polyline3D.cxx
index 0ae2a44f78e3e65e919c0955940336a2db242c4d..f2cb00e4091b923eceb0e9659a8dd0fcfbf86f32 100644 (file)
@@ -28,9 +28,6 @@
 
 #include <BRep_Tool.hxx>
 
-#include <Bnd_Box.hxx>
-#include <BRepBndLib.hxx>
-
 #include <Geom_BSplineCurve.hxx>
 
 #include <gp_Pnt2d.hxx>
@@ -50,6 +47,9 @@
 
 #include <TopTools_SequenceOfShape.hxx>
 
+#define _DEVDEBUG_
+#include "HYDRO_trace.hxx"
+
 #include <QColor>
 #include <QStringList>
 
@@ -58,7 +58,7 @@ IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Polyline3D,HYDROData_Object)
 
 
 HYDROData_Polyline3D::HYDROData_Polyline3D()
-: HYDROData_Object()
+: HYDROData_Object( Geom_3d )
 {
 }
 
@@ -210,12 +210,6 @@ void HYDROData_Polyline3D::Update()
   TopoDS_Wire aResWire = HYDROData_PolylineXY::BuildWire( aSectionType, anIsSectionClosed, aResPoints );
   SetTopShape( aResWire );
   SetShape3D( aResWire );
-
-  double Xmin=0, Xmax=0, Ymin=0, Ymax=0, Zmin=-9999, Zmax=-9999;
-  Bnd_Box B;
-  BRepBndLib::Add(aResWire, B);
-  B.Get(Xmin, Ymin, Zmin, Xmax, Ymax, Zmax);
-  SetMiddleZ((Zmin+Zmax)/2.);
 } 
 
 QColor HYDROData_Polyline3D::DefaultFillingColor()
@@ -255,7 +249,7 @@ bool HYDROData_Polyline3D::SetPolylineXY( const Handle(HYDROData_PolylineXY)& th
     updateChildProfilePoints();
 
   // Indicate model of the need to update the polyline presentation
-  SetToUpdate( true );
+  Changed( Geom_2d );
 
   return true;
 }
@@ -275,7 +269,7 @@ void HYDROData_Polyline3D::RemovePolylineXY()
   ClearReferenceObjects( DataTag_PolylineXY );
 
   // Indicate model of the need to update the polyline presentation
-  SetToUpdate( true );
+  Changed( Geom_2d );
 }
 
 bool HYDROData_Polyline3D::SetProfileUZ( const Handle(HYDROData_ProfileUZ)& theProfile )
@@ -293,7 +287,7 @@ bool HYDROData_Polyline3D::SetProfileUZ( const Handle(HYDROData_ProfileUZ)& theP
   RemoveAltitudeObject();
 
   // Indicate model of the need to update the polyline presentation
-  SetToUpdate( true );
+  Changed( Geom_Z );
 
   return true;
 }
@@ -313,7 +307,7 @@ void HYDROData_Polyline3D::RemoveProfileUZ()
   ClearReferenceObjects( DataTag_ProfileUZ );
 
   // Indicate model of the need to update the polyline presentation
-  SetToUpdate( true );
+  Changed( Geom_Z );
 }
 
 bool HYDROData_Polyline3D::SetAltitudeObject(