//purpose :
//=======================================================================
void TopOpeBRep_Hctxee2d::SetEdges(const TopoDS_Edge& E1,const TopoDS_Edge& E2,
- const BRepAdaptor_Surface& BAS1,
- const BRepAdaptor_Surface& BAS2)
+ const BRepAdaptor_Surface& BAS1,
+ const BRepAdaptor_Surface& BAS2)
{
const TopoDS_Face& F1 = BAS1.Face();
GeomAbs_SurfaceType ST1 = BAS1.GetType();
const TopoDS_Face& F2 = BAS2.Face();
-#ifdef DEb
- GeomAbs_SurfaceType ST2 = BAS2.GetType();
-#endif
myEdge1 = TopoDS::Edge(E1);
myEdge2 = TopoDS::Edge(E2);
BRep_Tool::UVPoints(myEdge1,F1,pfirst,plast);
tole = BRep_Tool::Tolerance(myEdge1);
myDomain1.SetValues(pfirst,first,tole,plast,last,tole);
-
+
#ifdef DEB
Standard_Boolean trc = Standard_False;
if (trc) {
cout<<"ed1 on fa1 : {pfirst=("<<pfirst.X()<<" "<<pfirst.Y()<<"),first="<<first<<"\n";
cout<<" plast =("<<plast.X()<<" "<<plast.Y()<<"),last="<<last<<"}"<<endl;}
-#endif
-
+#endif
+
Standard_Boolean memesfaces = F1.IsSame(F2);
Standard_Boolean memesupport = Standard_False;
TopLoc_Location L1,L2;
BRep_Tool::UVPoints(myEdge2,F1,pfirst,plast);
tole = BRep_Tool::Tolerance(myEdge2);
myDomain2.SetValues(pfirst,first,tole,plast,last,tole);
-
+
#ifdef DEB
if (trc) {
cout<<"ed2 on fa1 : {pfirst=("<<pfirst.X()<<" "<<pfirst.Y()<<"),first="<<first<<"\n";
- cout<<" plast =("<<plast.X()<<" "<<plast.Y()<<"),last="<<last<<"}"<<endl;}
+ cout<<" plast =("<<plast.X()<<" "<<plast.Y()<<"),last="<<last<<"}"<<endl;
+ }
#endif
-
}
else {
Handle(Geom2d_Curve) PC2on1; Handle(Geom_Curve) NC;
Standard_Boolean dgE2 = BRep_Tool::Degenerated(myEdge2);
- if (dgE2) { //xpu210998 : cto900Q3
+ if (dgE2)
+ { //xpu210998 : cto900Q3
TopExp_Explorer exv(myEdge2,TopAbs_VERTEX);
const TopoDS_Vertex& v2 = TopoDS::Vertex(exv.Current());
gp_Pnt pt2 = BRep_Tool::Pnt(v2);
Handle(Geom_Surface) S1 = BRep_Tool::Surface(F1);
Standard_Boolean apex = FUN_tool_onapex(uv2,S1);
if (apex) {
- TopoDS_Vertex vf,vl; TopExp::Vertices(myEdge1,vf,vl);
- gp_Pnt ptf = BRep_Tool::Pnt(vf); Standard_Real df = pt2.Distance(ptf);
- gp_Pnt ptl = BRep_Tool::Pnt(vl);
-#ifdef DEB
- Standard_Real dl =
-#endif
- pt2.Distance(ptl);
- Standard_Real tolf = BRep_Tool::Tolerance(vf);
-#ifdef DEB
- Standard_Real toll =
-#endif
- BRep_Tool::Tolerance(vl);
- Standard_Boolean onf = (df < tolf);
- TopoDS_Vertex v1 = onf ? vf : vl;
- TopTools_IndexedDataMapOfShapeListOfShape mapVE; TopExp::MapShapesAndAncestors(F1,TopAbs_VERTEX,TopAbs_EDGE,mapVE);
- const TopTools_ListOfShape& Edsanc = mapVE.FindFromKey(v1);
- TopTools_ListIteratorOfListOfShape it(Edsanc);
- for (; it.More(); it.Next()){
- const TopoDS_Edge& ee = TopoDS::Edge(it.Value());
- Standard_Boolean dgee = BRep_Tool::Degenerated(ee);
- if (!dgee) continue;
-// Standard_Real f,l;
- PC2on1 = BRep_Tool::CurveOnSurface(ee,F1,first,last);
- }
+ TopoDS_Vertex vf,vl; TopExp::Vertices(myEdge1,vf,vl);
+ gp_Pnt ptf = BRep_Tool::Pnt(vf); Standard_Real df = pt2.Distance(ptf);
+ gp_Pnt ptl = BRep_Tool::Pnt(vl);
+ Standard_Real tolf = BRep_Tool::Tolerance(vf);
+ Standard_Boolean onf = (df < tolf);
+ TopoDS_Vertex v1 = onf ? vf : vl;
+ TopTools_IndexedDataMapOfShapeListOfShape mapVE; TopExp::MapShapesAndAncestors(F1,TopAbs_VERTEX,TopAbs_EDGE,mapVE);
+ const TopTools_ListOfShape& Edsanc = mapVE.FindFromKey(v1);
+ TopTools_ListIteratorOfListOfShape it(Edsanc);
+ for (; it.More(); it.Next()){
+ const TopoDS_Edge& ee = TopoDS::Edge(it.Value());
+ Standard_Boolean dgee = BRep_Tool::Degenerated(ee);
+ if (!dgee) continue;
+ PC2on1 = BRep_Tool::CurveOnSurface(ee,F1,first,last);
+ }
}
else {} // NYIxpu210998
} //dgE2
myDomain2.SetValues(pfirst,first,tole,plast,last,tole);
#ifdef DEB
if ( TopOpeBRep_GettracePROEDG() ) {
- cout<<"------------ projection de curve"<<endl;
- cout<<"--- Curve : "<<endl;GeomTools_CurveSet::PrintCurve(NC,cout);
- cout<<"--- nouvelle PCurve : "<<endl;GeomTools_Curve2dSet::PrintCurve2d(PC2on1,cout);
- Handle(Geom_Surface) S1 = BRep_Tool::Surface(F1);
- cout<<"--- sur surface : "<<endl;GeomTools_SurfaceSet::PrintSurface(S1,cout);
- cout<<endl;
+ cout<<"------------ projection de curve"<<endl;
+ cout<<"--- Curve : "<<endl;GeomTools_CurveSet::PrintCurve(NC,cout);
+ cout<<"--- nouvelle PCurve : "<<endl;GeomTools_Curve2dSet::PrintCurve2d(PC2on1,cout);
+ Handle(Geom_Surface) S1 = BRep_Tool::Surface(F1);
+ cout<<"--- sur surface : "<<endl;GeomTools_SurfaceSet::PrintSurface(S1,cout);
+ cout<<endl;
}
#endif
}