]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
some housekeeping
authorPaul RASCLE <paul.rascle@edf.fr>
Thu, 13 Aug 2015 15:35:11 +0000 (17:35 +0200)
committerPaul RASCLE <paul.rascle@edf.fr>
Thu, 13 Aug 2015 15:35:11 +0000 (17:35 +0200)
src/HYDROData/HYDROData_Channel.h
src/HYDROData/HYDROData_Object.cxx
src/HYDROData/HYDROData_Object.h
src/HYDROData/HYDROData_ObstacleAltitude.cxx
src/HYDROData/HYDROData_Polyline3D.cxx
src/HYDROData/HYDROData_StreamAltitude.cxx
src/HYDROData/HYDROData_Zone.cxx

index 8e9587643ec72ef8fca48f2665faffa059d1a276..a53db842abeda6bbfce977a717ca1bb7e0dbc176 100644 (file)
@@ -100,7 +100,7 @@ public:
    */
   HYDRODATA_EXPORT virtual TopoDS_Shape GetShape3D() const;
 
- /**
 /**
    * Update the shape presentations of stream.
    * Call this method whenever you made changes for channel data.
    */
index fdd7e8fd9e741238ba5a98dc14ad28bb22bebe80..6a8ee297c192992bf666164f6d383a04a2c74673 100644 (file)
@@ -121,29 +121,6 @@ void HYDROData_Object::SetShape3D( const TopoDS_Shape& theShape )
   checkAndSetObject3D();
 }
 
-Standard_Boolean HYDROData_Object::GetMiddleZ( Standard_Real& theMiddleZ ) const
-{
-  theMiddleZ = -9999;
-  TDF_Label aLabel = myLab.FindChild( DataTag_MiddleZ, false );
-  if ( !aLabel.IsNull() )
-  {
-    Handle(TDataStd_Real) aRealVal;
-    if ( aLabel.FindAttribute( TDataStd_Real::GetID(), aRealVal ) )
-    {
-      theMiddleZ = aRealVal->Get();
-      return Standard_True;
-    }
-  }
-
-  return Standard_False;
-
-}
-
-void HYDROData_Object::SetMiddleZ( const Standard_Real& theMiddleZ )
-{
-  TDataStd_Real::Set( myLab.FindChild( DataTag_MiddleZ ), theMiddleZ );
-}
-
 Handle(HYDROData_DummyObject3D) HYDROData_Object::GetObject3D() const
 {
   Handle(HYDROData_DummyObject3D) anObject;
index cd4cf20a4012983936c5f66f986bb384bfa46007..56e1c4a02159acd577083c0a8060fdac92d3e931 100644 (file)
@@ -50,7 +50,6 @@ protected:
     DataTag_EdgesGroup,          ///< child group objects
     DataTag_ChildAltitudeObject, ///< child altitude object
     DataTag_IsSubmersible,       ///< the attribute "is submersible"
-    DataTag_MiddleZ,             ///< middle Z value of Shape3D
   };
 
 public:
@@ -100,16 +99,6 @@ public:
    */
   HYDRODATA_EXPORT virtual TopoDS_Shape GetShape3D() const = 0;
 
-  /**
-   * Returns the middle z value of 3D object representation or -9999 if no value.
-   */
-  HYDRODATA_EXPORT virtual Standard_Boolean GetMiddleZ( Standard_Real& theMiddleZ ) const;
-
-  /**
-   * Set the middle z value of 3D object representation.
-   */
-  HYDRODATA_EXPORT virtual void SetMiddleZ( const Standard_Real& theMiddleZ );
-
   /**
    * Returns reference object which represent the 3D shape of object.
    */
index 92cd90166b973612b122cb3eacfae4d0fceab86f..a91e835968edd9402bfb5223371e7a5f551fde80 100644 (file)
@@ -52,22 +52,22 @@ double HYDROData_ObstacleAltitude::GetAltitudeForPoint( const gp_XY& thePoint )
     Handle(HYDROData_Object)::DownCast( GetFatherObject() );
   if ( anObject.IsNull() )
   {
-       DEBTRACE("---");
+       DEBTRACE("anObject.IsNull()");
     return aResAltitude;
   }
+//  DEBTRACE("object: " << anObject->GetName().toStdString());
 
   TopoDS_Shape anObjectShape3D = anObject->GetShape3D();
-  DEBTRACE("object: " << anObject->GetName().toStdString());
   if ( anObjectShape3D.IsNull() )
   {
-       DEBTRACE("---");
+       DEBTRACE("anObjectShape3D.IsNull()");
     return aResAltitude;
   }
-  else
-  {
-       DEBTRACE("anObjectShape3D type " << anObjectShape3D.ShapeType());
-       BRepTools::Write(anObjectShape3D, "digue3D.brep");
-  }
+//  else
+//  {
+//     DEBTRACE("anObjectShape3D type " << anObjectShape3D.ShapeType());
+//     BRepTools::Write(anObjectShape3D, "digue3D.brep");
+//  }
 
   HYDROData_Make3dMesh aMesher3D( anObjectShape3D, Precision::Intersection() );
 
index 44ce9a2adf92135b3d0a8d84924ae9221f1ebc68..508224597315e978bfa0a3537c69e87dbf76e9c0 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>
@@ -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()
index 30270ee9c58b5eb3c2d046c618ce8d50116012d0..893be4427bfaf905da9f35dc4c5bdffb0b3dc18b 100644 (file)
@@ -224,21 +224,21 @@ double HYDROData_StreamAltitude::GetAltitudeForPoint( const gp_XY& thePoint ) co
     Handle(HYDROData_Stream)::DownCast( GetFatherObject() );
   if ( aStream.IsNull() )
   {
-       DEBTRACE("---");
+       DEBTRACE("aStream.IsNull()");
     return aResAltitude;
   }
 
   TopoDS_Shape aStreamShape = aStream->GetTopShape();
   if ( aStreamShape.IsNull() )
   {
-       DEBTRACE("---");
+       DEBTRACE("aStreamShape.IsNull()");
     return aResAltitude;
   }
 
   TopExp_Explorer aStreamFaceExp( aStreamShape, TopAbs_FACE );
   if ( !aStreamFaceExp.More() )
   {
-       DEBTRACE("---");
+       DEBTRACE("!aStreamFaceExp.More()");
     return aResAltitude;
   }
 
@@ -261,7 +261,7 @@ double HYDROData_StreamAltitude::GetAltitudeForPoint( const gp_XY& thePoint ) co
 #endif
   if ( aPointState == TopAbs_OUT )
   {
-       DEBTRACE("---");
+       DEBTRACE("aPointState == TopAbs_OUT");
     return aResAltitude;
   }
 
@@ -269,7 +269,7 @@ double HYDROData_StreamAltitude::GetAltitudeForPoint( const gp_XY& thePoint ) co
   Handle(HYDROData_Profile) aLeftProfile, aRightProfile;
   if ( !getBoundaryProfilesForPoint( thePoint, aLeftProfile, aRightProfile ) )
   {
-       DEBTRACE("---");
+       DEBTRACE("!getBoundaryProfilesForPoint( thePoint, aLeftProfile, aRightProfile )");
     return aResAltitude;
   }
 
index 69751927c457f5c09491cf2c75deada8c7fc9227..97e1da6c1e39c46da179889af2e8af8233cfa60b 100644 (file)
@@ -181,7 +181,7 @@ HYDROData_Zone::MergeType HYDROData_Zone::GetMergeType() const
 
 void HYDROData_Zone::SetMergeObject( const Handle(HYDROData_Entity)& theObject )
 {
-  DEBTRACE("HYDROData_Zone::SetMergeObject");
+  //DEBTRACE("HYDROData_Zone::SetMergeObject");
   SetReferenceObject( theObject, DataTag_MergeObject );
 }