problem with Approx_Curve3d

Hello

I have created a wire from a list of unsorted edges. Then i want to convert the
wire into a Geom_Curve by using Approx_Curve3d. But the result ist only a part of the
wire. I have used Approx_Curve3d before and it worked well, so i think there might be
a problem with the wire. But I don´t know what.
Can anybody help me?

here is the used code
Handle(ShapeFix_Wire) aShFW = new ShapeFix_Wire();
Handle(ShapeExtend_WireData) aWD = new ShapeExtend_WireData();

for....
aWD.Add(edge) //List of edges

aShFW->Load(aWD);
aShFW->ClosedWireMode() = Standard_True;
aShFW->FixReorder();
aShFW->FixConnected();

TopoDS_Wire awire = aShFW->Wire();

BRepAdaptor_CompCurve wireAdaptor2(awire);
Approx_Curve3d approx2(curve2,0.001,GeomAbs_C2,2000,12);
Handle_Geom_Curve anApproxCurve;
if (approx2.IsDone() && approx2.HasResult())
{
anApproxCurve=approx2.Curve();
}

regards
Joachim

Joachim Greiner's picture

the problem ist solved. when i decrease the tolerance of FixConnected, it works!