0024624: Lost word in license statement in source files
[occt.git] / src / AIS / AIS_TangentRelation.cxx
old mode 100755 (executable)
new mode 100644 (file)
index b13c8a5..1625e0f
@@ -1,7 +1,18 @@
-// File:       AIS_TangentRelation.cdl
-// Created:    Tue Dec  5 15:09:04 1996
-// Author:     Jean-Pierre COMBE/Odile Olivier
-//              <ODL>
+// Created on: 1996-12-05
+// Created by: Jean-Pierre COMBE/Odile Olivier
+// Copyright (c) 1996-1999 Matra Datavision
+// Copyright (c) 1999-2014 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
 
 #include <Standard_NotImplemented.hxx>
 
@@ -113,18 +124,6 @@ void AIS_TangentRelation::Compute(const Handle(Prs3d_Projector)& aProjector,
   PrsMgr_PresentableObject::Compute( aProjector , aPresentation ) ;
 }
 
-//=======================================================================
-//function : Compute
-//purpose  : to avoid warning
-//=======================================================================
-void AIS_TangentRelation::Compute(const Handle(PrsMgr_PresentationManager2d)& aPresentationManager2d,
-                                 const Handle(Graphic2d_GraphicObject)& aGraphicObject,
-                                 const Standard_Integer anInteger)
-{
-// Standard_NotImplemented::Raise("AIS_TangentRelation::Compute(const Handle(PrsMgr_PresentationManager2d)&,const Handle(Graphic2d_GraphicObject)&,const Standard_Integer)");
-  PrsMgr_PresentableObject::Compute( aPresentationManager2d ,aGraphicObject,anInteger) ;
-}
-
 void AIS_TangentRelation::Compute(const Handle_Prs3d_Projector& aProjector,
                                  const Handle_Geom_Transformation& aTransformation,
                                  const Handle_Prs3d_Presentation& aPresentation)
@@ -227,7 +226,7 @@ static Standard_Boolean ComputeTangencyPoint(const Handle(Geom_Curve)& GC1,
              ElCLib::D1(par_inter,ellipse->Elips(),P2,aVector2);
            }
 //       if ( aVector1.IsParallel(aVector2, 100*Precision::Angular()) ) break;
-         if ( aVector1.IsParallel(aVector2, Standard_PI/360.0) ) break; // 0.5 graduce
+         if ( aVector1.IsParallel(aVector2, M_PI / 360.0) ) break; // 0.5 graduce
        }
     }
   aPoint = PC1;
@@ -297,7 +296,7 @@ void AIS_TangentRelation::ComputeTwoEdgesTangent(const Handle(Prs3d_Presentation
     }
   else return;
 
-  //On cherche d'abord le vertex de tangence s'il existe
+  //First find the tangengy vector if exists
   TopoDS_Vertex VCom;
   TopExp_Explorer expF(TopoDS::Edge(myFShape),TopAbs_VERTEX);
   TopExp_Explorer expS(TopoDS::Edge(mySShape),TopAbs_VERTEX);
@@ -318,8 +317,8 @@ void AIS_TangentRelation::ComputeTwoEdgesTangent(const Handle(Prs3d_Presentation
     }
 
   gp_Vec theVector;
-  gp_Pnt pint3d; // le point de tangence
-  gp_Dir theDir; // la direction de la tangente
+  gp_Pnt pint3d; // tangency point
+  gp_Dir theDir; // tangency direction
   Standard_Real par_inter = 0.0; // parameter of tangency point
 
   if (found)
@@ -327,18 +326,18 @@ void AIS_TangentRelation::ComputeTwoEdgesTangent(const Handle(Prs3d_Presentation
       pint3d = BRep_Tool::Pnt(VCom);
     }
 
-  //Sinon, on le cherche comme si on savait que les 2 curves
-  // sont tangentes ( ce qui dooit etre le cas, tant pis pour les autres)
+  // Otherwise it is found as if it was known that 2 curves
+  // are tangents (which must be the cases)
   switch (typArg)
     {
-    case 12: // line circle
-      {
+    case 12: // circle line      
+       {
        const Handle(Geom_Line)& line = (Handle(Geom_Line)&) copy1;
        const Handle(Geom_Circle)& circle = (Handle(Geom_Circle)&) copy2;
 
        if ( !found )
          {
-           // il suffit de projeter le centre du cercle sur la droite
+           // it is enough to project the circus  center on the straight line 
            par_inter = ElCLib::Parameter(line->Lin(), circle->Location());
            pint3d = ElCLib::Value(par_inter, line->Lin());
          }
@@ -360,7 +359,7 @@ void AIS_TangentRelation::ComputeTwoEdgesTangent(const Handle(Prs3d_Presentation
       
        if (!found)
          {
-           // il suffit de projeter le centre du cercle sur la droite
+           // it is enough to project the circus  center on the straight line 
            par_inter = ElCLib::Parameter(line->Lin(), circle->Location());
            pint3d = ElCLib::Value(par_inter, line->Lin());
          }