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);
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()));
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)) {
}
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)) {
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;
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]);
#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;
}
//----------------------------------
- // Test en bout.
+ // Test at end.
//---------------------------------
Standard_Real U1,U2;
Standard_Real TolConf = Tol;
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;
// 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;
}
}
}
//---------------------------------
- // 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);
{
#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);
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]);
#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;
}
//----------------------------------
- // Test en bout.
+ // Test at end.
//---------------------------------
Standard_Real U1,U2;
Standard_Real TolConf = Tol;
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;
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;
}
}
}
//---------------------------------
- // Stockage vertex en SD.
+ // Vertex storage in SD.
//---------------------------------
////-----------------------------------------------------
if(LV1.Extent() > 1) {
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);
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;
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)) ) {
BRepOffset_Tool::MapVertexEdges(FI,MVE);
//---------------------
- // Extension des edges.
+ // Extension of edges.
//---------------------
TopoDS_Edge NE;
TopTools_DataMapIteratorOfDataMapOfShapeListOfShape it(MVE);
// 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;