From ab62e9b1ad153a3de6cc357d4010bae851c87677 Mon Sep 17 00:00:00 2001 From: Paul RASCLE Date: Sun, 19 Jun 2016 19:47:39 +0200 Subject: [PATCH] remove somme commented code --- src/HYDROData/HYDROData_PolylineOperator.cxx | 50 -------------------- src/HYDROData/HYDROData_PolylineOperator.h | 5 -- src/HYDROData/HYDROData_PolylineXY.cxx | 32 ------------- src/HYDROData/HYDROData_PolylineXY.h | 9 +--- src/HYDROData/HYDROData_TopoCurve.h | 3 +- 5 files changed, 3 insertions(+), 96 deletions(-) diff --git a/src/HYDROData/HYDROData_PolylineOperator.cxx b/src/HYDROData/HYDROData_PolylineOperator.cxx index 5c241ad8..1493f336 100644 --- a/src/HYDROData/HYDROData_PolylineOperator.cxx +++ b/src/HYDROData/HYDROData_PolylineOperator.cxx @@ -283,56 +283,6 @@ void HYDROData_PolylineOperator::Split( } } -//bool HYDROData_PolylineOperator::CreatePolylinesSplit(const Handle( HYDROData_Document )& theDoc, -// const Handle( HYDROData_PolylineXY )& thePolyline, -// const std::vector& theShapes, bool isUseIndices) -//{ -// -// if (theDoc.IsNull()) -// return false; -// -// int nbSections = thePolyline->NbSections(); -// const QString& theNamePrefix = thePolyline->GetName(); -// const QColor& theColor = thePolyline->GetWireColor(); -// -// int n = theShapes.size(); -// DEBTRACE("theShapes.size() "<< n); -// int anIndex = 1; -// for (int i = 0; i < n; i++) -// { -// Handle( HYDROData_PolylineXY ) aPolyline = -// Handle( HYDROData_PolylineXY )::DownCast(theDoc->CreateObject(KIND_POLYLINEXY)); -// if (aPolyline.IsNull()) -// return false; -// -// for (int isec = 0; isec < nbSections; isec++) -// { -// gp_XY p = gp_XY(0, 0); -// //double d = thePolyline->GetMinDistance(isec, p); -// } -// -// if (isUseIndices) -// { -// QString aNewName = theNamePrefix + "_" + QString::number(anIndex); -// while (!theDoc->FindObjectByName(aNewName).IsNull()) // the object with such a name is not found -// { -// anIndex++; -// aNewName = theNamePrefix + "_" + QString::number(anIndex); -// } -// aPolyline->SetName(aNewName); -// } -// else -// { -// aPolyline->SetName(theNamePrefix); -// } -// -// if (theColor.isValid()) -// aPolyline->SetWireColor(theColor); -// } -// return true; -// -//} - bool HYDROData_PolylineOperator::CreatePolylines( const Handle( HYDROData_Document )& theDoc, const Handle( HYDROData_PolylineXY )& theOldPolyline, const std::vector& theShapes, diff --git a/src/HYDROData/HYDROData_PolylineOperator.h b/src/HYDROData/HYDROData_PolylineOperator.h index 364f27a8..a4c280b8 100644 --- a/src/HYDROData/HYDROData_PolylineOperator.h +++ b/src/HYDROData/HYDROData_PolylineOperator.h @@ -82,11 +82,6 @@ protected: double theTolerance, std::vector& theWires); -// static bool CreatePolylinesSplit( const Handle( HYDROData_Document )& theDoc, -// const Handle( HYDROData_PolylineXY )& thePolyline, -// const std::vector& theShapes, -// bool isUseIndices); - static bool CreatePolylines( const Handle( HYDROData_Document )& theDoc, const Handle( HYDROData_PolylineXY )& theOldPolyline, const std::vector& theShape, diff --git a/src/HYDROData/HYDROData_PolylineXY.cxx b/src/HYDROData/HYDROData_PolylineXY.cxx index 69d291d9..de46304a 100644 --- a/src/HYDROData/HYDROData_PolylineXY.cxx +++ b/src/HYDROData/HYDROData_PolylineXY.cxx @@ -975,38 +975,6 @@ double HYDROData_PolylineXY::GetDistance( const int theSectionIndex, return aResDistance; } -//double HYDROData_PolylineXY::GetMinDistance( const int theSectionIndex, -// const Point& thePoint ) const -//{ -// double aResDistance = -1; -// if ( theSectionIndex < 0 || theSectionIndex >= NbSections() ) -// return aResDistance; -// -// std::vector aCurves; -// HYDROData_PolylineOperator::GetWires(this, aCurves); -// if (aCurves.size() != NbSections()) -// { -// DEBTRACE("nbCurves != nbSections " << aCurves.size() << " " << NbSections()); -// return aResDistance; -// } -// TopoDS_Wire aWire = aCurves[theSectionIndex]; -// TopTools_SequenceOfShape anEdges; -// HYDROData_ShapesTool::ExploreShapeToShapes( aWire, TopAbs_EDGE, anEdges ); -// for ( int i = 1, n = anEdges.Length(); i <= n; ++i ) -// { -// DEBTRACE("i: "<< i); -// TopoDS_Edge aWireEdge = TopoDS::Edge( anEdges.Value( i ) ); -// gp_XYZ aPointz = gp_XYZ(thePoint.X(), thePoint.Y(), 0); -// Adaptor3d_Curve theCurve = BRepAdaptor_Curve(aWireEdge); -// double theParameter = -1; -// double d = ProjectPointToCurve(aPointz, theCurve, theParameter); -// if (d& theValues) const; -- 2.39.2