# merging TopoDS_Edge

Hi All,
Is there any way to add two TopoDS_Edge.
I dont mean TopoDS_Wire, just adding them as a one TopoDS_Edge.
Thanks for any idea.
Akbari

You can try this

HGeomAPI_MergeCurve::HGeomAPI_MergeCurve
(const Handle(Geom_BSplineCurve)& BCurve1,
const Handle(Geom_BSplineCurve)& BCurve2)
{
Convert_CompBezierCurvesToBSplineCurve CBTB;
GeomConvert_BSplineCurveToBezierCurve BCTB1(BCurve1);
int nba=BCTB1.NbArcs();

for(int i=1;i<=nba;i++)
{
Handle(Geom_BezierCurve) BezierC=BCTB1.Arc(i);
int nbp=BezierC->NbPoles();
TColgp_Array1OfPnt Poles1(1,nbp);
BezierC->Poles(Poles1);
}

GeomConvert_BSplineCurveToBezierCurve BCTB2(BCurve2);
int nbb=BCTB2.NbArcs();

for(i=1;i<=nbb;i++)
{
Handle(Geom_BezierCurve) BezierC=BCTB2.Arc(i);
int nbp=BezierC->NbPoles();
TColgp_Array1OfPnt Poles2(1,nbp);
BezierC->Poles(Poles2);
}
CBTB.Perform();

int nbps,nbks,degree;
degree=CBTB.Degree();
nbks=CBTB.NbKnots();
nbps=CBTB.NbPoles();
TColStd_Array1OfReal Knots(1,nbks);
TColStd_Array1OfInteger Mults(1,nbks);
TColgp_Array1OfPnt Poles(1,nbps);
CBTB.Poles(Poles);
CBTB.KnotsAndMults(Knots,Mults);
for(i=1;i<=nbks;i++)
{
double k=Knots(i);
double m=Mults(i);
}
myCurve=new Geom_BSplineCurve(Poles,Knots,Mults,degree);
}

Hi Chien-Hung Lin,
Thank you very much.
I'm trying your code.
Regards
A.Akbari