How to find continuity for a wire

Hi all,
is there a way to find the continuity for a wire?
I've tried with BRepAdaptor_CompCurve, but method Continuity has a "strange" implementation, it always return C0 if the wire has more than one edge.

GeomAbs_Shape BRepAdaptor_CompCurve::Continuity() const
{
if ( myCurves->Length() > 1) return GeomAbs_C0;
return myCurves->Value(1).Continuity();
}

Thanks in advance

Gheorghiu's picture

Adaptor3d_Curve has a function Continuity() returning GeomAbs_Shape, but I do not know how good it works.

Marco Matt's picture

Adaptor3d_Curve is the base class of BRepAdaptor_CompCurve.
In Adaptor3d_Curve method Continuity is not implemented and raise an error if called.

Gheorghiu's picture

It seems that BRepAdaptor_Curve.Continuity() calls GeomAdaptor_Curve::Continuity(). This function looks promising.

Marco Matt's picture

GeomAdaptor_Curve::Continuity() works on a single curve, but I need to know if two or more contiguous curves are C2.

Roman Lygin's picture

You can subclass BRepAdaptor_CompCurve and redefine its Continuity() method by doing more accurate calculations.
Normally Continuity() should return minimum of individual continuities and continuity at vertices. It will depend how you define continuity at vertices (i.e. edge connection points). For example, continuity at vertices can be defined using Dx() measured at edge curve ends and compared. If D1() match then it can be C1 (or G1) and so forth.

Hope this helps.
Roman

---
opencascade.blogspot.com - blog on Open CASCADE