Salome HOME
merge BR_v14_rc
[modules/hydro.git] / src / HYDROData / HYDROData_Polyline3D.cxx
index 44ce9a2adf92135b3d0a8d84924ae9221f1ebc68..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>
@@ -61,7 +58,7 @@ IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Polyline3D,HYDROData_Object)
 
 
 HYDROData_Polyline3D::HYDROData_Polyline3D()
-: HYDROData_Object()
+: HYDROData_Object( Geom_3d )
 {
 }
 
@@ -213,13 +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);
-  DEBTRACE("Bounding Box xyz min:" << Xmin << " " << Ymin << " " << Zmin << " xyz max:" << Xmax << " " << Ymax << " " << Zmax);
-  SetMiddleZ((Zmin+Zmax)/2.);
 } 
 
 QColor HYDROData_Polyline3D::DefaultFillingColor()
@@ -259,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;
 }
@@ -279,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 )
@@ -297,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;
 }
@@ -317,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(