1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0022312: Translation of french commentaries in OCCT files

This commit is contained in:
YSN
2011-10-27 07:50:55 +00:00
committed by bugmaster
parent b2342827fa
commit 0d9695538c
214 changed files with 8746 additions and 10449 deletions

View File

@@ -41,22 +41,22 @@ static void ReplaceByLineIfIsToSmall (Handle(Geom2d_Curve)& Bis,
Standard_Real& UFirst,
Standard_Real& ULast);
//=============================================================================
//function : Constructeur vide
//function : Empty Constructor
//=============================================================================
Bisector_Bisec::Bisector_Bisec()
{
}
//===========================================================================
// calcul de la bissectrice entre deux courbes issue d un point.
// calculate the bissectrice between two curves coming from a point.
//
// afirstcurve : \ courbes entre lesquelles on veut calculer la
// asecondcurve : / bissectrice.
// apoint : point par lequel doit passer la bissectrice.
// afirstvector : \ vecteurs pour determiner le secteur dans lequel
// asecondvector : / la bissectrice doit se trouver.
// adirection : indique le cote de la bissectrice a conserver.
// tolerance : seuil a partir duquel les bisectrices sont degenerees
// afirstcurve : \ curves between which the
// asecondcurve : / bissectrice is calculated.
// apoint : point through which the bissectrice should pass.
// afirstvector : \ vectors to determine the sector where
// asecondvector : / the bissectrice should be located.
// adirection : shows the the side of the bissectrice to be preserved.
// tolerance : threshold starting from which the bisectrices are degenerated
//===========================================================================
void Bisector_Bisec::Perform(const Handle(Geom2d_Curve)& afirstcurve ,
@@ -85,7 +85,7 @@ void Bisector_Bisec::Perform(const Handle(Geom2d_Curve)& afirstcurve ,
if ( (Type1 == STANDARD_TYPE(Geom2d_Circle) || Type1 == STANDARD_TYPE(Geom2d_Line)) &&
(Type2 == STANDARD_TYPE(Geom2d_Circle) || Type2 == STANDARD_TYPE(Geom2d_Line)) ) {
//------------------------------------------------------------------
// Bissectrice analytique.
// Analytic Bissectrice.
//------------------------------------------------------------------
Handle(Bisector_BisecAna) BisAna = new Bisector_BisecAna();
BisAna->Perform(afirstcurve ,
@@ -113,7 +113,7 @@ void Bisector_Bisec::Perform(const Handle(Geom2d_Curve)& afirstcurve ,
}
if (IsLine) {
//------------------------------------------------------------------
// Demi-Droite.
// Half-Staight.
//------------------------------------------------------------------
gp_Dir2d N ( - adirection*afirstvector.Y(), adirection*afirstvector.X());
Handle (Geom2d_CartesianPoint) PG = new Geom2d_CartesianPoint(apoint);
@@ -138,8 +138,8 @@ void Bisector_Bisec::Perform(const Handle(Geom2d_Curve)& afirstcurve ,
apoint);
if (BisCC -> IsEmpty()) {
// la bissectrice est vide apoint se projette a la fin de la courbe
// guide . Construction d une fausse bissectrice.
// bissectrice is empty. a point is projected at the end of the guide curve.
// Construction of a false bissectrice.
// modified by NIZHNY-EAP Mon Feb 21 12:00:13 2000 ___BEGIN___
gp_Dir2d dir1(afirstvector), dir2(asecondvector);
Standard_Real
@@ -186,15 +186,15 @@ void Bisector_Bisec::Perform(const Handle(Geom2d_Curve)& afirstcurve ,
}
//===========================================================================
// calcul de la bissectrice entre une courbe et un point issue d un point.
// calculate the bissectrice between a curve and a point starting in a point.
//
// afirstcurve : \ courbe et point entre lesquelles on veut calculer la
// asecondpoint : / bissectrice.
// apoint : point par lequel doit passer la bissectrice.
// afirstvector : \ vecteurs pour determiner le secteur dans lequel
// asecondvector : / la bissectrice doit se trouver.
// adirection : indique le cote de la bissectrice a conserver.
// tolerance : seuil a partir duquel les bisectrices sont degenerees
// afirstcurve : \ curve and point the bissectrice between which is calculated.
// asecondpoint : /
// apoint : point through which the bissectrice should pass.
// afirstvector : \ vectors to find the sector where
// asecondvector : / the bissectrice should be located.
// adirection : shows the side of the bissectrice to be preserved.
// tolerance : threshold starting from which the bisectrices are degenerated
//===========================================================================
void Bisector_Bisec::Perform(const Handle(Geom2d_Curve)& afirstcurve ,
@@ -219,7 +219,7 @@ void Bisector_Bisec::Perform(const Handle(Geom2d_Curve)& afirstcurve ,
if ( Type1 == STANDARD_TYPE(Geom2d_Circle) || Type1 == STANDARD_TYPE(Geom2d_Line)) {
//------------------------------------------------------------------
// Bissectrice analytique.
// Analytic Bissectrice.
//------------------------------------------------------------------
Handle(Bisector_BisecAna) BisAna = new Bisector_BisecAna();
BisAna -> Perform (afirstcurve ,
@@ -246,7 +246,7 @@ void Bisector_Bisec::Perform(const Handle(Geom2d_Curve)& afirstcurve ,
}
if (IsLine) {
//------------------------------------------------------------------
// Demi-Droite.
// Half-Right.
//------------------------------------------------------------------
gp_Dir2d N ( -adirection*afirstvector.Y(), adirection*afirstvector.X());
Handle (Geom2d_Line) L = new Geom2d_Line (apoint,N);
@@ -326,15 +326,15 @@ void Bisector_Bisec::Perform(const Handle(Geom2d_Curve)& afirstcurve ,
}
//===========================================================================
// calcul de la bissectrice entre une courbe et un point issue d un point.
// calculate the bissectrice between a curve and a point starting in a point.
//
// afirstpoint : \ point et courbe entre lesquelles on veut calculer la
// asecondcurve : / bissectrice.
// apoint : point par lequel doit passer la bissectrice.
// afirstvector : \ vecteurs pour determiner le secteur dans lequel
// asecondvector : / la bissectrice doit se trouver.
// adirection : indique le cote de la bissectrice a conserver.
// tolerance : seuil a partir duquel les bisectrices sont degenerees
// afirstpoint : \ curve and point the bissectrice between which is calculated.
// asecondcurve : /
// apoint : point through which the bissectrice should pass.
// afirstvector : \ vectors to find the sector where
// asecondvector : / the bissectrice should be located.
// adirection : shows the side of the bissectrice to be preserved.
// tolerance : threshold starting from which the bisectrices are degenerated
//===========================================================================
void Bisector_Bisec::Perform(const Handle(Geom2d_Point)& afirstpoint ,
@@ -360,7 +360,7 @@ void Bisector_Bisec::Perform(const Handle(Geom2d_Point)& afirstpoint ,
if ( Type1 == STANDARD_TYPE(Geom2d_Circle) || Type1 == STANDARD_TYPE(Geom2d_Line)) {
//------------------------------------------------------------------
// Bissectrice analytique.
// Analytic Bissectrice.
//------------------------------------------------------------------
Handle(Bisector_BisecAna) BisAna = new Bisector_BisecAna();
BisAna -> Perform (afirstpoint ,
@@ -388,7 +388,7 @@ void Bisector_Bisec::Perform(const Handle(Geom2d_Point)& afirstpoint ,
}
if (IsLine) {
//------------------------------------------------------------------
// Demi-Droite.
// Half-Staight.
//------------------------------------------------------------------
gp_Dir2d N ( -adirection*afirstvector.Y(), adirection*afirstvector.X());
Handle (Geom2d_Line) L = new Geom2d_Line (apoint,N);
@@ -464,14 +464,14 @@ void Bisector_Bisec::Perform(const Handle(Geom2d_Point)& afirstpoint ,
}
//===========================================================================
// calcul de la bissectrice entre deux points issue d un point.
// calculate the bissectrice between two points starting in a point.
//
// afirstpoint : \ courbes entre lesquelles on veut calculer la
// asecondpoint : / bissectrice.
// apoint : point par lequel doit passer la bissectrice.
// afirstvector : \ vecteurs pour determiner le secteur dans lequel
// asecondvector : / la bissectrice doit se trouver.
// adirection : indique le cote de la bissectrice a conserver.
// afirstpoint : \ curves the bissectrice between which should be
// asecondpoint : / calculated.
// apoint : point through which the bissectrice should pass.
// afirstvector : \ vectors to find the sector where
// asecondvector : / the bissectrice should be located.
// adirection : shows the side of the bissectrice to be preserved.
//===========================================================================
void Bisector_Bisec::Perform(const Handle(Geom2d_Point)& afirstpoint ,
@@ -549,8 +549,8 @@ static Standard_Boolean PointIsOnCurve(const Handle(Geom2d_Curve)& C,
#endif
//=============================================================================
//function : ReplaceByLineIfIsToSmall
//purpose : Si une bissectrice algorithmique est de taille negligeable elle est
// remplace par une demi-droite.
//purpose : If the size of an algorithmic bissectrice is negligeable it is
// replaced by a half-straight.
//=============================================================================
static void ReplaceByLineIfIsToSmall (Handle(Geom2d_Curve)& Bis,
Standard_Real& UFirst,

View File

@@ -46,16 +46,16 @@ Bisector_BisecAna::Bisector_BisecAna()
}
//=============================================================================
// calcul de la distance du point a la bissectrice. +
// et orientation de la bissectrice. +
// apoint : point de passage. +
// abisector : la bissectrice calculee. +
// afirstvector : premier vecteur. \ +
// asecondvector : deuxieme vecteur./ pour choisir le bon cadran. +
// adirection : indique si bissectrice interieure ou exterieure. +
// aparameter : out : le parametre de depart de la bissectrice. +
// asense : out : le sens de la bissectrice. +
// astatus : out : indique si on garde la bissectrice. +
// calcul the distance betweem the point and the bissectrice. +
// and orientation of the bissectrice. +
// apoint : point of passage. +
// abisector : calculated bissectrice. +
// afirstvector : first vector. \ +
// asecondvector : second vector./ to choose the proper sector. +
// adirection : shows if the bissectrice is interior or exterior. +
// aparameter : out : the start parameter of the bissectrice. +
// asense : out : the direction of the bissectrice. +
// astatus : out : shows if the bissectrice is preserved. +
//=============================================================================
Standard_Real Bisector_BisecAna::Distance (
const gp_Pnt2d& apoint,
@@ -115,21 +115,21 @@ Standard_Real Bisector_BisecAna::Distance (
gp_Dir2d secdirrev = aseconddir.Reversed();
// 1er passage pour savoir si la courbe est dans le bon cadran
// 1st passage to learn if the curve is in the proper sector
if(asense) {
// le status n est determiner que dans le cas oncurve ie:
// la tangente a la bissectrice est bisectrice des deux vecteurs.
// the status is determined only in case on curve ie:
// tangent to the bissectrice is bisectrice of two vectors.
Standard_Real SinPlat = 1.e-3;
if (Abs(afirstdir^aseconddir) < SinPlat) { //plat
if (afirstdir*aseconddir >= 0.0) { //tangente confondues
// bonne si le produit scalaire est proche de 1.
if (Abs(afirstdir^aseconddir) < SinPlat) { //flat
if (afirstdir*aseconddir >= 0.0) { //tangent mixed
// correct if the scalar product is close to 1.
if (Abs(tangdir*afirstdir) < 0.5) {
astatus = Standard_False;
}
}
else { // tangentes opposees.
// bonne si le produit scalaire proche de 0.
else { // opposed tangents.
// correct if the scalar product is close to 0.
if (Abs(tangdir*afirstdir) > 0.5 ) {
astatus = Standard_False;
}
@@ -146,19 +146,19 @@ Standard_Real Bisector_BisecAna::Distance (
// Replacement of -1.E-8 for a tolerance 1.e-4
Standard_Real aTol = 1.e-4;
if ((afirstdir^secdirrev)*adirection < -0.1) { // rentrant
if ((afirstdir^secdirrev)*adirection < -0.1) { // input
if((afirstdir^tangdir)*adirection < aTol &&
(secdirrev^tangdir)*adirection < aTol) asense = Standard_False;
}
else if((afirstdir^secdirrev)*adirection > 0.1) { // sortant
else if((afirstdir^secdirrev)*adirection > 0.1) { // output
if((afirstdir^tangdir)*adirection < aTol ||
(secdirrev^tangdir)*adirection < aTol) asense = Standard_False;
}
else { // plat
else { // flat
if (afirstdir.Dot(secdirrev) > 0.) { // tangent
if ((afirstdir^tangdir)*adirection < 0.) asense = Standard_False;
}
else{ // rebroussement
else{ // turn back
// Modified by Sergey KHROMOV - Thu Oct 31 14:16:53 2002
// if ((afirstdir.Dot(tangdir))*adirection > 0.) asense = Standard_False;
if (afirstdir.Dot(tangdir) < 0.) asense = Standard_False;
@@ -171,15 +171,15 @@ Standard_Real Bisector_BisecAna::Distance (
}
//===========================================================================
// calcul de la bissectrice entre deux courbes issue d un point. +
// calculate the bissectrice between two curves coming from a point. +
// +
// afirstcurve : \ courbes entre lesquelles on veut calculer la +
// asecondcurve : / bissectrice. +
// apoint : point par lequel doit passer la bissectrice. +
// afirstvector : \ vecteurs pour determiner le secteur dans lequel +
// asecondvector : / la bissectrice doit se trouver. +
// adirection : indique le cote de la bissectrice a conserver. +
// tolerance : seuil a partir duquel les bisectrices sont degenerees+
// afirstcurve : \ curves the bissectrice between which will be calculated. +
// asecondcurve : / +
// apoint : point through which the bissectrice should pass. +
// afirstvector : \ vectors to find the sector where +
// asecondvector : / the bissectrice should be located. +
// adirection : shows the side of the bissectrice to be preserved. +
// tolerance : threshold starting from which the bisectrices are degenerated +
//===========================================================================
void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve ,
const Handle(Geom2d_Curve)& asecondcurve ,
@@ -225,7 +225,7 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve ,
gp_Lin2d line1,line2;
//=============================================================================
// Determination de la nature des arguments. +
// Determination of the nature of arguments. +
//=============================================================================
if (type1 == STANDARD_TYPE(Geom2d_Circle)) {
@@ -273,7 +273,7 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve ,
switch(cas) {
//=============================================================================
// Bissectrice cercle - cercle. +
// Bissectrice circle - circle. +
//=============================================================================
case 1 : {
@@ -281,7 +281,7 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve ,
Standard_Real radius2 = circle2.Radius();
//-----------------------------------------------------
// Cas particulier ou les deux cercles sont confondus.
// Particular case when two circles are mixed.
//-----------------------------------------------------
if (circle1.Location().IsEqual(circle2.Location(),PreConf)&&
(Abs(radius1 - radius2) <= PreConf)){
@@ -339,7 +339,7 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve ,
parameter2);
}
break;
} //fin cas part cercles confondus.
} //end of case mixed circles.
if (radius1 < radius2) {
gp_Circ2d circle = circle1;
@@ -351,9 +351,8 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve ,
radius2 = radius;
}
// petit recadrage des cercles. dans le cas ou les cercles
// sont OnCurve , si ils sont presque tangents on les rends
// tangents.
// small reframing of circles. in the case when the circles
// are OnCurve , if they are almost tangent they become tangent.
Standard_Real EntreAxe = circle1.Location().Distance(circle2.Location());
Standard_Real D1 = 0.5*(radius1 - EntreAxe - radius2);
Standard_Boolean CirclesTangent = Standard_False;
@@ -362,7 +361,7 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve ,
// if ( oncurve && Abs(D1) < PreConf) {
if ( oncurve && Abs(D1) < PreConf && tan1.IsParallel(tan2, 1.e-8)) {
// Modified by Sergey KHROMOV - Thu Oct 31 12:42:22 2002 Begin
// C2 inclus dans C1 et tangent.
// C2 included in C1 and tangent.
circle1.SetRadius(radius1 - D1);
circle2.SetRadius(radius2 + D1);
CirclesTangent = Standard_True;
@@ -373,12 +372,12 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve ,
// if (oncurve && Abs(D1) < PreConf) {
if (oncurve && Abs(D1) < PreConf && tan1.IsParallel(tan2, 1.e-8)) {
// Modified by Sergey KHROMOV - Thu Oct 31 12:44:25 2002 End
// C2 et C1 tangents et disjoints.
// C2 and C1 tangent and disconnected.
circle1.SetRadius(radius1 - D1);
circle2.SetRadius(radius2 - D1);
CirclesTangent = Standard_True;
}
} // fin recadrage.
} // end of reframing.
GccAna_Circ2dBisec Bisector(circle1,circle2);
@@ -432,14 +431,14 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve ,
if (!thesense) secondparameter = - Precision::Infinite();
if (oncurve) {
// bisectrice droite et oncurve
// soit cassure entre deux cercles de meme rayon soit cercles tangent.
// bisectrice right and oncurve
// is cut between two circle of the same radius if circles are tangent.
// si tangent plat et que la bissectrice est du cote de la concavite
// d un des cercle . la bissectrice est un segment du point commun au
// premier des 2 centre de cercle qu elle rencontre.
// dan ce cas il est important de mettre un segmnent pour les
// intersection dans Tool2d.
// if tangent flat and the bissectrice at the side of the concavity
// of one of the circles. the bissectrice is a segment of the point common to
// first of 2 centers of circle that it meets.
// in this case it is important to set a segmnent for
// intersection in Tool2d.
if (CirclesTangent) {
// Modified by skv - Tue Apr 13 17:23:31 2004 IDEM(Airbus) Begin
@@ -462,7 +461,7 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve ,
}
// Modified by skv - Tue Apr 13 17:23:32 2004 IDEM(Airbus) End
if (tan1.Dot(tan2) < 0.) {
// plat et nom rebroussement.
// flat and not turn back.
Standard_Real Par1 = ElCLib::Parameter(gpline, circle1.Location());
Standard_Real Par2 = ElCLib::Parameter(gpline, circle2.Location());
Standard_Real MinPar = Min(Par1,Par2);
@@ -521,13 +520,12 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve ,
break;
//=============================================================================
// Bissectrice cercle - droite. +
// Bissectrice circle - straight. +
//=============================================================================
case 2 : {
// petit recadrage des cercles. dans le cas OnCurve.
// Si le cercle et la droite sont presque tangents on les rends
// tangents.
// small reframing of circles. in case OnCurve.
// If the circle and the straight line are almost tangent they become tangent.
if (oncurve) {
Standard_Real radius1 = circle1.Radius();
Standard_Real D1 = (line2.Distance(circle1.Location()) - radius1);
@@ -580,14 +578,11 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve ,
Handle(Geom2d_Curve) bisectorcurve;
if (type == GccInt_Lin) {
// -----------------------------------------------------------------
// Si la bisectrice est une ligne
// => la droite est tangente au cercle.
// Si La portion de bisectrice qui nous interresse est du cote
// du centre.
// => la bisectrice est limitee par le point et le centre du
// cercle.
// Remarque : Dans ce dernier cas la bisectrice est en fait une
// parabole degeneree.
// If the bisectrice is a line
// => the straight line is tangent to the circle.
// It the part of bisectrice concerned is at the side of the center.
// => the bisectrice is limited by the point and the center of the circle.
// Note : In the latter case the bisectrice is a degenerated parabole.
// -----------------------------------------------------------------
gp_Pnt2d circlecenter;
gp_Lin2d gpline;
@@ -636,7 +631,7 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve ,
break;
//=============================================================================
// Bissectrice droite - droite. +
// Bissectrice straight - straight. +
//=============================================================================
case 3 : {
gp_Dir2d Direc1(line1.Direction());
@@ -737,15 +732,15 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve ,
//===========================================================================
// calcul de la bissectrice entre une courbe et un point issue d un point. +
// calculate the bissectrice between a curve and a point and starting in a point. +
// +
// afirstcurve : \ courbe et point entre lesquelles on veut calculer la +
// asecondpoint : / bissectrice. +
// apoint : point par lequel doit passer la bissectrice. +
// afirstvector : \ vecteurs pour determiner le secteur dans lequel +
// asecondvector : / la bissectrice doit se trouver. +
// adirection : indique le cote de la bissectrice a conserver. +
// tolerance : seuil a partir duquel les bisectrices sont degenerees+
// afirstcurve : \ curve and point the bissectrice between which is calculated +
// asecondpoint : / +
// apoint : point through which the bissectrice should pass. +
// afirstvector : \ vectors to determine the sector in which +
// asecondvector : / the bissectrice should be located. +
// adirection : shows the side of the bissectrice to be preserved. +
// tolerance : threshold starting from which the bisectrices are degenerated+
//===========================================================================
void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve ,
@@ -801,7 +796,7 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve ,
switch(cas) {
//=============================================================================
// Bissectrice point - cercle. +
// Bissectrice point - circle. +
//=============================================================================
case 1 : {
GccAna_CircPnt2dBisec Bisector(circle,asecondpoint->Pnt2d());
@@ -829,12 +824,11 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve ,
if (type == GccInt_Lin) {
// ----------------------------------------------------------------------------
// Si la bisectrice est une ligne
// => le point est sur le cercle.
// Si La portion de bisectrice qui nous interresse est du cote du centre.
// => la bisectrice est limitee par le point et le centre du cercle.
// Remarque : Dans ce dernier cas la bisectrice est en fait un ellipse de petit
// axe nul.
// If the bisectrice is a line
// => the point is on the circle.
// If the part of bisectrice concerned is at the side of the center.
// => the bisectrice is limited by the point and the center of the circle.
// Note : In this latter case the bisectrice is actually an ellipse of small null axis.
// ----------------------------------------------------------------------------
circlecenter = circle.Location();
@@ -907,7 +901,7 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve ,
break;
//=============================================================================
// Bissectrice point - droite. +
// Bissectrice point - straight. +
//=============================================================================
case 2 : {
GccAna_LinPnt2dBisec Bisector(line,asecondpoint->Pnt2d());
@@ -960,15 +954,15 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Curve)& afirstcurve ,
//===========================================================================
// calcul de la bissectrice entre une courbe et un point issue d un point. +
// calculate the bissectrice between a curve and a point starting at a point. +
// +
// afirstpoint : \ courbes entre lesquelles on veut calculer la +
// asecondcurve : / bissectrice. +
// apoint : point par lequel doit passer la bissectrice. +
// afirstvector : \ vecteurs pour determiner le secteur dans lequel +
// asecondvector : / la bissectrice doit se trouver. +
// adirection : indique le cote de la bissectrice a conserver. +
// tolerance : seuil a partir duquel les bisectrices sont degenerees+
// afirstpoint : \ curves between which the +
// asecondcurve : / bissectrice is calculated. +
// apoint : point through which the bissectrice should pass. +
// afirstvector : \ vectors to determine the secteur in which +
// asecondvector : / the bissectrice should be located. +
// adirection : shows the side of the bissectrice to be preserved. +
// tolerance : threshold at which the bisectrices become degenerated+
//===========================================================================
void Bisector_BisecAna::Perform(const Handle(Geom2d_Point)& afirstpoint ,
@@ -996,14 +990,14 @@ void Bisector_BisecAna::Perform(const Handle(Geom2d_Point)& afirstpoint ,
}
//===========================================================================
// calcul de la bissectrice entre deux points issue d un point. +
// calculate the bissectrice between two points starting at a point. +
// +
// afirstpoint : \ courbes entre lesquelles on veut calculer la +
// asecondpoint : / bissectrice. +
// apoint : point par lequel doit passer la bissectrice. +
// afirstvector : \ vecteurs pour determiner le secteur dans lequel +
// asecondvector : / la bissectrice doit se trouver. +
// adirection : indique le cote de la bissectrice a conserver. +
// afirstpoint : \ curves between which the +
// asecondpoint : / bissectrice is calculated. +
// apoint : point through which the bissectrice should pass. +
// afirstvector : \ vectors to determine the sector in which the +
// asecondvector : / bissectrice should be located. +
// adirection : shows the side of the bissectrice to be preserved. +
//===========================================================================
void Bisector_BisecAna::Perform(const Handle(Geom2d_Point)& afirstpoint ,
@@ -1058,11 +1052,11 @@ Standard_Boolean Bisector_BisecAna::IsExtendAtEnd() const
//=============================================================================
//function : SetTrim
//purpose : Restriction de la bissectrice par le domaine de la courbe Cu.
// Le domaine de la courbe est l ensemble des points plus pres de la
// courbe que de ses extremites.
// Pour le calcul le domaine est etendu. Extension de Epsilon1 du
// First et du Last parametre de la courbe.
//purpose : Restriction of the bissectrice by the domain of the curve Cu.
// The domain of the curve is the set of points that are closer to the
// than to its extremities.
// For the calculation the domain is extended. Extension of Epsilon1 of the
// First and the Last parameter of the curve.
//=============================================================================
//void Bisector_BisecAna::SetTrim(const Handle(Geom2d_Curve)& Cu)
void Bisector_BisecAna::SetTrim(const Handle(Geom2d_Curve)& )
@@ -1507,9 +1501,8 @@ void Bisector_BisecAna::Init(const Handle(Geom2d_TrimmedCurve)& Bis)
//=============================================================================
//function : Degenerate
//purpose : Remplace la bisectrice par une droite,
// si la bisectrice est une ellipse, une parabole ou une ellipse
// degenere.
//purpose : Replace the bisectrice by a straight line,
// if the bisectrice is an ellipse, a parabole or a degenerated ellipse.
//=============================================================================
Standard_Boolean Degenerate(Handle(GccInt_Bisec)& aBisector,
const Standard_Real Tolerance)
@@ -1528,8 +1521,8 @@ Standard_Boolean Degenerate(Handle(GccInt_Bisec)& aBisector,
if (type == GccInt_Hpr) {
gphyperbola = aBisector->Hyperbola();
// Si l Hyperbole est degeneree, elle est remplacee par la droite
// de direction l axe de symetrie.
// If the Hyperbola is degenerated, it is replaced by the straight line
// with direction to the axis if symmetry.
if (gphyperbola.MajorRadius() < Tolerance) {
gp_Lin2d gpline(gphyperbola.YAxis());
@@ -1547,8 +1540,8 @@ Standard_Boolean Degenerate(Handle(GccInt_Bisec)& aBisector,
else if (type == GccInt_Par) {
gpparabola = aBisector->Parabola();
// Si la parabole est degeneree, elle est remplacee par la droite
// issue du Sommet et de direction l axe de symetrie.
// If the parabole is degenerated, it is replaces by the straight
// line starting at the Top and with direction of the axis of symmetry.
if (gpparabola.Focal() < Tolerance) {
gp_Lin2d gpline(gpparabola.MirrorAxis());
@@ -1560,8 +1553,8 @@ Standard_Boolean Degenerate(Handle(GccInt_Bisec)& aBisector,
else if (type == GccInt_Ell) {
gpellipse = aBisector->Ellipse();
// Si l ellipse est degeneree, elle est remplacee par la droite
// definie par le grand axe.
// If the ellipse is degenerated, it is replaced by the straight line
// defined by the great axis.
if (gpellipse.MinorRadius() < Tolerance) {
gp_Lin2d gpline(gpellipse.XAxis());

View File

@@ -107,29 +107,29 @@ void Bisector_BisecCC::Perform(const Handle(Geom2d_Curve)& Cu1,
Standard_Boolean YaPoly = Standard_True;
Standard_Boolean OriInPoly = Standard_False;
//---------------------------------------------
// Calcul premier point du polygone.
// Calculate first point of the polygon.
//---------------------------------------------
U = ProjOnCurve (Origin,curve1);
P = ValueByInt (U,UC1,UC2,Dist);
if (Dist < Precision::Infinite()) {
//----------------------------------------------------
// le parametre du point origine donne un point sur le
// polygone.
// the parameter of the origin point gives a point
// on the polygon.
//----------------------------------------------------
myPolygon.Append(Bisector_PointOnBis(UC1,UC2,U,Dist,P));
startIntervals.Append(U);
if (P.IsEqual(Origin,Precision::Confusion())) {
//----------------------------------------
// test si le prenier point est l origine.
// test if the first point is the origin.
//----------------------------------------
OriInPoly = Standard_True;
}
}
else {
//-------------------------------------------------------
// Le point origine est sur un prolongement.
// Recherche du premier point du polygone par dichotomie.
// The origin point is on the extension.
// Find the first point of the polygon by dichotomy.
//-------------------------------------------------------
dU = (curve1->LastParameter() - U)/(NbPnts - 1);
U += dU;
@@ -149,7 +149,7 @@ void Bisector_BisecCC::Perform(const Handle(Geom2d_Curve)& Cu1,
if ( !myPolygon.Length() == 0) {
SupLastParameter();
//----------------------------------------------
// Construction du polygone de la bissectrice.
// Construction of the polygon of the bissectrice.
//---------------------------------------------
U = FirstParameter();
Standard_Real DU = LastParameter() - U;
@@ -182,7 +182,7 @@ void Bisector_BisecCC::Perform(const Handle(Geom2d_Curve)& Cu1,
}
else {
//----------------
// Polygone vide.
// Empty Polygon.
//----------------
YaPoly = Standard_False;
}
@@ -196,17 +196,17 @@ void Bisector_BisecCC::Perform(const Handle(Geom2d_Curve)& Cu1,
}
else {
//-----------------------------------------------------------------------------
// Prolongement : La courbe est prolongee au debut ou/et a la fin si
// - une des deux courbes est concave.
// - Les courbes ont un point commun au debut ou/et a la fin
// - l angle d ouverture au point commun entre les deux courbes
// vaut PI.
// le prolongemt au debut est pris en compte si l origine se trouve dessus.
// ie : l origine n est pas dans le polygone.
// Extension : The curve is extended at the beginning and/or the end if
// - one of two curves is concave.
// - the curves have a common point at the beginning and/or the end
// - the angle of opening at the common point between two curves
// values PI.
// the extension at the beginning is taken into account if the origin is found above.
// ie : the origin is not the in the polygon.
//-----------------------------------------------------------------------------
//---------------------------------
// Existent ils des prolongemnets ?
// Do the extensions exist ?
//---------------------------------
if (OriInPoly) {
extensionStart = Standard_False;
@@ -217,7 +217,7 @@ void Bisector_BisecCC::Perform(const Handle(Geom2d_Curve)& Cu1,
extensionEnd = TestExtension(curve1,curve2,2);
//-----------------
// Calcul pointEnd.
// Calculate pointEnd.
//-----------------
if (extensionEnd) {
pointEnd = curve1->Value(curve1->LastParameter());
@@ -229,7 +229,7 @@ void Bisector_BisecCC::Perform(const Handle(Geom2d_Curve)& Cu1,
ComputePointEnd();
}
//------------------------------------------------------
// Mise a jour des Bornes des intervalles de definition.
// Update the Limits of intervals of definition.
//------------------------------------------------------
if (YaPoly) {
if (extensionStart) {
@@ -250,7 +250,7 @@ void Bisector_BisecCC::Perform(const Handle(Geom2d_Curve)& Cu1,
}
else {
//--------------------------------------------------
// Pas de polygone => la bissectrise est un segment.
// No polygon => the bissectrice is a segment.
//--------------------------------------------------
startIntervals.Append(0.);
endIntervals .Append(pointEnd.Distance(pointStart));
@@ -337,10 +337,10 @@ Handle(Geom2d_Geometry) Bisector_BisecCC::Copy() const
//=============================================================================
//function : ChangeGuide
//purpose : Changement de la ligne guide pour le parametrage de la bissectrice
// ATTENTION : - Ceci peut inverser le sens de parametrage.
// - Ceci ne concerne que la partie de la courbe
// correspondante au polygone.
//purpose : Changet of the guideline for the parameters of the bissectrice
// ATTENTION : - This can invert the direction of parameterization.
// - This concerns only the part of the curve
// corresponding to the polygon.
//=============================================================================
Handle(Bisector_BisecCC) Bisector_BisecCC::ChangeGuide() const
{
@@ -351,13 +351,13 @@ Handle(Bisector_BisecCC) Bisector_BisecCC::ChangeGuide() const
C -> IsConvex (1, isConvex2); C -> IsConvex (2, isConvex1);
//-------------------------------------------------------------------------
// Construction du nouveau polygone a partir de celui d origine.
// inversion des PointOnBis et Calcul nouveau parametre sur la bissectrice.
// Construction of the new polygon from the initial one.
// inversion of PointOnBis and Calculation of new parameters on the bissectrice.
//-------------------------------------------------------------------------
Bisector_PolyBis Poly;
if (sign1 == sign2 ) {
//---------------------------------------------------------------
// les elements du nouveau polygone sont ranges dans l autre sens.
// elements of the new polygon are ranked in the other direction.
//---------------------------------------------------------------
for (Standard_Integer i = myPolygon.Length(); i >=1; i--) {
Bisector_PointOnBis P = myPolygon.Value(i);
@@ -536,17 +536,17 @@ static Standard_Real Curvature (const Handle(Geom2d_Curve)& C,
//=============================================================================
//function : Value
//purpose : CALCUL DU POINT COURANT PAR METHODE ITERATIVE.
//purpose : CALCULATE THE CURRENT POINT BY ITERATIVE METHOD.
// ----------------------------------------------
// Calcul du point courant, de la distance du point courant aux deux
// courbes, des parametres sur chaque courbe de la projection du
// point courrant.
// Calculate the current point, the distance from the current point to
// both curves, the parameters on each curve of the projection
// of the current point.
//
//method : - Recheche parametre de depart en utilisant <myPolygon>.
// - Calcul du parametre U2 sur la courbe C2 solution de H(U,V)= 0
//method : - Find start parameter by using <myPolygon>.
// - Calculate parameter U2 on curve C2 solution of H(U,V)= 0
// - P(U) = F(U,U2)
//
// ou :
// or :
// ||P2(v0)P1(u)||**2
// F(u,v) = P1(u) - 1/2 *----------------* N(u)
// (N(u).P2(v0)P1(u))
@@ -562,14 +562,14 @@ gp_Pnt2d Bisector_BisecCC::ValueAndDist (const Standard_Real U,
gp_Vec2d T;
//-----------------------------------------------
// le polygone est il reduit a un point ou vide?
// is the polygon reduced to a point or empty?
//-----------------------------------------------
if (myPolygon.Length() <= 1) {
return Extension(U,U1,U2,Dist,T);
}
//-----------------------------------------------
// test U en dehors des bornes du polygone.
// test U out of the limits of the polygon.
//-----------------------------------------------
if (U < myPolygon.First().ParamOnBis()) {
return Extension(U,U1,U2,Dist,T);
@@ -579,7 +579,7 @@ gp_Pnt2d Bisector_BisecCC::ValueAndDist (const Standard_Real U,
}
//-------------------------------------------------------
// Recheche parametre de depart en utilisant <myPolygon>.
// Find start parameter by using <myPolygon>.
//-------------------------------------------------------
Standard_Integer IntervalIndex = myPolygon.Interval(U);
Standard_Real UMin = myPolygon.Value(IntervalIndex ).ParamOnBis();
@@ -601,7 +601,7 @@ gp_Pnt2d Bisector_BisecCC::ValueAndDist (const Standard_Real U,
VMax = Max(VMin,VMax); VMin = VTemp;
Standard_Boolean Valid = Standard_True;
//---------------------------------------------------------------
// Calcul du parametre U2 sur la courbe C2 solution de H(u,v)= 0
// Calculate parameter U2 on curve C2 solution of H(u,v)=0
//---------------------------------------------------------------
gp_Pnt2d P1;
gp_Vec2d T1;
@@ -659,14 +659,13 @@ gp_Pnt2d Bisector_BisecCC::ValueAndDist (const Standard_Real U,
}
//----------------------------------------------------------------
// Si le point n est pas valide
// calcul par intersection.
// If the point is not valid
// calculate by intersection.
//----------------------------------------------------------------
if (!Valid) {
//--------------------------------------------------------------------
// Construction de la bisectrice point courbe et de la droite passant
// par P1 et portee par la normale. la curve2 est restreinte par VMin et
// VMax.
// Construction of the bisectrice point curve and of the straight line passing
// by P1 and carried by the normal. curve2 is limited by VMin and VMax.
//--------------------------------------------------------------------
Standard_Real DMin = Precision::Infinite();
gp_Pnt2d P;
@@ -700,16 +699,16 @@ gp_Pnt2d Bisector_BisecCC::ValueAndDist (const Standard_Real U,
//=============================================================================
//function : ValueByInt
//purpose : CALCUL DU POINT COURANT PAR INTERSECTION.
// -----------------------------------------
// Calcul du point courant, de la distance du point courant aux deux
// courbes, des parametres sur chaque courbe de la projection du
// point courrant.
// le point courrant au parametre U est l intersection de la
// bissectrice point courbe (P1,curve2) et de la droite passant par
// P1 de vecteur directeur N1.
// P1 est le point courrant de parametre U sur la curve1 et N1 la
// normale en ce point.
//purpose : CALCULATE THE CURRENT POINT BY INTERSECTION.
// -------------------------------------------
// Calculate the current point, the distance from the current point
// to two curves, the parameters on each curve of the projection of the
// current point.
// the current point with parameter U is the intersection of the
// bissectrice point curve (P1,curve2) and of the straight line
// passing through P1 of director vector N1.
// P1 is the current point of parameter U on curve1 and N1 the
// normal at this point.
//=============================================================================
gp_Pnt2d Bisector_BisecCC::ValueByInt (const Standard_Real U,
Standard_Real& U1,
@@ -717,7 +716,7 @@ gp_Pnt2d Bisector_BisecCC::ValueByInt (const Standard_Real U,
Standard_Real& Dist) const
{
//------------------------------------------------------------------
// Recuperation des point,tangente,normale sur C1 au parametre U.
// Return point, tangent, normal on C1 at parameter U.
//-------------------------------------------------------------------
U1 = LinkBisCurve(U);
@@ -727,7 +726,7 @@ gp_Pnt2d Bisector_BisecCC::ValueByInt (const Standard_Real U,
gp_Vec2d N1( Tan1.Y(), - Tan1.X());
//--------------------------------------------------------------------------
// test de confusion de P1 avec extremite de curve2.
// test confusion of P1 with extremity of curve2.
//--------------------------------------------------------------------------
if (P1.Distance(curve2->Value(curve2->FirstParameter())) < Precision::Confusion()) {
U2 = curve2->FirstParameter();
@@ -791,7 +790,7 @@ gp_Pnt2d Bisector_BisecCC::ValueByInt (const Standard_Real U,
Standard_Real SquareP2P1 = P2P1.SquareMagnitude();
Standard_Real N1P2P1 = N1.Dot(P2P1);
// Test si la solution est du bon cote des courbes.
// Test if the solution is at the proper side of the curves.
if (N1P2P1*sign1 > 0 ) {
P = P1.Translated(- (0.5*SquareP2P1/N1P2P1)*N1);
DistPP1 = P1.SquareDistance(P);
@@ -851,14 +850,14 @@ gp_Pnt2d Bisector_BisecCC::ValueByInt (const Standard_Real U,
if (YaSol) {
Dist = DMin;
//--------------------------------------------------------------
// Point trouve => Test distance courbure + Test angulaire
// Point found => Test curve distance + Angular Test
//---------------------------------------------------------------
P2 = curve2->Value(U2);
gp_Vec2d PP1(P1.X() - PSol.X(),P1.Y() - PSol.Y());
gp_Vec2d PP2(P2.X() - PSol.X(),P2.Y() - PSol.Y());
//-----------------------------------------------
// Dist = produit des normes = distance au carre.
// Dist = product of norms = distance at the square.
//-----------------------------------------------
if (PP1.Dot(PP2) > (1. - Precision::Angular())*Dist) {
YaSol = Standard_False;
@@ -968,12 +967,12 @@ gp_Vec2d Bisector_BisecCC::DN(const Standard_Real U,
//=============================================================================
//function : Values
// purpose : la courbe peut etre decrite par les equations suivantes:
// purpose : the curve can be described by the following equations:
//
// B(u) = F(u,v0)
// ou v0 = Phi(u) est donne par H (u,v) = 0.
// where v0 = Phi(u) is given by H (u,v) = 0.
//
// avec :
// with :
// ||P2(v0)P1(u)||**2
// F(u,v) = P1(u) - 1/2 *----------------* N(u)
// (N(u).P2(v0)P1(u))
@@ -982,8 +981,8 @@ gp_Vec2d Bisector_BisecCC::DN(const Standard_Real U,
//
// => dB(u)/du = dF/du + dF/dv(- dH/du:dH/dv)
//
// Remarque : la tangente a la bisectrice est bissectrice aux
// tangentes T1(u) et T2(v0)
// Note : tangent to the bisectrice is bissectrice at
// tangents T1(u) and T2(v0)
//
//=============================================================================
void Bisector_BisecCC::Values (const Standard_Real U,
@@ -997,13 +996,13 @@ void Bisector_BisecCC::Values (const Standard_Real U,
V2 = gp_Vec2d(0.,0.);
V3 = gp_Vec2d(0.,0.);
//-------------------------------------------------------------------------
// Calcul du point courant sur la bisectrice et des parametres sur chaque
// courbe.
// Calculate the current point on the bisectrice and the parameters on each
// curve.
//-------------------------------------------------------------------------
Standard_Real U0,V0,Dist;
//-----------------------------------------------
// le polygone est il reduit a un point ou vide?
// is the polygon reduced to a point or empty?
//-----------------------------------------------
if (myPolygon.Length() <= 1) {
P = Extension(U,U0,V0,Dist,V1);
@@ -1020,27 +1019,27 @@ void Bisector_BisecCC::Values (const Standard_Real U,
if (N == 0) return;
//------------------------------------------------------------------
// Recuperation des point,tangente,normale sur C1 au parametre U0.
// Return point, tangent, normal to C1 by parameter U0.
//-------------------------------------------------------------------
gp_Pnt2d P1 ; // point sur C1.
gp_Vec2d Tu ; // tangente a C1 en U0.
gp_Vec2d Tuu ; // derivee seconde a C1 en U0.
gp_Pnt2d P1 ; // point on C1.
gp_Vec2d Tu ; // tangent to C1 by U0.
gp_Vec2d Tuu ; // second derivative to C1 by U0.
curve1->D2(U0,P1,Tu,Tuu);
gp_Vec2d Nor( - Tu .Y() , Tu .X()); // Normale en U0.
gp_Vec2d Nu ( - Tuu.Y() , Tuu.X()); // derivee de la normale en U0.
gp_Vec2d Nor( - Tu .Y() , Tu .X()); // Normal by U0.
gp_Vec2d Nu ( - Tuu.Y() , Tuu.X()); // derivative of the normal by U0.
//-------------------------------------------------------------------
// Recuperation des point,tangente,normale sur C2 au parametre V0.
// Return point, tangent, normale to C2 by parameter V0.
//-------------------------------------------------------------------
gp_Pnt2d P2 ; // point sur C2.
gp_Vec2d Tv ; // tangente a C2 en V.
gp_Vec2d Tvv ; // derivee seconde a C2 en V.
gp_Pnt2d P2 ; // point on C2.
gp_Vec2d Tv ; // tangent to C2 by V.
gp_Vec2d Tvv ; // second derivative to C2 by V.
curve2->D2(V0,P2,Tv,Tvv);
gp_Vec2d PuPv(P2.X() - P1.X(), P2.Y() - P1.Y());
//-----------------------------
// Calcul de dH/du et de dH/dv.
// Calculate dH/du and dH/dv.
//-----------------------------
Standard_Real TuTu,TvTv,TuTv;
Standard_Real TuPuPv,TvPuPv ;
@@ -1058,7 +1057,7 @@ void Bisector_BisecCC::Values (const Standard_Real U,
TvPuPv*(TvvPuPv + TvTv)*TuTu);
//-----------------------------
// Calcul de dF/du et de dF/dv.
// Calculate dF/du and dF/dv.
//-----------------------------
Standard_Real NorPuPv,NuPuPv,NorTv;
Standard_Real A,B,dAdu,dAdv,dBdu,dBdv,BB;
@@ -1098,8 +1097,8 @@ void Bisector_BisecCC::Values (const Standard_Real U,
//=============================================================================
//function : Extension
// purpose : Calcul du point courant sur les extensions ou prolongement en
// tangence de la courbe.
// purpose : Calculate the current point on the extensions
// by tangence of the curve.
//============================================================================
gp_Pnt2d Bisector_BisecCC::Extension (const Standard_Real U,
Standard_Real& U1,
@@ -1119,7 +1118,7 @@ gp_Pnt2d Bisector_BisecCC::Extension (const Standard_Real U,
if (myPolygon.Length() == 0) {
//---------------------------------------------
// Polygone vide => segment (pointStart,pointEnd)
// Empty Polygon => segment (pointStart,pointEnd)
//---------------------------------------------
dU = U - startIntervals.First();
P = pointStart;
@@ -1135,7 +1134,7 @@ gp_Pnt2d Bisector_BisecCC::Extension (const Standard_Real U,
dU = U - PRef.ParamOnBis();
if (extensionStart) {
//------------------------------------------------------------
// extension = segment (pointstart,premier point du polygone.)
// extension = segment (pointstart, first point of the polygon.)
//------------------------------------------------------------
P1 = pointStart;
U1 = curve1->FirstParameter();
@@ -1153,7 +1152,7 @@ gp_Pnt2d Bisector_BisecCC::Extension (const Standard_Real U,
dU = U - PRef.ParamOnBis();
if (extensionEnd) {
//------------------------------------------------------------
// extension = segment (dernier point du polygone.pointEnd)
// extension = segment (last point of the polygon.pointEnd)
//------------------------------------------------------------
P1 = pointEnd;
U1 = curve1->LastParameter();
@@ -1168,8 +1167,7 @@ gp_Pnt2d Bisector_BisecCC::Extension (const Standard_Real U,
if (ExtensionTangent) {
//-----------------------------------------------------------
// Si la courbe n a pas d extension, celle ci est prolonge
// en tangence.
// If the la curve has no a extension, it is extended by tangency
//------------------------------------------------------------
U1 = PRef.ParamOnC1();
U2 = PRef.ParamOnC2();
@@ -1201,7 +1199,7 @@ static Standard_Boolean PointByInt(const Handle(Geom2d_Curve)& CA,
Standard_Real& Dist)
{
//------------------------------------------------------------------
// Recuperation des point,tangente,normale sur CA au parametre UOnA.
// Return point,tangent, normal on CA with parameter UOnA.
//-------------------------------------------------------------------
gp_Pnt2d P1,P2,P,PSol;
gp_Vec2d Tan1,Tan2;
@@ -1212,7 +1210,7 @@ static Standard_Boolean PointByInt(const Handle(Geom2d_Curve)& CA,
gp_Vec2d N1(Tan1.Y(), - Tan1.X());
//--------------------------------------------------------------------------
// test de confusion de P1 avec extremite de curve2.
// test of confusion of P1 with extremity of curve2.
//--------------------------------------------------------------------------
if (P1.Distance(CB->Value(CB->FirstParameter())) < Precision::Confusion()) {
UOnB = CB->FirstParameter();
@@ -1243,13 +1241,13 @@ static Standard_Boolean PointByInt(const Handle(Geom2d_Curve)& CA,
Standard_Real UPC;
Standard_Boolean YaSol = Standard_False;
//--------------------------------------------------------------------
// Construction de la bisectrice point courbe et de la droite passant
// par P1 et portee par la normale.
// Construction of the bisectrice point curve and of the straight line passing
// through P1 and carried by the normal.
//--------------------------------------------------------------------
Handle(Bisector_BisecPC) BisPC
= new Bisector_BisecPC(CB,P1,SignB );
//-------------------------------
// Test si la bissectrice existe.
// Test if the bissectrice exists.
//-------------------------------
if (BisPC->IsEmpty()) {
Dist = Precision::Infinite();
@@ -1283,7 +1281,7 @@ static Standard_Boolean PointByInt(const Handle(Geom2d_Curve)& CA,
}
if (YaSol) {
//--------------------------------------------------------------
// Point trouve => Test distance courbure + Test angulaire
// Point found => Test distance curvature + Angular test
//---------------------------------------------------------------
P2 = CB->Value(UOnB);
gp_Dir2d PP1Unit(P1.X() - PSol.X(),P1.Y() - PSol.Y());
@@ -1321,9 +1319,9 @@ void Bisector_BisecCC::SupLastParameter()
{
endIntervals.Append(curve1->LastParameter());
// ----------------------------------------------------------------------
// Calcul du parametre sur curve1 associees a l une ou lautre des extremites
// de curve2 suivant les valeurs de sign1 et sign2.
// la bissectrice est restreinte par les parametres obtenus.
// Calculate parameter on curve1 associated to one or the other of the extremities
// of curve2 following the values of sign1 and sign2.
// the bissectrice is limited by the obtained parameters.
//------------------------------------------------------------------------
Standard_Real UOnC1,UOnC2,Dist;
if (sign1 == sign2) {

View File

@@ -87,7 +87,7 @@ void Bisector_BisecPC::Perform(const Handle(Geom2d_Curve)& Cu,
sign = Side;
isConvex = Bisector::IsConvex(curve,sign);
//--------------------------------------------
// Calcul intervalle de definition.
// Calculate interval of definition.
//--------------------------------------------
ComputeIntervals();
if (isEmpty) return;
@@ -285,8 +285,8 @@ Standard_Boolean Bisector_BisecPC::IsClosed() const
{
if (curve->IsClosed()) {
//-----------------------------------------------------------------------
// La bisectrice est fermee si la curve est fermee et que la bissectrice
// a un seul domaine de continuite egale a celui de la courbe.
// The bisectrice is closed if the curve is closed and the bissectrice
// has only one domain of continuity equal to the one of the curve.
// -----------------------------------------------------------------------
if (startIntervals.First() == curve->FirstParameter() &&
endIntervals .First() == curve->LastParameter () )
@@ -339,14 +339,14 @@ void Bisector_BisecPC::Extension(const Standard_Real U,
//=============================================================================
//function : Values
// purpose : A chaque point de la courbe est associe un point sur la
// bissectrice. l equation de la bissectrice est:
// purpose : To each point of the curve is associated a point on the
// bissectrice. The equation of the bissectrice is:
// || PP(u)||**2
// F(u) = P(u) - 1/2* -------------- * N(u)
// (N(u)|PP(u))
//
// N(u) normale a la courbe en u.
// ( | ) designe le produit scalaire.
// N(u) normal to the curve by u.
// ( | ) designation of the scalar product.
//=============================================================================
void Bisector_BisecPC::Values(const Standard_Real U,
const Standard_Integer N,
@@ -387,9 +387,9 @@ void Bisector_BisecPC::Values(const Standard_Real U,
}
else {return; }
if (N == 0) return; // Fin Calcul Point;
if (N == 0) return; // End Calculation Point;
gp_Vec2d Nu ( - Tuu.Y() , Tuu.X()); // derivee de la normale en U.
gp_Vec2d Nu ( - Tuu.Y() , Tuu.X()); // derivative of the normal by U.
Standard_Real NuPPC = Nu .Dot(PPC);
Standard_Real TuPPC = Tu .Dot(PPC);
Standard_Real NorPPCE2 = NorPPC*NorPPC;
@@ -398,7 +398,7 @@ void Bisector_BisecPC::Values(const Standard_Real U,
//--------------------------
V1 = Tu - A1*Nu - A2*Nor;
//--------------------------
if (N == 1) return; //Fin calcul D1.
if (N == 1) return; // End calculation D1.
gp_Vec2d Nuu ( - T3u.Y() , T3u.X());
@@ -442,13 +442,13 @@ static Standard_Real Curvature (const Handle(Geom2d_Curve)& C,
//=============================================================================
//function : Distance
//purpose : distance au carre du point de parametre U a la courbe et au point:
//purpose : distance at the square of the point of parameter U to the curve and at point:
//
// 2 ||PP(u)||**4 2
// d = 1/4* ------------------- ||Nor||
// (Nor(u)/PP(u))**2
//
// ou Nor est la normale a la courbe en U.
// where Nor is the normal to the curve by U.
//=============================================================================
Standard_Real Bisector_BisecPC::Distance (const Standard_Real U) const
{
@@ -468,9 +468,9 @@ Standard_Real Bisector_BisecPC::Distance (const Standard_Real U) const
if (point.IsEqual(PC,Precision::Confusion())) {
if (isConvex) { return 0.;}
//----------------------------------------------------
// le point est sur une courbe concave.
// Le point voulu n est pas le point commun.
// ceci pour evite la discontinuite de la bisectrice.
// the point is on a concave curve.
// The required point is not the common point.
// This can avoid the discontinuity of the bisectrice.
//----------------------------------------------------
else { return Precision::Infinite();}
}
@@ -482,7 +482,7 @@ Standard_Real Bisector_BisecPC::Distance (const Standard_Real U) const
Standard_Real A = 0.5*SquareMagPPC/Prosca;
Standard_Real Dist = A*A*NorNor;
//----------------------------------------
// Test Courbure si la courbe est concave.
// Test Curvature if the curve is concave.
//----------------------------------------
// if (!isConvex){
// Standard_Real K = Curvature(curve,UOnCurve,Precision::Confusion());
@@ -687,20 +687,19 @@ void Bisector_BisecPC::ComputeIntervals ()
endIntervals .Append(UEnd);
//------------------------------------------------------------------------
// Decalage eventuel du parametre sur la courbe par rapport a celui sur
// la curve. Le decalage est effectue si la curve est periodique. et
// que le point de parametre initial est interieure a un interval de cont
// inuite.
// Eventual offset of the parameter on the curve correspondingly to the one
// on the curve. The offset can be done if the curve is periodical and the
// point of initial parameter is less then the interval of continuity.
//------------------------------------------------------------------------
if (curve->IsPeriodic()) {
if (startIntervals.Length() > 1) { // Plusieurs intervals.
if (endIntervals .Last() == curve->LastParameter() &&
startIntervals.First() == curve->FirstParameter() ) {
//---------------------------------------------------------------
// la bissectrice est definie a l origine.
// => Fusion du premier et du dernier interval.
// => le 0 sur la bisectrice devient le debut du premier interval
// => decalage de parametre sur toutes les bornes des intervals.
// the bissectrice is defined at the origin.
// => Fusion of the first and the last interval.
// => 0 on the bisectrice becomes the start of the first interval
// => offset of parameter on all limits of intervals.
//---------------------------------------------------------------
startIntervals.Remove(1);
endIntervals .Remove(endIntervals.Length());

View File

@@ -97,7 +97,7 @@ void Bisector_Inter::Perform(const Bisector_Bisec& C1,
gp_Pnt2d PMin,PMax;
//------------------------------------------------------
// Recuperation Min Max domain1.
// Return Min Max domain1.
//------------------------------------------------------
if (D1.HasFirstPoint()) {MinDomain = D1.FirstParameter();}
else {MinDomain = RealFirst(); }
@@ -106,8 +106,8 @@ void Bisector_Inter::Perform(const Bisector_Bisec& C1,
else {MaxDomain = RealLast(); }
//----------------------------------------------------------
// Decoupage de la premiere courbe selon les intervalles de
// continuite en tenant compte de D1
// Cutting the first curve by the intervals of
// continuity taking account of D1
//----------------------------------------------------------
//for (Standard_Integer IB1 = 1; IB1 <= Bis1->NbIntervals(); IB1++) {
Standard_Integer IB1;
@@ -125,7 +125,7 @@ void Bisector_Inter::Perform(const Bisector_Bisec& C1,
if ((IB1 == 1 && Bis1->IsExtendAtStart()) ||
(IB1 == Bis1->NbIntervals() && Bis1->IsExtendAtEnd()) ){
//--------------------------------------------------------
// Portion correspondante a une extension est un segment.
// Part corresponding to an extension is a segment.
//--------------------------------------------------------
SBis1 [IB1] = ConstructSegment (PMin,PMax,UMin,UMax);
}
@@ -137,7 +137,7 @@ void Bisector_Inter::Perform(const Bisector_Bisec& C1,
}
//------------------------------------------------------
// Recuperation Min Max domain2.
// Return Min Max domain2.
//------------------------------------------------------
if (D2.HasFirstPoint()) {MinDomain = D2.FirstParameter();}
else {MinDomain = RealFirst(); }
@@ -146,8 +146,8 @@ void Bisector_Inter::Perform(const Bisector_Bisec& C1,
else {MaxDomain = RealLast(); }
//----------------------------------------------------------
// Decoupage de la deuxieme courbe selon les intervalles de
// continuite en tenant compte de D2
// Cut the second curve following the intervals of
// continuity taking account of D2
//----------------------------------------------------------
//for (Standard_Integer IB2 = 1; IB2 <= Bis2->NbIntervals(); IB2++) {
Standard_Integer IB2;
@@ -165,7 +165,7 @@ void Bisector_Inter::Perform(const Bisector_Bisec& C1,
if ((IB2 == 1 && Bis2->IsExtendAtStart()) ||
(IB2 == Bis1->NbIntervals() && Bis2->IsExtendAtEnd()) ){
//--------------------------------------------------------
// Portion correspondante a une extension est un segment.
// Part corresponding to an extension is a segment.
//--------------------------------------------------------
SBis2 [IB2] = ConstructSegment (PMin,PMax,UMin,UMax);
}
@@ -177,7 +177,7 @@ void Bisector_Inter::Perform(const Bisector_Bisec& C1,
}
//--------------------------------------------------------------
// Boucle sur les intersections des portions de chaque courbe.
// Loop on the intersections of parts of each curve.
//--------------------------------------------------------------
for ( IB1 = 1; IB1 <= NB1; IB1++) {
for ( IB2 = 1; IB2 <= NB2; IB2++) {
@@ -254,9 +254,9 @@ void Bisector_Inter::SinglePerform(const Handle(Geom2d_Curve)& CBis1,
Handle(Bisector_BisecCC)::DownCast(Bis2),D2,Tol);
}
else {
// Si on arrive la une des deux bissectrices est un segment.
// Si une des bissectrice n est pas un segment on teste si
// ses extremites sont sur la droite
// If we are here one of two bissectrices is a segment.
// If one of bissectrices is not a segment, it is tested if
// its extremities are on the straight line.
if (Type1 == STANDARD_TYPE(Geom2d_Line) && Type2 != STANDARD_TYPE(Geom2d_Line)) {
TestBound(Handle(Geom2d_Line)::DownCast(Bis1),
@@ -297,15 +297,14 @@ void Bisector_Inter::SinglePerform(const Handle(Geom2d_Curve)& CBis1,
//===================================================================================
// function : NeighbourPerform
// putpose : Recherche de l intersection de 2 bissectrices courbe/courbe
// Voisines (ie Bis1 separe A et B et Bis2 separe B et C).
// Bis1 est parametree par B et Bis2 par C.
// putpose : Find the intersection of 2 neighbor bissectrices curve/curve
// (ie Bis1 separates A and B and Bis2 separates B and C).
// Bis1 is parameterized by B and Bis2 by C.
//
// Methode : On parametre Bis2 par B
// les 2 bissectrices sont alors parametree par la meme
// courbe.
// Soientt D1(u) = d(Bis1(u),B(u)) et D2(U) = d(Bis2(u),B(U))
// On cherche le parametre U0 pour lequel D1(U0)-D2(U0) = 0.
// Method : Bis2 is parameterized by B
// 2 bissectrices are thus parameterized by the same curve.
// Let D1(u) = d(Bis1(u),B(u)) and D2(U) = d(Bis2(u),B(U))
// Parameter U0 for which D1(U0)-D2(U0) = 0 is found.
//===================================================================================
void Bisector_Inter::NeighbourPerform(const Handle(Bisector_BisecCC)& Bis1,
const IntRes2d_Domain& D1,
@@ -325,7 +324,7 @@ void Bisector_Inter::NeighbourPerform(const Handle(Bisector_BisecCC)& Bis1,
Handle(Geom2d_Curve) Guide;
Handle(Bisector_BisecCC) BisTemp;
// Changement ligne guide sur Bis2.
// Change guiedline on Bis2.
BisTemp = Bis2->ChangeGuide();
Guide = Bis2->Curve(2);
#ifdef DEB
@@ -335,7 +334,7 @@ void Bisector_Inter::NeighbourPerform(const Handle(Bisector_BisecCC)& Bis1,
Bis2->ValueAndDist(D2.FirstParameter(),U1,UMax,Dist);
Bis2->ValueAndDist(D2.LastParameter() ,U1,UMin,Dist);
#endif
// Calcul du domaine d intersection sur la ligne guide.
// Calculate the domain of intersection on the guideline.
UMin = Max (D1.FirstParameter(),UMin);
UMax = Min (D1.LastParameter() ,UMax);
@@ -343,7 +342,7 @@ void Bisector_Inter::NeighbourPerform(const Handle(Bisector_BisecCC)& Bis1,
if (UMin - Eps > UMax + Eps) {return;}
// Resolution F = 0 pour trouver le point commun.
// Solution F = 0 to find the common point.
Bisector_FunctionInter Fint (Guide,Bis1,BisTemp);
math_BissecNewton Sol (Fint,UMin,UMax,Tol,20);
if (Sol.IsDone()) {
@@ -361,11 +360,10 @@ void Bisector_Inter::NeighbourPerform(const Handle(Bisector_BisecCC)& Bis1,
//===================================================================================
//=====================================================================================
// function : TestBound
// putpose : Test si les extremites de Bis2 sont sur le segment coorespondant
// a Bis1.
//===================================================================================
// putpose : Test if the extremities of Bis2 are on the segment cooresponding to Bis1.
//=====================================================================================
void Bisector_Inter::TestBound (const Handle(Geom2d_Line)& Bis1,
const IntRes2d_Domain& D1,
const Handle(Geom2d_Curve)& Bis2,