]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
remove somme commented code
authorPaul RASCLE <paul.rascle@edf.fr>
Sun, 19 Jun 2016 17:47:39 +0000 (19:47 +0200)
committerPaul RASCLE <paul.rascle@edf.fr>
Sun, 19 Jun 2016 17:47:39 +0000 (19:47 +0200)
src/HYDROData/HYDROData_PolylineOperator.cxx
src/HYDROData/HYDROData_PolylineOperator.h
src/HYDROData/HYDROData_PolylineXY.cxx
src/HYDROData/HYDROData_PolylineXY.h
src/HYDROData/HYDROData_TopoCurve.h

index 5c241ad8ad45e12d65882632ebbe623ec73688f1..1493f336ec287b960a18b0ab49617c397cd7783a 100644 (file)
@@ -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<TopoDS_Shape>& 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<TopoDS_Shape>& theShapes,
index 364f27a8e2a65dc3b0d01c43906f93413d34ce77..a4c280b8c12eb0fd72911af03536b883581879af 100644 (file)
@@ -82,11 +82,6 @@ protected:
     double theTolerance,
     std::vector<TopoDS_Shape>& theWires);
 
-//  static bool CreatePolylinesSplit( const Handle( HYDROData_Document )& theDoc,
-//                                    const Handle( HYDROData_PolylineXY )& thePolyline,
-//                                    const std::vector<TopoDS_Shape>& theShapes,
-//                                    bool isUseIndices);
-
   static bool CreatePolylines( const Handle( HYDROData_Document )& theDoc,
                                const Handle( HYDROData_PolylineXY )& theOldPolyline,
                                const std::vector<TopoDS_Shape>& theShape,
index 69d291d9cd8579b65ad4ce352dcfdff5be9957aa..de46304ab5b80c1428617cbaf9f704636b98fe69 100644 (file)
@@ -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<TopoDS_Wire> 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<aResDistance) aResDistance = d;
-//      DEBTRACE("d[" << i <<"]=" << d);
-//    }
-//  DEBTRACE("distance section "<<theSectionIndex<<" point="<<aResDistance<<" ("<<thePoint.X()<<", "<< thePoint.Y()<<")");
-//  return aResDistance;
-//}
-
 int HYDROData_PolylineXY::NbSections() const
 {
   Handle(TDataStd_ExtStringList) aNamesList;
index 5e050cf9e929274893c60fc71d91293766f3f5ae..12117de8105dfaa68dfd30ed52a53c1f079807d3 100644 (file)
@@ -152,19 +152,12 @@ public:
   HYDRODATA_EXPORT bool IsClosed( const bool theIsSimpleCheck = true ) const;
 
    /**
-   * Returns the distance beetwen first and point with index thePointIndex
+   * Returns the distance between first and point with index thePointIndex
    * at the section with index theSectionIndex. -1 is returned if error is occurred.
    */
   HYDRODATA_EXPORT double GetDistance( const int theSectionIndex,
                                        const int thePointIndex ) const;
 
-  /**
-  * Returns the distance between a section and a point
-  */
-// HYDRODATA_EXPORT double GetMinDistance( const int theSectionIndex,
-//                                         const Point& thePoint ) const;
-
-
   /**
    * Returns number of sections.
    */
index c707e2a5e8c0e61075e2be074ab3c41223742b64..e85b7550381a6064b67211f4e5193e32f017bba8 100644 (file)
@@ -31,6 +31,7 @@
 
 class TopoDS_Wire;
 
+//! Get the parameter of the projected point on the curve, and return the distance of the original point
 double ProjectPointToCurve(const gp_XYZ& thePoint,
                            const Adaptor3d_Curve& theCurve,
                            double& theParameter);
@@ -170,7 +171,7 @@ public:
     const double theDeflection, HYDROData_TopoCurve& theCurve) const;
 
   //! Calculates the values of the curve in its knots.
-  //! Returns 'false' if a curve edge has a nonidentity location or a nonforward
+  //! Returns 'false' if a curve edge has a non-identity location or a non-forward
   //! orientation or has no a B-spline representation.
   HYDRODATA_EXPORT bool ValuesInKnots(std::list<gp_XYZ>& theValues) const;