-// 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>
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)
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;
}
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);
}
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)
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());
}
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());
}