From a4ff53a102b0c1fe67ab6b280d6d11b5316bbe0f Mon Sep 17 00:00:00 2001 From: isn Date: Mon, 8 Apr 2019 21:13:09 +0300 Subject: [PATCH] debug of tests --- src/HYDROData/HYDROData_Channel.cxx | 2 +- src/HYDROData/HYDROData_DTM.cxx | 3 ++- src/HYDROData/HYDROData_Entity.cxx | 2 +- src/HYDROData/HYDROData_Profile.cxx | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/HYDROData/HYDROData_Channel.cxx b/src/HYDROData/HYDROData_Channel.cxx index 1a08a52d..3abe2317 100644 --- a/src/HYDROData/HYDROData_Channel.cxx +++ b/src/HYDROData/HYDROData_Channel.cxx @@ -179,7 +179,7 @@ bool HYDROData_Channel::internalCreatePresentations( bool mode, if (mode) { if (!ReverseXCoord) - aProfileWire = TopoDS::Wire( theProfile->GetShape3D(true, false) ); //temp force rebuild + aProfileWire = TopoDS::Wire( theProfile->GetShape3D(false, false) ); //temp force rebuild else aProfileWire = TopoDS::Wire( theProfile->GetShape3D(true, true)); } diff --git a/src/HYDROData/HYDROData_DTM.cxx b/src/HYDROData/HYDROData_DTM.cxx index ec4537bb..7349737f 100644 --- a/src/HYDROData/HYDROData_DTM.cxx +++ b/src/HYDROData/HYDROData_DTM.cxx @@ -864,7 +864,8 @@ void HYDROData_DTM::ProfileDiscretization( const Handle(HYDROData_Profile)& theP } double xmin, ymin, xmax, ymax; intersect_bndbox.Get(xmin, ymin, xmax, ymax); - if (Abs(xmax-xmin)>PREC) + //if (Abs(xmax-xmin)>PREC) + if (intersection_nb >= 1) { double u_mid, u_wid; if( !CalcMidWidth( intersect_bndbox, u_mid, u_wid ) ) diff --git a/src/HYDROData/HYDROData_Entity.cxx b/src/HYDROData/HYDROData_Entity.cxx index 7084a5be..387cd70a 100644 --- a/src/HYDROData/HYDROData_Entity.cxx +++ b/src/HYDROData/HYDROData_Entity.cxx @@ -965,7 +965,7 @@ int HYDROData_Entity::GetInteger( int theTag, int theDefValue ) const Handle(TDataStd_Integer) anAttr; TDF_Label aLabel = myLab.FindChild( theTag ); if( !aLabel.FindAttribute( TDataStd_Integer::GetID(), anAttr ) ) - return 0; + return theDefValue; return anAttr->Get(); } diff --git a/src/HYDROData/HYDROData_Profile.cxx b/src/HYDROData/HYDROData_Profile.cxx index f8f8ba20..059f299a 100644 --- a/src/HYDROData/HYDROData_Profile.cxx +++ b/src/HYDROData/HYDROData_Profile.cxx @@ -796,7 +796,7 @@ HYDROData_Profile::ProfilePoint HYDROData_Profile::GetBottomPoint(bool IsConvert gp_Lin aMidLin( aMiddlePoint2d, gp::DZ() ); TopoDS_Edge aMidEdge = BRepLib_MakeEdge( aMidLin ); - const TopoDS_Wire& aProf = TopoDS::Wire( GetShape3D() ); + TopoDS_Shape aProf = TopoDS::Wire( GetShape3D() ); if (aProf.IsNull()) return aMiddlePoint; TopoDS_Iterator anIt( aProf ); -- 2.39.2