Wed, 02/18/2009 - 13:22
Forums:
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
Wed, 02/18/2009 - 15:36
Adaptor3d_Curve has a function Continuity() returning GeomAbs_Shape, but I do not know how good it works.
Wed, 02/18/2009 - 15:46
Adaptor3d_Curve is the base class of BRepAdaptor_CompCurve.
In Adaptor3d_Curve method Continuity is not implemented and raise an error if called.
Wed, 02/18/2009 - 16:20
It seems that BRepAdaptor_Curve.Continuity() calls GeomAdaptor_Curve::Continuity(). This function looks promising.
Wed, 02/18/2009 - 17:14
GeomAdaptor_Curve::Continuity() works on a single curve, but I need to know if two or more contiguous curves are C2.
Wed, 02/18/2009 - 18:26
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