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

@@ -85,7 +85,7 @@ static void EdgeAnalyse(const TopoDS_Edge& E,
f = C.FirstParameter();
l = C.LastParameter();
// Tangent si la regularite estaum moins G1.
// Tangent if the regularity is at least G1.
if (BRep_Tool::HasContinuity(E,F1,F2)) {
if (BRep_Tool::Continuity(E,F1,F2) > GeomAbs_C0) {
BRepOffset_Interval I;
@@ -95,9 +95,9 @@ static void EdgeAnalyse(const TopoDS_Edge& E,
return;
}
}
// Premiere etape : Type determine par un des bout.
// Calcul des normales et tangentes sur les courbes et surface.
// normales sont dirigees vers l exterieur.
// First stage : Type determined by one of ends.
// Calculate normals and tangents on the curves and surface.
// normals are oriented outwards.
Standard_Real ParOnC = 0.5*(f+l);
gp_Vec T1 = C.DN(ParOnC,1).Transformed(L.Transformation());
@@ -133,15 +133,15 @@ static void EdgeAnalyse(const TopoDS_Edge& E,
I.First(f); I.Last(l);
if (Abs(NormProVec) < SinTol) {
// plat
// plane
if (DN1.Dot(DN2) > 0) {
//Tangent
I.Type(BRepOffset_Tangent);
}
else {
//Confondu pas fini!
//Mixed not finished!
#ifdef DEB
cout <<" face localement confondues"<<endl;
cout <<" faces locally mixed"<<endl;
#endif
I.Type(BRepOffset_Convex);
}
@@ -151,11 +151,11 @@ static void EdgeAnalyse(const TopoDS_Edge& E,
ProVec.Normalize();
Standard_Real Prod = T1.Dot(DN1^DN2);
if (Prod > 0.) {
//Saillant
//
I.Type(BRepOffset_Convex);
}
else {
//rentrant
//reenters
I.Type(BRepOffset_Concave);
}
}
@@ -174,7 +174,7 @@ static void BuildAncestors (const TopoDS_Shape& S,
TopExp::MapShapesAndAncestors(S,TopAbs_VERTEX,TopAbs_EDGE,MA);
TopExp::MapShapesAndAncestors(S,TopAbs_EDGE ,TopAbs_FACE,MA);
// Purge des ancetres.
// Purge ancestors.
TopTools_MapOfShape Map;
for (Standard_Integer i = 1; i <= MA.Extent(); i++) {
Map.Clear();
@@ -420,8 +420,8 @@ void BRepOffset_Analyse::Explode( TopTools_ListOfShape& List,
TopoDS_Compound Co;
B.MakeCompound(Co);
B.Add(Co,Face);
// on ajoute a Co toutes les faces constituant la nappe de faces
// G1 creee a partir de <Face>
// add to Co all faces from the cloud of faces
// G1 created from <Face>
AddFaces(Face,Co,Map,T);
List.Append(Co);
}
@@ -448,8 +448,8 @@ void BRepOffset_Analyse::Explode( TopTools_ListOfShape& List,
TopoDS_Compound Co;
B.MakeCompound(Co);
B.Add(Co,Face);
// on ajoute a Co toutes les faces constituant la nappe de faces
// G1 creee a partir de <Face>
// add to Co all faces from the cloud of faces
// G1 created from <Face>
AddFaces(Face,Co,Map,T1,T2);
List.Append(Co);
}
@@ -473,7 +473,7 @@ void BRepOffset_Analyse::AddFaces (const TopoDS_Face& Face,
const TopoDS_Edge& E = TopoDS::Edge(exp.Current());
const BRepOffset_ListOfInterval& LI = Type(E);
if (!LI.IsEmpty() && LI.First().Type() == T) {
// alors ca y est <NewFace> est raccordee G1 a <Face>
// so <NewFace> is attached to G1 by <Face>
const TopTools_ListOfShape& L = Ancestors(E);
if (L.Extent() == 2) {
TopoDS_Face F1 = TopoDS::Face(L.First());
@@ -505,7 +505,7 @@ void BRepOffset_Analyse::AddFaces (const TopoDS_Face& Face,
const BRepOffset_ListOfInterval& LI = Type(E);
if (!LI.IsEmpty() &&
(LI.First().Type() == T1 || LI.First().Type() == T2)) {
// alors ca y est <NewFace> est raccordee G1 a <Face>
// so <NewFace> is attached to G1 by <Face>
const TopTools_ListOfShape& L = Ancestors(E);
if (L.Extent() == 2) {
TopoDS_Face F1 = TopoDS::Face(L.First());

View File

@@ -122,10 +122,9 @@ static void Store (const TopoDS_Edge& E1,
Standard_Real Tol)
{
//-------------------------------------------------------------
// Test si les points d intersection correspondent a des vertex
// existants.Sinon ajout dans les descendants des edges.
// Remarque a ce stade seulement les vertex d intersection sont
// dans les descendants.
// Test if the points of intersection correspond to existing
// vertices. Otherwise add edges in the descendants.
// Note: at this stage only vertices of intersection are in the descendants.
//-------------------------------------------------------------
const TopTools_ListOfShape& VOnE1 = AsDes->Descendant(E1);
const TopTools_ListOfShape& VOnE2 = AsDes->Descendant(E2);
@@ -154,7 +153,7 @@ static void Store (const TopoDS_Edge& E1,
if (!VOnE1.IsEmpty()) {
//-----------------------------------------------------------------
// Recherche si le point d intersection correspond a un vertex de E1.
// Find if the point of intersection corresponds to a vertex of E1.
//-----------------------------------------------------------------
for (it.Initialize(VOnE1); it.More(); it.Next()) {
P1 = BRep_Tool::Pnt(TopoDS::Vertex(it.Value()));
@@ -169,7 +168,7 @@ static void Store (const TopoDS_Edge& E1,
if (!VOnE2.IsEmpty()) {
if (OnE1) {
//-----------------------------------------------------------------
// Recherche si le vertex trouve sur E1 n est pas deja sur E2.
// Find if the vertex found on E1 is not already on E2.
//-----------------------------------------------------------------
for (it.Initialize(VOnE2); it.More(); it.Next()) {
if (it.Value().IsSame(V)) {
@@ -181,7 +180,7 @@ static void Store (const TopoDS_Edge& E1,
}
for (it.Initialize(VOnE2); it.More(); it.Next()) {
//-----------------------------------------------------------------
// Recherche si le point d intersection correspond a un vertex de E2.
// Find if the point of intersection corresponds to a vertex of E2.
//-----------------------------------------------------------------
P2 = BRep_Tool::Pnt(TopoDS::Vertex(it.Value()));
if (P.IsEqual(P2,Tol)) {
@@ -195,9 +194,9 @@ static void Store (const TopoDS_Edge& E1,
if (OnE1 && OnE2) {
if (!V1.IsSame(V2)) {
//---------------------------------------------------------------
// Les deux vertex sont en fait les memes.
// on va remplacer V2 par V1.
// mis a jour des parametres des vertex sur les edges.
// Two vertices are actually the same.
// V2 will be replaced by V1.
// update the parameters of vertex on edges.
//---------------------------------------------------------------
Standard_Real UV2;
TopoDS_Edge EWE2;
@@ -280,7 +279,7 @@ static void EdgeInter(const TopoDS_Face& F,
Standard_Real f[3],l[3];
Standard_Real MilTol2 = 1000*Tol*Tol;
Standard_Real TolDub = 1.e-7; // Faire un calcul plus malin !!! NYI
Standard_Real TolDub = 1.e-7;
Standard_Integer i;
BRep_Tool::Range(E1, f[1], l[1]);
@@ -373,17 +372,17 @@ static void EdgeInter(const TopoDS_Face& F,
#ifdef DEB
if (aT1 < f[1]-Tol || aT1 > l[1]+Tol)
{
cout << "hors borne"<<endl;
cout << "out of limit"<<endl;
cout<<"aT1 = "<<aT1<<", f[1] = "<<f[1]<<", l[1] = "<<l[1]<<endl;
}
if (aT2 < f[2]-Tol || aT2 > l[2]+Tol)
{
cout << "hors borne"<<endl;
cout << "out of limit"<<endl;
cout<<"aT2 = "<<aT2<<", f[2] = "<<f[2]<<", l[2] = "<<l[2]<<endl;
}
if (P1.SquareDistance(P) > MilTol2 || P2.SquareDistance(P) > MilTol2 || P1.Distance(P2) > 2.*Tol)
{
cout << "Inter2d : Solution rejete "<<endl;
cout << "Inter2d : Solution rejected "<<endl;
cout<<"P = "<<P.X()<<" "<<P.Y()<<" "<<P.Z()<<endl;
cout<<"P1 = "<<P1.X()<<" "<<P1.Y()<<" "<<P1.Z()<<endl;
cout<<"P2 = "<<P2.X()<<" "<<P2.Y()<<" "<<P2.Z()<<endl;
@@ -421,7 +420,7 @@ static void EdgeInter(const TopoDS_Face& F,
}
//----------------------------------
// Test en bout.
// Test at end.
//---------------------------------
Standard_Real U1,U2;
Standard_Real TolConf = Tol;
@@ -470,8 +469,8 @@ static void EdgeInter(const TopoDS_Face& F,
if ( !LV1.IsEmpty()) {
//----------------------------------
// Purge de l ensemble des vertex.
// il peut y avoir des doublons
// Remove all vertices.
// There can be doubles
//----------------------------------
TopTools_ListIteratorOfListOfShape it1LV1,it1LV2,it2LV1;
gp_Pnt P1,P2;
@@ -497,7 +496,7 @@ static void EdgeInter(const TopoDS_Face& F,
// Modified by skv - Thu Jan 22 18:19:05 2004 OCC4455 End
LV1.Remove(it1LV1);
LV2.Remove(it1LV2);
if (AffichPurge) cout <<"Doublons purges dans EdgeInter."<<endl;
if (AffichPurge) cout <<"Doubles removed in EdgeInter."<<endl;
Purge = Standard_True;
break;
}
@@ -509,7 +508,7 @@ static void EdgeInter(const TopoDS_Face& F,
}
}
//---------------------------------
// Stockage vertex en SD.
// Vertex storage in DS.
//---------------------------------
// Modified by skv - Tue Jan 13 15:14:30 2004 Begin
Standard_Real TolStore = BRep_Tool::Tolerance(E1) + BRep_Tool::Tolerance(E2);
@@ -537,7 +536,7 @@ static void RefEdgeInter(const TopoDS_Face& F,
{
#ifdef DRAW
if (AffichInt2d) {
//POP pour NT
//POP for NT
char* name = new char[100];
sprintf(name,"E2d_%d_%d",NbF2d,NbE2d++);
DBRep::Set(name,E1);
@@ -551,7 +550,7 @@ static void RefEdgeInter(const TopoDS_Face& F,
Standard_Real f[3],l[3];
Standard_Real MilTol2 = 1000*Tol*Tol;
Standard_Real TolDub = 1.e-7; // Faire un calcul plus malin !!! NYI
Standard_Real TolDub = 1.e-7;
Standard_Integer i;
//BRep_Tool::Range(E1, f[1], l[1]);
@@ -641,17 +640,17 @@ static void RefEdgeInter(const TopoDS_Face& F,
#ifdef DEB
if (aT1 < f[1]-Tol || aT1 > l[1]+Tol)
{
cout << "hors borne"<<endl;
cout << "out of limit"<<endl;
cout<<"aT1 = "<<aT1<<", f[1] = "<<f[1]<<", l[1] = "<<l[1]<<endl;
}
if (aT2 < f[2]-Tol || aT2 > l[2]+Tol)
{
cout << "hors borne"<<endl;
cout << "out of limit"<<endl;
cout<<"aT2 = "<<aT2<<", f[2] = "<<f[2]<<", l[2] = "<<l[2]<<endl;
}
if (P1.SquareDistance(P) > MilTol2 || P2.SquareDistance(P) > MilTol2 || P1.Distance(P2) > 2.*Tol)
{
cout << "Inter2d : Solution rejete "<<endl;
cout << "Inter2d : Solution rejected"<<endl;
cout<<"P = "<<P.X()<<" "<<P.Y()<<" "<<P.Z()<<endl;
cout<<"P1 = "<<P1.X()<<" "<<P1.Y()<<" "<<P1.Z()<<endl;
cout<<"P2 = "<<P2.X()<<" "<<P2.Y()<<" "<<P2.Z()<<endl;
@@ -688,7 +687,7 @@ static void RefEdgeInter(const TopoDS_Face& F,
}
//----------------------------------
// Test en bout.
// Test at end.
//---------------------------------
Standard_Real U1,U2;
Standard_Real TolConf = Tol;
@@ -725,8 +724,8 @@ static void RefEdgeInter(const TopoDS_Face& F,
if ( !LV1.IsEmpty()) {
//----------------------------------
// Purge de l ensemble des vertex.
// il peut y avoir des doublons
// Remove all vertices.
// there can be doubles
//----------------------------------
TopTools_ListIteratorOfListOfShape it1LV1,it1LV2,it2LV1;
gp_Pnt P1,P2;
@@ -745,7 +744,7 @@ static void RefEdgeInter(const TopoDS_Face& F,
if (P1.IsEqual(P2,10*Tol)) {
LV1.Remove(it1LV1);
LV2.Remove(it1LV2);
if (AffichPurge) cout <<"Doublons purges dans EdgeInter."<<endl;
if (AffichPurge) cout <<"Doubles removed in EdgeInter."<<endl;
Purge = Standard_True;
break;
}
@@ -757,7 +756,7 @@ static void RefEdgeInter(const TopoDS_Face& F,
}
}
//---------------------------------
// Stockage vertex en SD.
// Vertex storage in SD.
//---------------------------------
////-----------------------------------------------------
if(LV1.Extent() > 1) {
@@ -931,8 +930,8 @@ static void ExtentEdge(const TopoDS_Edge& E,TopoDS_Edge& NE, const Standard_Real
BRep_Tool::Range(E, anEf, anEl);
NE = TopoDS::Edge(aLocalShape);
// NE = TopoDS::Edge(E.EmptyCopied());
// Suffit pour les edges analytiques, pour le cas general reconstruire la
// la geometrie de l edge en recalculant l intersection des surfaces.
// Enough for analytic edges, for general case reconstruct the
// geometry of the edge recalculating the intersection of surfaces.
//BRepLib::BuildCurve3d(E);
@@ -1412,14 +1411,14 @@ void BRepOffset_Inter2d::Compute (const Handle(BRepAlgo_AsDes)& AsDes,
EdgesOfFace.Add( Explo.Current() );
//-----------------------------------------------------------
// calcul des intersections2d sur les faces touchees par les
// calculate intersections2d on faces touched by
// intersection3d
//---------------------------------------------------------
TopTools_ListIteratorOfListOfShape it1LE ;
TopTools_ListIteratorOfListOfShape it2LE ;
//-----------------------------------------------
// Intersection des edges 2 a 2.
// Intersection of edges 2*2.
//-----------------------------------------------
const TopTools_ListOfShape& LE = AsDes->Descendant(F);
TopoDS_Vertex V1,V2;
@@ -1433,8 +1432,8 @@ void BRepOffset_Inter2d::Compute (const Handle(BRepAlgo_AsDes)& AsDes,
while (j < i && it2LE.More()) {
const TopoDS_Edge& E2 = TopoDS::Edge(it2LE.Value());
//--------------------------------------------------------------
// Intersectionns des Nouvelles edges obtenues par intersection
// entre elles et avec les edges de restictions
// Intersections of New edges obtained by intersection
// between them and with edges of restrictions
//------------------------------------------------------
if ( (!EdgesOfFace.Contains(E1) || !EdgesOfFace.Contains(E2)) &&
(NewEdges.Contains(E1) || NewEdges.Contains(E2)) ) {
@@ -1471,7 +1470,7 @@ void BRepOffset_Inter2d::ConnexIntByInt
BRepOffset_Tool::MapVertexEdges(FI,MVE);
//---------------------
// Extension des edges.
// Extension of edges.
//---------------------
TopoDS_Edge NE;
TopTools_DataMapIteratorOfDataMapOfShapeListOfShape it(MVE);
@@ -1538,7 +1537,7 @@ void BRepOffset_Inter2d::ConnexIntByInt
// TopoDS_Edge CEO = TopoDS::Edge(OFI.Generated(CurE));
// TopoDS_Edge NEO = TopoDS::Edge(OFI.Generated(NextE));
//------------------------------------------
//traitement Inter des images de CurE NextE.
// Inter processing of images of CurE NextE.
//------------------------------------------
TopTools_ListOfShape LV1,LV2;
Standard_Boolean DoInter = 1;

View File

@@ -60,8 +60,8 @@ static void ExtentEdge(const TopoDS_Face& F,
// NE = TopoDS::Edge(E.EmptyCopied());
// Suffit pour les edges analytiques, pour le cas general reconstruire la
// la geometrie de l edge en recalculant l intersection des surfaces.
// Enough for analytic edges, in general case reconstruct the
// geometry of the edge recalculating the intersection of surfaces.
NE.Orientation(TopAbs_FORWARD);
Standard_Real f,l;
@@ -92,7 +92,7 @@ static void SelectEdge (const TopoDS_Face& F,
TopTools_ListOfShape& LInt)
{
//------------------------------------------------------------
// detrompeur sur les intersections sur les faces periodiques
// Proofing on the intersections on periodical faces
//------------------------------------------------------------
TopTools_ListIteratorOfListOfShape it(LInt);
// Modified by Sergey KHROMOV - Wed Jun 5 11:43:04 2002 Begin
@@ -112,7 +112,7 @@ static void SelectEdge (const TopoDS_Face& F,
Extrema_ExtPC anExt;
// Modified by Sergey KHROMOV - Wed Jun 5 11:23:11 2002 End
//----------------------------------------------------------------------
// Selection de l edge qui couvre le plus le domaine de l edge initiale.
// Selection of edge that coversmost of the domain of the initial edge.
//----------------------------------------------------------------------
for (; it.More(); it.Next()) {
const TopoDS_Edge& EI = TopoDS::Edge(it.Value());
@@ -198,14 +198,14 @@ void BRepOffset_Inter3d::CompletInt(const TopTools_ListOfShape& SetOfFaces,
const BRepAlgo_Image& InitOffsetFace)
{
//---------------------------------------------------------------
// Calcul des intersections des offsetfaces entre elles
// Distinction des intersection entre faces // tangentes.
// Calculate the intersections of offset faces
// Distinction of intersection between faces // tangents.
//---------------------------------------------------------------
TopoDS_Face F1,F2;
TopTools_ListIteratorOfListOfShape it;
//---------------------------------------------------------------
// Construction des boites englobantes.
// Construction of bounding boxes
//---------------------------------------------------------------
TopOpeBRepTool_BoxSort BOS;
BRep_Builder B;
@@ -219,7 +219,7 @@ void BRepOffset_Inter3d::CompletInt(const TopTools_ListOfShape& SetOfFaces,
BOS.AddBoxesMakeCOB(CompOS,TopAbs_FACE);
//---------------------------
// Intersection des faces //
// Intersection of faces //
//---------------------------
for (it.Initialize(SetOfFaces); it.More(); it.Next()) {
const TopoDS_Face& F1 = TopoDS::Face(it.Value());
@@ -257,13 +257,13 @@ void BRepOffset_Inter3d::FaceInter(const TopoDS_Face& F1,
if (BRepOffset_Tool::HasCommonShapes(F1,F2,LE,LV) ||
myAsDes->HasCommonDescendant(F1,F2,LE)) {
//-------------------------------------------------
// F1 et F2 partagent des shapes.
// F1 and F2 share shapes.
//-------------------------------------------------
if ( LE.IsEmpty() && !LV.IsEmpty()) {
if (InterPipes) {
//----------------------------
// tuyaux partageant un vertex.
//----------------------------
//----------------------
// tubes share a vertex.
//----------------------
const TopoDS_Edge& EE1 = TopoDS::Edge(InitF1);
const TopoDS_Edge& EE2 = TopoDS::Edge(InitF2);
TopoDS_Vertex VE1[2],VE2[2];
@@ -277,16 +277,16 @@ void BRepOffset_Inter3d::FaceInter(const TopoDS_Face& F1,
}
}
}
if (!InitOffsetFace.HasImage(V)) { //pas de sphere
if (!InitOffsetFace.HasImage(V)) { //no sphere
BRepOffset_Tool::PipeInter(F1,F2,LInt1,LInt2,mySide);
}
}
else {
//--------------------------------------------------------
// Intersection de faces n ayant que des vertex en communs.
// et dont les supports avaient des edges en commun.
// INSUFFISANT mais critere plus large secoue trop
// les sections et le reste pour l instant.
// Intersection having only common vertices
// and supports having common edges.
// UNSUFFICIENT, but a larger criterion shakes too
// many sections.
//--------------------------------------------------------
if (InterFaces &&
BRepOffset_Tool::HasCommonShapes(TopoDS::Face(InitF1),
@@ -326,16 +326,15 @@ void BRepOffset_Inter3d::ConnexIntByArc(const TopTools_ListOfShape& SetOfFaces,
TopoDS_Edge NullEdge;
//---------------------------------------------------------------------
// etape 1 : Intersections des face // correspondant a des faces
// initiales separees par une edge concave si offset > 0,
// convexe sinon.
// etape 1 : Intersection of faces // corresponding to the initial faces
// separated by a concave edge if offset > 0, otherwise convex.
//---------------------------------------------------------------------
for (; Exp.More(); Exp.Next()) {
const TopoDS_Edge& E = TopoDS::Edge(Exp.Current());
const BRepOffset_ListOfInterval& L = Analyse.Type(E);
if (!L.IsEmpty() && L.First().Type() == OT) {
//-----------------------------------------------------------
// l edge est du bon type , recuperation des faces adjacentes.
// edge is of the proper type , return adjacent faces.
//-----------------------------------------------------------
const TopTools_ListOfShape& Anc = Analyse.Ancestors(E);
if (Anc.Extent() == 2) {
@@ -349,11 +348,9 @@ void BRepOffset_Inter3d::ConnexIntByArc(const TopTools_ListOfShape& SetOfFaces,
}
}
//---------------------------------------------------------------------
// etape 2 : Intersections des tuyaux partageant un vertex sans
// sphere avec:
// - Soit les tuyaux sur chaque autre edge partageant le vertex
// - Soit avec les faces contenant une edge connexe au vertex
// qui n a pas de tuyaux.
// etape 2 : Intersections of tubes sharing a vertex without sphere with:
// - tubes on each other edge sharing the vertex
// - faces containing an edge connected to vertex that has no tubes.
//---------------------------------------------------------------------
TopoDS_Vertex V[2];
TopTools_ListIteratorOfListOfShape it;
@@ -362,7 +359,7 @@ void BRepOffset_Inter3d::ConnexIntByArc(const TopTools_ListOfShape& SetOfFaces,
const TopoDS_Edge& E1 = TopoDS::Edge(Exp.Current());
if (InitOffsetFace.HasImage(E1)) {
//---------------------------
// E1 a genere un tuyau.
// E1 generated a tube.
//---------------------------
F1 = TopoDS::Face(InitOffsetFace.Image(E1).First());;
TopExp::Vertices(E1,V[0],V[1]);
@@ -371,7 +368,7 @@ void BRepOffset_Inter3d::ConnexIntByArc(const TopTools_ListOfShape& SetOfFaces,
for (Standard_Integer i = 0; i < 2; i++) {
if (!InitOffsetFace.HasImage(V[i])) {
//-----------------------------
// le vertex n a pas de sphere.
// the vertex has no sphere.
//-----------------------------
const TopTools_ListOfShape& Anc = Analyse.Ancestors(V[i]);
TopTools_ListOfShape TangOnV;
@@ -399,12 +396,12 @@ void BRepOffset_Inter3d::ConnexIntByArc(const TopTools_ListOfShape& SetOfFaces,
// Modified by skv - Fri Jan 16 16:27:54 2004 OCC4455 End
if (InitOffsetFace.HasImage(E2)) {
//-----------------------------
// E2 a genere un tuyau.
// E2 generated a tube.
//-----------------------------
F2 = TopoDS::Face(InitOffsetFace.Image(E2).First());
if (!IsDone(F1,F2)) {
//---------------------------------------------------------------------
// Intersection tuyau/tuyau si les edges ne sont pas tangentes (AFINIR).
// Intersection tube/tube if the edges are not tangent (AFINIR).
//----------------------------------------------------------------------
BRepOffset_Tool::PipeInter (F1,F2,LInt1,LInt2,mySide);
Store (F1,F2,LInt1,LInt2);
@@ -412,9 +409,9 @@ void BRepOffset_Inter3d::ConnexIntByArc(const TopTools_ListOfShape& SetOfFaces,
}
else {
//-------------------------------------------------------
// Intersection du tuyau de E1 avec les faces //
// aux face contenant E2 si elles ne sont pas tangentes
// au tuyau. ou si E2 n est pas une edge tangente.
// Intersection of the tube of E1 with faces //
// to face containing E2 if they are not tangent
// to the tube or if E2 is not a tangent edge.
//-------------------------------------------------------
const BRepOffset_ListOfInterval& L = Analyse.Type(E2);
if (!L.IsEmpty() && L.First().Type() == BRepOffset_Tangent) {
@@ -485,7 +482,7 @@ void BRepOffset_Inter3d::ConnexIntByInt
if (OT == BRepOffset_Concave) CurSide = TopAbs_IN;
else CurSide = TopAbs_OUT;
//-----------------------------------------------------------
// l edge est du bon type , recuperation des faces adjacentes.
// edge is of the proper type, return adjacent faces.
//-----------------------------------------------------------
const TopTools_ListOfShape& Anc = Analyse.Ancestors(E);
if (Anc.Extent() != 2) continue;
@@ -517,7 +514,7 @@ void BRepOffset_Inter3d::ConnexIntByInt
BRepOffset_Tool::Inter3D (NF1,NF2,LInt1,LInt2,CurSide,E,Standard_True);
if (LInt1.Extent() > 1)
{
// l intersection est en plusieurs edges (franchissement de couture)
// intersection is in seceral edges (free sewing)
SelectEdge( NF1, NF2, E, LInt1 );
SelectEdge( NF1, NF2, E, LInt2 );
}
@@ -610,8 +607,8 @@ void BRepOffset_Inter3d::ContextIntByInt
const TopoDS_Edge& E = TopoDS::Edge(exp.Current());
if (!Analyse.HasAncestor(E)) {
//----------------------------------------------------------------
// Les edges des faces de contexte qui ne sont pas dans le shape
// initiales peuvent apparaitre dans le resultat.
// the edges of faces of context that are not in the initial shape
// can appear in the result.
//----------------------------------------------------------------
if (!ExtentContext) {
myAsDes->Add(CF,E);
@@ -753,14 +750,14 @@ void BRepOffset_Inter3d::ContextIntByArc(const TopTools_MapOfShape& ContextFaces
continue;
}
OE.Nullify();
//----------------------------------------------
// OF1 face parallele genere par l ancetre de E.
//----------------------------------------------
//---------------------------------------------------
// OF1 parallel facee generated by the ancestor of E.
//---------------------------------------------------
const TopoDS_Shape SI = Analyse.Ancestors(E).First();
OF1 = TopoDS::Face(InitOffsetFace.Image(SI).First());
OE = TopoDS::Edge(InitOffsetEdge.Image(E).First());
//--------------------------------------------------
// MAJ de OE sur bouchon CF.
// MAJ of OE on cap CF.
//--------------------------------------------------
// TopTools_ListOfShape LOE; LOE.Append(OE);
// BRepOffset_Tool::TryProject(CF,OF1,LOE,LInt1,LInt2,mySide);
@@ -777,7 +774,7 @@ void BRepOffset_Inter3d::ContextIntByArc(const TopTools_MapOfShape& ContextFaces
Store(CF,OF1,LInt1,LInt2);
//------------------------------------------------------
// Traitement des offsets sur les ancetres des vertices.
// Processing of offsets on the ancestors of vertices.
//------------------------------------------------------
TopoDS_Vertex V[2];
TopExp::Vertices (E,V[0],V[1]);
@@ -790,12 +787,12 @@ void BRepOffset_Inter3d::ContextIntByArc(const TopTools_MapOfShape& ContextFaces
const TopoDS_Edge& EV = TopoDS::Edge(itLE.Value());
if (InitOffsetFace.HasImage(EV)) {
//-------------------------------------------------
// OF1 face parallele genere par une edge ancetre de V[i].
// OF1 parallel face generated by an ancester edge of V[i].
//-------------------------------------------------
OF1 = TopoDS::Face(InitOffsetFace.Image(EV).First());
OE = TopoDS::Edge(InitOffsetEdge.Image(V[i]).First());
//--------------------------------------------------
// MAj de OE sur bouchon CF.
// MAj of OE on cap CF.
//--------------------------------------------------
// LOE.Clear(); LOE.Append(OE);
// BRepOffset_Tool::TryProject(CF,OF1,LOE,LInt1,LInt2,mySide);
@@ -830,13 +827,12 @@ void BRepOffset_Inter3d::ContextIntByArc(const TopTools_MapOfShape& ContextFaces
for ( ; itLF.More(); itLF.Next()) {
const TopoDS_Face& FEV = TopoDS::Face(itLF.Value());
//-------------------------------------------------
// OF1 face parallele genere par uneFace ancetre de V[i].
// OF1 parallel face generated by uneFace ancestor of V[i].
//-------------------------------------------------
OF1 = TopoDS::Face(InitOffsetFace.Image(FEV).First());
if (!IsDone(OF1,CF)) {
//-------------------------------------------------------
//Recherche si une des edges de OF1 n a pas de trace dans
// CF.
// Find if one of edges of OF1 has no trace in CF.
//-------------------------------------------------------
TopTools_ListOfShape LOE;
TopExp_Explorer exp2(OF1.Oriented(TopAbs_FORWARD),TopAbs_EDGE);
@@ -845,7 +841,7 @@ void BRepOffset_Inter3d::ContextIntByArc(const TopTools_MapOfShape& ContextFaces
}
BRepOffset_Tool::TryProject(CF,OF1,LOE,LInt1,LInt2,mySide,myTol);
//-------------------------------------------------------
// Si pas de trace essai intersection.
// If no trace try intersection.
//-------------------------------------------------------
if (LInt1.IsEmpty()) {
BRepOffset_Tool::Inter3D (CF,OF1,LInt1,LInt2,mySide,NullEdge);

View File

@@ -54,11 +54,11 @@ void BRepOffset_MakeLoops::Build(const TopTools_ListOfShape& LF,
for (; it.More(); it.Next()) {
const TopoDS_Face& F = TopoDS::Face(it.Value());
//---------------------------
// Initialisation de Loops.
// Initialization of Loops.
//---------------------------
Loops.Init(F);
//-----------------------------
// recuperation des edges de F.
// return edges of F.
//-----------------------------
const TopTools_ListOfShape& LE = AsDes->Descendant(F);
TopTools_ListOfShape AddedEdges;
@@ -67,10 +67,9 @@ void BRepOffset_MakeLoops::Build(const TopTools_ListOfShape& LF,
TopoDS_Edge E = TopoDS::Edge(itl.Value());
if (Image.HasImage(E)) {
//-------------------------------------------
// E a deja ete decoupeee dans une autre face.
// Recuperation des edges decoupees et reorientation
// de ces edges comme E.
// Voir pb pour les edges qui ont disparu?
// E was already cut in another face.
// Return the cut edges reorientate them as E.
// See pb for the edges that have disappeared?
//-------------------------------------------
const TopTools_ListOfShape& LCE = Image.Image(E);
for (itLCE.Initialize(LCE); itLCE.More(); itLCE.Next()) {
@@ -84,7 +83,7 @@ void BRepOffset_MakeLoops::Build(const TopTools_ListOfShape& LF,
}
}
//------------------------
// Debouclage.
// Unwind.
//------------------------
Loops.Perform();
Loops.WiresToFaces();
@@ -93,7 +92,7 @@ void BRepOffset_MakeLoops::Build(const TopTools_ListOfShape& LF,
//------------------------
const TopTools_ListOfShape& NF = Loops.NewFaces();
//-----------------------
// F => Nouvelles faces;
// F => New faces;
//-----------------------
Image.Bind(F,NF);
@@ -101,7 +100,7 @@ void BRepOffset_MakeLoops::Build(const TopTools_ListOfShape& LF,
for (itAdded.Initialize(AddedEdges); itAdded.More(); itAdded.Next()) {
const TopoDS_Edge& E = TopoDS::Edge(itAdded.Value());
//-----------------------
// E => Nouvelles edges;
// E => New edges;
//-----------------------
const TopTools_ListOfShape& LoopNE = Loops.NewEdges(E);
if (Image.HasImage(E)) {
@@ -194,7 +193,7 @@ void BRepOffset_MakeLoops::BuildOnContext(const TopTools_ListOfShape& LContext
const Standard_Boolean InSide)
{
//-----------------------------------------
// debouclage des bouchons.
// unwinding of caps.
//-----------------------------------------
TopTools_ListIteratorOfListOfShape it(LContext);
TopTools_ListIteratorOfListOfShape itl,itLCE;
@@ -207,16 +206,16 @@ void BRepOffset_MakeLoops::BuildOnContext(const TopTools_ListOfShape& LContext
const TopoDS_Face& F = TopoDS::Face(it.Value());
TopTools_MapOfShape MBound;
//-----------------------------------------------
// Initialisation de Loops.
// F est reversed elle sera ajoute dans myOffC.
// et myOffC sera reversed dans le resultat final.
// Initialisation of Loops.
// F is reversed it will be added in myOffC.
// and myOffC will be reversed in the final result.
//-----------------------------------------------
TopoDS_Shape aLocalShape = F.Reversed();
if (InSide) Loops.Init(TopoDS::Face(aLocalShape));
// if (InSide) Loops.Init(TopoDS::Face(F.Reversed()));
else Loops.Init(F);
//--------------------------------------------------------
// recuperation des edges de F non modifie par definition.
// return edges of F not modified by definition.
//--------------------------------------------------------
for (exp.Init(F.Oriented(TopAbs_FORWARD),TopAbs_EDGE);
exp.More();
@@ -224,7 +223,7 @@ void BRepOffset_MakeLoops::BuildOnContext(const TopTools_ListOfShape& LContext
TopoDS_Edge CE = TopoDS::Edge(exp.Current());
MBound.Add(CE);
if (Analyse.HasAncestor(CE)) {
// les arretes des bouchons sauf les arretes de conexite entre bouchons.
// the stop of cups except for the connectivity stops between caps.
// if (!AsDes->HasAscendant(CE)) {
aLocalShape = CE.Reversed();
if (InSide) Loops.AddConstEdge(CE);
@@ -233,7 +232,7 @@ void BRepOffset_MakeLoops::BuildOnContext(const TopTools_ListOfShape& LContext
}
}
//------------------------------------------------------
// Trace des offsets + edge de connexite entre bouchons.
// Trace of offsets + connectivity edge between caps.
//------------------------------------------------------
const TopTools_ListOfShape& LE = AsDes->Descendant(F);
TopTools_ListOfShape AddedEdges;
@@ -242,10 +241,9 @@ void BRepOffset_MakeLoops::BuildOnContext(const TopTools_ListOfShape& LContext
TopoDS_Edge E = TopoDS::Edge(itl.Value());
if (Image.HasImage(E)) {
//-------------------------------------------
// E a deja ete decoupeee dans une autre face.
// Recuperation des edges decoupees et reorientation
// de ces edges comme E.
// Voir pb pour les edges qui ont disparu?
// E was already cut in another face.
// Return cut edges and orientate them as E.
// See pb for the edges that have disappeared?
//-------------------------------------------
const TopTools_ListOfShape& LCE = Image.Image(E);
for (itLCE.Initialize(LCE); itLCE.More(); itLCE.Next()) {
@@ -266,7 +264,7 @@ void BRepOffset_MakeLoops::BuildOnContext(const TopTools_ListOfShape& LContext
}
else {
if (IsBetweenCorks(E,AsDes,LContext) && AsDes->HasDescendant(E)) {
//conexite entre 2 bouchons
//connection between 2 caps
MapExtent.Add(E);
TopTools_ListOfShape LV;
if (InSide) {
@@ -297,7 +295,7 @@ void BRepOffset_MakeLoops::BuildOnContext(const TopTools_ListOfShape& LContext
}
}
//------------------------
// Debouclage.
// Unwind.
//------------------------
Loops.Perform();
Loops.WiresToFaces();
@@ -306,7 +304,7 @@ void BRepOffset_MakeLoops::BuildOnContext(const TopTools_ListOfShape& LContext
//------------------------
const TopTools_ListOfShape& NF = Loops.NewFaces();
//-----------------------
// F => Nouvelles faces;
// F => New faces;
//-----------------------
Image.Bind(F,NF);
@@ -314,7 +312,7 @@ void BRepOffset_MakeLoops::BuildOnContext(const TopTools_ListOfShape& LContext
for (itAdded.Initialize(AddedEdges); itAdded.More(); itAdded.Next()) {
const TopoDS_Edge& E = TopoDS::Edge(itAdded.Value());
//-----------------------
// E => Nouvelles edges;
// E => New edges;
//-----------------------
if (Image.HasImage(E)) {
Image.Add(E,Loops.NewEdges(E));
@@ -385,7 +383,7 @@ void BRepOffset_MakeLoops::BuildFaces(const TopTools_ListOfShape& LF,
BRep_Builder B;
//----------------------------------
// Boucle sur toutes les faces //.
// Loop on all faces //.
//----------------------------------
for (itr.Initialize(LF); itr.More(); itr.Next()) {
TopoDS_Face F = TopoDS::Face(itr.Value());
@@ -395,14 +393,13 @@ void BRepOffset_MakeLoops::BuildFaces(const TopTools_ListOfShape& LF,
if (!Image.HasImage(F)) {
//----------------------------------
// Face F non deja reconstruite.
// Face F not yet reconstructed.
//----------------------------------
const TopTools_ListOfShape& LE = AsDes->Descendant(F);
//----------------------------------------------------------------
// premiere boucle pour determiner si des edges de la face ont ete
// reconstruite.
// - maj de la map MONV. certains vertex sur les edges reconstruites
// coincide geometriquement avec les anciens mais ne sont pas IsSame.
// first loop to find if the edges of the face were reconstructed.
// - maj on map MONV. Some vertices on reconstructed edges
// coincide geometrically with old but are not IsSame.
//----------------------------------------------------------------
TopTools_DataMapOfShapeShape MONV;
TopoDS_Vertex OV1,OV2,NV1,NV2;
@@ -419,7 +416,7 @@ void BRepOffset_MakeLoops::BuildFaces(const TopTools_ListOfShape& LF,
continue;
}
//----------------------------------
// F doit etre reconstruite.
// F should be reconstructed.
//----------------------------------
ToRebuild = Standard_True;
for (itLCE.Initialize(LCE); itLCE.More(); itLCE.Next()) {
@@ -436,7 +433,7 @@ void BRepOffset_MakeLoops::BuildFaces(const TopTools_ListOfShape& LF,
}
if (ToRebuild) {
#ifdef DRAW
//POP pour NT
//POP for NT
if ( Affich) {
char* name = new char[100];
sprintf(name,"CF_%d",NbF++);
@@ -445,9 +442,8 @@ void BRepOffset_MakeLoops::BuildFaces(const TopTools_ListOfShape& LF,
#endif
//-----------------------------------------------------------
// les edges non reconstruites dans d autre faces sont
// ajoutees .si leurs vertex ont ete reconstruits elles
// seront reconstruites.
// Non-reconstructed edges on other faces are added.
// If their vertices were reconstructed they are reconstructed.
//-----------------------------------------------------------
for (itl.Initialize(LE); itl.More(); itl.Next()) {
Standard_Real f,l;
@@ -494,7 +490,7 @@ void BRepOffset_MakeLoops::BuildFaces(const TopTools_ListOfShape& LF,
//------------------------
const TopTools_ListOfShape& NF = Loops.NewFaces();
//-----------------------
// F => Nouvelles faces;
// F => New faces;
//-----------------------
Image.Bind(F,NF);
@@ -502,7 +498,7 @@ void BRepOffset_MakeLoops::BuildFaces(const TopTools_ListOfShape& LF,
for (itAdded.Initialize(AddedEdges); itAdded.More(); itAdded.Next()) {
const TopoDS_Edge& E = TopoDS::Edge(itAdded.Value());
//-----------------------
// E => Nouvelles edges;
// E => New edges;
//-----------------------
if (Image.HasImage(E)) {
Image.Add(E,Loops.NewEdges(E));

View File

@@ -101,7 +101,7 @@
#include <GeomFill_Generator.hxx>
// POP pour NT
// POP for NT
#include <stdio.h>
#ifdef DRAW
@@ -145,7 +145,7 @@ static void DEBVerticesControl (const TopTools_MapOfShape& NewEdges,
for (it1LE.Initialize(AsDes->Descendant(NE)); it1LE.More(); it1LE.Next()) {
if (AsDes->Ascendant(it1LE.Value()).Extent() < 3) {
LVP.Append(it1LE.Value());
cout <<"Vertex sur moins de 3 edges."<<endl;
cout <<"Vertex on at least 3 edges."<<endl;
#ifdef DRAW
if (AffichInt2d) {
sprintf (name,"VP_%d",NVP++);
@@ -154,7 +154,7 @@ static void DEBVerticesControl (const TopTools_MapOfShape& NewEdges,
#endif
}
else if (AsDes->Ascendant(it1LE.Value()).Extent() > 3) {
cout <<"Vertex sur plus de 3 edges."<<endl;
cout <<"Vertex on more than 3 edges."<<endl;
#ifdef DRAW
if (AffichInt2d) {
sprintf (name,"VM_%d",NVM++);
@@ -175,7 +175,7 @@ static void DEBVerticesControl (const TopTools_MapOfShape& NewEdges,
}
}
//------------------------------------------------
// Essai de confusion des vertex pourris.
// Try to mix spoiled vertices.
//------------------------------------------------
BRep_Builder B;
TopTools_ListIteratorOfListOfShape it1(LVP);
@@ -220,7 +220,7 @@ static void DEBVerticesControl (const TopTools_MapOfShape& NewEdges,
j++;
}
i++;
cout <<" distmin entre VP : "<<distmin<<endl;
cout <<" distmin between VP : "<<distmin<<endl;
}
}
#endif
@@ -570,8 +570,8 @@ static void RemoveCorks (TopoDS_Shape& S,
BRep_Builder B;
B.MakeCompound (SS);
//-----------------------------------------------------
// Construction d un shape sans les bouchons.
// et Orientation des bouchons comme dans le shape S.
// Construction of a shape without caps.
// and Orientation of caps as in shape S.
//-----------------------------------------------------
TopExp_Explorer exp(S,TopAbs_FACE);
for (; exp.More(); exp.Next()) {
@@ -581,7 +581,7 @@ static void RemoveCorks (TopoDS_Shape& S,
}
else {
Faces.Remove (Cork);
Faces.Add (Cork); // pour la remettre avec la bonne orientation.
Faces.Add (Cork); // to reset it with proper orientation.
}
}
S = SS;
@@ -650,7 +650,7 @@ void BRepOffset_MakeOffset::MakeOffsetShape()
{
myDone = Standard_False;
//------------------------------------------
// Constuction de myShape sans les bouchons.
// Construction of myShape without caps.
//------------------------------------------
RemoveCorks (myShape,myFaces);
@@ -671,10 +671,10 @@ void BRepOffset_MakeOffset::MakeOffsetShape()
Standard_Real TolAngle = 4*ASin(myTol/Abs(myOffset*0.5));
myAnalyse.Perform(myShape,TolAngle);
//---------------------------------------------------
// Construction des Offset a partir de la preanalyse.
// Construction of Offset from preanalysis.
//---------------------------------------------------
//----------------------------
// MaJ de la SD Face - Offset
// MaJ of SD Face - Offset
//----------------------------
UpdateFaceOffset();
@@ -683,7 +683,7 @@ void BRepOffset_MakeOffset::MakeOffsetShape()
else if (myJoin == GeomAbs_Intersection)
BuildOffsetByInter();
//-----------------
// Auto debouclage.
// Auto unwinding.
//-----------------
// if (mySelfInter) SelfInter(Modif);
//-----------------
@@ -699,12 +699,12 @@ void BRepOffset_MakeOffset::MakeOffsetShape()
if (!Modif.IsEmpty()) Intersection2D (Modif,NewEdges);
//-------------------------------------------------------
// Debouclage 2D et reconstruction des faces modifiees
// Unwinding 2D and reconstruction of modified faces
//----------------------------------------------------
MakeLoops (Modif);
//-----------------------------------------------------
// Reconstuction des faces non modifie mais qui partage
// des edges recontruits
// Reconstruction of non modified faces sharing
// reconstructed edges
//------------------------------------------------------
if (!Modif.IsEmpty()) MakeFaces (Modif);
@@ -712,24 +712,24 @@ void BRepOffset_MakeOffset::MakeOffsetShape()
MakeMissingWalls();
//-------------------------
// Construction des shells.
// Construction of shells.
//-------------------------
MakeShells ();
//--------------
// Debouclage3d.
// Unwinding 3D.
//--------------
SelectShells ();
//----------------------------------
// Codage ges regularites.
// Coding of regularities.
//----------------------------------
EncodeRegularity();
//----------------------
// Creation des solides.
// Creation of solids.
//----------------------
MakeSolid ();
//-----------------------------
// MAJ Tolerance edge et Vertex
// MAJ Tolerance edge and Vertex
// ----------------------------
if (!myOffsetShape.IsNull()) {
UpdateTolerance (myOffsetShape,myFaces);
@@ -751,13 +751,13 @@ void BRepOffset_MakeOffset::MakeOffsetShape()
void BRepOffset_MakeOffset::MakeThickSolid()
{
//--------------------------------------------------------------
// Construction shell parallele au shell (initial sans bouchon).
// Construction of shell parallel to shell (initial without cap).
//--------------------------------------------------------------
MakeOffsetShape ();
//--------------------------------------------------------------------
// Construction d un solide avec le shell initial le shell parallele
// limite par les bouchons.
// Construction of a solid with the initial shell, parallel shell
// limited by caps.
//--------------------------------------------------------------------
if (!myFaces.IsEmpty()) {
TopoDS_Solid Res;
@@ -790,8 +790,8 @@ void BRepOffset_MakeOffset::MakeThickSolid()
Res.Closed(Standard_True);
myOffsetShape = Res;
// Test de Validite du resultat le Solide epais doit avoir
// plus de face que le solide initial.
// Test of Validity of the result of thick Solid
// more face than the initial solid.
Standard_Integer NbOF = 0;
for (exp.Init(myOffsetShape,TopAbs_FACE);exp.More(); exp.Next()) {
@@ -840,8 +840,8 @@ const TopoDS_Shape& BRepOffset_MakeOffset::Shape() const
//=======================================================================
//function : TrimEdge
//purpose : Trim l edge au plus large par ses descendants dans AsDes2d.
// Range dans AsDes les deux vertex qui ont trimme l edge.
//purpose : Trim the edge of the largest of descendants in AsDes2d.
// Order in AsDes two vertices that have trimmed the edge.
//=======================================================================
static void TrimEdge (TopoDS_Edge& NE,
@@ -912,7 +912,7 @@ void BRepOffset_MakeOffset::BuildOffsetByInter()
{
#ifdef DEB
if ( ChronBuild) {
cout << " CONSTRUCTION DES OFFSETS :" << endl;
cout << " CONSTRUCTION OF OFFSETS :" << endl;
Clock.Reset();
Clock.Start();
}
@@ -922,7 +922,7 @@ void BRepOffset_MakeOffset::BuildOffsetByInter()
TopTools_MapOfShape Done;
Standard_Boolean OffsetOutside = (myOffset > 0.)? Standard_True : Standard_False;
//--------------------------------------------------------
// Construction des faces paralleles a des faces initiales
// Construction of faces parallel to initial faces
//--------------------------------------------------------
TopExp_Explorer Exp;
TopTools_ListOfShape LF;
@@ -980,20 +980,20 @@ void BRepOffset_MakeOffset::BuildOffsetByInter()
Handle(BRepAlgo_AsDes) AsDes = new BRepAlgo_AsDes();
//-------------------------------------------------------------------
// Extension des faces et calcul des nouvelles edges d intersection.
// Extension of faces and calculation of new edges of intersection.
//-------------------------------------------------------------------
Standard_Boolean ExtentContext = 0;
if (myOffset > 0) ExtentContext = 1;
BRepOffset_Inter3d Inter3 (AsDes,Side,myTol);
// Intersection entre faces paralleles
// Intersection between parallel faces
Inter3.ConnexIntByInt(myShape,MapSF,myAnalyse,MES,Build,Failed );
// Intersection avec les bouchons.
// Intersection with caps.
Inter3.ContextIntByInt(myFaces,ExtentContext,MapSF,myAnalyse,MES,Build,Failed );
//---------------------------------------------------------------------------------
// Extension des edges voisines des nouvelles edges.et intersection entre les voisins.
// Extension of neighbor edges of new edges and intersection between neighbors.
//--------------------------------------------------------------------------------
Handle(BRepAlgo_AsDes) AsDes2d = new BRepAlgo_AsDes();
for (Exp.Init(myShape,TopAbs_FACE) ; Exp.More(); Exp.Next()) {
@@ -1004,7 +1004,7 @@ void BRepOffset_MakeOffset::BuildOffsetByInter()
// Modified by skv - Mon Jan 12 11:50:03 2004 OCC4455 End
}
//-----------------------------------------------------------
// Restriction large des nouvelles edges et mise a jour AsDes.
// Great restriction of new edges and update of AsDes.
//------------------------------------------ ----------------
TopTools_MapOfShape NewEdges;
TopExp_Explorer Exp2,ExpC;
@@ -1030,9 +1030,9 @@ void BRepOffset_MakeOffset::BuildOffsetByInter()
}
else {
//------------------------------------------------------------
// Les Intersections sont en plusieurs edges.
// Les morceaux sans intersections avec les voisins
// sont supprimes de AsDes.
// The Intersections are on several edges.
// The pieces without intersections with neighbors
// are removed from AsDes.
//------------------------------------------------------------
for (ExpC.Init(NE,TopAbs_EDGE); ExpC.More(); ExpC.Next()) {
if (NewEdges.Add(ExpC.Current())) {
@@ -1065,7 +1065,7 @@ void BRepOffset_MakeOffset::BuildOffsetByInter()
}
//---------------------------------
// Intersection2d sur les //
// Intersection 2D on //
//---------------------------------
TopTools_ListOfShape LFE;
BRepAlgo_Image IMOE;
@@ -1085,7 +1085,7 @@ void BRepOffset_MakeOffset::BuildOffsetByInter()
BRepOffset_Inter2d::Compute(AsDes,NEF,NewEdges,myTol);
}
//----------------------------------------------
// Intersections 2d sur les bouchons.
// Intersections 2d on caps.
//----------------------------------------------
TopTools_MapIteratorOfMapOfShape itCork(myFaces);
for (; itCork.More(); itCork.Next()) {
@@ -1094,7 +1094,7 @@ void BRepOffset_MakeOffset::BuildOffsetByInter()
}
//-------------------------------
// Debouclage des Faces etendues.
// Unwinding of extended Faces.
//-------------------------------
myMakeLoops.Build(LFE ,AsDes,IMOE);
@@ -1102,7 +1102,7 @@ void BRepOffset_MakeOffset::BuildOffsetByInter()
TopTools_MapOfShape COES;
#endif
//---------------------------
// MAJ SD. pour les faces //
// MAJ SD. for faces //
//---------------------------
for (Exp.Init(myShape,TopAbs_FACE) ; Exp.More(); Exp.Next()) {
const TopoDS_Shape& FI = Exp.Current();
@@ -1288,7 +1288,7 @@ void BRepOffset_MakeOffset::BuildOffsetByInter()
// Modified by skv - Tue Mar 15 16:20:43 2005
//---------------------------
// MAJ SD. pour les bouchons
// MAJ SD. for caps
//---------------------------
TopTools_MapOfShape View;
for (itCork.Initialize(myFaces); itCork.More(); itCork.Next()) {
@@ -1349,7 +1349,7 @@ void BRepOffset_MakeOffset::BuildOffsetByArc()
{
#ifdef DEB
if ( ChronBuild) {
cout << " CONSTRUCTION DES OFFSETS :" << endl;
cout << " CONSTRUCTION OF OFFSETS :" << endl;
Clock.Reset();
Clock.Start();
}
@@ -1359,7 +1359,7 @@ void BRepOffset_MakeOffset::BuildOffsetByArc()
TopTools_MapOfShape Done;
Standard_Boolean OffsetOutside = (myOffset > 0.)? Standard_True : Standard_False;
//--------------------------------------------------------
// Construction des faces paralleles a des faces initiales
// Construction of faces parallel to initial faces
//--------------------------------------------------------
TopExp_Explorer Exp;
TopTools_ListOfShape LF;
@@ -1406,7 +1406,7 @@ void BRepOffset_MakeOffset::BuildOffsetByArc()
MapSF.Bind(F,OF);
}
//--------------------------------------------------------
// Construction des tuyaux sur arete.
// Construction of tubes on edge.
//--------------------------------------------------------
BRepOffset_Type OT = BRepOffset_Convex;
if (myOffset < 0.) OT = BRepOffset_Concave;
@@ -1463,7 +1463,7 @@ void BRepOffset_MakeOffset::BuildOffsetByArc()
}
else {
// ----------------------
// bord libre.
// free border.
// ----------------------
TopoDS_Shape aLocalShape = MapSF(Anc.First()).Generated(E);
TopoDS_Edge EOn1 = TopoDS::Edge(aLocalShape);
@@ -1475,7 +1475,7 @@ void BRepOffset_MakeOffset::BuildOffsetByArc()
}
//--------------------------------------------------------
// Construction des shperes sur vertex.
// Construction of spheres on vertex.
//--------------------------------------------------------
Done.Clear();
TopTools_ListIteratorOfListOfShape it;
@@ -1490,7 +1490,7 @@ void BRepOffset_MakeOffset::BuildOffsetByArc()
if (LE.Extent() >= 3 && LE.Extent() == LA.Extent()) {
TopTools_ListOfShape LOE;
//--------------------------------------------------------
// Recuperation des edges connexes sur les tuyaux.
// Return connected edges on tubes.
//--------------------------------------------------------
for (it.Initialize(LE) ; it.More(); it.Next()) {
LOE.Append(MapSF(it.Value()).Generated(V).Reversed());
@@ -1508,7 +1508,7 @@ void BRepOffset_MakeOffset::BuildOffsetByArc()
MapSF.Bind(V,OF);
}
//--------------------------------------------------------------
// Traitemnet particulier si V est sur au moins un bord libre.
// Particular processing if V is at least a free border.
//-------------------------------------------------------------
TopTools_ListOfShape LBF;
myAnalyse.Edges(V,BRepOffset_FreeBoundary,LBF);
@@ -1529,8 +1529,8 @@ void BRepOffset_MakeOffset::BuildOffsetByArc()
}
//------------------------------------------------------------
// Extension des faces paralleles jusq au contexte.
// Les faces etendues sont rangees en SD et Supprime de MapSF.
// Extension of parallel faces to the context.
// Extended faces are ordered in DS and removed from MapSF.
//------------------------------------------------------------
if (!myFaces.IsEmpty()) ToContext (MapSF);
@@ -1549,8 +1549,7 @@ void BRepOffset_MakeOffset::BuildOffsetByArc()
if (SF.Status() == BRepOffset_Reversed ||
SF.Status() == BRepOffset_Degenerated ) {
//------------------------------------------------
// Les faces degenerees ou retournees ne sont pas
// stockes.
// Degenerated or returned faces are not stored.
//------------------------------------------------
continue;
}
@@ -1558,15 +1557,15 @@ void BRepOffset_MakeOffset::BuildOffsetByArc()
const TopoDS_Face& OF = It.Value().Face();
myInitOffsetFace.Bind (SI,OF);
myInitOffsetFace.SetRoot (SI); // Initial<-> Offset
myImageOffset.SetRoot (OF); // FaceOffset racine des images
myImageOffset.SetRoot (OF); // FaceOffset root of images
if (SI.ShapeType() == TopAbs_FACE) {
for (Exp.Init(SI.Oriented(TopAbs_FORWARD),TopAbs_EDGE);
Exp.More(); Exp.Next()) {
//--------------------------------------------------------------------
// A chaque face // on associe les edges qui la restreignent
// Les edges qui ne genere pas de tuyaux ou qui ne sont pas tangentes
// a deux faces sont supprimees.
// To each face are associatedthe edges that restrict that
// The edges that do not generate tubes or are not tangent
// to two faces are removed.
//--------------------------------------------------------------------
const TopoDS_Edge& E = TopoDS::Edge(Exp.Current());
const BRepOffset_ListOfInterval& L = myAnalyse.Type(E);
@@ -1643,15 +1642,15 @@ void BRepOffset_MakeOffset::ToContext (BRepOffset_DataMapOfShapeOffset& MapSF)
const TopoDS_Edge& E = TopoDS::Edge(exp.Current());
if (!myAnalyse.HasAncestor(E)) {
//----------------------------------------------------------------
// Les edges des faces de contexte qui ne sont pas dans le shape
// initiales peuvent apparaitre dans le resultat.
// The edges of context faces that are not in the initial shape
// can appear in the result.
//----------------------------------------------------------------
//myAsDes->Add(CF,E);
}
}
}
//--------------------------------------------------------
// Determination des edges et des faces a reconstruire par
//-------------------------------------------------------
// Determine the edges and faces reconstructed by
// intersection.
//---------------------------------------------------------
for ( it.Initialize(myFaces); it.More(); it.Next()) {
@@ -1683,7 +1682,7 @@ void BRepOffset_MakeOffset::ToContext (BRepOffset_DataMapOfShapeOffset& MapSF)
}
}
//---------------------------
// Reconstruction des faces.
// Reconstruction of faces.
//---------------------------
TopoDS_Face F,NF;
BRepOffset_Type RT = BRepOffset_Concave;
@@ -1731,7 +1730,7 @@ void BRepOffset_MakeOffset::ToContext (BRepOffset_DataMapOfShapeOffset& MapSF)
}
else {
//------------------
// Tuyau
// Tube
//---------------------
for (exp.Init(NF.Oriented(TopAbs_FORWARD),TopAbs_EDGE);
exp.More(); exp.Next()) {
@@ -1741,9 +1740,9 @@ void BRepOffset_MakeOffset::ToContext (BRepOffset_DataMapOfShapeOffset& MapSF)
MapSF.UnBind(S);
}
//----------------
// MAJ bords libre
//----------------
//------------------
// MAJ free borders
//------------------
TopTools_DataMapIteratorOfDataMapOfShapeShape itc;
for (itc.Initialize(Created); itc.More(); itc.Next()) {
OE = itc.Key();
@@ -1838,7 +1837,7 @@ void BRepOffset_MakeOffset::CorrectConicalFaces()
//Handle(BRep_TEdge)& TE = *((Handle(BRep_TEdge)*) &anEdge.TShape());
if (BRep_Tool::Degenerated(anEdge))
{
//Check wether anEdge is a really degenerated edge or not
//Check if anEdge is a really degenerated edge or not
BRepAdaptor_Curve BACurve(anEdge, aFace);
gp_Pnt Pfirst, Plast, Pmid;
Pfirst = BACurve.Value(BACurve.FirstParameter());
@@ -2550,20 +2549,20 @@ void BRepOffset_MakeOffset::Intersection3D(BRepOffset_Inter3d& Inter)
Clock.Start();
}
#endif
TopTools_ListOfShape OffsetFaces; // liste des faces // crees.
TopTools_ListOfShape OffsetFaces; // list of faces // created.
MakeList (OffsetFaces,myInitOffsetFace,myFaces);
if (!myFaces.IsEmpty()) {
Standard_Boolean InSide = (myOffset < 0.); // PROVISOIRE
// il faut calculer Inside en tenant compte de la concavite ou convexite des arretes
// entre le bouchon et la piece.
Standard_Boolean InSide = (myOffset < 0.); // Temporary
// it is necessary to calculate Inside taking account of the concavity or convexity of edges
// between the cap and the part.
if (myJoin == GeomAbs_Arc)
Inter.ContextIntByArc (myFaces,InSide,myAnalyse,myInitOffsetFace,myInitOffsetEdge);
}
if (myInter) {
//-------------
//Complet.
//Complete.
//-------------
Inter.CompletInt (OffsetFaces,myInitOffsetFace);
TopTools_MapOfShape& NewEdges = Inter.NewEdges();
@@ -2573,7 +2572,7 @@ void BRepOffset_MakeOffset::Intersection3D(BRepOffset_Inter3d& Inter)
}
else {
//--------------------------------
// Seulememt entre face voisines.
// Only between neighbor faces.
//--------------------------------
Inter.ConnexIntByArc(OffsetFaces,myShape,myAnalyse,myInitOffsetFace);
}
@@ -2597,13 +2596,13 @@ void BRepOffset_MakeOffset::Intersection2D(const TopTools_MapOfShape& Modif,
Clock.Start();
}
#endif
//-----------------------------------------------------------
// calcul des intersections2d sur les faces touchees par les
//--------------------------------------------------------
// calculate intersections2d on faces concerned by
// intersection3d
//---------------------------------------------------------
//--------------------------------------------------------
TopTools_MapIteratorOfMapOfShape it(Modif);
//-----------------------------------------------
// Intersection des edges 2 a 2.
// Intersection of edges 2 by 2.
//-----------------------------------------------
for ( it.Initialize(Modif); it.More(); it.Next()) {
const TopoDS_Face& F = TopoDS::Face(it.Key());
@@ -2636,7 +2635,7 @@ void BRepOffset_MakeOffset::MakeLoops(TopTools_MapOfShape& Modif)
TopTools_MapIteratorOfMapOfShape it(Modif);
TopTools_ListOfShape LF,LC;
//-----------------------------------------
// debouclage des faces // modifiees.
// unwinding of faces // modified.
//-----------------------------------------
for (; it.More(); it.Next()) {
if (!myFaces.Contains(it.Key())) LF.Append(it.Key());
@@ -2644,7 +2643,7 @@ void BRepOffset_MakeOffset::MakeLoops(TopTools_MapOfShape& Modif)
myMakeLoops.Build(LF,myAsDes,myImageOffset);
//-----------------------------------------
// debouclage des bouchons.
// unwinding of caps.
//-----------------------------------------
for (it.Initialize(myFaces); it.More(); it.Next()) {
LC.Append(it.Key());
@@ -2660,15 +2659,15 @@ void BRepOffset_MakeOffset::MakeLoops(TopTools_MapOfShape& Modif)
//=======================================================================
//function : MakeFaces
//purpose : Reconstruction des faces topologiquement inchangees qui
// partage des edges qui ont ete reconstruites.
//purpose : Reconstruction of topologically unchanged faces that
// share edges that were reconstructed.
//=======================================================================
void BRepOffset_MakeOffset::MakeFaces(TopTools_MapOfShape& Modif)
{
#ifdef DEb
if (ChronBuild) {
cout << " RECONSTRUCTION DES FACES:" << endl;
cout << " RECONSTRUCTION OF FACES:" << endl;
Clock.Reset();
Clock.Start();
}
@@ -2677,7 +2676,7 @@ void BRepOffset_MakeOffset::MakeFaces(TopTools_MapOfShape& Modif)
const TopTools_ListOfShape& Roots = myInitOffsetFace.Roots();
TopTools_ListOfShape LOF;
//----------------------------------
// Boucle sur toutes les faces //.
// Loop on all faces //.
//----------------------------------
for (itr.Initialize(Roots); itr.More(); itr.Next()) {
TopoDS_Face F = TopoDS::Face(myInitOffsetFace.Image(itr.Value()).First());
@@ -2692,7 +2691,7 @@ void BRepOffset_MakeOffset::MakeFaces(TopTools_MapOfShape& Modif)
//=======================================================================
//function : UpdateInitOffset
//purpose : mis a jour et purge de myInitOffset
//purpose : Update and cleaning of myInitOffset
//=======================================================================
static void UpdateInitOffset (BRepAlgo_Image& myInitOffset,
@@ -3059,7 +3058,7 @@ void BRepOffset_MakeOffset::MakeShells ()
{
#ifdef DEB
if (ChronBuild) {
cout << " RECONSTRUCTION DES SHELLS:" << endl;
cout << " RECONSTRUCTION OF SHELLS:" << endl;
Clock.Reset();
Clock.Start();
}
@@ -3143,9 +3142,9 @@ void BRepOffset_MakeOffset::SelectShells ()
TopTools_MapOfShape FreeEdges;
TopExp_Explorer exp(myShape,TopAbs_EDGE);
//-------------------------------------------------------------
// FreeEdges ensemble des edges qui peuvent etre bord libre dans
// le shell parallele
// 1 - les bord libres de myShape .
// FreeEdges all edges that can have free border in the
// parallel shell
// 1 - free borders of myShape .
//-------------------------------------------------------------
for ( ; exp.More(); exp.Next()) {
const TopoDS_Edge& E = TopoDS::Edge(exp.Current());
@@ -3156,8 +3155,8 @@ void BRepOffset_MakeOffset::SelectShells ()
}
}
}
// myShape a des bords libres et il n y a pas de bouchons.
// pas de debouclage3d.
// myShape has free borders and there are no caps
// no unwinding 3d.
if (!FreeEdges.IsEmpty() && myFaces.IsEmpty()) return;
myOffsetShape = BRepOffset_Tool::Deboucle3D(myOffsetShape,FreeEdges);
@@ -3218,14 +3217,14 @@ void BRepOffset_MakeOffset::EncodeRegularity ()
{
#ifdef DEB
if (ChronBuild) {
cout << " CODAGE DES REGULARITES:" << endl;
cout << " CODING OF REGULARITIES:" << endl;
Clock.Reset();
Clock.Start();
}
#endif
if (myOffsetShape.IsNull()) return;
// recherche des edges G1 dans le resultat
// find edges G1 in the result
TopExp_Explorer exp(myOffsetShape,TopAbs_EDGE);
BRep_Builder B;
@@ -3246,7 +3245,7 @@ void BRepOffset_MakeOffset::EncodeRegularity ()
if (LofOF.Extent() != 2) {
#ifdef DEB
if ( Standard_False)
cout << " Edge partage par " << LofOF.Extent() << " Faces" << endl;
cout << " Edge shared by " << LofOF.Extent() << " Faces" << endl;
#endif
continue;
}
@@ -3265,12 +3264,12 @@ void BRepOffset_MakeOffset::EncodeRegularity ()
if (F1.IsSame(F2)) {
if (BRep_Tool::IsClosed(OE,F1)) {
// Debug provisoire pour le Bench.
// Voir avec YFR.
// En mode intersection, les aretes ne sont pas codees dans myInitOffsetEdge
// on gere donc au cas par cas.
// Remarque DUB; Pour les parties cachees, il FAUT coder CN
// les Surf Analytiques.
// Temporary Debug for the Bench.
// Check with YFR.
// In mode intersection, the edges are not coded in myInitOffsetEdge
// so, manage case by case
// Note DUB; for Hidden parts, it is NECESSARY to code CN
// Analytic Surfaces.
if (myJoin == GeomAbs_Intersection) {
BRepAdaptor_Surface BS(F1,Standard_False);
GeomAbs_SurfaceType SType = BS.GetType();
@@ -3281,7 +3280,7 @@ void BRepOffset_MakeOffset::EncodeRegularity ()
B.Continuity(OE,F1,F1,GeomAbs_CN);
}
else {
// Voir YFR : MaJ de myInitOffsetFace
// See YFR : MaJ of myInitOffsetFace
}
}
else if (myInitOffsetEdge.IsImage(ROE)) {
@@ -3302,16 +3301,15 @@ void BRepOffset_MakeOffset::EncodeRegularity ()
}
// on code les regularites G1 entre :
// - sphere et tuyau : une root est un vertex, l'autre un edge
// et le vertex est inclus dans l'edge
// - face et tuyau : une root est une face, l'autre un edge
// et l'edge est inclus dans la face
// - face et face : si les 2 faces root sont tangentes dans
// le shape initial, elles le seront dans
// le shape offset
// - tuyau et tuyau : si les 2 edges generant les tuyaux sont
// tangents, les 2 tuyaux le seront.
// code regularities G1 between :
// - sphere and tube : one root is a vertex, the other is an edge
// and the vertex is included in the edge
// - face and tube : one root is a face, the other an edge
// and the edge is included in the face
// - face and face : if two root faces are tangent in
// the initial shape, they will be tangent in the offset shape
// - tube and tube : if 2 edges generating tubes are
// tangents, the 2 will be tangent either.
if ( Type1 == TopAbs_EDGE && Type2 == TopAbs_VERTEX) {
TopoDS_Vertex V1,V2;
TopExp::Vertices(TopoDS::Edge(Root1), V1, V2);
@@ -3345,8 +3343,8 @@ void BRepOffset_MakeOffset::EncodeRegularity ()
}
}
else if ( Type1 == TopAbs_FACE && Type2 == TopAbs_FACE) {
// si les 2 faces root sont tangentes dans le shape initial,
// elles le seront dans le shape offset
// if two root faces are tangent in
// the initial shape, they will be tangent in the offset shape
TopTools_ListOfShape LE,LV;
BRepOffset_Tool::HasCommonShapes(TopoDS::Face(Root1),
TopoDS::Face(Root2),
@@ -3408,7 +3406,7 @@ static void UpdateTolerance (TopoDS_Shape& S,
TopTools_MapOfShape View;
TopoDS_Vertex V[2];
// Les edges des bouchons ne sont pas modifiees.
// The edges of caps are not modified.
TopTools_MapIteratorOfMapOfShape it;
for (it.Initialize(Faces); it.More(); it.Next()) {
const TopoDS_Shape& F = it.Key();
@@ -3435,7 +3433,7 @@ static void UpdateTolerance (TopoDS_Shape& S,
TV->Tolerance(0.);
Handle(BRepCheck_Vertex) VertexCorrector = new BRepCheck_Vertex(V[i]);
B.UpdateVertex (V[i],VertexCorrector->Tolerance());
// on profite de l occasion pour purger le vertex.
// use the occasion to clean the vertices.
(TV->ChangePoints()).Clear();
}
B.UpdateVertex(V[i],Tol);

View File

@@ -83,8 +83,7 @@ static void UpdateEdge(const TopoDS_Edge& E,
const TopLoc_Location& L,
const Standard_Real Tol)
{
// Detrime les courbes pour eviter des copies dans
//les extensions.
// Cut curves to avoid copies in the extensions.
BRep_Builder B;
Handle(Geom_TrimmedCurve) BC = Handle(Geom_TrimmedCurve)::DownCast(C);
if (!BC.IsNull()) {
@@ -105,8 +104,7 @@ static void UpdateEdge(const TopoDS_Edge& E,
const TopoDS_Face& F,
const Standard_Real Tol)
{
// Detrime les courbes pour eviter des copies dans
//les extensions.
// Cut curves to avoid copies in the extensions.
BRep_Builder B;
Handle(Geom2d_TrimmedCurve) BC = Handle(Geom2d_TrimmedCurve)::DownCast(C);
if (!BC.IsNull()) {
@@ -128,8 +126,7 @@ static void UpdateEdge (const TopoDS_Edge& E,
const TopoDS_Face& F,
const Standard_Real Tol)
{
// Detrime les courbes pour eviter des copies dans
//les extensions.
// Cut curves to avoid copies in the extensions.
BRep_Builder B;
Handle(Geom2d_Curve) NC1,NC2;
Handle(Geom2d_TrimmedCurve) BC1 = Handle(Geom2d_TrimmedCurve)::DownCast(C1);
@@ -142,7 +139,7 @@ static void UpdateEdge (const TopoDS_Edge& E,
//=======================================================================
//function : Range3d
//purpose : Set the range only on the 3d curve
// en attendant que le BRep_Builder le fasse !!
// waitint that BRep_Builder does it !!
//=======================================================================
static void Range3d (const TopoDS_Edge& E,
@@ -193,14 +190,14 @@ static void ComputeCurve3d(TopoDS_Edge Edge,
Standard_Boolean IsComputed = Standard_False;
// Seach only isos on analytiques surfaces.
// Search only isos on analytic surfaces.
Geom2dAdaptor_Curve C(Curve);
GeomAdaptor_Surface S(Surf);
GeomAbs_CurveType CTy = C.GetType();
GeomAbs_SurfaceType STy = S.GetType();
BRep_Builder TheBuilder;
if ( STy != GeomAbs_Plane) { // if plane buildcurve3d gere KPart
if ( STy != GeomAbs_Plane) { // if plane buildcurve3d manage KPart
if ( CTy == GeomAbs_Line) {
gp_Dir2d D = C.Line().Direction();
if ( D.IsParallel(gp::DX2d(),Precision::Angular())) { // Iso V.
@@ -281,10 +278,10 @@ static void ComputeCurve3d(TopoDS_Edge Edge,
gp_Sphere Sph = S.Sphere();
gp_Pnt2d P = C.Line().Location();
gp_Ax3 Axis = Sph.Position();
// calculde l'iso 0.
// calculate iso 0.
gp_Circ Ci = ElSLib::SphereUIso(Axis, Sph.Radius(),0.);
// mise a sameparameter (rotation du cercle - decalage du Y)
// set to sameparameter (rotation of circle - offset of Y)
gp_Dir DRev = Axis.XDirection().Crossed(Axis. Direction());
gp_Ax1 AxeRev(Axis.Location(),DRev);
Ci.Rotate(AxeRev, P.Y());