Salome HOME
projects
/
modules
/
hydro.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
refs #430: incorrect coordinates in dump polyline
[modules/hydro.git]
/
src
/
HYDROData
/
HYDROData_ProfileUZ.cxx
diff --git
a/src/HYDROData/HYDROData_ProfileUZ.cxx
b/src/HYDROData/HYDROData_ProfileUZ.cxx
index dc82a136233f8f6593c8f468de092ba42c0a3a8f..9e05e0a83fbe389129ecb72245064f9d6803a5f8 100755
(executable)
--- a/
src/HYDROData/HYDROData_ProfileUZ.cxx
+++ b/
src/HYDROData/HYDROData_ProfileUZ.cxx
@@
-28,26
+28,25
@@
HYDROData_ProfileUZ::~HYDROData_ProfileUZ()
{
}
{
}
-TopoDS_Shape HYDROData_ProfileUZ::GetShape()
+TopoDS_Shape HYDROData_ProfileUZ::GetShape()
const
{
{
- // TODO
return TopoDS_Shape();
}
return TopoDS_Shape();
}
-double HYDROData_ProfileUZ::GetDepthFromDistance( const double& theDistance ) const
+double HYDROData_ProfileUZ::GetDepthFromDistance( const PointsList& thePoints,
+ const double& theDistance )
{
double aResDepth = 0.0;
{
double aResDepth = 0.0;
- HYDROData_IPolyline::PointsList aPoints = GetPoints();
- int aNbPoints = aPoints.Size();
+ int aNbPoints = thePoints.Size();
if ( aNbPoints < 2 )
return aResDepth;
double aCompDist = 0.0;
if ( aNbPoints < 2 )
return aResDepth;
double aCompDist = 0.0;
- HYDROData_IPolyline::Point aPrevPoint =
a
Points.First();
+ HYDROData_IPolyline::Point aPrevPoint =
the
Points.First();
for ( int i = 2; i <= aNbPoints; ++i )
{
for ( int i = 2; i <= aNbPoints; ++i )
{
- const Point& aCurPoint =
a
Points.Value( i );
+ const Point& aCurPoint =
the
Points.Value( i );
double aPntDist = gp_Pnt2d( aPrevPoint.X(), 0 ).Distance( gp_Pnt2d( aCurPoint.X(), 0 ) );
double aPntDist = gp_Pnt2d( aPrevPoint.X(), 0 ).Distance( gp_Pnt2d( aCurPoint.X(), 0 ) );
@@
-55,7
+54,7
@@
double HYDROData_ProfileUZ::GetDepthFromDistance( const double& theDistance ) co
if ( theDistance < aCompDist )
{
if ( theDistance < aCompDist )
{
- double aComPntDist = gp_Pnt2d(
a
Points.First().X(), 0 ).Distance( gp_Pnt2d( aPrevPoint.X(), 0 ) );
+ double aComPntDist = gp_Pnt2d(
the
Points.First().X(), 0 ).Distance( gp_Pnt2d( aPrevPoint.X(), 0 ) );
double aFindDist = theDistance - aComPntDist;
double aRatio = aFindDist / ( aPntDist - aFindDist );
double aFindDist = theDistance - aComPntDist;
double aRatio = aFindDist / ( aPntDist - aFindDist );