Convert Wire to BSpline Curve

Dear all,
is there an easy way to convert a wire to a BSpline Curve?

It would also help me if there is a way to combine the edges of the wire to one BSpline Curve.

Thank you very much in advance.


dvdjimmy's picture

Dear all,
I am still stuck with this problem.
Is there really no way to combine some curves to only one curve? Or some edges to one "big" curve?
Thx in advance.

Bearloga's picture

You can use the class BRepAdaptor_CompCurve if the interface of Adaptor3d_Curve is sufficient for you. If you need the real Geom_Curve then you have to approximate CompCurve into bspline using available approximation tool (e.g. AdvApprox_ApproxAFunction, see GeomLib::BuildCurve3d).

dvdjimmy's picture

Hi Bearloga,
thx for your help. Its a perfect way for me if there would be no other little problem right now:

I thought that I already have got a wire but instead its just edges that are "yet" not connected to a wire.

I tried now to convert them to a wire with the BRepBuilderAPI_makeWire and the add-function.

This all works just fine for most of my wires...but now I have a wire where two of the edges I would like to connect do not share a common point. It might just be a problem of tolerance as the edges are a result of an intersection operation on a stp-file.

But now I am not able to make a wire out of these edges and therefore I am also not able to use the BRepAdaptor_CompCurve class.

Is there also a way to fix the edges so that they will form a "nice" wire?

Thx in advance Bearloga and all the others out there.


Patrik Mueller's picture

Hi Joachim,

take a look at the ShapeFix classes (esp. ShapeFix_Wire)...



dvdjimmy's picture

Thx for your help Patrik,

now I am able to combine my edges to a Wire :)

But as you might have seen in another I have a wire problem :)

Take care.