#include <ShapeUpgrade_UnifySameDomain.hxx>
#include <BRepBuilderAPI_MakePolygon.hxx>
#include <BOPAlgo_Builder.hxx>
+#include <BRepAdaptor_Curve.hxx>
+#include <GeomProjLib.hxx>
#include <gp_Pln.hxx>
#include <TopTools_IndexedDataMapOfShapeShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
BRep_Builder BB;
TopoDS_Face F;
Handle_Geom_Plane refpl = new Geom_Plane(gp_Pnt(0,0,0), gp_Dir(0,0,1));
- BB.MakeFace(F, refpl, Precision::Confusion());
- BRepAlgo_NormalProjection nproj(F);
- nproj.Add(LB);
- nproj.Add(RB);
- nproj.SetDefaultParams();
- nproj.Build();
- if(!nproj.IsDone())
- return false;
- //TopoDS_Shape projBanks = nproj.Projection();
TopoDS_Vertex VFI, VLI, VFO, VLO;
- TopoDS_Edge prLB = TopoDS::Edge(nproj.Generated(LB).First());
- TopoDS_Edge prRB = TopoDS::Edge(nproj.Generated(RB).First());
+ TopoDS_Edge prLB;
+ TopoDS_Edge prRB;
+
+
+ BRepAdaptor_Curve LBAD(LB);
+ Handle_Geom_Curve LBPC = GeomProjLib::ProjectOnPlane(LBAD.Curve().Curve(), refpl, gp_Dir(0, 0, -1), 1 );
+ prLB = BRepLib_MakeEdge(LBPC).Edge();
+
+ BRepAdaptor_Curve RBAD(RB);
+ Handle_Geom_Curve RBPC = GeomProjLib::ProjectOnPlane(RBAD.Curve().Curve(), refpl, gp_Dir(0, 0, -1), 1 );
+ prRB = BRepLib_MakeEdge(RBPC).Edge();
+
TopExp::Vertices(prLB, VFI, VFO, 1);
TopExp::Vertices(prRB, VLI, VLO, 1);
TopoDS_Edge prIL = BRepLib_MakeEdge(VFI, VLI).Edge();