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