Approx_Curve3d convert an wire to Geom_BSplineCurve

Hello everyone, when I use the Approx_Curve3d function to convert a wire to a C2 continuous BSplineCurve.but the resutl curve is a C0 continuous curve.

BRepAdaptor_CompCurve wireAdaptor(wire);
Handle(BRepAdaptor_HCompCurve) curve = new BRepAdaptor_HCompCurve(wireAdaptor);
Approx_Curve3d approx(curve, 0.001, GeomAbs_C1, 200, 12);
if (approx.IsDone() && approx.HasResult()) {
   Handle(Geom_BSplineCurve) anApproximatedCurve = approx.Curve();
   return anApproximatedCurve;
}

Is there a problem with the wire processed by BRepAdaptor_HCompCurve or is there any other reason? Thank you all.