1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-08 14:17:06 +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

@@ -5,28 +5,28 @@
// Modified: Mon Jan 12 10:50:10 1998
// Author: Joelle CHAUVET
// <jct@sgi64>
// gestion automatique de l'origine et de l'orientation
// avec la methode Organize
// automatic management of origin and orientation
// with method Organize
// Modified: Mon Feb 23 09:28:46 1998
// Author: Joelle CHAUVET
// <jct@sgi64>
// methode Organize avec option de projection pour les wires fermes
// nouvelle methode SameNumber avec option de report des decoupes
// + utilitaires ComputeACR et InsertACR
// + traitement du cas derniere section ponctuelle
// method Organize with option of projection for closed wires
// new method SameNumber with option to report cuts
// + utilities ComputeACR and InsertACR
// + processing of the case of last point section
// Modified: Thu Apr 30 15:24:17 1998
// Author: Joelle CHAUVET
// <jct@sgi64>
// separation sections fermees / sections ouvertes + debug
// Organize devient ComputeOrigin et SearchOrigin
// separation closed / open sections + debug
// Organize becomes ComputeOrigin and SearchOrigin
// Modified: Tue Jul 21 16:48:35 1998
// Author: Joelle CHAUVET
// <jct@sgi64>
// cas limite pour Pnext d'ou vrillage (BUC60281)
// limited case for Pnext of a twist (BUC60281)
// Modified: Thu Jul 23 11:38:36 1998
// Author: Joelle CHAUVET
// <jct@sgi64>
// calcul de l'angle de la rotation dans SearchOrigin
// calculate the angle of rotation in SearchOrigin
// Modified: Fri Jul 31 15:14:19 1998
// Author: Joelle CHAUVET
// <jct@sgi64>
@@ -34,7 +34,7 @@
// Modified: Mon Oct 12 09:42:33 1998
// Author: Joelle CHAUVET
// <jct@sgi64>
// numero des aretes dans EdgesFromVertex (CTS21570)
// number of edges in EdgesFromVertex (CTS21570)
#include <BRepFill.ixx>
@@ -167,11 +167,11 @@ static void TrimEdge (const TopoDS_Edge& CurrentEdge,
Vbid.Nullify();
if (SeqOrder) {
// de first vers last
// from first to last
m0 = first;
V0 = Vf;
for (j=1; j<=ndec; j++) {
// morceau d'edge
// piece of edge
m1 = (CutValues.Value(j)-t0)*(last-first)/(t1-t0)+first;
TopoDS_Edge CutE = BRepLib_MakeEdge(C,V0,Vbid,m0,m1);
CutE.Orientation(CurrentOrient);
@@ -179,7 +179,7 @@ static void TrimEdge (const TopoDS_Edge& CurrentEdge,
m0 = m1;
V0 = TopExp::LastVertex(CutE);
if (j==ndec) {
// dernier morceau
// last piece
TopoDS_Edge LastE = BRepLib_MakeEdge(C,V0,Vl,m0,last);
LastE.Orientation(CurrentOrient);
S.Append(LastE);
@@ -187,11 +187,11 @@ static void TrimEdge (const TopoDS_Edge& CurrentEdge,
}
}
else {
// de last vers first
// from last to first
m1 = last;
V1 = Vl;
for (j=ndec; j>=1; j--) {
// morceau d'edge
// piece of edge
m0 = (CutValues.Value(j)-t0)*(last-first)/(t1-t0)+first;
TopoDS_Edge CutE = BRepLib_MakeEdge(C,Vbid,V1,m0,m1);
CutE.Orientation(CurrentOrient);
@@ -199,7 +199,7 @@ static void TrimEdge (const TopoDS_Edge& CurrentEdge,
m1 = m0;
V1 = TopExp::FirstVertex(CutE);
if (j==1) {
// dernier morceau
// last piece
TopoDS_Edge LastE = BRepLib_MakeEdge(C,Vf,V1,first,m1);
LastE.Orientation(CurrentOrient);
S.Append(LastE);
@@ -243,7 +243,7 @@ TopoDS_Face BRepFill::Face(const TopoDS_Edge& Edge1,
TopoDS_Vertex V1f,V1l,V2f,V2l;
// on cree un new Handle
// create a new Handle
if (Abs(f1 - C1->FirstParameter()) > Precision::PConfusion() ||
Abs(l1 - C1->LastParameter()) > Precision::PConfusion() ) {
C1 = new Geom_TrimmedCurve(C1,f1,l1);
@@ -251,11 +251,11 @@ TopoDS_Face BRepFill::Face(const TopoDS_Edge& Edge1,
else {
C1 = Handle(Geom_Curve)::DownCast(C1->Copy());
}
// eventuellement on bouge la courbe
// eventually the curve is concerned
if ( !SameLoc) {
C1->Transform(L1.Transformation());
}
// on la met dans le bon sens et on prend ses vertex
// it is set in the proper direction and its vertices are taken
if (Edge1.Orientation() == TopAbs_REVERSED) {
TopExp::Vertices(Edge1,V1l,V1f);
C1->Reverse();
@@ -264,7 +264,7 @@ TopoDS_Face BRepFill::Face(const TopoDS_Edge& Edge1,
TopExp::Vertices(Edge1,V1f,V1l);
}
// on cree un new Handle
// a new Handle is created
if (Abs(f2 - C2->FirstParameter()) > Precision::PConfusion() ||
Abs(l2 - C2->LastParameter()) > Precision::PConfusion() ) {
C2 = new Geom_TrimmedCurve(C2,f2,l2);
@@ -272,11 +272,11 @@ TopoDS_Face BRepFill::Face(const TopoDS_Edge& Edge1,
else {
C2 = Handle(Geom_Curve)::DownCast(C2->Copy());
}
// eventuellement on bouge la courbe
// eventually the curve is concerned
if ( !SameLoc) {
C2->Transform(L2.Transformation());
}
// on la met dans le bon sens et on prend ses vertex
// it is set in the proper direction and its vertices are taken
if (Edge2.Orientation() == TopAbs_REVERSED) {
TopExp::Vertices(Edge2,V2l,V2f);
C2->Reverse();
@@ -285,7 +285,7 @@ TopoDS_Face BRepFill::Face(const TopoDS_Edge& Edge1,
TopExp::Vertices(Edge2,V2f,V2l);
}
// Sont-ce des edges fermes
// Are they closed edges?
Standard_Boolean Closed = V1f.IsSame(V1l) && V2f.IsSame(V2l);
@@ -642,7 +642,7 @@ void BRepFill::Axe (const TopoDS_Shape& Spine,
TopoDS_Face aFace;
// normale au Spine.
// normal to the Spine.
if (Spine.ShapeType() == TopAbs_FACE) {
aFace = TopoDS::Face(Spine);
S = BRep_Tool::Surface(TopoDS::Face(Spine), L);
@@ -670,7 +670,7 @@ void BRepFill::Axe (const TopoDS_Shape& Spine,
Normal = Handle(Geom_Plane)::DownCast(S)->Pln().Axis().Direction();
// Recherche du vertex du profil le plus proche du spine.
// Find vertex of the profile closest to the spine.
Standard_Real DistMin = Precision::Infinite();
Standard_Real Dist;
// Standard_Real Tol2 = Tol*Tol;
@@ -681,7 +681,7 @@ void BRepFill::Axe (const TopoDS_Shape& Spine,
// Standard_Real D1,D2;
gp_Pnt P1,P2;
// On cherche d'abord si il y a contact Vertex Vertex.
// First check if there is contact Vertex Vertex.
Standard_Boolean IsOnVertex = Standard_False;
SE.Init(aFace.Oriented(TopAbs_FORWARD),TopAbs_VERTEX);
// modified by NIZHNY-EAP Wed Feb 23 12:31:52 2000 ___BEGIN___
@@ -780,7 +780,7 @@ void BRepFill::Axe (const TopoDS_Shape& Spine,
}
}
}
// sauvegarde minimum.
// save minimum.
if (Dist < DistMin) {
DistMin = Dist;
BRepAdaptor_Curve BAC(E);
@@ -800,7 +800,7 @@ void BRepFill::Axe (const TopoDS_Shape& Spine,
//=======================================================================
//function : SearchOrigin
//purpose : Decoupe et oriente un wire ferme.
//purpose : Cut and orientate a closed wire.
//=======================================================================
void BRepFill::SearchOrigin(TopoDS_Wire & W,
@@ -821,9 +821,9 @@ void BRepFill::SearchOrigin(TopoDS_Wire & W,
// Class BRep_Tool without fields and without Constructor :
// BRep_Tool BT;
W.Orientation(TopAbs_FORWARD); //pour ne pas composer les orientations
W.Orientation(TopAbs_FORWARD); //to avoid composing the orientations
// Calcul la distance
// Calculate the distance
B.MakeVertex(V, P, Tol);
BRepExtrema_DistShapeShape DSS(V, W);
if (DSS.IsDone()) {
@@ -870,14 +870,14 @@ void BRepFill::SearchOrigin(TopoDS_Wire & W,
Standard_Boolean forward;
BRepTools_WireExplorer exp;
// Calcul le nombre d'edges
// Calculate the number of edges
for(exp.Init(W); exp.More(); exp.Next()) NbEdges++;
if (NewVertex) {
NbEdges++;
Eref = E;
}
// Construit la Table et calcul rangdeb
// Construct the Table and calculate rangdeb
TopTools_Array1OfShape Edges(1, NbEdges);
for(exp.Init(W), ii=1; exp.More(); exp.Next(), ii++) {
E = exp.Current();
@@ -898,7 +898,7 @@ void BRepFill::SearchOrigin(TopoDS_Wire & W,
}
if (rangdeb == 0) rangdeb = NbEdges;
// Calcul du sens de parcourt
// Calculate the direction of parsing
E = TopoDS::Edge(Edges(rangdeb));
if (!NewVertex) {
// theparam = BT.Parameter(V, E);
@@ -930,11 +930,11 @@ void BRepFill::SearchOrigin(TopoDS_Wire & W,
void BRepFill::ComputeACR(const TopoDS_Wire& wire,
TColStd_Array1OfReal& ACR)
{
// calcul des abscisses curvilignes reduites et de la longueur du wire
// calculate the reduced curvilinear abscisses and the length of the wire
BRepTools_WireExplorer anExp;
Standard_Integer nbEdges=0, i;
// longueurs cumulees
// cumulated lengths
ACR.Init(0);
for(anExp.Init(wire); anExp.More(); anExp.Next()) {
nbEdges++;
@@ -946,17 +946,17 @@ void BRepFill::ComputeACR(const TopoDS_Wire& wire,
}
}
// longueur totale du wire
// total length of the wire
ACR(0) = ACR(nbEdges);
// abscisses curvilignes reduites
// reduced curvilinear abscisses
if (ACR(0)>Precision::Confusion()) {
for (i=1; i<=nbEdges; i++) {
ACR(i) /= ACR(0);
}
}
else {
// wire ponctuel
// punctual wire
ACR(nbEdges) = 1;
}
@@ -971,7 +971,7 @@ TopoDS_Wire BRepFill::InsertACR(const TopoDS_Wire& wire,
const TColStd_Array1OfReal& ACRcuts,
const Standard_Real prec)
{
// calcul des ACR du wire a decouper
// calculate ACR of the wire to be cut
BRepTools_WireExplorer anExp;
Standard_Integer nbEdges=0;
for(anExp.Init(wire); anExp.More(); anExp.Next()) {
@@ -987,13 +987,13 @@ TopoDS_Wire BRepFill::InsertACR(const TopoDS_Wire& wire,
Standard_Real t0,t1=0;
nbEdges=0;
// traitement edge par edge
// processing edge by edge
for(anExp.Init(wire); anExp.More(); anExp.Next()) {
nbEdges++;
t0 = t1;
t1 = ACRwire(nbEdges);
// parametres de decoupe sur cette edge
// parameters of cut on this edge
Standard_Integer ndec=0;
for (i=1; i<=ACRcuts.Length(); i++ ) {
if (t0+prec<ACRcuts(i) && ACRcuts(i)<t1-prec) {
@@ -1006,19 +1006,19 @@ TopoDS_Wire BRepFill::InsertACR(const TopoDS_Wire& wire,
TopoDS_Vertex V = anExp.CurrentVertex();
if (ndec==0 || BRep_Tool::Degenerated(E)) {
// on copie l'edge
// copy the edge
MW.Add(E);
}
else {
// il faut couper l'edge
// en respectant le sens de parcours du wire
// it is necessary to cut the edge
// following the direction of parsing of the wire
Standard_Boolean SO = (V.IsSame(TopExp::FirstVertex(E)));
TopTools_SequenceOfShape SE;
SE.Clear();
TColStd_SequenceOfReal SR;
SR.Clear();
// le wire est toujours FORWARD
// il faut modifier le parametre de decoupe si l'edge est REVERSED
// the wire is always FORWARD
// it is necesary to modify the parameter of cut6 if the edge is REVERSED
if (E.Orientation() == TopAbs_FORWARD) {
for (j=1; j<=ndec; j++) SR.Append(paradec(j));
}
@@ -1032,7 +1032,7 @@ TopoDS_Wire BRepFill::InsertACR(const TopoDS_Wire& wire,
}
}
// resultat
// result
TopAbs_Orientation Orien = wire.Orientation();
TopoDS_Shape aLocalShape = MW.Wire();
aLocalShape.Orientation(Orien);

View File

@@ -7,10 +7,9 @@
class ACRLaw from BRepFill inherits LocationLaw from BRepFill
---Purpose: Build Location Law, with a Wire. dans le cas du
-- contour guide et triedre par Abscisse Curviligne
-- Reduite
--
---Purpose: Build Location Law, with a Wire. In the case
-- of guided contour and trihedron by reduced
-- curvilinear abscissa

View File

@@ -27,12 +27,12 @@ BRepFill_ACRLaw::BRepFill_ACRLaw(const TopoDS_Wire& Path,
{
Init(Path);
// calcul du nb d'edge du path
// calculate the nb of edge of the path
BRepTools_WireExplorer wexp;
Standard_Integer NbEdge = 0;
for (wexp.Init(myPath); wexp.More(); wexp.Next()) NbEdge++;
// tab pour memoriser les ACR pour chaque edge
// tab to memorize ACR for each edge
OrigParam = new (TColStd_HArray1OfReal)(0,NbEdge);
TColStd_Array1OfReal Orig (0,NbEdge);
BRepFill::ComputeACR(Path, Orig);
@@ -46,12 +46,12 @@ BRepFill_ACRLaw::BRepFill_ACRLaw(const TopoDS_Wire& Path,
Handle(GeomAdaptor_HCurve) AC;
Standard_Real First, Last;
// on recupere les ACR des edges de la trajectoire
// return ACR of edges of the trajectory
OrigParam->SetValue(0,0);
for (ipath=1;ipath<=NbEdge;ipath++)
OrigParam->SetValue(ipath, Orig(ipath));
// on traite chaque edge de la trajectoire
// process each edge of the trajectory
for (ipath=0, wexp.Init(myPath);
wexp.More(); wexp.Next()) {
E = wexp.Current();
@@ -64,14 +64,14 @@ BRepFill_ACRLaw::BRepFill_ACRLaw(const TopoDS_Wire& Path,
if (Or == TopAbs_REVERSED) {
Handle(Geom_TrimmedCurve) CBis =
new (Geom_TrimmedCurve) (C, First, Last);
CBis->Reverse(); // Pour eviter de deteriorer la topologie
CBis->Reverse(); // To avoid damaging the topology
C = CBis;
First = C->FirstParameter();
Last = C->LastParameter();
}
AC = new (GeomAdaptor_HCurve) (C, First, Last);
// on Set les parametres pour le cas multi-edges
// Set the parameters for the case multi-edges
Standard_Real t1 = OrigParam->Value(ipath-1);
Standard_Real t2 = OrigParam->Value(ipath);
Handle(GeomFill_LocationGuide) Loc;

View File

@@ -87,7 +87,7 @@ static void ComputeTrsf(const TopoDS_Wire& W,
Bnd_Box& Box,
gp_Trsf& Tf)
{
// Calcul d'un barycentre approximatif
// Calculate approximate barycenter
BRepTools_WireExplorer Exp(W);
// Class BRep_Tool without fields and without Constructor :
// BRep_Tool BT;
@@ -101,19 +101,19 @@ static void ComputeTrsf(const TopoDS_Wire& W,
}
Bary /= nb;
// Calcul la Transfo
// Calculate the Transformation
gp_Ax3 N(Bary, D);
Tf.SetTransformation(N);
BRepAdaptor_Curve AC;
// BndLib_Add3dCurve BC;
// transfo du wire
// transformation to the wire
TopoDS_Wire TheW = W;
TopLoc_Location Loc(Tf);
TheW.Location(Loc);
// Calcul la boite
// Calculate the box
Box.SetVoid();
for (Exp.Init(TheW); Exp.More(); Exp.Next()) {
AC.Initialize(Exp.Current());
@@ -123,7 +123,7 @@ static void ComputeTrsf(const TopoDS_Wire& W,
}
//=======================================================================
//function : Longueur
//function : Length
//purpose :
//======================================================================
static Standard_Real Longueur(const Bnd_Box& WBox,
@@ -131,11 +131,11 @@ static Standard_Real Longueur(const Bnd_Box& WBox,
gp_Dir& D,
gp_Pnt& P)
{
// face de la boite la plus eloignee de la face entree dans
//la direction de depouille
// face of the box most remoted from the face input in
// the direction of skin
Standard_Real Xmin,Ymin,Zmin,Xmax,Ymax,Zmax,WZmin,WZmax,L;
//"coord" de la boite
//"coord" of the box
WBox.Get(Xmin,Ymin,Zmin,Xmax,Ymax,Zmax);
WZmin = Zmin;
WZmax = Zmax;
@@ -144,7 +144,7 @@ static Standard_Real Longueur(const Bnd_Box& WBox,
P.SetCoord( (Xmin+Xmax)/2, (Ymin+Ymax)/2, Zmax);
if (Zmax < WZmin) {
// Depouille dans le mauvais sens. On inverse...
// Skin in the wrong direction. Invert...
D.Reverse();
L = WZmax - Zmin;
P.SetZ(Zmin);
@@ -157,8 +157,7 @@ static Standard_Real Longueur(const Bnd_Box& WBox,
//=======================================================================
//function : GoodOrientation
//purpose : Regarde si la loi est oriente de maniere a avoir une depouille
// "exterieur"
//purpose : Check if the law is oriented to have an exterior skin
//======================================================================
static Standard_Boolean GoodOrientation(const Bnd_Box& B,
const Handle(BRepFill_LocationLaw)& Law,
@@ -182,7 +181,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
//#endif
r = l/Nb;
Nb++; // Nombre de points
Nb++; // Number of points
TColgp_Array1OfPnt Pnts(1, Nb);
Handle(Adaptor3d_HCurve) AC;
@@ -266,7 +265,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
}
else {
#if DEB
cout << "Pas de Bords Libre !" << endl;
cout << "No Free Borders !" << endl;
#endif
Standard_ConstructionError::Raise("BRepFill_Draft");
}
@@ -276,7 +275,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
Standard_ConstructionError::Raise("BRepFill_Draft");
}
// Attention aux wire closed non declare !
// Attention to closed non declared wires !
if (!myWire.Closed()) {
TopoDS_Vertex Vf, Vl;
TopExp::Vertices(myWire, Vf, Vl);
@@ -300,7 +299,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
//=======================================================================
//function :SetOptions
//purpose : Definit le style
//purpose : Defines the style
//======================================================================
void BRepFill_Draft::SetOptions(const BRepFill_TransitionStyle Style,
const Standard_Real Min,
@@ -323,7 +322,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
//=======================================================================
//function :Perform
//purpose : calcul d'une surface de depouille
//purpose : calculate a surface of skinning
//======================================================================
void BRepFill_Draft::Perform(const Standard_Real LengthMax)
{
@@ -341,7 +340,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
//=======================================================================
//function :Perform
//purpose : calcul d'une surface de depouille
//purpose : calculate a surface of skinning
//======================================================================
void BRepFill_Draft::Perform(const Handle(Geom_Surface)& Surface,
const Standard_Boolean KeepInsideSurface)
@@ -353,7 +352,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
ComputeTrsf(myWire, myDir, WBox, Trsf);
// boite englobant la surface d'arret
// box with bounds of the stop surface
Handle(Geom_Surface) Surf;
Surf = Handle(Geom_Surface)::DownCast(Surface->Transformed(Trsf));
GeomAdaptor_Surface S1 (Surf);
@@ -361,20 +360,20 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
// AS.Add(S1, 0.1, SBox);
BndLib_AddSurface::Add(S1, 0.1, SBox);
// on calcule la longueur maximum de la regle.
// calculate the maximum length of the rule.
L = Longueur(WBox, SBox, myDir, Pt);
L /= Abs(Cos(myAngle));
// Constructuion
// Construction
Init(Surface, L, WBox);
BuildShell(Surface, !KeepInsideSurface);
Sewing();
}
//=======================================================================
//================================================================
//function :Perform
//purpose : calcul de la surface de depouille, arretee par une shape
//======================================================================
//purpose : calculate the surface of skinning, stopped by a shape
//================================================================
void BRepFill_Draft::Perform(const TopoDS_Shape& StopShape,
const Standard_Boolean KeepOutSide)
{
@@ -385,7 +384,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
ComputeTrsf(myWire, myDir, WBox, Trsf);
// boite englobant la shape d'arret
// bounding box of the stop shape
Bnd_Box BSurf;//, TheBox;
Standard_Real Umin, Umax, Vmin, Vmax;
#ifdef DEB
@@ -400,28 +399,28 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
TopExp_Explorer Ex (StopShape, TopAbs_FACE);
SBox.SetVoid();
while (Ex.More()) { // on parcourt les faces de la shape d'arret
while (Ex.More()) { // parse faces of the stop shape
// B.UVBounds(TopoDS::Face(Ex.Current()), Umin,Umax,Vmin,Vmax);
BRepTools::UVBounds(TopoDS::Face(Ex.Current()), Umin,Umax,Vmin,Vmax);
Surf = Handle(Geom_Surface)::DownCast(
// BT.Surface(TopoDS::Face(Ex.Current()))->Transformed(Trsf) );
BRep_Tool::Surface(TopoDS::Face(Ex.Current()))->Transformed(Trsf) );
GeomAdaptor_Surface S1 (Surf);
// boite englobant la face courante
// bounding box of the current face
// AS.Add(S1, Umin, Umax, Vmin, Vmax, 0.1, BSurf);
BndLib_AddSurface::Add(S1, Umin, Umax, Vmin, Vmax, 0.1, BSurf);
SBox.Add(BSurf); // on regroupe les boites
SBox.Add(BSurf); // group boxes
Ex.Next();
}// while_Ex
// on calcule la longueur maximum de la regle.
// calculate the maximum length of the rule.
L = Longueur(WBox, SBox, myDir, Pt);
L /= Abs(Cos(myAngle));
// surface d'arret
// surface of stop
gp_Trsf Inv;
Inv = Trsf.Inverted(); // transfo inverse
Pt.Transform(Inv); // coord dans le repere absolu
Inv = Trsf.Inverted(); // inverted transformation
Pt.Transform(Inv); // coordinate in the absolute reference
Handle(Geom_Plane) Plan = new (Geom_Plane)(Pt, myDir);
Surf = new (Geom_RectangularTrimmedSurface) (Plan,-L, L, -L, L);
@@ -433,7 +432,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
}
#endif
// Balayage et restriction
// Sweeping and restriction
Init(Plan, L*1.01, WBox);
BuildShell(Surf, Standard_False);
Fuse(StopShape, KeepOutSide);
@@ -442,7 +441,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
//=======================================================================
//function : Init
//purpose : Construction des lois.
//purpose : Construction of laws.
//======================================================================
void BRepFill_Draft::Init(const Handle(Geom_Surface)& ,
const Standard_Real Length,
@@ -450,7 +449,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
{
Standard_Boolean B;
// loi de positionnement
// law of positioning
Handle(GeomFill_LocationDraft) Loc
= new (GeomFill_LocationDraft) (myDir, myAngle);
myLoc = new (BRepFill_DraftLaw) (myWire, Loc);
@@ -463,14 +462,14 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
myLoc = new (BRepFill_DraftLaw) (myWire, Loc);
}
myLoc->CleanLaw(angmin); // Nettoie les petites discontinuites.
myLoc->CleanLaw(angmin); // Clean small discontinuities.
// loi de section
// generatrice est une droite // a la binormal.
// law of section
// generating line is straight and parallel to binormal.
gp_Pnt P(0, 0, 0);
gp_Vec D (0., 1., 0.);
// Controle de l'orientation
// Control of the orientation
Standard_Real f,l;
myLoc->Law(1)->GetDomain(f,l);
gp_Mat M;
@@ -504,12 +503,12 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
//=======================================================================
//function : BuildShell
//purpose : Construction de la surface de depouille
//purpose : Construction of the skinning surface
//======================================================================
void BRepFill_Draft::BuildShell(const Handle(Geom_Surface)& Surf,
const Standard_Boolean KeepOutSide)
{
// construction de la surface
// construction of the surface
BRepFill_Sweep Sweep(mySec, myLoc, Standard_True);
Sweep.SetTolerance(myTol);
Sweep.SetAngularControl(angmin, angmax);
@@ -520,7 +519,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
myFaces = Sweep.SubShape();
mySections = Sweep.Sections();
myDone = Standard_True;
// Controle de l'orientation
// Control of the orientation
Standard_Boolean out=Standard_True;
TopExp_Explorer ex(myShell,TopAbs_FACE);
TopoDS_Face F;
@@ -547,10 +546,10 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
return;
}
if (!Surf.IsNull()) { // On ajoute la face en bout
if (!Surf.IsNull()) { // Add the face at end
// En attendant une utilisation des traces & retriction dans BRepFill_Sweep
// On fait un Fuse.
// Waiting the use of traces & retriction in BRepFill_Sweep
// Make Fuse.
BRepLib_MakeFace MkF;
MkF.Init(Surf, Standard_True, Precision::Confusion());
Fuse(MkF.Face(), KeepOutSide);
@@ -560,8 +559,8 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
//=======================================================================
//function : Fuse
//purpose : Operation booleenne entre la depouille et
// la shape d'arret
//purpose : Boolean operation between the skin and the
// stop shape
//======================================================================
Standard_Boolean BRepFill_Draft::Fuse(const TopoDS_Shape& StopShape,
const Standard_Boolean KeepOutSide)
@@ -578,7 +577,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
}
else {
B.MakeSolid(Sol1);
B.Add(Sol1, myShape); // shell => solid (pour fusion)
B.Add(Sol1, myShape); // shell => solid (for fusion)
}
@@ -596,7 +595,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
case TopAbs_SHELL :
{
B.MakeSolid(Sol2);
B.Add(Sol2, StopShape); // shell => solid (pour fusion)
B.Add(Sol2, StopShape); // shell => solid (for fusion)
break;
}
@@ -606,32 +605,32 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
B.MakeShell(S);
B.Add(S, StopShape);
B.MakeSolid(Sol2);
B.Add(Sol2, S); // shell => solid (pour fusion)
B.Add(Sol2, S); // shell => solid (for fusion)
break;
}
default :
{
return Standard_False; // On ne sait pas faire
return Standard_False; // Impossible to do
}
}
BRepAlgo_DSAccess DSA;
DSA.Load(Sol1, Sol2);
DSA.Intersect(Sol1, Sol2); // intersection des 2 solids
DSA.Intersect(Sol1, Sol2); // intersection of 2 solids
// suppression des aretes correspondant aux intersections "inutiles"
// removal of edges corresponding to "unused" intersections
Standard_Integer NbPaquet;
// gp_Pnt P1,P2;
TopoDS_Vertex V,V1;
TopTools_ListOfShape List;
List = DSA.GetSectionEdgeSet();// liste des aretes
List = DSA.GetSectionEdgeSet();// list of edges
NbPaquet = List.Extent();
if (NbPaquet == 0) {
#if DRAW
cout << "Pas de fusion" << endl;
cout << "No fusion" << endl;
DBRep::Set("DepPart", Sol1);
DBRep::Set("StopPart", Sol2);
#endif
@@ -639,13 +638,13 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
}
if (NbPaquet > 1) {
// Il faut selectioner les paquets.
// It is required to select packs.
TColStd_Array1OfReal Dist(1, NbPaquet);
TopTools_ListIteratorOfListOfShape it(List);
Standard_Real D, Dmin = 1.e10;
Standard_Integer ii;
//On classe les paquets par eloignement.
//Classify the packs by distance.
BRepExtrema_DistShapeShape Dist2;
Dist2.LoadS1( myWire );
for (ii=1; it.More();it.Next(),ii++){
@@ -660,7 +659,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
Dist(ii) = 1.e10;
}
// on supprime les edges "plus loin" que Dmin
// remove edges "farther" than Dmin
for (ii=1, it.Initialize(List); it.More();it.Next(), ii++){
if (Dist(ii) > Dmin) {
DSA.SuppressEdgeSet(it.Value());
@@ -674,15 +673,15 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
}
if (StopShape.ShapeType() != TopAbs_SOLID) {
// Il faut choisir le state par la geometrie
// It is required to choose the state by the geometry
//(1) On recupere une edge de section
List = DSA.GetSectionEdgeSet();// liste des aretes
//(1) Return an edge of section
List = DSA.GetSectionEdgeSet();// list of edges
TopTools_ListIteratorOfListOfShape it(List);
TopoDS_Iterator iter(it.Value());
TopoDS_Edge E = TopoDS::Edge(iter.Value());
// (2) On recupere sa geometrie sur StopShape
//(2) Return geometry on StopShape
// Class BRep_Tool without fields and without Constructor :
// BRep_Tool BT;
Handle(Geom_Surface) S;
@@ -693,7 +692,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
// BT.CurveOnSurface(E, C2d, S, L, f, l, 2);
BRep_Tool::CurveOnSurface(E, C2d, S, L, f, l, 2);
// On Trouve une normale.
// Find a normal.
C2d->D0((f+l)/2,P2d);
GeomLProp_SLProps SP(S, P2d.X(), P2d.Y(), 1, 1.e-12);
if (! SP.IsNormalDefined()) {
@@ -705,17 +704,17 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
}
}
// On en deduit State1
// Subtract State1
if (myDir.Angle(SP.Normal()) < PI/2) State1 = TopAbs_IN;
else State1 = TopAbs_OUT;
}
if (! KeepOutSide) { // On inverse State2;
if (! KeepOutSide) { // Invert State2;
if (State2 == TopAbs_IN) State2 = TopAbs_OUT;
else State2 = TopAbs_IN;
}
//recalcul de la shape finale
//recalculate the final shape
TopoDS_Shape result = DSA.Merge(State1, State2);
if (issolid) myShape = result;
@@ -725,7 +724,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
if (Exp.More()) myShape = Exp.Current();
}
// Mise a jour de l'Historique
// Update the History
Standard_Integer ii;
for (ii=1; ii<=myLoc->NbLaw(); ii++) {
const TopTools_ListOfShape& L = DSA.Modified(myFaces->Value(1,ii));
@@ -743,7 +742,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
//=======================================================================
//function : Sewing
//purpose : Assemble la depouille avec la face du dessus
//purpose : Assemble the skin with the above face
//======================================================================
Standard_Boolean BRepFill_Draft::Sewing()
{
@@ -753,8 +752,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
if ((!ToAss) || (!myDone)) return Standard_False;
// Assemblage
// on fait un shell a partir des faces de la shape + la shape en entree
// Assembly make a shell from the faces of the shape + the input shape
Handle(BRepBuilderAPI_Sewing) Ass = new BRepBuilderAPI_Sewing(5*myTol, Standard_True,
Standard_True, Standard_False);
Ass->Add(myShape);
@@ -765,7 +763,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
Standard_Integer NbCE;
Ass->Perform();
// On verifie que l'assemblage est effectif.
// Check if the assembly is real.
NbCE = Ass->NbContigousEdges();
if (NbCE > 0) {
@@ -780,7 +778,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
TopoDS_Iterator It(res);
res = It.Value();
It.Next();
if (!It.More()) {//Une seule partie => c'est bon
if (!It.More()) {//Only one part => this is correct
myShape = res;
Ok = Standard_True;
}
@@ -788,7 +786,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
}
if (Ok) {
// Mise a jour de l'Historique
// Update the History
Standard_Integer ii;
for (ii=1; ii<=myLoc->NbLaw(); ii++) {
if (Ass->IsModified(myFaces->Value(1,ii)))
@@ -801,7 +799,7 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
Ass->Modified(mySections->Value(1,ii)));
}
if (myShape.Closed()) { // On fait un Solid
if (myShape.Closed()) { // Make a Solid
TopoDS_Solid solid;
BRep_Builder BS;
BS.MakeSolid(solid);
@@ -818,14 +816,14 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
}
}
#if DEB
else cout << "Draft : Pas d'assemblage !" << endl;
else cout << "Draft : No assembly !" << endl;
#endif
return Ok;
}
//=======================================================================
//function : Generated
//purpose : retourne une sous partie partie generes par balayage
//purpose : return a sub-part generated by sweeping
//======================================================================
const TopTools_ListOfShape&
BRepFill_Draft::Generated(const TopoDS_Shape& S)
@@ -854,17 +852,17 @@ static Standard_Boolean GoodOrientation(const Bnd_Box& B,
//=======================================================================
//function : Shape
//purpose : retourne la shape complete
//purpose : return the complete shape
//======================================================================
TopoDS_Shape BRepFill_Draft::Shape()const
{
return myShape;
}
//=======================================================================
//=====================================================================
//function : Shell
//purpose : surface de depouille avec la face entree (=>shell)
//======================================================================
//purpose : surface of skinning with the input face (=>shell)
//=====================================================================
TopoDS_Shell BRepFill_Draft::Shell()const
{
return myShell;

View File

@@ -65,7 +65,7 @@ BRepFill_EdgeOnSurfLaw::BRepFill_EdgeOnSurfLaw(const TopoDS_Wire& Path,
AS = new (BRepAdaptor_HSurface) (F);
}
}
if (!Trouve) { // Impossible de construire la loi.
if (!Trouve) { // Impossible to construct the law.
hasresult = Standard_False;
myLaws.Nullify();
return;
@@ -75,7 +75,7 @@ BRepFill_EdgeOnSurfLaw::BRepFill_EdgeOnSurfLaw(const TopoDS_Wire& Path,
if (Or == TopAbs_REVERSED) {
Handle(Geom2d_TrimmedCurve) CBis =
new (Geom2d_TrimmedCurve) (C, First, Last);
CBis->Reverse(); // Pour eviter de deteriorer la topologie
CBis->Reverse(); // To avoid spoiling the topology
C = CBis;
First = C->FirstParameter();
Last = C->LastParameter();

View File

@@ -7,7 +7,7 @@
class Evolved from BRepFill
---Purpose: Constructs a evolved volume from a spine (wire or face)
---Purpose: Constructs an evolved volume from a spine (wire or face)
-- and a profile ( wire).
uses
@@ -45,10 +45,10 @@ is
returns Evolved from BRepFill
---Purpose: Creates an evolved shape by sweeping the <Profile>
-- along the <Spine>. <AxeProf> is used to set the
-- position of <Profile> along <Spine> as follow:
-- l <AxeProf> glisse sur le profil avec sa
-- direction colineaire a la normale au <Spine>, et sa
-- <XDirection> confondue avec la tangente au <Spine>.
-- position of <Profile> along <Spine> as follows:
-- <AxeProf> slides on the profile with direction
-- colinear to the normal to <Spine>, and its
-- <XDirection> mixed with the tangent to <Spine>.
--
raises
ConstructionError from Standard;

File diff suppressed because it is too large Load Diff

View File

@@ -2,33 +2,6 @@
// Created: Mon Mar 7 10:01:42 1994
// Author: Bruno DUMORTIER
// <dub@fuegox>
// Modified: Mon Feb 23 09:28:46 1998
// Author: Joelle CHAUVET
// <jct@sgi64>
// traitement des wires ponctuels
// Modified: Tue Mar 10 17:08:58 1998
// Author: Joelle CHAUVET
// <jct@sgi64>
// suite traitement des KPart, calcul d'une BezierCurve
// au lieu d'une extraction d'iso pour Edge3 et Edge4
// Modified: Mon Apr 6 15:47:44 1998
// Author: Joelle CHAUVET
// <jct@sgi64>
// correction KPart (PRO12929)
// Modified: Thu Apr 30 15:24:17 1998
// Author: Joelle CHAUVET
// <jct@sgi64>
// debug KPart
// Modified: Fri Jul 31 15:14:19 1998
// Author: Joelle CHAUVET
// <jct@sgi64>
// KPart semi-cone pointe en bas : calcul de Edge4
//
// ajout des methodes Generated et GeneratedShapes
// Modified: Mon Nov 23 12:22:04 1998
// Author: Joelle CHAUVET
// <jct@sgi64>
// CTS21701 : orientation de l'edge dans DetectKPart
#include <BRepFill_Generator.ixx>
@@ -88,10 +61,10 @@
Standard_Integer DetectKPart(const TopoDS_Edge& Edge1,
const TopoDS_Edge& Edge2)
{
// initialisations
// initializations
Standard_Integer IType = 0;
// caracteristiques de la premiere edge
// characteristics of the first edge
Standard_Real first1, last1, first2, last2, ff, ll;
TopLoc_Location loc;
TopoDS_Vertex V1, V2;
@@ -99,7 +72,7 @@ Standard_Integer DetectKPart(const TopoDS_Edge& Edge1,
GeomAdaptor_Curve AdC1;
Standard_Boolean degen1 = BRep_Tool::Degenerated(Edge1);
// recherche de cas particulier
// find the particular case
gp_Pnt pos1, pos;
Standard_Real dist;
#ifndef DEB
@@ -127,14 +100,14 @@ Standard_Integer DetectKPart(const TopoDS_Edge& Edge1,
}
AdC1.Load(curv1);
if (AdC1.GetType() == GeomAbs_Circle) {
// premiere section circulaire
// first circular section
IType = 1;
pos1 = AdC1.Circle().Location();
dist1 = AdC1.Circle().Radius();
axe1 = AdC1.Circle().Axis();
}
else if (AdC1.GetType() == GeomAbs_Line) {
// premiere section rectiligne
// first straight line section
IType = 4;
pos1 = AdC1.Line().Location();
dist1 = AdC1.Value(first1).Distance(AdC1.Value(last1));
@@ -143,7 +116,7 @@ Standard_Integer DetectKPart(const TopoDS_Edge& Edge1,
axe1 = gp_Ax1(AdC1.Value(first1),dir);
}
else {
// premiere section quelconque
// first section of any type
IType = 0;
}
}
@@ -155,9 +128,9 @@ Standard_Integer DetectKPart(const TopoDS_Edge& Edge1,
TopExp::Vertices(Edge2,V1,V2);
pos = BRep_Tool::Pnt(V1);
if (IType==1) {
// seul cas particulier avec une edge degeneree en bout : le cone
// the only particular case with degenerated edge at end : the cone
if (pos.IsEqual(pos1,Precision::Confusion())) {
// le sommet est confondu avec le centre du cercle
// the top is mixed with the center of the circle
IType = 0;
}
else {
@@ -165,17 +138,17 @@ Standard_Integer DetectKPart(const TopoDS_Edge& Edge1,
gp_Dir dir(vec);
axe = gp_Ax1(pos1,dir);
if (axe.IsParallel(axe1,Precision::Angular())) {
// le sommet est bien sur l'axe du cercle
// the top is on the axis of the circle
IType = 2;
}
else {
// sommet incorrect --> pas de cas particulier
// incorrect top --> no particular case
IType = 0;
}
}
}
else if (IType != 4) { //not plane
// pas de cas particulier
else if (IType != 4) { //not a plane
// no particular case
IType = 0;
}
}
@@ -194,15 +167,15 @@ Standard_Integer DetectKPart(const TopoDS_Edge& Edge1,
if (IType>0 && IType<4) {
if (AdC.GetType() != GeomAbs_Circle) {
// section non circulaire --> pas de cas particulier
// section not circular --> no particular case
IType = 0;
}
else {
if (AdC.Circle().Axis()
.IsCoaxial(axe1,Precision::Angular(),Precision::Confusion())) {
// meme axe
// same axis
if (Abs(AdC.Circle().Radius()-dist1)< Precision::Confusion()) {
// possibilite de cylindre ou de morceau de cylindre
// possibility of cylinder or a piece of cylinder
Standard_Real h1 = Abs(last1-first1), h2 = Abs(last2-first2);
Standard_Boolean Same,
SameParametricLength = ( Abs(h1-h2) < Precision::PConfusion() );
@@ -214,16 +187,16 @@ Standard_Integer DetectKPart(const TopoDS_Edge& Edge1,
Same = SameParametricLength
&& ( gp_Vec(P1,P2).IsNormal(DU,Precision::Angular()) ) ;
if (Same) {
// cylindre ou morceau de cylindre
// cylinder or piece of cylinder
IType = 1;
}
else {
// l'intervalle de definition n'est pas correct
// the interval of definition is not correct
IType = 0;
}
}
else {
// possibilite de tronc de cone
// possibility of cone truncation
Standard_Real h1 = Abs(last1-first1), h2 = Abs(last2-first2);
Standard_Boolean Same,
SameParametricLength = ( Abs(h1-h2) < Precision::PConfusion() );
@@ -235,27 +208,27 @@ Standard_Integer DetectKPart(const TopoDS_Edge& Edge1,
Same = SameParametricLength
&& ( gp_Vec(P1,P2).IsNormal(DU,Precision::Angular()) ) ;
if (Same) {
// tronc de cone
// truncation of cone
IType = 2;
}
else {
// l'intervalle de definition n'est pas correct
// the interval of definition is not correct
IType = 0;
}
}
if (AdC.Circle().Location().IsEqual(pos1,Precision::Confusion())) {
// les centres sont confondus
// the centers are mixed
IType = 0;
}
}
else {
// axe different
// different axis
if (AdC.Circle().Radius()==dist1) {
// tore ?
// torus ?
IType = 3;
}
else {
// rayon different --> pas de cas particulier
// different radius --> no particular case
IType = 0;
}
}
@@ -263,7 +236,7 @@ Standard_Integer DetectKPart(const TopoDS_Edge& Edge1,
}
else if (IType>=4) {
if (AdC.GetType() != GeomAbs_Line) {
// section non rectiligne --> pas de cas particulier
// not a straight line section --> no particular case
IType = 0;
}
else {
@@ -273,11 +246,11 @@ Standard_Integer DetectKPart(const TopoDS_Edge& Edge1,
gp_Dir dir(vec);
axe = gp_Ax1(AdC.Value(first2),dir);
if (axe.IsParallel(axe1,Precision::Angular())) {
// droite parallele
// parallel straight line
if (Abs(dist-dist1)<Precision::Confusion()) {
gp_Dir dir(gp_Vec(AdC1.Value(first1),AdC.Value(first2)));
if (dir.IsNormal(gp_Dir(vec),Precision::Angular())) {
// plan
// plane
IType = 4;
}
else {
@@ -286,12 +259,12 @@ Standard_Integer DetectKPart(const TopoDS_Edge& Edge1,
}
}
else {
// longueur differente --> pas de cas particulier
// different length --> no particular case
IType = 0;
}
}
else {
// droite non parallele --> pas de cas particulier
// not parallel straight line --> no particular case
IType = 0;
}
}
@@ -301,11 +274,11 @@ Standard_Integer DetectKPart(const TopoDS_Edge& Edge1,
IType = 4; //plane
else if (AdC.GetType() == GeomAbs_Circle)
{
// seul cas particulier avec une edge degeneree au debut : le cone
// the only particular case with degenerated edge at the beginning the cone
pos = AdC.Circle().Location();
axe = AdC.Circle().Axis();
if (pos1.IsEqual(pos,Precision::Confusion())) {
// le sommet est confondu avec le centre du cercle
// the top is mixed with the center of the circle
IType = 0;
}
else {
@@ -313,11 +286,11 @@ Standard_Integer DetectKPart(const TopoDS_Edge& Edge1,
gp_Dir dir(vec);
axe1 = gp_Ax1(pos1,dir);
if (axe.IsParallel(axe1,Precision::Angular())) {
// le sommet est bien sur l'axe du cercle
// the top is on the axis of the circle
IType = -2;
}
else {
// sommet incorrect --> pas de cas particulier
// incorrect top --> no particular case
IType = 0;
}
}
@@ -328,7 +301,7 @@ Standard_Integer DetectKPart(const TopoDS_Edge& Edge1,
}
}
// tore et extrusion ne sont pas des cas part.
// torus and extrusion are not particular cases.
if (IType == 3 || IType == 5) IType = 0;
return IType;
}
@@ -354,7 +327,7 @@ void CreateKPart(const TopoDS_Edge& Edge1,const TopoDS_Edge& Edge2,
Handle(Geom_Curve) C1;
Standard_Boolean degen1 = BRep_Tool::Degenerated(Edge1);
if(degen1) {
// cone avec arete degeneree au sommet
// cone with degenerated edge at the top
TopExp::Vertices(Edge1,v1f,v1l);
}
else {
@@ -377,7 +350,7 @@ void CreateKPart(const TopoDS_Edge& Edge1,const TopoDS_Edge& Edge2,
Handle(Geom_Curve) C2;
Standard_Boolean degen2 = BRep_Tool::Degenerated(Edge2);
if(degen2) {
// cone avec arete degeneree au sommet
// cone with degenerated edge at the top
TopExp::Vertices(Edge2,v2f,v2l);
}
else {
@@ -419,7 +392,7 @@ void CreateKPart(const TopoDS_Edge& Edge1,const TopoDS_Edge& Edge2,
Handle(Geom_Surface) surface;
Standard_Real V, Rad;
if (IType==1) {
// surface cylindrique
// cylindrical surface
gp_Circ c1 = (Handle(Geom_Circle)::DownCast(C1))->Circ();
gp_Circ c2 = (Handle(Geom_Circle)::DownCast(C2))->Circ();
gp_Ax3 Ac1 = c1.Position();
@@ -434,7 +407,7 @@ void CreateKPart(const TopoDS_Edge& Edge1,const TopoDS_Edge& Edge2,
( Cyl, aa, bb, Min(0.,V), Max(0.,V) );
}
else if (IType==2) {
// surface conique
// conical surface
gp_Circ k1 = (Handle(Geom_Circle)::DownCast(C1))->Circ();
gp_Ax3 Ak1 = k1.Position();
if (degen2) {
@@ -460,7 +433,7 @@ void CreateKPart(const TopoDS_Edge& Edge1,const TopoDS_Edge& Edge2,
( Cone, aa, bb, Min(0.,V), Max(0.,V) );
}
else if (IType==-2) {
// surface conique avec le sommet au debut (degen1 est vrai)
// conical surface with the top at the beginning (degen1 is true)
gp_Circ k2 = (Handle(Geom_Circle)::DownCast(C2))->Circ();
gp_Ax3 Ak2 = k2.Position();
Ak2.SetLocation(BRep_Tool::Pnt(v1f));
@@ -479,7 +452,7 @@ void CreateKPart(const TopoDS_Edge& Edge1,const TopoDS_Edge& Edge2,
( Cone, aa, bb, Min(0.,V), Max(0.,V) );
}
else if (IType==3) {
// surface torique ?
// torus surface ?
}
else if (IType==4) {
// surface plane
@@ -508,7 +481,7 @@ void CreateKPart(const TopoDS_Edge& Edge1,const TopoDS_Edge& Edge2,
//( Plan, aa, bb, Min(0.,V), Max(0.,V) );
}
else if (IType==5) {
// surface d'extrusion ?
// surface of extrusion ?
}
else {
// IType incorrect
@@ -638,12 +611,12 @@ void BRepFill_Generator::Perform()
Standard_Boolean Periodic
= (Edge1.Closed() || degen1) && (Edge2.Closed() || degen2);
// ATTENTION : un wire non ponctuel ne doit pas
// contenir une edge ponctuelle
// ATTENTION : a non-punctual wire should not
// contain a punctual edge
if (!wPoint1) ex1.Next();
if (!wPoint2) ex2.Next();
// initialisation des vertices
// initialization of vertices
Handle(Geom_Surface) Surf;
Standard_Real f1=0, l1=1, f2=0, l2=1;
if (Edge1.Orientation() == TopAbs_REVERSED)
@@ -671,10 +644,10 @@ void BRepFill_Generator::Perform()
Periodic
= (E1IsReallyClosed || degen1) && (E2IsReallyClosed || degen2);
}
// traitement des KPart
// processing of KPart
Standard_Integer IType = DetectKPart(Edge1,Edge2);
if (IType==0) {
// pas de cas part
// no part cases
TopLoc_Location L,L1,L2;
Handle(Geom_Curve) C1, C2;
@@ -735,7 +708,7 @@ void BRepFill_Generator::Perform()
B.MakeFace(Face,Surf,Precision::Confusion());
}
else {
// cas particulier
// particular case
CreateKPart(Edge1,Edge2,IType,Surf);
B.MakeFace(Face,Surf,Precision::Confusion());
}
@@ -753,13 +726,13 @@ void BRepFill_Generator::Perform()
Handle(Geom_Curve) CC;
TColgp_Array1OfPnt Extremities(1,2);
if (IType==0) {
// cas general : Edge3 correspond a l'iso U=f1
// general case : Edge3 corresponds to iso U=f1
CC = Surf->UIso(f1);
first=f2;
last=l2;
}
else {
// cas particulier : il faut calculer la courbe 3d
// particular case : it is required to calculate the curve 3d
Extremities(1) = BRep_Tool::Pnt(V1f);
Extremities(2) = BRep_Tool::Pnt(V2f);
CC = new Geom_BezierCurve(Extremities);
@@ -794,13 +767,13 @@ void BRepFill_Generator::Perform()
Handle(Geom_Curve) CC;
TColgp_Array1OfPnt Extremities(1,2);
if (IType==0) {
// cas general : Edge4 correspond a l'iso U=l1
// general case : Edge4 corresponds to iso U=l1
CC = Surf->UIso(l1);
first=f2;
last=l2;
}
else {
// cas particulier : il faut calculer la courbe 3d
// particular case : it is required to calculate the curve 3d
Extremities(1) = BRep_Tool::Pnt(V1l);
Extremities(2) = BRep_Tool::Pnt(V2l);
CC = new Geom_BezierCurve(Extremities);

View File

@@ -30,7 +30,7 @@
//=======================================================================
//function : Norm
//purpose : Norme d'une Matrice
//purpose : Norm of a Matrix
//=======================================================================
static Standard_Real Norm(const gp_Mat& M) {
@@ -50,7 +50,7 @@ static Standard_Real Norm(const gp_Mat& M) {
//=======================================================================
//function : ToG0
//purpose : Cacul une tranformation T tq T.M2 = M1
//purpose : Calculate tranformation T such as T.M2 = M1
//=======================================================================
static void ToG0(const gp_Mat& M1, const gp_Mat& M2, gp_Mat& T) {
@@ -133,7 +133,7 @@ void BRepFill_LocationLaw::BiNormalIsMain()
//=======================================================================
//function : TransformInCompatibleLaw
//purpose : Mise en continuite des loi
//purpose : Set in continuity of laws
//=======================================================================
void BRepFill_LocationLaw::TransformInCompatibleLaw(const Standard_Real TolAngular)
{
@@ -168,7 +168,7 @@ void BRepFill_LocationLaw::BiNormalIsMain()
#if DEB
if (N2.Dot(T1) > 1.e-9) {
cout << "Imprecision dans TransformInCompatibleLaw" << endl;
cout << "Inprecision in TransformInCompatibleLaw" << endl;
cout << "--- T1.R(N2) = " << N2.Dot(T1) << endl;
gp_Vec tt;
tt = T1;
@@ -186,7 +186,7 @@ void BRepFill_LocationLaw::BiNormalIsMain()
//=======================================================================
//function : TransformInG0Law
//purpose : Mise en continuite des loi
//purpose : Set in continuity of laws
//=======================================================================
void BRepFill_LocationLaw::TransformInG0Law()
{
@@ -204,7 +204,7 @@ void BRepFill_LocationLaw::BiNormalIsMain()
myLaws->Value(ipath)->SetTrsf(aux);
}
// La loi est elle periodique ?
// Is the law periodical ?
if (myPath.Closed()) {
myLaws->Value(myLaws->Length())->D0(Last, M1, V);
myLaws->Value(1)->GetDomain(First, Last);
@@ -214,7 +214,7 @@ void BRepFill_LocationLaw::BiNormalIsMain()
//=======================================================================
//function : DeleteTransform
//purpose : Supprime la Mise en continuite des loi
//purpose : Remove the setting in continuity of law.
//=======================================================================
void BRepFill_LocationLaw::DeleteTransform()
{
@@ -228,7 +228,7 @@ void BRepFill_LocationLaw::BiNormalIsMain()
//=======================================================================
//function : NbHoles
//purpose : Rechecherche des "Trous"
//purpose : Find "Holes"
//=======================================================================
Standard_Integer BRepFill_LocationLaw::NbHoles(const Standard_Real Tol)
{
@@ -324,11 +324,11 @@ const TopoDS_Edge& BRepFill_LocationLaw::Edge(const Standard_Integer Index) cons
return V;
}
//=======================================================================
//===================================================================
//function : PerformVertex
//purpose : Calcul un vertex du balayage a partir d'un vertex d'une section
// et de l'indice de l'edge dans la trajectoire
//=======================================================================
//purpose : Calculate a vertex of sweeping from a vertex of section
// and the index of the edge in the trajectory
//===================================================================
void BRepFill_LocationLaw::PerformVertex(const Standard_Integer Index,
const TopoDS_Vertex& Input,
const Standard_Real TolMin,
@@ -418,7 +418,7 @@ void BRepFill_LocationLaw::CurvilinearBounds(const Standard_Integer Index,
{
First = myLength->Value(Index);
Last = myLength->Value(Index+1);
if (Last<0) { //Il faut effectuer le calcul
if (Last<0) { //It is required to carry out the calculation
Standard_Integer ii, NbE = myEdges->Length();
Standard_Real Length, f, l;
GCPnts_AbscissaPoint AbsC;
@@ -441,7 +441,7 @@ void BRepFill_LocationLaw::CurvilinearBounds(const Standard_Integer Index,
//=======================================================================
//function : IsG1
//purpose : Evalue la continuite de la loi en un vertex
//purpose : Evaluate the continuity of the law by a vertex
//=======================================================================
Standard_Integer
BRepFill_LocationLaw::IsG1(const Standard_Integer Index,
@@ -506,23 +506,23 @@ void BRepFill_LocationLaw::CurvilinearBounds(const Standard_Integer Index,
if (Norm(M1-M2) > SpatialTolerance) isG0 = Standard_False;
if (!isG0) return -1;
if (!Ok_D1) return 0; // Pas de controle de la derive
if (!Ok_D1) return 0; // No control of the derivative
if ( (DV1.Magnitude()>EpsNul) && (DV2.Magnitude()>EpsNul)
&& (DV1.Angle(DV2) > AngularTolerance) ) isG1 = Standard_False;
// Pour la suite, les test sont plutot empirique
// For the next, the tests are mostly empirical
Standard_Real Norm1 = Norm(DM1);
Standard_Real Norm2 = Norm(DM2);
// Si les 2 normes sont nulle c'est bon
// It two 2 norms are null, it is good
if ((Norm1 > EpsNul) || (Norm2 > EpsNul)) {
// sinon on compare les matrice normalise
// otherwise the normalized matrices are compared
if ((Norm1 > EpsNul) && (Norm2 > EpsNul)) {
DM1 /= Norm1;
DM2 /= Norm2;
if (Norm(DM1 - DM2) > AngularTolerance) isG1 = Standard_False;
}
else isG1 = Standard_False; // 1 Null l'autre pas
else isG1 = Standard_False; // 1 Null the other is not
}
if (isG1) return 1;
@@ -541,13 +541,13 @@ void BRepFill_LocationLaw::CurvilinearBounds(const Standard_Integer Index,
Standard_Integer iedge, NbE=myEdges->Length();
Standard_Boolean Trouve = Standard_False;
//Controle que les longueurs sont calcules
//Control that the lengths are calculated
if (myLength->Value(NbE+1) < 0) {
Standard_Real f, l;
CurvilinearBounds(NbE, f, l);
}
// Recherche de l'interval
// Find the interval
for (iedge=1; iedge<=NbE && !Trouve; ) {
if (myLength->Value(iedge+1) >= Abcissa) {
Trouve = Standard_True;
@@ -581,10 +581,10 @@ void BRepFill_LocationLaw::CurvilinearBounds(const Standard_Integer Index,
}
//=======================================================================
//===================================================================
//function : D0
//purpose : Positionement d'une section, a une abscisse curviligne donnee
//=======================================================================
//purpose : Position of a section, with a given curviline abscissa
//===================================================================
void BRepFill_LocationLaw::D0(const Standard_Real Abcissa,
TopoDS_Shape& W)
{
@@ -608,7 +608,7 @@ void BRepFill_LocationLaw::CurvilinearBounds(const Standard_Integer Index,
else {
W.Nullify();
#if DEB
cout << "BRepFill_LocationLaw::D0 : Attention positionement hors borne"
cout << "BRepFill_LocationLaw::D0 : Attention position out of limits"
<< endl;
#endif
}
@@ -616,7 +616,7 @@ void BRepFill_LocationLaw::CurvilinearBounds(const Standard_Integer Index,
//=======================================================================
//function : Abscissa
//purpose : Calcul l'abscisse d'un point
//purpose : Calculate the abscissa of a point
//=======================================================================
Standard_Real BRepFill_LocationLaw::Abscissa(const Standard_Integer Index,
const Standard_Real Param)

View File

@@ -143,7 +143,7 @@ myKPart(0)
}
// recuperons les isos dans leur domaine de restriction.
// return isos in their domain of restriction.
Handle(Geom_Curve) UU1, UU2, VV1, VV2;
Handle(Geom_Surface) S;
S = BRep_Tool::Surface(myFace1,L);
@@ -197,7 +197,7 @@ myKPart(0)
Vmax = dummyUmax;
}
// essai dub
// try duplication
GeomAdaptor_Surface GAS1(S);
GeomAbs_SurfaceType Type1 = GAS1.GetType();
@@ -223,7 +223,7 @@ myKPart(0)
Precision::PConfusion(),
Vmin, Vmax);
}
// fin essai dub
// end try duplication
myU1 = Geom2dAdaptor_Curve(GeomProjLib::Curve2d(UU1, BasisPlane),
Umin, Umax);
@@ -260,7 +260,7 @@ myKPart(0)
}
}
// recuperons les isos dans leur domaine de restriction.
// return isos in their domain of restriction.
S = BRep_Tool::Surface(myFace2,L);
if (!L.IsIdentity())
@@ -313,7 +313,7 @@ myKPart(0)
Vmax = dummyUmax;
}
// essai dub
// try duplication
GeomAdaptor_Surface GAS2(S);
GeomAbs_SurfaceType Type2 = GAS2.GetType();
@@ -339,7 +339,7 @@ myKPart(0)
Precision::PConfusion(),
Vmin, Vmax);
}
// fin essai dub
// end try duplication
myU2 = Geom2dAdaptor_Curve(GeomProjLib::Curve2d(UU2, BasisPlane),
Umin, Umax);
@@ -350,12 +350,12 @@ myKPart(0)
Vmin, Vmax);
// eval if in a particular case.
// Cas Particulier si :
// 1) - Bissec droite
// - Bissec orthogonale a l`element de la base.
// ==> Iso sur les 2 faces.
// 2) - Bissec droite
// - les 2 surfaces sont des plans.
// Particular case if :
// 1) - Straight Bissectrice
// - Bissectrice orthogonal to the base element.
// ==> Iso on 2 faces.
// 2) - Straight Bissectrice
// - 2 surfaces are planes.
myCont = GeomAbs_C0;
if ( myBis.GetType() == GeomAbs_Line) {
@@ -408,8 +408,8 @@ void BRepFill_MultiLine::Curves(Handle(Geom_Curve)& Curve,
P1 = ValueOnF1(myBis.FirstParameter());
P2 = ValueOnF1(myBis.LastParameter());
// on recherche la valeur de l iso avec le point milieu
// les bouts pouvant etre des points degeneres.
// find value of the with medium point
// the ends can be degenerated points.
PMil = ValueOnF1(0.5*(myBis.FirstParameter() + myBis.LastParameter()));
@@ -600,7 +600,7 @@ static gp_Pnt2d ValueOnFace(const Standard_Real U,
UU = Ext.LowerDistanceParameter();
Dist = Ext.LowerDistance();
}
// Controle avec les `bouts`
// Control with `ends`
D1 = P.Distance(TheU.Value(TheU.FirstParameter()));
D2 = P.Distance(TheU.Value(TheU.LastParameter()));
@@ -646,7 +646,7 @@ static gp_Pnt2d ValueOnFace(const Standard_Real U,
VV = TheV.LastParameter();
}
else {
// test si la courbe est du cote `Y negatif`.
// test if the curve is at the side `negative Y`.
if ( Min( PF.Y(),PL.Y()) < -Tol) Dist = -Dist;
Handle(Geom2d_Line) Line

View File

@@ -109,7 +109,7 @@ static Handle(Geom_BSplineSurface) totalsurf(const TopTools_Array2OfShape& shape
for (j=jdeb; j<=jfin; j++) {
// cas des sections bouclantes
// case of looping sections
if (j==jfin && vClosed) {
section.AddCurve(BS1);
}
@@ -118,7 +118,7 @@ static Handle(Geom_BSplineSurface) totalsurf(const TopTools_Array2OfShape& shape
// read the first edge to initialise CompBS;
edge = TopoDS::Edge(shapes.Value(1,j));
if (BRep_Tool::Degenerated(edge)) {
// edge degeneree : construction d'une courbe ponctuelle
// degenerated edge : construction of a point curve
TopExp::Vertices(edge,vl,vf);
TColgp_Array1OfPnt Extremities(1,2);
Extremities(1) = BRep_Tool::Pnt(vf);
@@ -129,7 +129,7 @@ static Handle(Geom_BSplineSurface) totalsurf(const TopTools_Array2OfShape& shape
curv->LastParameter());
}
else {
// recuperation de la courbe sur l'edge
// return the curve on the edge
Handle(Geom_Curve) curv = BRep_Tool::Curve(edge, loc, first, last);
curvTrim = new Geom_TrimmedCurve(curv, first, last);
curvTrim->Transform(loc.Transformation());
@@ -138,7 +138,7 @@ static Handle(Geom_BSplineSurface) totalsurf(const TopTools_Array2OfShape& shape
curvTrim->Reverse();
}
// transformation en BSpline reparametree sur [i-1,i]
// transformation into BSpline reparameterized on [i-1,i]
curvBS = Handle(Geom_BSplineCurve)::DownCast(curvTrim);
if (curvBS.IsNull()) {
Handle(Geom_Curve) theCurve = curvTrim->BasisCurve();
@@ -156,14 +156,14 @@ static Handle(Geom_BSplineSurface) totalsurf(const TopTools_Array2OfShape& shape
BSplCLib::Reparametrize(0.,1.,BSK);
curvBS->SetKnots(BSK);
// initialisation
// initialization
GeomConvert_CompCurveToBSplineCurve CompBS(curvBS);
for (i=2; i<=NbEdges; i++) {
// read the edge
edge = TopoDS::Edge(shapes.Value(i,j));
if (BRep_Tool::Degenerated(edge)) {
// edge degeneree : construction d'une courbe ponctuelle
// degenerated edge : construction of a point curve
TopExp::Vertices(edge,vl,vf);
TColgp_Array1OfPnt Extremities(1,2);
Extremities(1) = BRep_Tool::Pnt(vf);
@@ -174,7 +174,7 @@ static Handle(Geom_BSplineSurface) totalsurf(const TopTools_Array2OfShape& shape
curv->LastParameter());
}
else {
// recuperation de la courbe sur l'edge
// return the curve on the edge
Handle(Geom_Curve) curv = BRep_Tool::Curve(edge, loc, first, last);
curvTrim = new Geom_TrimmedCurve(curv, first, last);
curvTrim->Transform(loc.Transformation());
@@ -183,7 +183,7 @@ static Handle(Geom_BSplineSurface) totalsurf(const TopTools_Array2OfShape& shape
curvTrim->Reverse();
}
// transformation en BSpline reparametree sur [i-1,i]
// transformation into BSpline reparameterized on [i-1,i]
curvBS = Handle(Geom_BSplineCurve)::DownCast(curvTrim);
if (curvBS.IsNull()) {
Handle(Geom_Curve) theCurve = curvTrim->BasisCurve();
@@ -213,11 +213,11 @@ static Handle(Geom_BSplineSurface) totalsurf(const TopTools_Array2OfShape& shape
Standard_True, Standard_False, 1);
}
// recuperation de la section finale
// return the final section
BS = CompBS.BSplineCurve();
section.AddCurve(BS);
// cas des sections bouclantes
// case of looping sections
if (j==jdeb && vClosed) {
BS1 = BS;
}
@@ -399,7 +399,7 @@ BRepFill_NSections::BRepFill_NSections(const TopTools_SequenceOfShape& S,
//=======================================================================
//function : Init
//purpose : On cree une table de GeomFill_SectionLaw
//purpose : Create a table of GeomFill_SectionLaw
//=======================================================================
void BRepFill_NSections::Init(const TColStd_SequenceOfReal & P,
const Standard_Boolean Build)
@@ -415,7 +415,7 @@ void BRepFill_NSections::Init(const TColStd_SequenceOfReal & P,
Standard_Real First, Last;
TopoDS_Wire W;
// On regarde si les wires debut et fin sont ponctuels
// Check if the start and end wires are punctual
W = TopoDS::Wire(myShapes(1));
for (wexp.Init(W); wexp.More(); wexp.Next())
// w1Point = w1Point && B.Degenerated(wexp.Current());
@@ -427,10 +427,10 @@ void BRepFill_NSections::Init(const TColStd_SequenceOfReal & P,
w2Point = w2Point && BRep_Tool::Degenerated(wexp.Current());
if (w2Point) ifin--;
// On regarde si les wires debut et fin sont identiques
// Check if the start and end wires are identical
vclosed = myShapes(1).IsSame(myShapes(NbSects));
// On compte le nombre d'aretes non degenerees
// Count the number of non-degenerated edges
W = TopoDS::Wire(myShapes(ideb));
for (NbEdge=0, wexp.Init(W); wexp.More(); wexp.Next())
// if (! B.Degenerated(wexp.Current())) NbEdge++;
@@ -438,7 +438,7 @@ void BRepFill_NSections::Init(const TColStd_SequenceOfReal & P,
myEdges = new (TopTools_HArray2OfShape) (1, NbEdge, 1, NbSects);
// On Remplit les tables
// Fill tables
uclosed = Standard_True;
for (jj=ideb;jj<=ifin;jj++){
@@ -453,11 +453,11 @@ void BRepFill_NSections::Init(const TColStd_SequenceOfReal & P,
}
}
// La loi est elle fermee en U ?
// Is the law closed by U ?
wClosed = W.Closed();
if (!wClosed) {
// le flag n'etant pas tres sur, on fait une verif
// if unsure about the flag, make check
TopoDS_Edge Edge1, Edge2;
TopoDS_Vertex V1,V2;
Edge1 = TopoDS::Edge (myEdges->Value(NbEdge,jj));
@@ -492,7 +492,7 @@ void BRepFill_NSections::Init(const TColStd_SequenceOfReal & P,
if (!wClosed) uclosed = Standard_False;
}
// sections en bout ponctuelles
// point sections at end
if (w1Point) {
W = TopoDS::Wire(myShapes(1));
wexp.Init(W);
@@ -518,9 +518,9 @@ void BRepFill_NSections::Init(const TColStd_SequenceOfReal & P,
mySurface = totalsurf(myEdges->Array2(),myShapes.Length(),NbEdge,
myParams,w1Point,w2Point,uclosed,vclosed,tol);
// On augmente le degre pour que le positionnement D2
// sur les GeomFill_NSections soit correct
// cf commentaires dans GeomFill_NSections
// Increase the degree so that the position D2
// on GeomFill_NSections could be correct
// see comments in GeomFill_NSections
if (mySurface->VDegree()<2) {
mySurface->IncreaseDegree(mySurface->UDegree(),2);
}
@@ -532,7 +532,7 @@ void BRepFill_NSections::Init(const TColStd_SequenceOfReal & P,
}
#endif
// On Remplit les tables
// Fill tables
if (Build) {
for (ii=1; ii<=NbEdge ; ii++) {
TColGeom_SequenceOfCurve NC;
@@ -563,18 +563,18 @@ void BRepFill_NSections::Init(const TColStd_SequenceOfReal & P,
if (E.Orientation() == TopAbs_REVERSED) {
Standard_Real aux;
Handle(Geom_Curve) CBis;
CBis = C->Reversed(); // Pour eviter de deteriorer la topologie
CBis = C->Reversed(); // To avoid the spoiling of the topology
aux = C->ReversedParameter(First);
First = C->ReversedParameter(Last);
Last = aux;
C = CBis;
}
if ((ii>1) || (!E.Closed()) ) { // On trimme C
if ((ii>1) || (!E.Closed()) ) { // Cut C
Handle(Geom_TrimmedCurve) TC =
new (Geom_TrimmedCurve) (C,First, Last);
C = TC;
}
// sinon On garde l'integrite de la courbe
// otherwise preserve the integrity of the curve
}
NC.Append(C);
}
@@ -646,7 +646,7 @@ void BRepFill_NSections::Init(const TColStd_SequenceOfReal & P,
///=======================================================================
//function : VertexTol
//purpose : Evalue le trou entre 2 edges de la section
//purpose : Evaluate the hole between 2 edges of the section
//=======================================================================
Standard_Real BRepFill_NSections::VertexTol(const Standard_Integer Index,
const Standard_Real Param) const
@@ -654,7 +654,7 @@ void BRepFill_NSections::Init(const TColStd_SequenceOfReal & P,
Standard_Real Tol = Precision::Confusion();
Standard_Integer I1, I2;
if ( (Index==0) || (Index==myEdges->ColLength()) ) {
if (!uclosed) return Tol; //Le moins faux possible
if (!uclosed) return Tol; //The least possible error
I1 = myEdges->ColLength();
I2 = 1;
}
@@ -753,7 +753,7 @@ void BRepFill_NSections::Init(const TColStd_SequenceOfReal & P,
TopoDS_Edge Edge1, Edge2;
if ( (Index==0) || (Index==myEdges->ColLength()) ) {
if (!uclosed) return GeomAbs_C0; //Le moins faux possible
if (!uclosed) return GeomAbs_C0; //The least possible error
Edge1 = TopoDS::Edge (myEdges->Value(myEdges->ColLength(),jj));
Edge2 = TopoDS::Edge (myEdges->Value(1,jj));

View File

@@ -224,7 +224,7 @@ static Standard_Boolean KPartCircle
BRepFill_IndexedDataMapOfOrientedShapeListOfShape& myMap,
Standard_Boolean& myIsDone)
{
// Un seul contour qui est un cercle ferme
// The only contour which is a closed circle
TopExp_Explorer exp(mySpine,TopAbs_EDGE);
Standard_Integer NbEdges = 0;
TopoDS_Edge E;
@@ -319,7 +319,7 @@ void BRepFill_OffsetWire::Init(const TopoDS_Face& Spine,
myMap.Clear();
myMapSpine.Clear();
//------------------------------------------------------------------
// decoupe du spine pour les lieux bissecteurs.
// cut the spine for bissectors.
//------------------------------------------------------------------
// Modified by Sergey KHROMOV - Tue Nov 26 17:39:03 2002 Begin
static BRepMAT2d_Explorer Exp;
@@ -339,8 +339,8 @@ void BRepFill_OffsetWire::Init(const TopoDS_Face& Spine,
//-----------------------------------------------------
// Calcul de la carte des lieux bissecteurs a gauche.
// et des Liens Topologie -> elements de base de la carte.
// Calculate the map of bissectors to the left.
// and Links Topology -> base elements of the map.
//-----------------------------------------------------
// Modified by Sergey KHROMOV - Tue Nov 26 17:39:03 2002 Begin
@@ -395,7 +395,7 @@ const TopTools_ListOfShape& BRepFill_OffsetWire::GeneratedShapes
{
if (!myCallGen) {
if (!myMapSpine.IsEmpty()) {
// myMapSpine peut etre vide si on est passe par PerformWithBilo.
// myMapSpine can be empty if passed by PerformWithBilo.
TopTools_DataMapIteratorOfDataMapOfShapeShape it(myMapSpine);
for (; it.More(); it.Next()) {
if (myMap.Contains(it.Key())) {
@@ -632,7 +632,7 @@ void Compute (const TopoDS_Face& Spine,
TopoDS_Wire NewW = TopoDS::Wire(aLocalShape);
// TopoDS_Wire NewW = TopoDS::Wire(CurW.Moved(L));
B.Add(aShape,NewW);
// mise a jour de la Map.
// update Map.
TopoDS_Iterator it1( CurW);
TopoDS_Iterator it2( NewW);
for ( ; it1.More(); it1.Next(), it2.Next()) {
@@ -675,32 +675,28 @@ void BRepFill_OffsetWire::PerformWithBiLo
}
myMap.Clear();
//*****************************************
// si myOffset = 0, on ne s'emmerde pas !!
//*****************************************
if ( Abs(myOffset) < Precision::Confusion()) {
Compute(mySpine,myShape,myMap,Alt);
myIsDone = Standard_True;
return;
}
//******************************
// Calcul pour un offset non nul
//******************************
//********************************
// Calculate for a non null offset
//********************************
if (KPartCircle(mySpine,Offset,Alt,myShape,myMap,myIsDone)) return;
BRep_Builder myBuilder;
myBuilder.MakeCompound(TopoDS::Compound(myShape));
//---------------------------------------------------------------------
// MapNodeVertex : associe a chaque noeud de la carte (key1) et
// a chaque element du profil (key2) un vertex (item).
// MapBis : ensemble des edges ou vertex (item) generes par
// une bisectrice sur une face ou un edge (key)des
// tuyaux ou revol.
// MapVerPar : Map des parametres des vertex sur les edges paralleles
// la liste contenue dans MapVerPar (E) correspond aux
// parametres sur E des vertex contenu dans MapBis(E);
// MapNodeVertex : associate to each node of the map (key1) and to
// each element of the profile (key2) a vertex (item).
// MapBis : all edges or vertices (item) generated by
// a bisectrice on a face or an edge (key) of revolution tubes.
// MapVerPar : Map of parameters of vertices on parallel edges
// the list contained in MapVerPar (E) corresponds to
// parameters on E of vertices contained in MapBis(E);
//---------------------------------------------------------------------
@@ -721,7 +717,7 @@ void BRepFill_OffsetWire::PerformWithBiLo
(RefPlane->Translated( ALT * gp_Vec(RefPlane->Axis().Direction() )));
//---------------------------------------------------------------
// Construction des Cercles et des OffsetCurves
// Construction of Circles and OffsetCurves
//---------------------------------------------------------------
for (Standard_Integer ic = 1; ic <= Locus.NumberOfContours(); ic++) {
@@ -743,13 +739,13 @@ void BRepFill_OffsetWire::PerformWithBiLo
#ifdef DEB
if (AffichEdge) {
cout << " Fin Construction des primitives geometriques"<<endl;
cout << " End Construction of geometric primitives "<<endl;
}
#endif
//---------------------------------------------------
// Constructions des vertex de l offset.
// Construction of offset vertices.
//---------------------------------------------------
BRepFill_DataMapOfOrientedShapeListOfShape Detromp;
Handle(MAT_Arc) CurrentArc;
@@ -774,9 +770,9 @@ void BRepFill_OffsetWire::PerformWithBiLo
}
#endif
//-----------------------------------------------------------------------
// Recuperation des elements du spine correspondant aux basicElts separes.
//-----------------------------------------------------------------------
//-------------------------------------------------------------------
// Return elements of the spine corresponding to separate basicElts.
//-------------------------------------------------------------------
S [0] = Link.GeneratingShape(CurrentArc->FirstElement());
S [1] = Link.GeneratingShape(CurrentArc->SecondElement());
@@ -787,8 +783,8 @@ void BRepFill_OffsetWire::PerformWithBiLo
BRepFill_DataMapOfShapeSequenceOfPnt MapSeqPar;
//-----------------------------------------------------------
// Recuperation des edges paralleles sur chaque face.
// Si pas d offset generees => saut a la bissectrice suivante.
// Return parallel edges on each face.
// If no offset generated => move to the next bissectrice.
//--------------------------------------------------------------
if (myMap.Contains(S[0]) && myMap.Contains(S[1])) {
E [0] = TopoDS::Edge(myMap.FindFromKey(S[0]).First());
@@ -797,8 +793,8 @@ void BRepFill_OffsetWire::PerformWithBiLo
else continue;
//-----------------------------------------------------------
// Construction des vertex correspondant au noeud de la carte.
// si ils sont sur l offset.
// Construction of vertices corresponding to the node of the map.
// if they are on the offset.
//-----------------------------------------------------------
TopoDS_Vertex VS,VE;
Handle(MAT_Node) Node1, Node2;
@@ -828,7 +824,7 @@ void BRepFill_OffsetWire::PerformWithBiLo
}
//---------------------------------------------
// Construction des geometries.
// Construction of geometries.
//---------------------------------------------
BRepFill_TrimEdgeTool Trim (Bisec,
Locus.GeomElt(CurrentArc->FirstElement()),
@@ -836,7 +832,7 @@ void BRepFill_OffsetWire::PerformWithBiLo
myOffset);
//-----------------------------------------------------------
// Construction des vertex sur les edges paralleles au spine.
// Construction of vertices on edges parallel to the spine.
//-----------------------------------------------------------
Trim.IntersectWith(E [0], E [1], Params);
@@ -857,7 +853,7 @@ void BRepFill_OffsetWire::PerformWithBiLo
Vertices.SetValue(1,VS);
else
// le point n avait pas ete trouve par IntersectWith
// the point was not found by IntersectWith
Vertices.Prepend(VS);
}
if (EndOnEdge) {
@@ -867,17 +863,17 @@ void BRepFill_OffsetWire::PerformWithBiLo
Vertices.SetValue(Params.Length(),VE);
else
// le point n avait pas ete trouve par IntersectWith
// the point was not found by IntersectWith
Vertices.Append(VE);
}
//------------------------------------------------------------
// Mise a jour Detromp.
// Detromp permetra de supprimer les vertex sur l offset
// correspondant a des zones de tangences
// dans Detromp sont ranges les vertex qui limitent
// les portions de la bissectrices situes entre le spine et
// l offset.
// Update Detromp.
// Detromp allows to remove vertices on the offset
// corresponding to tangency zones
// Detromp ranks the vertices that limit
// the parts of the bissectrices located between the spine and the
// offset.
//------------------------------------------------------------
if (!Detromp.IsBound(S[0])) Detromp.Bind(S[0],EmptyList);
if (!Detromp.IsBound(S[1])) Detromp.Bind(S[1],EmptyList);
@@ -886,8 +882,8 @@ void BRepFill_OffsetWire::PerformWithBiLo
UpdateDetromp (Detromp(S[0]), Detromp(S[1]), Vertices, Params,
Bisec, StartOnEdge, EndOnEdge, Trim);
//----------------------------------------------
// Stockage des vertex sur les edges paralleles.
// on remplit MapBis et MapVerPar.
// Storage of vertices on parallel edges.
// fill MapBis and MapVerPar.
//----------------------------------------------
if (!Vertices.IsEmpty()) {
for (k = 0; k <= 1; k++) {
@@ -904,11 +900,10 @@ void BRepFill_OffsetWire::PerformWithBiLo
}
else {
//------------------------------------------------------------
//POUR LES CERCLES COMPLETS . la parallele peut etre contenue
// dans la zone sans intersection avec la frontiere
// pas d intersection
// si myoffset est < distance des noeuds la parallele peut etre
// valide.
// FOR COMPLETE CIRCLES. the parallel line can be contained
// in the zone without intersection with the border
// no intersection
// if myoffset is < distance of nodes the parallel can be valid.
//-------------------------------------------------------------
for (k = 0; k <= 1; k++) {
if (!MapBis.IsBound(E[k])) {
@@ -923,12 +918,12 @@ void BRepFill_OffsetWire::PerformWithBiLo
#ifdef DEB
if (AffichEdge) {
cout << " Fin Construction des vertex sur les offsets"<<endl;
cout << " End Construction of vertices on offsets"<<endl;
}
#endif
//----------------------------------
// Construction des edges paralleles.
// Construction of parallel edges.
//----------------------------------
TopTools_IndexedDataMapOfShapeShape MapVV;
@@ -955,7 +950,7 @@ void BRepFill_OffsetWire::PerformWithBiLo
}
else {
//-----------------
// Cercles complets
// Complete circles
//-----------------
myMap(j).Append(CurrentEdge);
}
@@ -992,11 +987,11 @@ void BRepFill_OffsetWire::PerformWithBiLo
}
//----------------------------------
// Constructions des wires offset.
// Construction of offset wires.
//----------------------------------
MakeWires ();
// Mise a jour des vertex ( Construits dans le plan Z = 0) !!!
// Update vertices ( Constructed in the plane Z = 0) !!!
TopTools_MapOfShape MapVertex;
for ( TopExp_Explorer exp(myShape,TopAbs_VERTEX); exp.More(); exp.Next()) {
TopoDS_Vertex V = TopoDS::Vertex(exp.Current());
@@ -1007,7 +1002,7 @@ void BRepFill_OffsetWire::PerformWithBiLo
}
}
// Constructions des courbes 3d.
// Construction of curves 3d.
BRepLib::BuildCurves3d(myShape);
MapVertex.Clear();
TopExp_Explorer Explo( myShape, TopAbs_EDGE );
@@ -1109,7 +1104,7 @@ void BRepFill_OffsetWire::PrepareSpine()
myMapSpine.Bind(V2,V2);
Cuts.Clear();
// Decoupe
// Cut
TopoDS_Shape aLocalShape = E.Oriented(TopAbs_FORWARD);
// Modified by Sergey KHROMOV - Thu Nov 16 17:29:29 2000 Begin
if (nbEdges == 2 && nbResEdges == 0)
@@ -1161,7 +1156,7 @@ void BRepFill_OffsetWire::PrepareSpine()
void BRepFill_OffsetWire::MakeWires()
{
//--------------------------------------------------------
// creation d une liste unique des edges paralelles crees.
// creation of a single list of created parallel edges.
//--------------------------------------------------------
TopTools_SequenceOfShape TheEdges;
TopTools_ListOfShape TheWires;
@@ -1192,7 +1187,7 @@ void BRepFill_OffsetWire::MakeWires()
}
//--------------------------------------
// Creation des wires paralleles.
// Creation of parallel wires.
//--------------------------------------
BRep_Builder B;
@@ -1227,7 +1222,7 @@ void BRepFill_OffsetWire::MakeWires()
while(!End) {
//-------------------------------
// Construction d un wire.
// Construction of a wire.
//-------------------------------
TopExp::Vertices(CE,V1,V2);
if (!CV.IsSame(V1)) CV = V1; else CV = V2;
@@ -1250,7 +1245,7 @@ void BRepFill_OffsetWire::MakeWires()
if (!End) {
if (MVE.FindFromKey(CV).Extent() > 2) {
//cout <<"vertex sur plus de 2 edges dans une face."<<endl;
//cout <<"vertex on more that 2 edges in a face."<<endl;
}
for ( itl.Initialize(MVE.FindFromKey(CV)); itl.More(); itl.Next()) {
if (itl.Value().IsSame(CE)) {
@@ -1281,9 +1276,9 @@ void BRepFill_OffsetWire::MakeWires()
TheWires.Append(NW);
}
// mise a jour de myShape :
// -- si un seul wire : myShape est un Wire
// -- si plusieurs wires : myShape est un Compound.
// update myShape :
// -- if only one wire : myShape is a Wire
// -- if several wires : myShape is a Compound.
if ( TheWires.Extent() == 1) {
myShape = TheWires.First();
}
@@ -1572,13 +1567,11 @@ void BRepFill_OffsetWire::FixHoles()
//=======================================================================
//function : CutEdge
//purpose : Decoupe d une edge aux extrema de courbures et aux points
// d inflexion.
// Les cercles fermes sont aussi decoupes en deux.
// Si <Cuts> est vide l edge n est pas modifie.
// Le premier et le dernier vertex de l edge originale
// appartiennent respectivement a la premiere et derniere
// portions.
//purpose : Cut edge at the extrema of curvatures and points of inflexion.
// So, closed circles are cut in two.
// If <Cuts> is empty, the edge is not modified.
// The first and the last vertex of the initial edge
// belong to the first and the last parts respectively.
//=======================================================================
Standard_Integer CutEdge (const TopoDS_Edge& E,
const TopoDS_Face& F,
@@ -1611,7 +1604,7 @@ Standard_Integer CutEdge (const TopoDS_Edge& E,
( Abs(f-l) >= PI) ) {
return 0;
//---------------------------
// Decoupe cercle ferme.
// Cut closed circle.
//---------------------------
Standard_Real m = (f + l)*0.5;
// Modified by Sergey KHROMOV - Wed Mar 6 17:37:28 2002 Begin
@@ -1636,13 +1629,13 @@ Standard_Integer CutEdge (const TopoDS_Edge& E,
Cuts.Append(FE.Oriented(E.Orientation()));
Cuts.Append(LE.Oriented(E.Orientation()));
//--------
// Retour.
// Return.
//--------
return 2;
}
//-------------------------
// Decoupe de la courbe.
// Cut curve.
//-------------------------
Cuter.Perform(CT2d);
@@ -1650,7 +1643,7 @@ Standard_Integer CutEdge (const TopoDS_Edge& E,
if (ForceCut == 0) {
if (Cuter.UnModified()) {
//-----------------------------
// edge non modifiee => retour.
// edge not modified => return.
//-----------------------------
return 0;
} else {
@@ -1687,7 +1680,7 @@ Standard_Integer CutEdge (const TopoDS_Edge& E,
// Modified by Sergey KHROMOV - Thu Nov 16 17:28:37 2000 End
//--------------------------------------
// Creation des edges decoupees.
// Creation of cut edges.
//--------------------------------------
VF = V1;
@@ -1779,7 +1772,7 @@ void MakeCircle (const TopoDS_Edge& E,
BRepFill_IndexedDataMapOfOrientedShapeListOfShape& Map,
const Handle(Geom_Plane)& RefPlane)
{
// eval the Axis of the Circle.
// evaluate the Axis of the Circle.
Standard_Real f,l;
Handle(Geom2d_Curve) GC = BRep_Tool::CurveOnSurface(E,F,f,l);
gp_Vec2d DX;
@@ -1831,8 +1824,8 @@ void MakeOffset (const TopoDS_Edge& E,
Geom2dAdaptor_Curve AC(G2d,f,l);
if ( AC.GetType() == GeomAbs_Circle) {
// si l offset est superieur ou egal au rayon et du cote de la
// concavite du cercle => edge null.
// if the offset is greater otr equal to the radius and the side of the
// concavity of the circle => edge null.
gp_Circ2d C1(AC.Circle());
#ifdef DEB
Standard_Real radius =
@@ -1845,7 +1838,7 @@ void MakeOffset (const TopoDS_Edge& E,
Standard_Real Signe = ( Crossed > 0.) ? 1. : -1.;
if (anOffset*Signe < AC.Circle().Radius()) {
// -anOffset vient d une Etrangete adaptoresque!
Handle(Geom2dAdaptor_HCurve) AHC =
new Geom2dAdaptor_HCurve(G2d);
Adaptor3d_OffsetCurve Off(AHC,-anOffset);
@@ -1895,12 +1888,12 @@ void MakeOffset (const TopoDS_Edge& E,
//=======================================================================
//function : UpdateDetromp
//purpose : Pour chaque interval sur la bissectrice defini par params
// test si le point milieu est a une distance > offset
// dans ce cas les vertex correspondants aux extremites de l interval
// sont ranges dans le detrompeur.
// => Si un meme vertex apparait deux fois dans le detrompeur la
// frontiere de la zone de proximitee est tangente a l offset .
//purpose : For each interval on bissectrice defined by parameters
// test if the medium point is at a distance > offset
// in this case vertices corresponding to the extremities of the interval
// are ranked in the proofing.
// => If the same vertex appears in the proofing, the
// border of the zone of proximity is tangent to the offset .
//=======================================================================
void UpdateDetromp (TopTools_ListOfShape& Detromp1,
@@ -1921,7 +1914,7 @@ void UpdateDetromp (TopTools_ListOfShape& Detromp1,
U1 = Bis->FirstParameter();
if (SOnE) {
// le premier point de la bissectrice est sur l offset
// the first point of the bissectrice is on the offset
V1 = TopoDS::Vertex(Vertices.Value(ii));
ii++;
}
@@ -1944,7 +1937,7 @@ void UpdateDetromp (TopTools_ListOfShape& Detromp1,
ii ++;
}
// test point milieu entre le dernier params et la fin de la bissectrice.
// test medium point between the last parameter and the end of the bissectrice.
U2 = Bis->LastParameter();
if (!EOnE) {
if (!Precision::IsInfinite(U2)) {
@@ -1982,7 +1975,7 @@ Standard_Boolean VertexFromNode (const Handle(MAT_Node)& aNode,
if (!aNode->Infinite() && Abs(aNode->Distance()-Offset) < Tol) {
//------------------------------------------------
// le Noeud donne un vertex sur l offset
// the Node gives a vertex on the offset
//------------------------------------------------
if (MapNodeVertex.IsBound(aNode)) {
VN = TopoDS::Vertex(MapNodeVertex(aNode));
@@ -2043,7 +2036,7 @@ void TrimEdge (const TopoDS_Edge& E,
S.Clear();
//-----------------------------------------------------------
// Tri des deux sequences en fonction du parametre sur l edge.
// Parse two sequences depending on the parameter on the edge.
//-----------------------------------------------------------
while (Change) {
Change = Standard_False;
@@ -2057,7 +2050,7 @@ void TrimEdge (const TopoDS_Edge& E,
}
//----------------------------------------------------------
// Si un vertex n est pas dans le detrompeur il est elimine.
// If a vertex is not in the proofing, it is eliminated.
//----------------------------------------------------------
if (!BRep_Tool::Degenerated(E)) {
for (Standard_Integer k = 1; k <= TheVer.Length(); k ++) {
@@ -2071,9 +2064,9 @@ void TrimEdge (const TopoDS_Edge& E,
}
//----------------------------------------------------------
// Si un vertex_double apparait deux fois dans le detrompeur
// le vertex est elimine .
// sinon on garde une seule de ces representations.
// If a vertex_double appears twice in the proofing
// the vertex is removed.
// otherwise preserve only one of its representations.
//----------------------------------------------------------
if (!BRep_Tool::Degenerated(E)) {
for (Standard_Integer k = 1; k < TheVer.Length(); k ++) {
@@ -2103,9 +2096,9 @@ void TrimEdge (const TopoDS_Edge& E,
}
}
//-----------------------------------------------------------
// Creation des edges.
// le nombre de vertex doit etre pair les edges a creer vont
// d un vertex d indice impair i au vertex i+1;
// Creation of edges.
// the number of vertices should be even. The created edges
// go from a vertex with uneven index i to vertex i+1;
//-----------------------------------------------------------
for (Standard_Integer k = 1; k < TheVer.Length(); k = k+2) {
TopoDS_Shape aLocalShape = E.EmptyCopied();
@@ -2150,7 +2143,7 @@ void TrimEdge (const TopoDS_Edge& E,
//=======================================================================
//function : DoubleOrNotInside
//purpose : return True si V apparait 2 fois dans LV ou n est pas dedans.
//purpose : return True if V appears twice in LV or is not inside.
//=======================================================================
Standard_Boolean DoubleOrNotInside (const TopTools_ListOfShape& LV,
@@ -2369,7 +2362,7 @@ static void QuasiFleche(const Adaptor3d_Curve& C,
Standard_Real theFleche=0;
Standard_Boolean flecheok = Standard_False;
if (Norme > Eps) {
// Evaluation de la fleche par interpolation . Voir IntWalk_IWalking_5.gxx
// Evaluation of the arrow by interpolation. See IntWalk_IWalking_5.gxx
Standard_Real N1 = Vdeb.SquareMagnitude();
Standard_Real N2 = Vdelta.SquareMagnitude();
if (N1 > Eps && N2 > Eps) {

View File

@@ -98,9 +98,9 @@ void BRepFill_Pipe::Perform(const TopoDS_Wire& Spine,
new (GeomFill_CurveAndTrihedron) (TLaw);
myLoc = new (BRepFill_Edge3DLaw) (mySpine, Loc);
if (myLoc->NbLaw() == 0) {
return; // Cas degenere
return; // Degenerated case
}
myLoc->TransformInG0Law(); // Mise en continuite
myLoc->TransformInG0Law(); // Set into continuity
BRepFill_SectionPlacement Place(myLoc, Profile);
myTrsf = Place.Transformation();
@@ -111,7 +111,7 @@ void BRepFill_Pipe::Perform(const TopoDS_Wire& Spine,
TheProf = myProfile;
TheProf.Location(Loc2.Multiplied(Loc1));
// Construit les Shape First && Last
// Construct First && Last Shape
Handle(GeomFill_LocationLaw) law;
gp_Mat M;
@@ -134,7 +134,7 @@ void BRepFill_Pipe::Perform(const TopoDS_Wire& Spine,
myLoc->Law(myLoc->NbLaw())->GetDomain(first, last);
myLoc->Law(myLoc->NbLaw())->D0(last,M, V);
// try { // Pas joli mais il n'y as pas d'autre moyens de tester SetValues
// try { // Not good, but there are no other means to test SetValues
fila.SetValues(M(1,1), M(1,2), M(1,3), V.X(),
M(2,1), M(2,2), M(2,3), V.Y(),
M(3,1), M(3,2), M(3,3), V.Z(),
@@ -330,12 +330,12 @@ TopoDS_Shape BRepFill_Pipe::Section(const TopoDS_Vertex& VSpine) const
//=======================================================================
//function : PipeLine
//purpose : Construit un wire par balayage d'un point
//purpose : Construct a wire by sweeping of a point
//=======================================================================
TopoDS_Wire BRepFill_Pipe::PipeLine(const gp_Pnt& Point) const
{
// Postionnement
// Postioning
gp_Pnt P;
P = Point;
P.Transform(myTrsf);
@@ -344,7 +344,7 @@ TopoDS_Wire BRepFill_Pipe::PipeLine(const gp_Pnt& Point) const
Handle(BRepFill_ShapeLaw) Section =
new (BRepFill_ShapeLaw) (MkV.Vertex());
// Balayage
// Sweeping
BRepFill_Sweep MkSw(Section, myLoc, Standard_True);
MkSw.Build( BRepFill_Modified, GeomFill_Location, GeomAbs_C2, myDegmax, mySegmax );
TopoDS_Shape aLocalShape = MkSw.Shape();
@@ -486,7 +486,7 @@ TopoDS_Shape BRepFill_Pipe::MakeShape(const TopoDS_Shape& S,
MkSw.Build( BRepFill_Modified, GeomFill_Location, GeomAbs_C2, myDegmax, mySegmax );
result = MkSw.Shape();
// Reperage des elements
// Labeling of elements
if (mySections.IsNull()) {
myFaces = MkSw.SubShape();
mySections = MkSw.Sections();
@@ -582,11 +582,10 @@ TopoDS_Shape BRepFill_Pipe::MakeShape(const TopoDS_Shape& S,
return result;
}
//=======================================================================
//============================================================================
//function : FindEdge
//purpose : Recherche le numero de bande correspondant a une edge du
// profil.
//=======================================================================
//purpose : Find the number of edge corresponding to the edge of the profile.
//============================================================================
Standard_Integer BRepFill_Pipe::FindEdge(const TopoDS_Shape& S,
const TopoDS_Edge& E,
@@ -640,8 +639,7 @@ Standard_Integer BRepFill_Pipe::FindEdge(const TopoDS_Shape& S,
//=======================================================================
//function : FindVertex
//purpose : Recherche le numero de bande correspondant a une edge du
// profil.
//purpose : Find the number of edge corresponding to an edge of the profile.
//=======================================================================
Standard_Integer BRepFill_Pipe::FindVertex(const TopoDS_Shape& S,

View File

@@ -44,7 +44,7 @@
#include <GeomFill_GuideTrihedronPlan.hxx>
#include <GeomFill_LocationGuide.hxx>
//Specif Guide
//Specification Guide
#include <GeomAdaptor_HCurve.hxx>
#include <gp_Trsf.hxx>
@@ -80,7 +80,7 @@ static Standard_Boolean BuildBoundaries(const BRepFill_Sweep& theS
//=======================================================================
//function : ComputeSection
//purpose : Construit une section intermediaire
//purpose : Construct an intermediary section
//=======================================================================
static Standard_Boolean ComputeSection(const TopoDS_Wire& W1,
@@ -112,7 +112,7 @@ static Standard_Boolean ComputeSection(const TopoDS_Wire& W1,
//=======================================================================
//function : PerformTransition
//purpose : Modifie une loi de loc en fonction de Transition
//purpose : Modify a law of location depending on Transition
//=======================================================================
static void PerformTransition(const BRepFill_TransitionStyle Mode,
@@ -127,7 +127,7 @@ static void PerformTransition(const BRepFill_TransitionStyle Mode,
}
//=======================================================================
//function : PerformPlan
//purpose : Construit s'il existe un plan de remplissage
//purpose : Construct a plane of filling if exists
//=======================================================================
static Standard_Boolean PerformPlan(TopoDS_Shape& S)
@@ -202,7 +202,7 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine)
myLaw.Nullify();
SetTolerance();
// Attention aux wire closed non declare !
// Attention to closed non-declared wire !
if (!mySpine.Closed()) {
TopoDS_Vertex Vf, Vl;
TopExp::Vertices(mySpine, Vf, Vl);
@@ -212,7 +212,7 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine)
//=======================================================================
//function : Set
//purpose : Definie une loi de Frenet (Corrige)
//purpose : Define a law of Frenet (Correct)
//=======================================================================
void BRepFill_PipeShell::Set(const Standard_Boolean IsFrenet)
{
@@ -228,12 +228,12 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine)
Handle(GeomFill_CurveAndTrihedron) Loc =
new (GeomFill_CurveAndTrihedron) (TLaw);
myLocation = new (BRepFill_Edge3DLaw) (mySpine, Loc);
mySection.Nullify(); //Il faut relocaliser les sections.
mySection.Nullify(); //It is required to relocalize sections.
}
//=======================================================================
//function : Set
//purpose : Definie une loi Constante
//purpose : Define a law Constant
//=======================================================================
void BRepFill_PipeShell::Set(const gp_Ax2& Axe)
{
@@ -245,12 +245,12 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine)
Handle(GeomFill_CurveAndTrihedron) Loc =
new (GeomFill_CurveAndTrihedron) (TLaw);
myLocation = new (BRepFill_Edge3DLaw) (mySpine, Loc);
mySection.Nullify(); //Il faut relocaliser les sections.
mySection.Nullify(); //It is required to relocalize sections.
}
//=======================================================================
//function : Set
//purpose : Construit une loi de location de type binormal fixe
//purpose : Construct a law of location of binormal fixed type
//=======================================================================
void BRepFill_PipeShell::Set(const gp_Dir& BiNormal)
{
@@ -266,40 +266,40 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine)
//=======================================================================
//function : Set
//purpose : Construit une loi de location de type Darboux
//purpose : Construct a law of location of Darboux type
//=======================================================================
Standard_Boolean BRepFill_PipeShell::Set(const TopoDS_Shape& SpineSupport)
{
Standard_Boolean B;
// Il faut une loi de location speciale
// A special law of location is required
Handle(BRepFill_EdgeOnSurfLaw) loc =
new (BRepFill_EdgeOnSurfLaw) (mySpine, SpineSupport);
B = loc->HasResult();
if (B) {
myLocation = loc;
myTrihedron = GeomFill_IsDarboux;
mySection.Nullify(); //Il faut relocaliser les sections.
mySection.Nullify(); //It is required to relocalize the sections.
}
return B;
}
//=======================================================================
//function : Set
//purpose : Definit une loi a l'aide d'un contour guide
//purpose : Defines a lawv with help of a guided contour
//=======================================================================
void BRepFill_PipeShell::Set(const TopoDS_Wire& AuxiliarySpine,
const Standard_Boolean CurvilinearEquivalence,
const Standard_Boolean KeepContact)
{
// Reorganisation du guide (pb d'orientation et d'origine)
// Reorganization of the guide (pb of orientation and origin)
TopoDS_Wire TheGuide;
TheGuide = AuxiliarySpine;
Standard_Boolean SpClose = mySpine.Closed(),
GuideClose = AuxiliarySpine.Closed();
if (!SpClose && !GuideClose) {
// Cas ouvert reorientation du guide
// Case open reorientation of the guide
TopoDS_Wire sp = mySpine;
TopTools_SequenceOfShape Seq;
Seq.Append(sp);
@@ -311,8 +311,8 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine)
TheGuide = TopoDS::Wire(CW.Shape().Value(2));
}
else if (GuideClose) {
// Cas guide ferme : Determination de l'origine
// & reorientation du guide
// Case guide closed : Determination of the origin
// & reorientation of the guide
gp_Vec Dir;
gp_Pnt SpOr;
if (!SpClose) {
@@ -336,16 +336,16 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine)
if (Affich)
DBRep::Set("theguide", TheGuide);
#endif
// on transforme le guide en 1 seule courbe (periodic si posssible)
// transform the guide in a single curve (periodic if posssible)
Handle(BRepAdaptor_HCompCurve) Guide =
new (BRepAdaptor_HCompCurve) (TheGuide);
Guide->ChangeCurve().SetPeriodic(Standard_True);
if (CurvilinearEquivalence) { // triedre par abscisse curviligne reduite
if (CurvilinearEquivalence) { // trihedron by curvilinear reduced abscissa
if (KeepContact)
myTrihedron = GeomFill_IsGuideACWithContact; // avec rotation
myTrihedron = GeomFill_IsGuideACWithContact; // with rotation
else
myTrihedron = GeomFill_IsGuideAC; // sans rotation
myTrihedron = GeomFill_IsGuideAC; // without rotation
Handle(GeomFill_GuideTrihedronAC) TLaw
= new (GeomFill_GuideTrihedronAC) (Guide);
@@ -353,11 +353,11 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine)
new (GeomFill_LocationGuide) (TLaw);
myLocation = new (BRepFill_ACRLaw) (mySpine, Loc);
}
else {// triedre par plan
else {// trihedron by plane
if (KeepContact)
myTrihedron = GeomFill_IsGuidePlanWithContact; // avec rotation
myTrihedron = GeomFill_IsGuidePlanWithContact; // with rotation
else
myTrihedron = GeomFill_IsGuidePlan; // sans rotation
myTrihedron = GeomFill_IsGuidePlan; // without rotation
Handle(GeomFill_GuideTrihedronPlan) TLaw =
new (GeomFill_GuideTrihedronPlan) (Guide);
@@ -365,12 +365,12 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine)
new (GeomFill_LocationGuide) (TLaw);
myLocation = new (BRepFill_Edge3DLaw) (mySpine, Loc);
}
mySection.Nullify(); //Il faut relocaliser les sections.
mySection.Nullify(); //It is required to relocalize the sections.
}
//=======================================================================
//function : Add
//purpose : Ajoute une Section
//purpose : Add a Section
//=======================================================================
void BRepFill_PipeShell::Add(const TopoDS_Shape& Profile,
const Standard_Boolean WithContact,
@@ -384,14 +384,14 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine)
//=======================================================================
//function : Add
//purpose : Ajoute une Section
//purpose : Add a Section
//=======================================================================
void BRepFill_PipeShell::Add(const TopoDS_Shape& Profile,
const TopoDS_Vertex& Location,
const Standard_Boolean WithContact,
const Standard_Boolean WithCorrection)
{
Delete(Profile); // Pas de duplication
Delete(Profile); // No duplication
BRepFill_Section S (Profile, Location, WithContact, WithCorrection);
mySeq.Append(S);
mySection.Nullify();
@@ -400,7 +400,7 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine)
//=======================================================================
//function : SetLaw
//purpose : Section + Loi d'homothetie
//purpose : Section + law of homothety
//=======================================================================
void BRepFill_PipeShell::SetLaw(const TopoDS_Shape& Profile,
const Handle(Law_Function)& L,
@@ -415,7 +415,7 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine)
//=======================================================================
//function : SetLaw
//purpose : Section + Loi d'homothetie
//purpose : Section + Law of homothety
//=======================================================================
void BRepFill_PipeShell::SetLaw(const TopoDS_Shape& Profile,
const Handle(Law_Function)& L,
@@ -434,7 +434,7 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine)
//=======================================================================
//function : Delete
//purpose : Supprime une section
//purpose : Delete a section
//=======================================================================
void BRepFill_PipeShell::Delete(const TopoDS_Shape& Profile)
{
@@ -500,14 +500,14 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine)
//=======================================================================
//function : SetTransition
//purpose : Definit le mode de traitement des coins
//purpose : Defines the mode of processing of corners
//=======================================================================
void BRepFill_PipeShell::SetTransition(const BRepFill_TransitionStyle Mode,
const Standard_Real Angmin,
const Standard_Real Angmax)
{
if (myTransition != Mode)
mySection.Nullify(); //Il faut relocaliser les sections.
mySection.Nullify(); //It is required to relocalize the sections.
myTransition = Mode;
angmin = Angmin;
angmax = Angmax;
@@ -515,7 +515,7 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine)
//=======================================================================
//function : Simulate
//purpose : Calcul N Sections
//purpose : Calculate N Sections
//=======================================================================
void BRepFill_PipeShell::Simulate(const Standard_Integer N,
TopTools_ListOfShape& List)
@@ -530,14 +530,14 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine)
Standard_Boolean Finis=Standard_False;
TopoDS_Shape W;
// Calcul des parametres de digitalisation
// Calculate the parameters of digitalization
mySection->Law(1)->GetDomain(FirstS, Last);
DeltaS = Last - FirstS;
myLocation->CurvilinearBounds(NbL,First, Length);
Delta = Length;
if (N>1) Delta /= (N-1);
myLocation->CurvilinearBounds(1,First, Last); // Init de Last
myLocation->CurvilinearBounds(1,First, Last); // Initiation of Last
for (U=0.0, ii=1; !Finis ; U+=Delta) {
if (U >= Length) {
U = Length;
@@ -545,7 +545,7 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine)
}
else {
if (ii < NbL) myLocation->CurvilinearBounds(NbL,First, Last);
if (U > Last) U = (Last+First)/2; // On ne saute pas une arete
if (U > Last) U = (Last+First)/2; // The edge is not skipped
if (U> First) ii++;
}
US = FirstS + (U/Length)*DeltaS;
@@ -558,7 +558,7 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine)
//=======================================================================
//function : Build
//purpose : Construit le Shell et l'historique
//purpose : Construct the Shell and the history
//=======================================================================
Standard_Boolean BRepFill_PipeShell::Build()
{
@@ -575,7 +575,7 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine)
return Standard_False;
}
// 2) Calcul de myFirst et myLast
// 2) Calculate myFirst and myLast
mySection->Law(1)->GetDomain(FirstS, LastS);
mySection->D0(FirstS, myFirst);
myLocation->D0(0, myFirst);
@@ -671,7 +671,7 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine)
Standard_Boolean BRepFill_PipeShell::MakeSolid()
{
if (myShape.IsNull())
StdFail_NotDone::Raise("PipeShell is not build");
StdFail_NotDone::Raise("PipeShell is not built");
Standard_Boolean B = myShape.Closed();
BRep_Builder BS;
@@ -681,7 +681,7 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine)
B = (myFirst.Closed() && myLast.Closed());
}
if (B) {
// Il faut boucher les extremites
// It is necessary to block the extremities
B = PerformPlan(myFirst);
if (B) {
B = PerformPlan(myLast);
@@ -721,7 +721,7 @@ BRepFill_PipeShell::BRepFill_PipeShell(const TopoDS_Wire& Spine)
//=======================================================================
//function : Shape
//purpose : Renvoi le resultat
//purpose : Return the result
//=======================================================================
const TopoDS_Shape& BRepFill_PipeShell::Shape() const
{
@@ -730,7 +730,7 @@ const TopoDS_Shape& BRepFill_PipeShell::Shape() const
//=======================================================================
//function : FirstShape
//purpose : Renvoi la section du debut
//purpose : Return the start section
//=======================================================================
const TopoDS_Shape& BRepFill_PipeShell::FirstShape() const
{
@@ -739,7 +739,7 @@ const TopoDS_Shape& BRepFill_PipeShell::FirstShape() const
//=======================================================================
//function : LastShape
//purpose : Renvoi la section de fin
//purpose : Return the end section
//=======================================================================
const TopoDS_Shape& BRepFill_PipeShell::LastShape() const
{
@@ -765,16 +765,16 @@ void BRepFill_PipeShell::Generated(const TopoDS_Shape& theShape,
//=======================================================================
//function : Prepare
//purpose : - Verifie que tout est pret
// - Construit la loi de section
// - Construit la loi de location si necessaire
// - Calcul First & Last
//purpose : - Check that everything is ready
// - Construct the law of section
// - Construct the law of location if required
// - Calculate First & Last
//=======================================================================
void BRepFill_PipeShell::Prepare()
{
TopoDS_Wire theSect;
if (!IsReady()) StdFail_NotDone::Raise("PipeShell");
if (!myLocation.IsNull() && !mySection.IsNull()) return; // C'est deja pret
if (!myLocation.IsNull() && !mySection.IsNull()) return; // It is ready
//Check set of section for right configuration of punctual sections
Standard_Integer i;
@@ -803,7 +803,7 @@ void BRepFill_PipeShell::Generated(const TopoDS_Shape& theShape,
Standard_Failure::Raise("Wrong usage of punctual sections");
}
// Construction de la loi de location
// Construction of the law of location
if(myLocation.IsNull())
{
switch(myTrihedron)
@@ -818,17 +818,17 @@ void BRepFill_PipeShell::Generated(const TopoDS_Shape& theShape,
break;
}
default :
{ // Pas prevu !
{ // Not planned!
Standard_ConstructionError::Raise("PipeShell");
}
}
}
//Transformation de la loi (Gestion Transition)
//Transformation of the law (Transition Management)
PerformTransition(myTransition, myLocation, angmin);
// Construction de la loi de section
// Construction of the section law
if (mySeq.Length() == 1) {
Standard_Real p1;
gp_Trsf aTrsf;
@@ -867,20 +867,20 @@ void BRepFill_PipeShell::Generated(const TopoDS_Shape& theShape,
}
// sections bouclantes ?
// looping sections ?
if (myLocation->IsClosed()) {
if (ideb>0) {
// on place la section initiale en position finale
// place the initial section at the final position
Param.Append(V2);
WSeq.Append(WSeq(ideb));
}
else if (ifin>0) {
// on place la section finale en position initiale
// place the final section at the initial position
Param.Append(V1);
WSeq.Append(WSeq(ifin));
}
else {
// il faut trouver une section moyenne a imposer en V1 et en V2
// it is necessary to find a medium section to impose by V1 and by V2
Standard_Real pmin = Param.Value(1), pmax = Param.Value(1);
TopoDS_Wire Wmin = TopoDS::Wire(WSeq.Value(1)), Wmax;
for (iseq=2;iseq<=WSeq.Length();iseq++) {
@@ -893,12 +893,12 @@ void BRepFill_PipeShell::Generated(const TopoDS_Shape& theShape,
Wmax = TopoDS::Wire(WSeq.Value(iseq));
}
}
// section moyenne entre Wmin et Wmax
// medium section between Wmin and Wmax
TopoDS_Wire Wres;
Standard_Real dmin = Abs(pmin-V1);
Standard_Real dmax = Abs(pmax-V2);
if (ComputeSection(Wmin,Wmax,dmin,dmax,Wres)) {
// on impose la section Wres au debut et a la fin
// impose section Wres at the beginning and the end
Param.Append(V1);
WSeq.Append(Wres);
Param.Append(V2);
@@ -909,7 +909,7 @@ void BRepFill_PipeShell::Generated(const TopoDS_Shape& theShape,
}
}
// tri des sections par parametre croissant
// parse sections by increasing parameter
Standard_Boolean play_again = Standard_True;
while (play_again) {
play_again = Standard_False;
@@ -938,7 +938,7 @@ void BRepFill_PipeShell::Generated(const TopoDS_Shape& theShape,
// Calcul des sections de travail
// Calculate work sections
TopTools_SequenceOfShape WorkingSections;
WorkingSections.Clear();
TopTools_DataMapOfShapeListOfShape WorkingMap;
@@ -957,7 +957,7 @@ void BRepFill_PipeShell::Generated(const TopoDS_Shape& theShape,
}// else
// on modifie la loi de location si contact
// modify the law of location if contact
if ( (myTrihedron == GeomFill_IsGuidePlanWithContact)
|| (myTrihedron == GeomFill_IsGuideACWithContact) ) {
Standard_Real fs, f, l, Delta, Length;
@@ -972,7 +972,7 @@ void BRepFill_PipeShell::Generated(const TopoDS_Shape& theShape,
myLocation->CurvilinearBounds(ipath, f, l);
Loc = Handle(GeomFill_LocationGuide)::DownCast(myLocation->Law(ipath));
Loc->Set(Sec, Standard_True, fs + f*Delta, fs + l*Delta,
old_angle, angle); // on force la rotation
old_angle, angle); // force the rotation
old_angle = angle;
}
}
@@ -982,8 +982,8 @@ void BRepFill_PipeShell::Generated(const TopoDS_Shape& theShape,
//=======================================================================
//function : Place
//purpose : Met en Place une Section dans le repere local
// et retourne son parametre sur la trajectoire
//purpose : Implement a Section in the local refernce frame
// and return its parameter on the trajectory
//=======================================================================
void BRepFill_PipeShell::Place(const BRepFill_Section& Sec,
TopoDS_Wire& W,
@@ -1006,7 +1006,7 @@ void BRepFill_PipeShell::Place(const BRepFill_Section& Sec,
//=======================================================================
//function : ResetLoc
//purpose : Supprime les references aux sections dans les loi de location
//purpose : Remove references to the sections in the laws of location
//=======================================================================
void BRepFill_PipeShell::ResetLoc()
{
@@ -1015,7 +1015,7 @@ void BRepFill_PipeShell::Place(const BRepFill_Section& Sec,
Handle(GeomFill_LocationGuide) Loc;
for (Standard_Integer isec=1; isec<=myLocation->NbLaw(); isec++) {
Loc = Handle(GeomFill_LocationGuide)::DownCast(myLocation->Law(isec));
Loc->EraseRotation();// on supprime la rotation
Loc->EraseRotation();// remove the rotation
}
}
}

View File

@@ -30,7 +30,7 @@
//=======================================================================
//function : NbLaw
//purpose : Donne le nombre de loi elementaire (ou Geometrique)
//purpose : Gives the number of elementary (or Geometric) law
//=======================================================================
Standard_Integer BRepFill_SectionLaw::NbLaw() const
{
@@ -68,7 +68,7 @@
//=======================================================================
//function : Init
//purpose : Prepare le parcour d'un wire
//purpose : Prepare the parsing of a wire
//=======================================================================
void BRepFill_SectionLaw::Init(const TopoDS_Wire& W)
{
@@ -77,7 +77,7 @@
//=======================================================================
//function :
//purpose : Parcourt d'un wire en sautant les Edges degenere
//purpose : Parses the wire omitting the degenerated Edges
//=======================================================================
TopoDS_Edge BRepFill_SectionLaw::CurrentEdge()
{
@@ -87,14 +87,14 @@
Standard_Boolean Suivant = Standard_False;
if (myIterator.More()) {
E = myIterator.Current();
// Suivant = (B.Degenerated(E));
// Next = (B.Degenerated(E));
Suivant = (BRep_Tool::Degenerated(E));
}
while (Suivant) {
myIterator.Next();
E = myIterator.Current();
// Suivant = (B.Degenerated(E) && myIterator.More());
// Next = (B.Degenerated(E) && myIterator.More());
Suivant = (BRep_Tool::Degenerated(E) && myIterator.More());
}

View File

@@ -144,7 +144,7 @@ BRepFill_SectionPlacement(const Handle(BRepFill_LocationLaw)& Law,
// modified by NIZHNY-629 Fri Jul 25 11:10:27 2003 b
// // section ponctuelle
// // punctual section
// Ex.Init(mySection, TopAbs_EDGE);
// Standard_Boolean isPonctual = Standard_False;
// if (Ex.More()) {
@@ -270,7 +270,7 @@ BRepFill_SectionPlacement(const Handle(BRepFill_LocationLaw)& Law,
GeomFill_SectionPlacement Place(myLaw->Law(1), theSection);
// Dans le cas generale : Localisation via une concatenation de la spine
// In the general case : Localisation via concatenation of the spine
TColStd_Array1OfReal SuperKnot(1, myLaw->NbLaw()+1);
TColStd_Array1OfInteger Index(1, myLaw->NbLaw());
for (ii=1; ii<=myLaw->NbLaw(); ii++) {
@@ -310,7 +310,7 @@ BRepFill_SectionPlacement(const Handle(BRepFill_LocationLaw)& Law,
Ind1 = Index(Ind1);
if (Ind2) Ind2 = Index(Ind2);
// Positionnement sur l'edge (ou les 2 Edges) localisee(s)
// Positioning on the localized edge (or 2 Edges)
Standard_Real Angle;
Place.SetLocation(myLaw->Law(Ind1));
if(TheV.IsNull())

View File

@@ -33,8 +33,8 @@
//=======================================================================
//function : Create
//purpose : On traite le cas du Vertex en construisant, une line,
// ayant le vertex pour origine
//purpose : Process the case of Vertex by constructing a line
// with the vertex in the origin
//=======================================================================
BRepFill_ShapeLaw::BRepFill_ShapeLaw(const TopoDS_Vertex& V,
const Standard_Boolean Build)
@@ -43,14 +43,14 @@ BRepFill_ShapeLaw::BRepFill_ShapeLaw(const TopoDS_Vertex& V,
{
TheLaw.Nullify();
uclosed = Standard_False;
vclosed = Standard_True; // loi constante
vclosed = Standard_True; // constant law
myEdges = new (TopTools_HArray1OfShape) (1, 1);
myEdges->SetValue(1, V);
if (Build) {
myLaws = new (GeomFill_HArray1OfSectionLaw) (1, 1);
// gp_Pnt Origine;
gp_Dir D(1,0,0); //Suivant la normal
gp_Dir D(1,0,0); //Following the normal
Handle(Geom_Line) L = new (Geom_Line)(BRep_Tool::Pnt(V), D);
Standard_Real Last = 2*BRep_Tool::Tolerance(V)+Precision::PConfusion();
Handle(Geom_TrimmedCurve) TC = new (Geom_TrimmedCurve) (L, 0, Last);
@@ -78,7 +78,7 @@ BRepFill_ShapeLaw::BRepFill_ShapeLaw(const TopoDS_Wire& W,
//=======================================================================
//function : Create
//purpose : Wire evolutif
//purpose : Evolutive Wire
//=======================================================================
BRepFill_ShapeLaw::BRepFill_ShapeLaw(const TopoDS_Wire& W,
@@ -94,7 +94,7 @@ BRepFill_ShapeLaw::BRepFill_ShapeLaw(const TopoDS_Wire& W,
//=======================================================================
//function : Init
//purpose : Cas du wire : On cree une table de GeomFill_SectionLaw
//purpose : Case of the wire : Create a table of GeomFill_SectionLaw
//=======================================================================
void BRepFill_ShapeLaw::Init(const Standard_Boolean Build)
{
@@ -132,7 +132,7 @@ void BRepFill_ShapeLaw::Init(const Standard_Boolean Build)
if (E.Orientation() == TopAbs_REVERSED) {
Standard_Real aux;
Handle(Geom_Curve) CBis;
CBis = C->Reversed(); // Pour eviter de deteriorer la topologie
CBis = C->Reversed(); // To avoid the deterioration of the topology
aux = C->ReversedParameter(First);
First = C->ReversedParameter(Last);
Last = aux;
@@ -152,11 +152,11 @@ void BRepFill_ShapeLaw::Init(const Standard_Boolean Build)
}
}
if ((ii>1) || !IsReallyClosed ) { // On trimme C
if ((ii>1) || !IsReallyClosed ) { // Trim C
Handle(Geom_TrimmedCurve) TC = new Geom_TrimmedCurve(C,First, Last);
C = TC;
}
// sinon On garde l'integrite de la courbe
// otherwise preserve the integrity of the curve
if (TheLaw.IsNull()) {
myLaws->ChangeValue(ii) = new GeomFill_UniformSection(C);
}
@@ -171,10 +171,10 @@ void BRepFill_ShapeLaw::Init(const Standard_Boolean Build)
// cout << "new law" << endl;
// La loi est elle ferme en U ?
// Is the law closed by U ?
uclosed = W.Closed();
if (!uclosed) {
// le flag n'etant pas tres sur, on fait une verif
// if not sure about the flag, make check
TopoDS_Edge Edge1, Edge2;
TopoDS_Vertex V1,V2;
Edge1 = TopoDS::Edge (myEdges->Value(myEdges->Length()));
@@ -263,7 +263,7 @@ void BRepFill_ShapeLaw::Init(const Standard_Boolean Build)
///=======================================================================
//function : VertexTol
//purpose : Evalue le trou entre 2 edges de la section
//purpose : Evaluate the hole between 2 edges of the section
//=======================================================================
Standard_Real BRepFill_ShapeLaw::VertexTol(const Standard_Integer Index,
const Standard_Real Param) const
@@ -271,7 +271,7 @@ void BRepFill_ShapeLaw::Init(const Standard_Boolean Build)
Standard_Real Tol = Precision::Confusion();
Standard_Integer I1, I2;
if ( (Index==0) || (Index==myEdges->Length()) ) {
if (!uclosed) return Tol; //Le moins faux possible
if (!uclosed) return Tol; //The least possible error
I1 = myEdges->Length();
I2 = 1;
}
@@ -339,7 +339,7 @@ void BRepFill_ShapeLaw::Init(const Standard_Boolean Build)
TopoDS_Vertex V;
W = TopoDS::Wire(myShape);
if(!W.IsNull()) {
// Concatenation des aretes
// Concatenation of edges
Standard_Integer ii;
Standard_Real epsV, f, l;
Standard_Boolean Bof;
@@ -388,7 +388,7 @@ void BRepFill_ShapeLaw::Init(const Standard_Boolean Build)
TopoDS_Edge Edge1, Edge2;
if ( (Index==0) || (Index==myEdges->Length()) ) {
if (!uclosed) return GeomAbs_C0; //Le moins faux possible
if (!uclosed) return GeomAbs_C0; //The least possible error
Edge1 = TopoDS::Edge (myEdges->Value(myEdges->Length()));
Edge2 = TopoDS::Edge (myEdges->Value(1));

View File

@@ -192,7 +192,7 @@ static Standard_Boolean HasPCurves(const TopoDS_Edge& E)
//=======================================================================
//function : Translate
//purpose : Copy une colonne d'un tableau dans un autre.
//purpose : Copy a column from one table to another.
//=======================================================================
static void Translate(const Handle(TopTools_HArray2OfShape)& ArrayIn,
const Standard_Integer In,
@@ -209,7 +209,7 @@ static void Translate(const Handle(TopTools_HArray2OfShape)& ArrayIn,
//=======================================================================
//function : Box
//purpose : Boite d'encombrement d'une section.
//purpose : Bounding box of a section.
//=======================================================================
static void Box(Handle(GeomFill_SectionLaw)& Sec,
const Standard_Real U,
@@ -229,8 +229,8 @@ static void Box(Handle(GeomFill_SectionLaw)& Sec,
//=======================================================================
//function : Couture
//purpose : Controle si E est une arete de couture sur S
// et rend la representation HadHoc
//purpose : Check if E is an edge of sewing on S
// and make the representation HadHoc
//=======================================================================
static Handle(Geom2d_Curve) Couture(const TopoDS_Edge& E,
const Handle(Geom_Surface)& S,
@@ -261,7 +261,7 @@ static Handle(Geom2d_Curve) Couture(const TopoDS_Edge& E,
//=======================================================================
//function : CheckSameParameter
//purpose : Controle a posteriori que sameparameter a bien fait son boulot
//purpose : Check a posteriori that sameparameter has worked correctly
//=======================================================================
static Standard_Boolean CheckSameParameter
@@ -298,9 +298,9 @@ static Standard_Boolean CheckSameParameter
//=======================================================================
//function : SameParameter
//purpose : Encapsulation de Sameparameter
// Le boolean dit si l'on a calcule la pcurve ou non...
// La tolerance est toujours Ok.
//purpose : Encapsulation of Sameparameter
// Boolean informs if the pcurve was computed or not...
// The tolerance is always OK.
//=======================================================================
static Standard_Boolean SameParameter(TopoDS_Edge& E,
@@ -348,8 +348,8 @@ static Standard_Boolean SameParameter(TopoDS_Edge& E,
ResTol = sp.TolReached();
if(ResTol > tolreached ){
#ifdef DEB
cout<<"SameParameter : Tol non atteinte!!!"<<endl;
cout<<"tol visee : "<<tol3d<<" tol obtenue : "<<ResTol<<endl;
cout<<"SameParameter : Tolerance not reached!"<<endl;
cout<<"tol visee : "<<tol3d<<" tol obtained : "<<ResTol<<endl;
#endif
return Standard_False;
}
@@ -361,8 +361,8 @@ static Standard_Boolean SameParameter(TopoDS_Edge& E,
}
//=======================================================================
//Objet : Oriente une arete de restriction naturelle
// : Cas generale
//Objet : Orientate an edge of natural restriction
// : General
//=======================================================================
static void Oriente(const Handle(Geom_Surface)& S,
TopoDS_Edge& E)
@@ -417,10 +417,10 @@ static void UpdateEdgeOnPlane(const TopoDS_Face& F, const TopoDS_Edge& E,
//<-OCC500(apo)
//=======================================================================
//Function : BuildFace
//Objet : Construire une Face via, une surface et 4 Edge( Bords naturels)
// : Seule Hypothese : les iso u et v sont alternee :
// Edge1/3 sont des iso u (recp v)
// Edge2/4 sont des iso v (recp u)
//Objet : Construct a Face via a surface and 4 Edges (natural borders)
// : Only one Hypothesis : isos u and v are switched :
// Edge1/3 are iso u (recp v)
// Edge2/4 are iso v (recp u)
//=======================================================================
static void BuildFace(const Handle(Geom_Surface)& S,
const TopoDS_Edge& E1,
@@ -442,7 +442,7 @@ static void BuildFace(const Handle(Geom_Surface)& S,
TopoDS_Iterator Iter;
//gp_Pnt2d P;
//La surface est elle plane ?
//Is the surface planar ?
Standard_Real Tol1, Tol2, Tol3, Tol4;
Tol1 = BRep_Tool::Tolerance( E1 );
Tol2 = BRep_Tool::Tolerance( E2 );
@@ -492,7 +492,7 @@ static void BuildFace(const Handle(Geom_Surface)& S,
}
}
// Construction du wire
// Construction of the wire
// B.MakeWire(WW);
e1 = E1;
Oriente(S, e1);
@@ -575,9 +575,9 @@ static void BuildFace(const Handle(Geom_Surface)& S,
}
#endif
// Construction de la face.
if (IsPlan) { // On vire les representation 2d
// et on constuit une face Plane
// Construction of the face.
if (IsPlan) { // Suspend representation 2d
// and construct face Plane
//BRepLib_MakeFace MkF(IsP.Plan(), WW);
gp_Pnt aPnt;
@@ -638,7 +638,7 @@ static void BuildFace(const Handle(Geom_Surface)& S,
//=======================================================================
//Fonction : BuildEdge
//Objet : Construit une Edge non fermee
//Objet : Construct non-closed Edge
//=======================================================================
static TopoDS_Edge BuildEdge(Handle(Geom_Curve)& C3d,
Handle(Geom2d_Curve)& C2d,
@@ -668,7 +668,7 @@ static TopoDS_Edge BuildEdge(Handle(Geom_Curve)& C3d,
if (VF.IsSame(VL) ||
(P1.Distance(P2) < Tol ) ) {
// Cas degenere
// Degenerated case
gp_Pnt2d P2d;
C2d->D0(f, P2d);
S->D0(P2d.X(), P2d.Y(), P);
@@ -705,7 +705,7 @@ static TopoDS_Edge BuildEdge(Handle(Geom_Curve)& C3d,
B.UpdateVertex(VL, d);
BRepLib_MakeEdge MkE (C3d, VF, VL, f, l);
if (!MkE.IsDone()) { // Erreur de construction !!
if (!MkE.IsDone()) { // Error of construction !!
#ifdef DRAW
char name[100];
sprintf(name,"firstvertex_error");
@@ -730,7 +730,7 @@ static TopoDS_Edge BuildEdge(Handle(Geom_Curve)& C3d,
//=======================================================================
//Fonction : Filling
//Objet : Construit les faces de remplisage
//Objet : Construct the faces of filling
//=======================================================================
static Standard_Boolean Filling(const TopoDS_Shape& EF,
const TopoDS_Shape& F1,
@@ -751,7 +751,7 @@ static Standard_Boolean Filling(const TopoDS_Shape& EF,
// Standard_Real Tol3d = Tol;
Standard_Boolean WithE3, WithE4;
// Recuperation des contraintes
// Return constraints
TopoDS_Vertex V1, V2, Vf, Vl;
TopoDS_Edge E1, E2, E3, E4;
E1 = TopoDS::Edge(EF);
@@ -798,7 +798,7 @@ static Standard_Boolean Filling(const TopoDS_Shape& EF,
}
#endif
// Construction d'une surface de revolution
// Construction of a surface of revolution
Handle(Geom_Curve) Prof1, Prof2;
//Standard_Integer ii, jj;//, Nb;
Standard_Real f1, f2, l1, l2,/*d1, d2,*/ Angle;//, Eps = 1.e-9;
@@ -811,7 +811,7 @@ static Standard_Boolean Filling(const TopoDS_Shape& EF,
gp_Trsf Tf;
Tf.SetTransformation(Axe);
// Choix d'un angle d'ouverture
// Choose the angle of opening
P1 = Prof1->Value((f1+l1)/2);
P2 = Prof2->Value((f2+l2)/2);
P1.Transform(Tf);
@@ -838,11 +838,11 @@ static Standard_Boolean Filling(const TopoDS_Shape& EF,
Handle(Geom_Surface) Surf =
new (Geom_RectangularTrimmedSurface) (Rev, 0, Angle, f1, l1);
// Controle le sens de la rotation
// Control the direction of the rotation
Standard_Boolean ToReverseResult = Standard_False;
gp_Vec d1u;
d1u = Surf->DN(0, (f1+l1)/2, 1, 0);
if (d1u.Angle(TangentOnPart1) > PI/2) { //On inverse tout
if (d1u.Angle(TangentOnPart1) > PI/2) { //Invert everything
ToReverseResult = Standard_True;
/*
axe.Reverse();
@@ -862,7 +862,7 @@ static Standard_Boolean Filling(const TopoDS_Shape& EF,
Handle(Geom2d_Curve) C1, C2, C3, C4;
/*
// Deformation de la surface de revolution.
// Deform the surface of revolution.
GeomPlate_BuildPlateSurface BPS;
Handle(BRepAdaptor_HSurface) AS;
@@ -879,7 +879,7 @@ static Standard_Boolean Filling(const TopoDS_Shape& EF,
L = new (Geom2d_Line) (P2d, gp::DY2d());
C2 = new (Geom2d_TrimmedCurve) (L, f1, l1);
// Ici il faut controler le sens et le range.
// It is required to control the direction and the range.
C2->D0(f1, P2d);
Surf->D0(P2d.X(), P2d.Y(), P1);
C2->D0(l1, P2d);
@@ -887,7 +887,7 @@ static Standard_Boolean Filling(const TopoDS_Shape& EF,
// P = BT.Pnt(V1);
P = BRep_Tool::Pnt(V1);
if (P.Distance(P2)+Tol < P.Distance(P1)) {
// E2 est (sans doute!) parcourue dans le sens inverse de E1
// E2 is parsed in the direction opposite to E1
C2->Reverse();
TopoDS_Vertex aux;
aux = V2;
@@ -924,8 +924,8 @@ static Standard_Boolean Filling(const TopoDS_Shape& EF,
L = new (Geom2d_Line) (P2d, gp::DX2d());
C4 = new (Geom2d_TrimmedCurve) (L, 0, Angle);
/*
// Determination des contraintes et
// de leur localisation parametrique.
// Determine the constraints and
// their parametric localisation.
if (!E1.IsNull()) {
AS = new BRepAdaptor_HSurface(TopoDS::Face(F1));
AC2d = new BRepAdaptor_HCurve2d();
@@ -1113,16 +1113,16 @@ static Standard_Boolean Filling(const TopoDS_Shape& EF,
}
}
//Construction de la face
//Construct face
BuildFace(Surf,E1, E3, E2, E4, EEmap,
Standard_False, Standard_False,
Result);
// Set Les continuites.
// Set the continuities.
B.Continuity(E1, TopoDS::Face(F1), Result, GeomAbs_G1);
B.Continuity(E2, TopoDS::Face(F2), Result, GeomAbs_G1);
// Rend les bords calcules.
// Render the calculated borders.
// if (!BT.Degenerated(E3))
if (!BRep_Tool::Degenerated(E3))
Aux1 = E3;
@@ -1135,7 +1135,7 @@ static Standard_Boolean Filling(const TopoDS_Shape& EF,
else
B.MakeEdge(Aux2);
// Set de l'orientation
// Set the orientation
gp_Vec D1U, D1V, N1, N2;
C1->D0( (f1+l1)/2, P2d);
Surf->D1(P2d.X(), P2d.Y(), P, D1U, D1V);
@@ -1197,7 +1197,7 @@ static void Substitute(BRepTools_Substitution& aSubstitute,
//=======================================================================
//Function : SetCommonEdgeInFace
//Purpose : Replace an edge of the face by correspondent edge from
//Purpose : Replace an edge of the face by the corresponding edge from
// myUEdges
//=======================================================================
/*
@@ -1236,7 +1236,7 @@ static void SetCommonEdgeInFace(BRepTools_Substitution& aSubstitute,
//=======================================================================
//Fonction : KeepEdge
//Objet : Recheche les edges de la face supporte par la meme Courbe.
//Objet : Find edges of the face supported by the same Curve.
//=======================================================================
static void KeepEdge(const TopoDS_Shape& Face,
const TopoDS_Shape& Edge,
@@ -1263,7 +1263,7 @@ static void KeepEdge(const TopoDS_Shape& Face,
//=======================================================================
//Function :
//Objet : Construire un vertex via, une iso
//Objet : Construct a vertex via an iso
//=======================================================================
static void BuildVertex(const Handle(Geom_Curve)& Iso,
const Standard_Boolean isfirst,
@@ -1283,7 +1283,7 @@ static void BuildVertex(const Handle(Geom_Curve)& Iso,
//=======================================================================
//Function :
//Objet : Construire une arete vide
//Objet : Construct an empty edge
//=======================================================================
static TopoDS_Edge NullEdge(TopoDS_Shape& Vertex)
{
@@ -1300,7 +1300,7 @@ static TopoDS_Edge NullEdge(TopoDS_Shape& Vertex)
//=======================================================================
//Function :
//Objet : Construire une arete via, une iso
//Objet : Construct an edge via an iso
//=======================================================================
static TopoDS_Edge BuildEdge(const Handle(Geom_Surface)& S,
const Standard_Boolean isUiso,
@@ -1320,7 +1320,7 @@ static TopoDS_Edge BuildEdge(const Handle(Geom_Surface)& S,
Iso = S->VIso(ValIso);
}
if (VFirst.IsSame(VLast)) { // Cas Singulier ?
if (VFirst.IsSame(VLast)) { // Singular case ?
gp_Pnt P;
// Class BRep_Tool without fields and without Constructor :
// BRep_Tool BT;
@@ -1337,7 +1337,7 @@ static TopoDS_Edge BuildEdge(const Handle(Geom_Surface)& S,
}
if (sing) { // Cas Singulier
if (sing) { // Singular case
TopoDS_Shape V;
V = VFirst;
E = NullEdge(V);
@@ -1347,7 +1347,7 @@ static TopoDS_Edge BuildEdge(const Handle(Geom_Surface)& S,
}
else {
// Construction Via le 3d
// Construction Via 3d
// if (isUiso) {
// Iso = S->UIso(ValIso);
gp_Pnt P1,P2;
@@ -1426,7 +1426,7 @@ static TopoDS_Edge BuildEdge(const Handle(Geom_Surface)& S,
E = MkE.Edge();
}
// On associe le 2d
// Associate 2d
Handle(Geom2d_Line) L;
TopLoc_Location Loc;
if (isUiso) {
@@ -1450,7 +1450,7 @@ static TopoDS_Edge BuildEdge(const Handle(Geom_Surface)& S,
//=======================================================================
//Function :
//Objet : Completer une arete via, une iso
//Objet : Complete an edge via an iso
//=======================================================================
static void UpdateEdge(TopoDS_Edge& E,
const Handle(Geom_Surface)& S,
@@ -1475,7 +1475,7 @@ static void UpdateEdge(TopoDS_Edge& E,
TopoDS_Vertex Vf, Vl;
TopExp::Vertices(E, Vf, Vl);
if (Vf.IsSame(Vl)) { // Cas Singulier ?
if (Vf.IsSame(Vl)) { // Singular case ?
gp_Pnt Pmid;
Standard_Real tol = BRep_Tool::Tolerance(Vf);
Iso->D0((Iso->FirstParameter()+Iso->LastParameter())/2, Pmid);
@@ -1501,7 +1501,7 @@ static void UpdateEdge(TopoDS_Edge& E,
}
CL = new (Geom2d_TrimmedCurve) (L, F2d, L2d);
// Controle sens & Range
// Control direction & Range
Standard_Real R, First, Last, Tol=1.e-4;
Standard_Boolean reverse = Standard_False;;
@@ -1514,14 +1514,14 @@ static void UpdateEdge(TopoDS_Edge& E,
BRep_Tool::Range(E, First, Last);
if (!Vf.IsSame(Vl)) {
// On test les distance entre le "FirstPoint et les Vertex"
// Test distances between "FirstPoint" and "Vertex"
P2d = CL->Value(F2d);
POnS = S->Value(P2d.X(), P2d.Y());
// reverse = POnS.Distance(BT.Pnt(Vl)) < POnS.Distance(BT.Pnt(Vf));
reverse = POnS.Distance(BRep_Tool::Pnt(Vl)) < POnS.Distance(BRep_Tool::Pnt(Vf));
}
else if (!sing) {
// On test l'angle entre les "First Tangente"
// Test angle between "First Tangente"
gp_Vec2d V2d;
gp_Vec V3d, du, dv, dC3d;
BRepAdaptor_Curve C3d(E);
@@ -1532,7 +1532,7 @@ static void UpdateEdge(TopoDS_Edge& E,
V3d.SetLinearForm(V2d.X(), du, V2d.Y(), dv);
reverse = ( dC3d.Angle(V3d) > Tol);
}
if (reverse ) { // On retourne la courbe 2d
if (reverse ) { // Return curve 2d
CL = new (Geom2d_TrimmedCurve)(L, F2d, L2d);
CL->Reverse();
F2d = CL->FirstParameter();
@@ -1575,7 +1575,7 @@ static void UpdateEdge(TopoDS_Edge& E,
R = POnS.Distance(BRep_Tool::Pnt(V));
B.UpdateVertex(V, R);
// Update de l'Edge
// Update Edge
if (!sing && SameParameter(E, CL, S, Tol, R)) {
B.UpdateEdge(E, R);
}
@@ -1583,7 +1583,7 @@ static void UpdateEdge(TopoDS_Edge& E,
PCurve = Couture(E, S, Loc);
if (PCurve.IsNull())
B.UpdateEdge(E, CL, S, Loc, Precision::Confusion());
else { // Arete de couture
else { // Sewing edge
TopoDS_Edge e = E;
Oriente(S, e);
if (e.Orientation() == TopAbs_REVERSED)
@@ -1592,13 +1592,13 @@ static void UpdateEdge(TopoDS_Edge& E,
B.UpdateEdge(E, PCurve, CL, S, Loc, Precision::Confusion());
}
// Attention au cas non SameRange sur ces shapes (PRO13551)
// Attention to case not SameRange on its shapes (PRO13551)
// if (!BT.SameRange(E)) B.Range(E, S, Loc, First, Last);
if (!BRep_Tool::SameRange(E)) B.Range(E, S, Loc, First, Last);
}
//=======================================================================
//Objet : Voir si une surface est degenere
// Object : Check if a surface is degenerated
//=======================================================================
static Standard_Boolean IsDegen(const Handle(Geom_Surface)& S,
const Standard_Real Tol)
@@ -1613,7 +1613,7 @@ static Standard_Boolean IsDegen(const Handle(Geom_Surface)& S,
S->Bounds(Umin, Umax, Vmin, Vmax);
// Controle la longeur des Iso-U
// Check the length of Iso-U
t = (Umin + Umax)/2;
S->D0(t, Vmin, P1);
S->D0(t, (Vmin+Vmax)/2, P2);
@@ -1630,7 +1630,7 @@ static Standard_Boolean IsDegen(const Handle(Geom_Surface)& S,
if (B) return Standard_True;
// Controle la longeur des Iso-V
// Check the length of Iso-V
t = (Vmin + Vmax)/2;
S->D0(Umin, t, P1);
S->D0((Umin+Umax)/2, t, P2);
@@ -1676,7 +1676,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
//=======================================================================
//function : SetBounds
//purpose : Definit les shapes de debut et fin
//purpose : Define start and end shapes
//======================================================================
void BRepFill_Sweep::SetBounds(const TopoDS_Wire& First,
const TopoDS_Wire& Last)
@@ -1684,7 +1684,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
FirstShape = First;
LastShape = Last;
// Il faut verifier le SameRange sur ces shapes (PRO13551)
// It is necessary to check the SameRange on its (PRO13551)
Standard_Boolean issame = Standard_True;
BRep_Builder B;
BRepTools_WireExplorer wexp;
@@ -1710,7 +1710,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
#if DEB
if (!issame)
cout<<"Sweep Warning : Edge non SameRange dans les bornes"<<endl;
cout<<"Sweep Warning : Edge not SameRange in the limits"<<endl;
#endif
}
@@ -1772,7 +1772,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
//=======================================================================
//function : BuildWire
//purpose : Construit un wire par balayage
//purpose : Construit a wire by sweeping
//======================================================================
Standard_Boolean BRepFill_Sweep::
BuildWire(const BRepFill_TransitionStyle /*Transition*/)
@@ -1795,16 +1795,16 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
TopoDS_Edge E;
B.MakeWire(wire);
// (1) Construction de toutes les courbes
// (1) Construction of all curves
// (1.1) Construction des Tables
// (1.1) Construction of Tables
myFaces = new (TopTools_HArray2OfShape) (1, 1, 1, NbPath);
myUEdges = new (TopTools_HArray2OfShape) (1, 2, 1, NbPath);
myVEdges = new (TopTools_HArray2OfShape) (1, 1, 1, NbPath+1);
// (1.2) Calcul des courbes / vertex / edge
// (1.2) Calculate curves / vertex / edge
for (ipath=1; ipath <=NbPath; ipath++) {
// Courbe par iso valeur
// Curve by iso value
GeomFill_Sweep Sweep(myLoc->Law(ipath), KPart);
Sweep.SetTolerance(myTol3d, myBoundTol, myTol2d, myTolAngular);
Sweep.Build(mySec->Law(isec), myApproxStyle, myContinuity, myDegmax, mySegmax);
@@ -1821,7 +1821,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
else S->Bounds(val, bid, First, Last);
Iso = S->UIso(val);
}
// Vertex par positionement
// Vertex by position
if (ipath < NbPath)
BuildVertex(Iso, Standard_False, First, Last,
myVEdges->ChangeValue(1, ipath+1));
@@ -1854,14 +1854,14 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
myVEdges->ChangeValue(1, 1));
}
// Construction de l'arete
// Construction of the edge
BRepLib_MakeEdge MkE;
MkE.Init(Iso,
TopoDS::Vertex(myVEdges->Value(1, ipath)),
TopoDS::Vertex(myVEdges->Value(1, ipath+1)),
Iso->FirstParameter(),
Iso->LastParameter());
if (!MkE.IsDone()) { // Erreur de construction !!
if (!MkE.IsDone()) { // Error of construction !!
#ifdef DRAW
char name[100];
sprintf(name,"firstvertex_error");
@@ -1897,7 +1897,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
//=======================================================================
//function : BuildShell
//purpose : Construit une Shell par balayage
//purpose : Construct a Shell by sweeping
//======================================================================
Standard_Boolean BRepFill_Sweep::
BuildShell(const BRepFill_TransitionStyle /*Transition*/,
@@ -1920,15 +1920,15 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
(NbPath == myLoc->NbLaw()) && (myLoc->IsG1(0, myTol3d)>= 0);
Error = 0.;
// (1) Construction de toutes les surfaces
// (1) Construction of all surfaces
// (1.1) Construction des Tables
// (1.1) Construction of Tables
TColStd_Array2OfInteger ExchUV(1, NbLaw, 1, NbPath);
TColStd_Array2OfInteger UReverse(1, NbLaw, 1, NbPath);
TColStd_Array2OfInteger Degenerated(1, NbLaw, 1, NbPath);
Degenerated.Init(0);
// Pas de VReverse pour le moment...
// No VReverse for the moment...
TColStd_Array2OfReal TabErr(1, NbLaw , 1, NbPath);
TColGeom_Array2OfSurface TabS(1, NbLaw , 1, NbPath);
@@ -1944,8 +1944,8 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
TColStd_Array1OfReal VError(1, NbLaw+1);
TColStd_Array1OfReal Vi(1, NbPath+1);
//Initialisation de la gestion des intervalles parametrique
//(Cas des sections evolutive)
//Initialization of management of parametric intervals
//(Case of evolutionary sections)
Standard_Real Length, SecDom, SecDeb;
myLoc->CurvilinearBounds(myLoc->NbLaw(), SecDom, Length);
mySec->Law(1)->GetDomain(SecDeb, SecDom);
@@ -1958,7 +1958,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
else
Vi(1) = SecDeb;
// Erreur a priori sur les vertex
// Error a priori on vertices
if (constSection) {
for (isec=1; isec<=NbLaw+1; isec++) {
VError(isec) = mySec->VertexTol(isec-1, 0.);
@@ -1967,13 +1967,13 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
}
// (1.2) Calcul des surfaces
// (1.2) Calculate surfaces
for (ipath=1, IPath=IFirst; ipath <=NbPath; ipath++, IPath++) {
GeomFill_Sweep Sweep(myLoc->Law(IPath), KPart);
Sweep.SetTolerance(myTol3d, myBoundTol, myTol2d, myTolAngular);
// Cas des section evolutive, definition de la correspondance parametrique
// Case of evolutionary section, definition of parametric correspondence
if (!constSection) {
Standard_Real lf, ll, Lf, Ll;
myLoc->Law(IPath)->GetDomain(lf, ll);
@@ -2024,13 +2024,13 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
}
}
// (2) Construction des Edges
// (2) Construction of Edges
Standard_Real UFirst, ULast, VFirst, VLast;
Standard_Boolean exuv, singu, singv;
Handle(Geom_Surface) S;
if (! vclose) {
// (2.0) recuperation des Edges et vertex prexistant
// (2.0) return preexisting Edges and vertices
TopoDS_Edge E;
if (! FirstShape.IsNull() && (IFirst==1)) {
mySec->Init(FirstShape);
@@ -2051,11 +2051,11 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
UpdateVertex(IFirst-1, 1,
TabErr(1, 1), Vi(1), Vertex(1, 1));
}
else { // Sinon on construit quand meme les vertex
else { // Otherwise construct vertices
Standard_Real u, v, aux;
Standard_Boolean ureverse;
for (isec=1; isec<=NbLaw+1; isec++) {
// Recuperation des donne
// Return data
if (isec >NbLaw) {
S = TabS(NbLaw, 1);
ureverse = UReverse(NbLaw, 1);
@@ -2068,7 +2068,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
}
S->Bounds(UFirst, ULast, VFirst, VLast);
// Choix des parametres
// Choice of parameters
if (ureverse) {
if (exuv) {
aux = VFirst; VFirst = VLast; VLast = aux;
@@ -2092,7 +2092,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
}
}
// construction du vertex
// construction of vertices
B.MakeVertex(TopoDS::Vertex(Vertex(isec, 1)),
S->Value(u,v),
mySec->VertexTol(isec-1,Vi(1)));
@@ -2124,7 +2124,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
Standard_Real u, v, aux;
Standard_Boolean ureverse;
for (isec=1; isec<=NbLaw+1; isec++) {
// Recuperation des donne
// Return data
if (isec >NbLaw) {
S = TabS(NbLaw, NbPath);
ureverse = UReverse(NbLaw, NbPath);
@@ -2137,7 +2137,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
}
S->Bounds(UFirst, ULast, VFirst, VLast);
// Choix des parametres
// Choice of parametres
if (ureverse) {
if (exuv) {
aux = VFirst; VFirst = VLast; VLast = aux;
@@ -2161,7 +2161,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
}
}
// construction du vertex
// construction of vertex
B.MakeVertex(TopoDS::Vertex(Vertex(isec, NbPath+1)),
S->Value(u,v),
mySec->VertexTol(isec-1, Vi(NbPath+1)));
@@ -2170,7 +2170,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
}
// ---------- Creation de Vertex et edge ------------
// ---------- Creation of Vertex and edge ------------
for (ipath=1, IPath=IFirst; ipath<=NbPath;
ipath++, IPath++) {
for (isec=1; isec <=NbLaw; isec++) {
@@ -2187,10 +2187,10 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
}
}
// (2.1) Construction des nouveaux vertex
// (2.1) Construction of new vertices
if (isec == 1) {
if (ipath == 1 && Vertex(1, 1).IsNull()) {
// Le tout premier
// All first
if (constSection)
myLoc->PerformVertex(IPath-1,
TopoDS::Vertex(SecVertex(1)),
@@ -2202,7 +2202,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
mySec->VertexTol(0,Vi(1)),
TopoDS::Vertex(Vertex(1, 1)));
}
// le premier de la colonne suivante
// the first and the next column
if (vclose &&(ipath == NbPath) ) {
Vertex(1, ipath+1) = Vertex(1, 1);
}
@@ -2266,7 +2266,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
TopoDS::Vertex(Vertex(isec+1, ipath+1)) );
}
// Cas Singuliers
// Singular cases
singv = MergeVertex(Vertex(isec,ipath+1), Vertex(isec+1,ipath+1));
singu = MergeVertex(Vertex(isec+1,ipath), Vertex(isec+1,ipath+1));
@@ -2278,30 +2278,30 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
}
if (Degenerated(isec, ipath)) {
#if DEB
cout << "Sweep : Cas degenere" << endl;
cout << "Sweep : Degenerated case" << endl;
#endif
hasdegen = Standard_True;
// Construction particuliere des edge
// Particular construction of edges
if (UEdge(isec+1, ipath).IsNull()) {
if (singu) {
// Edge degenere
// Degenerated edge
UEdge(isec+1, ipath) = NullEdge(Vertex(isec+1,ipath));
}
else { // Copie de l'edge precedente
else { // Copy the previous edge
UEdge(isec+1, ipath) = UEdge(isec, ipath);
}
}
if (VEdge(isec, ipath+1).IsNull()) {
if (singv) {
// Edge degenere
// Degenerated Edge
VEdge(isec, ipath+1) = NullEdge(Vertex(isec,ipath+1));
}
else { // Copie de l'edge precedente
else { // Copy the previous edge
VEdge(isec, ipath+1) = VEdge(isec, ipath);
}
}
}
else { // Construction des edges par les isos
else { // Construction of edges by isos
if (exuv) {
Standard_Real UV;
UV = UFirst; UFirst = VFirst; VFirst = UV;
@@ -2360,10 +2360,10 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
S, exuv, VLast);
}
}//Fin de contruction des edges
}// End of construction of edges
}
// (3) Construction des Faces
// (3) Construction of Faces
TopoDS_Face face;
#ifdef DRAW
@@ -2413,10 +2413,10 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
}
// (4) Historique et Continuity
// (4) History and Continuity
if (hasdegen) {
//(4.1) // Cas degenere => Marteau Pilon
//(4.1) // Degenerated case => Sledgehammer
TopoDS_Compound Comp;
B.MakeCompound(Comp);
for (isec=1; isec <= NbLaw+1; isec++)
@@ -2430,7 +2430,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
BRepLib::EncodeRegularity(Comp, myTolAngular);
}
else {
//(4.2) // Cas generale => Pince a epiler
//(4.2) // General case => Tweezers
Standard_Boolean isG1;
TopoDS_Face FF;
TopoDS_Edge E;
@@ -2452,7 +2452,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
}
Standard_Integer nbpath = NbPath;
if (vclose) nbpath++; //Un test G1 en plus
if (vclose) nbpath++; //Another test G1
for (ipath=1, IPath=IFirst; ipath<= NbPath+1; ipath++, IPath++) {
if ((ipath > 1) && (ipath <=nbpath))
isG1 = (myLoc->IsG1(IPath-1, myTol3d, myTolAngular) >= 0);
@@ -2475,7 +2475,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
//=======================================================================
//function : Build
//purpose : Construit le resultat d'un balayage
//purpose : Construt the result of sweeping
//======================================================================
void BRepFill_Sweep::Build(const BRepFill_TransitionStyle Transition,
const GeomFill_ApproxStyle Approx,
@@ -2507,20 +2507,20 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
Handle(TColStd_HArray1OfInteger) Trous;
if (NbTrous>0) { // Combien de sous parties ?
if (NbTrous>0) { // How many sub-parts ?
Trous = new (TColStd_HArray1OfInteger) (1, NbTrous);
myLoc->Holes(Trous->ChangeArray1());
NbPart += NbTrous;
if (Trous->Value(NbTrous) == NbPath+1) NbPart--;
}
if (NbPart == 1) { // On le fait en un coup
if (NbPart == 1) { // This is done at once
Standard_Real Extend = 0.0;
if (NbTrous==1) Extend = EvalExtrapol(1, Transition);
isDone = BuildShell(Transition,
1, NbPath+1,
Extend, Extend);
}
else { // On le fait bout par bout
else { // This is done piece by piece
Standard_Integer IFirst = 1, ILast;
for (ii=1, isDone=Standard_True;
ii<=NbPart && isDone; ii++) {
@@ -2539,7 +2539,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
Translate(myVEdges, IFirst, Bounds, 1);
}
}
// Gestion des terminaisons bouclantes
// Management of looping ends
if ( (NbTrous>0) && (myLoc->IsClosed()) &&
(Trous->Value(NbTrous) == NbPath+1) ) {
Translate(myVEdges, NbPath+1, Bounds, 1);
@@ -2547,7 +2547,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
PerformCorner(1, Transition, Bounds);
}
// Construction de la shell
// Construction of the shell
TopoDS_Shell shell;
B.MakeShell(shell);
for (ipath=1; ipath<=NbPath; ipath++)
@@ -2634,9 +2634,9 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
}
}
// Est ce Ferme ?
// Is it Closed ?
if (myLoc->IsClosed() && mySec->IsUClosed()) {
//On verifie
//Check
Standard_Boolean closed = Standard_True;
Standard_Integer iedge;
TopTools_IndexedDataMapOfShapeListOfShape EFmap;
@@ -2684,7 +2684,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
//=======================================================================
//function : SubShape
//purpose : Les faces obtenues par balayage
//purpose : Faces obtained by sweeping
//=======================================================================
Handle(TopTools_HArray2OfShape) BRepFill_Sweep::SubShape() const
{
@@ -2693,7 +2693,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
//=======================================================================
//function : InterFaces
//purpose : les Edges obtenues par balayage
//purpose : Edges obtained by sweeping
//=======================================================================
Handle(TopTools_HArray2OfShape) BRepFill_Sweep::InterFaces() const
{
@@ -2702,7 +2702,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
//=======================================================================
//function : Sections
//purpose : Les Edges ou Face (ou compound des 2) Transition entre 2 balayages.
//purpose : Edges or Face (or compound of 2) Transition between 2 sweepings
//=======================================================================
Handle(TopTools_HArray2OfShape) BRepFill_Sweep::Sections() const
{
@@ -2711,14 +2711,14 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
//=======================================================================
//function : PerformCorner
//purpose : Trim et/ou bouche un coin
//purpose : Trim and/or loop a corner
//======================================================================
void BRepFill_Sweep::PerformCorner(const Standard_Integer Index,
const BRepFill_TransitionStyle Transition,
const Handle(TopTools_HArray2OfShape)& Bounds)
{
if (Transition == BRepFill_Modified) return; // On ne fait rien.
if (Transition == BRepFill_Modified) return; // Do nothing.
BRepFill_TransitionStyle TheTransition = Transition;
Standard_Boolean isTangent=Standard_False;
@@ -2740,7 +2740,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
I2 = 1;
}
// On Construit un axe supporte par la bissectrice
// Construct an axis supported by the bissectrice
myLoc->Law(I1)->GetDomain(F, L);
myLoc->Law(I1)->GetCurve()->D1(L, P1, T1);
T1.Normalize();
@@ -2762,7 +2762,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
if (t1.Angle(t2) < myAngMin) {
#if DEB
cout << "BRepFill_Sweep::PerformCorner : Ce n'est pas un coin !" << endl;
cout << "BRepFill_Sweep::PerformCorner : This is not a corner !" << endl;
#endif
return;
}
@@ -2774,15 +2774,15 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
TheTransition = BRepFill_Round;
}
Tang = T1 + T2; //Direction moyenne
Tang = T1 + T2; //Average direction
gp_Dir NormalOfBisPlane = Tang;
if (isTangent) {
Sortant -= Tang.Dot(Tang)*Tang;
}
else {
Sortant = T2-T1; //Direction rentrente
Sortant *= -1; // " " sortante
Sortant = T2-T1; //Direction input
Sortant *= -1; // " " output
Tang -= (Tang.Dot(T2))*T2;
}
@@ -2793,7 +2793,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
gp_Ax2 Axe (P1, N, Dx);
gp_Ax2 AxeOfBisPlane( P1, NormalOfBisPlane );
// On construit les 2 Shell a intersecter
// Construct 2 intersecting Shells
Handle (TopTools_HArray2OfShape) UEdges =
new TopTools_HArray2OfShape( 1, mySec->NbLaw()+1, 1, myLoc->NbLaw() );
UEdges->ChangeArray2() = myUEdges->Array2();
@@ -2855,9 +2855,9 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
else if ((TheTransition == BRepFill_Right) ||
aTrim.HasSection() ) {
#if DEB
cout << "Echec de TrimCorner" << endl;
cout << "Fail of TrimCorner" << endl;
#endif
return; // On ne touche a rien
return; // Nothing is touched
}
if (mySec->IsUClosed())
@@ -2867,7 +2867,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
}
if (TheTransition == BRepFill_Round) {
// Remplissage
// Filling
TopTools_ListOfShape list1, list2;
TopoDS_Edge Bord1, Bord2, BordFirst;
BordFirst.Nullify();
@@ -2883,7 +2883,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
TopTools_ListIteratorOfListOfShape It2(list2);
Standard_Boolean B;
for (; It1.More(); It1.Next(), It2.Next()) {
if (HasFilling) { // Choix des contraintes transversale
if (HasFilling) { // Transversal choice of constraints
TopoDS_Vertex VF, VL, VC;
TopoDS_Edge E = TopoDS::Edge(It1.Value());
TopoDS_Edge E1, E2;
@@ -2909,7 +2909,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
Bord2 = E2;
}
// Remplissage
// Filling
B = Filling(It1.Value(), myFaces->Value(ii, I1),
It2.Value(), myFaces->Value(ii, I2),
myVEdgesModified, myTol3d, Axe, T1, Bord1, Bord2, FF);
@@ -2923,7 +2923,7 @@ BRepFill_Sweep::BRepFill_Sweep(const Handle(BRepFill_SectionLaw)& Section,
}
}
#if DEB
else cout << "PerformCorner : Disymetrie de bord libre" << endl;
else cout << "PerformCorner : Unsymmetry of free border" << endl;
#endif
}
}
@@ -2979,8 +2979,8 @@ Standard_Real BRepFill_Sweep::
Standard_Real alpha = T1.Angle(T2);
if ((alpha > myAngMax) || (alpha < myAngMin)) {
//Angle trop grand => Pas de raccord "droit"
//Angle trop petit => Pas de raccord
//Angle too great => No "straight" connection
//Angle too small => No connection
return Extrap; // = 0.0
}
@@ -3014,7 +3014,7 @@ Standard_Real BRepFill_Sweep::
//=======================================================================
//function : MergeVertex
//purpose : Fait V2 = V1 si V2 est trop proche de V1
//purpose : Make V2 = V1 if V2 is too close to V1
//======================================================================
Standard_Boolean BRepFill_Sweep::MergeVertex(const TopoDS_Shape& V1,
TopoDS_Shape& V2) const
@@ -3038,7 +3038,7 @@ Standard_Boolean BRepFill_Sweep::MergeVertex(const TopoDS_Shape& V1,
//=======================================================================
//function : UpdateVertex
//purpose : Update la Tolerance des Vertexs en Fonction des Lois.
//purpose : Update the Tolerance of Vertices depending on Laws.
//======================================================================
void BRepFill_Sweep::UpdateVertex(const Standard_Integer ipath,
const Standard_Integer isec,

View File

@@ -83,7 +83,7 @@ myBisec(Bisec)
isPoint1 = (S1->DynamicType() == STANDARD_TYPE(Geom2d_CartesianPoint));
isPoint2 = (S2->DynamicType() == STANDARD_TYPE(Geom2d_CartesianPoint));
// recuperation des geometries des shapes.
// return geometries of shapes.
// Standard_Real f,l;
if (isPoint1) {
myP1 = Handle(Geom2d_Point)::DownCast(S1)->Pnt2d();
@@ -112,7 +112,7 @@ myBisec(Bisec)
}
#endif
}
// recuperer l expression simple de la bisectrice
// return the simple expression of the bissectrice
Handle(Geom2d_Curve) Bis;
SimpleExpression(myBisec, Bis);
myBis = Geom2dAdaptor_Curve(Bis);
@@ -127,7 +127,7 @@ myBisec(Bisec)
//=======================================================================
//function : Bubble
//purpose : Ordonne la sequence de point en x croissant.
//purpose : Order the sequence of points by increasing x.
//=======================================================================
static void Bubble(TColgp_SequenceOfPnt& Seq)
@@ -149,7 +149,7 @@ static void Bubble(TColgp_SequenceOfPnt& Seq)
//=======================================================================
//function : EvalParameters (lbr le 8 juillet, je duplique pour modifier)
//function : EvalParameters
//purpose :
//=======================================================================
@@ -218,7 +218,7 @@ static void EvalParameters(const Geom2dAdaptor_Curve& Bis,
}
}
// Ordonne la sequence en param croissant sur la bissectrice.
// Order the sequence by growing parameter on the bissectrice.
Bubble( Params);
}
@@ -282,7 +282,7 @@ static void EvalParametersBis(const Geom2dAdaptor_Curve& Bis,
}
}
// Ordonne la sequence en param croissant sur la bissectrice.
// Order the sequence by parameter growing on the bissectrice.
Bubble( Params);
}
@@ -298,7 +298,7 @@ void BRepFill_TrimEdgeTool::IntersectWith(const TopoDS_Edge& Edge1,
{
Params.Clear();
// recuperer les courbes associees aux edges.
// return curves associated to edges.
TopLoc_Location L;
Standard_Real f,l;
Handle(Geom_Surface) Surf;
@@ -333,7 +333,7 @@ void BRepFill_TrimEdgeTool::IntersectWith(const TopoDS_Edge& Edge1,
}
#endif
// Calcul intersection
// Calculate intersection
TColgp_SequenceOfPnt Points2;
gp_Pnt PSeq;
@@ -359,7 +359,7 @@ void BRepFill_TrimEdgeTool::IntersectWith(const TopoDS_Edge& Edge1,
(Points2.Length() == 0 && Params.Length() == 0) ) ) {
#ifdef DEB
cout << "BRepFill_TrimEdgeTool: incoherent intersection. On essaie avec une tol plus grande" << endl;
cout << "BRepFill_TrimEdgeTool: incoherent intersection. Try with a greater tolerance" << endl;
#endif
Params.Clear();
@@ -421,10 +421,10 @@ void BRepFill_TrimEdgeTool::IntersectWith(const TopoDS_Edge& Edge1,
}
}
// petite manip destinee a eliminer les intersections incoherentes:
// on ne renvoie que les intersections communes ( meme parametre sur
// la bissectrice.).
// La tolerance pourra eventuellement etre reglee.
// small manipulation to remove incorrect intersections:
// return only common intersections (same parameter
// on the bissectrice.).
// The tolerance can be eventually changed.
gp_Pnt P1,P2;
Standard_Real Tol = 4 * 100 * Precision::PConfusion();
@@ -449,11 +449,11 @@ void BRepFill_TrimEdgeTool::IntersectWith(const TopoDS_Edge& Edge1,
if ( P1xP2x > Tol ) {
#ifdef DEB
cout << "BRepFill_TrimEdgeTool: Pas le meme parametre sur la bissectrice" << endl;
cout << "BRepFill_TrimEdgeTool: no same parameter on the bissectrice" << endl;
#endif
if(P1xP2x>TolInit) {
#ifdef DEB
cout << "BRepFill_TrimEdgeTool: On continue quand meme" << endl;
cout << "BRepFill_TrimEdgeTool: Continue somehow" << endl;
#endif
i++;
}
@@ -482,9 +482,9 @@ void BRepFill_TrimEdgeTool::IntersectWith(const TopoDS_Edge& Edge1,
//=======================================================================
//function : AddOrConfuse
//purpose : le premier ou le dernier point de la bissectrice est sur la
// parallele si on ne l a pas trouve dans les intersections on
// le projette sur les paralleles et on l ajoute dans les params
//purpose : the first or the last point of the bissectrice is on the
// parallel if it was not found in the intersections,
// it is projected on parallel lines and added in the parameters
//=======================================================================
void BRepFill_TrimEdgeTool::AddOrConfuse(const Standard_Boolean Start,
@@ -497,7 +497,7 @@ const
gp_Pnt2d PBis;
Standard_Real Tol = 10*Precision::Confusion();
// recuperer les courbes associees aux edges.
// return curves associated to edges.
TopLoc_Location L;
Standard_Real f,l;
Handle(Geom_Surface) Surf;
@@ -510,7 +510,7 @@ const
if (Start) PBis = myBis.Value(myBis.FirstParameter());
else PBis = myBis.Value(myBis.LastParameter ());
// Test si le bout de la bissectrice est dans l ensemble des points d intersection.
// Test if the end of the bissectrice is in the set of intersection points.
if (!Params.IsEmpty()) {
gp_Pnt2d P;
if (Start) P = AC1.Value(Params.First().Y());
@@ -520,10 +520,10 @@ const
if (ToProj) {
#ifdef DEB
cout << " projection extremite bissectrice sur parallele."<<endl;
cout << " project extremity bissectrice on parallel."<<endl;
#endif
// Projection du point sur les paralleles et ajout dans Params
// Project point on parallels and add in Params
Standard_Real f2,l2;
Handle(Geom2d_Curve) C2;
@@ -534,19 +534,19 @@ const
if (Projector1.NbPoints() == 0) {
#ifdef DEB
cout << "Echec projection dans BRepFill_TrimEdgeTool::AddOrConfuse"<<endl;
cout << "Failed projection in BRepFill_TrimEdgeTool::AddOrConfuse"<<endl;
#endif
return;
}
if (!Projector1.NearestPoint().IsEqual(PBis,Tol)) {
#ifdef DEB
cout <<" Mauvaisesolution dans BRepFill_TrimEdgeTool::AddOrConfuse"<<endl;
cout <<"Incorrect solution in BRepFill_TrimEdgeTool::AddOrConfuse"<<endl;
#endif
return;
}
if (Projector2.NbPoints() == 0) {
#ifdef DEB
cout << "Echec projection dans BRepFill_TrimEdgeTool::AddOrConfuse"<<endl;
cout << "Failed projection in BRepFill_TrimEdgeTool::AddOrConfuse"<<endl;
#endif
return;
}

View File

@@ -61,12 +61,12 @@ static Standard_Integer NBCALL = 1;
//=======================================================================
//function : BRepFill_TrimSurfaceTool
//purpose : Initialisation avec les deux face voisines
// Edge1 et Edge2 sont les edges paralleles correspondant
// a une iso minimum sur F1 et F2 respectivement.
// ie Edge1 est Umin ou VMin sur F1.
// Inv1 et Inv2 indique si Edge1 et Edge2 sont des
// parallleles retournees.
//purpose : Initialisation with two neighbor faces
// Edge1 and Edge2 are parallel edges corresponding
// to minimum iso on F1 and F2 respectively.
// ie Edge1 is Umin or VMin on F1.
// Inv1 and Inv2 show if Edge1 and Edge2 are
// returned parallel.
//=======================================================================
BRepFill_TrimSurfaceTool::BRepFill_TrimSurfaceTool
@@ -115,7 +115,7 @@ myBis (Bis)
//=======================================================================
//function : Bubble
//purpose : Ordonne la sequence de point en x croissant.
//purpose : Order the sequence of points by increasing x.
//=======================================================================
static void Bubble(TColgp_SequenceOfPnt& Seq)
@@ -183,7 +183,7 @@ static void EvalParameters(const TopoDS_Edge& Edge,
TColgp_SequenceOfPnt& Seq )
{
Standard_Boolean Degener = BRep_Tool::Degenerated(Edge);
// recuperer les courbes 3d associees aux edges.
// return curves 3d associated to edges.
TopLoc_Location L;
Standard_Real f,l;
@@ -205,7 +205,7 @@ static void EvalParameters(const TopoDS_Edge& Edge,
Handle(Geom_Curve) C = BRep_Tool::Curve(Edge,L,f,l);
CT = new Geom_TrimmedCurve(C,f,l);
CT->Transform(L.Transformation());
// projection de ces courbes 3d dans le plan xOy
// projection of 3d curves in the plane xOy
Handle(Geom2d_Curve) C2d = GeomProjLib::Curve2d(CT,Plane);
Geom2dAdaptor_Curve AC(C2d);
@@ -268,7 +268,7 @@ static void EvalParameters(const TopoDS_Edge& Edge,
if (NbSegments > 0) {
#ifdef DEB
cout << " IntersectWith : " << NbSegments
<< " Segments d`intersection" << endl;
<< " Segments of intersection" << endl;
#endif
IntRes2d_IntersectionSegment Seg;
for ( Standard_Integer i = 1; i <= NbSegments; i++) {
@@ -283,7 +283,7 @@ static void EvalParameters(const TopoDS_Edge& Edge,
Seq.Append(P);
}
}
// Ordonne la sequence en param croissant sur la bissectrice.
// Order the sequence by increasing parameter on the bissectrice.
Bubble( Seq);
// modified by NIZHNY-EAP Fri Dec 24 18:47:24 1999 ___BEGIN___
@@ -301,8 +301,8 @@ static void EvalParameters(const TopoDS_Edge& Edge,
// modified by NIZHNY-EAP Fri Dec 24 18:47:28 1999 ___END___
}
else {
// l`edge est degenere : on recupere le point et on cherche s`il est sur
// la bissectrice.
// the edge is degenerated : the point and it is found if it is
// on the bissectrice.
gp_Pnt P3d = BRep_Tool::Pnt( TopExp::FirstVertex(Edge));
gp_Pnt2d P2d( P3d.X(), P3d.Y());
@@ -325,7 +325,7 @@ static void EvalParameters(const TopoDS_Edge& Edge,
if ( PBis.Distance(P2d) > Tol) return;
}
// eval parametre intersection.
// evaluate parameter intersection.
Handle(Geom_Surface) GS = BRep_Tool::Surface(Face);
GeomAdaptor_Surface GAS(GS);
@@ -338,8 +338,8 @@ static void EvalParameters(const TopoDS_Edge& Edge,
Axis = GAS.Sphere().Position(); break;
case GeomAbs_Cone: {
//----------------------------------------------------------
// si myFace1 n est pas du meme cote de l apex que le point
// de parametre 0 0 sur le cone => phase = PI.
// if myFace1 is not at the same side of the apex as the point
// of parameter 0 0 on the cone => phase = PI.
//----------------------------------------------------------
Axis = GAS.Cone().Position();
Phase = EvalPhase(Edge,Face,GAS,Axis);
@@ -351,8 +351,8 @@ static void EvalParameters(const TopoDS_Edge& Edge,
Axis = GAS.Cylinder().Position(); break;
case GeomAbs_SurfaceOfRevolution: {
//----------------------------------------------------------
// si myFace1 n est pas du meme cote de l apex que le point
// de parametre 0 0 sur le cone => phase = PI.
// if myFace1 is not at the same side of the apex as the point
// of parameter 0 0 on the cone => phase = PI.
//----------------------------------------------------------
Handle(Geom_SurfaceOfRevolution) GSRev =
Handle(Geom_SurfaceOfRevolution)::DownCast(GS);
@@ -455,11 +455,11 @@ Standard_Real BRepFill_TrimSurfaceTool::ProjOn(const gp_Pnt2d& Point,
Handle(Geom_TrimmedCurve) CT = new Geom_TrimmedCurve(C1,f,l);
CT->Transform(L.Transformation());
// projection de ces courbes 3d dans le plan xOy
// projection of curves 3d in the plane xOy
Handle(Geom_Plane) Plane = new Geom_Plane(0,0,1,0);
Handle(Geom2d_Curve) C2d = GeomProjLib::Curve2d(CT,Plane);
// eval the projection of the point on the curve.
// evaluate the projection of the point on the curve.
Geom2dAPI_ProjectPointOnCurve Projector(Point, C2d);
#ifdef DEB
Standard_Real Dist =
@@ -468,7 +468,7 @@ Standard_Real BRepFill_TrimSurfaceTool::ProjOn(const gp_Pnt2d& Point,
#ifdef DEB
if ( Dist > Precision::Confusion() ) {
cout << " *** WARNING TrimSurfaceTool: *** " << endl;
cout << " --> le point n'est pas sur l'edge" <<endl;
cout << " --> the point is not on the edge" <<endl;
cout << " distance = " << Dist << endl;
}
#endif