Geom_BezierCurve Bug. Please confirm or exclude.

Dear sirs

May you please confirm or exclude that the crash occurring at the last line of following code is due to bug of the Geom_BezierCurve constructor ?



int main(int argc, char *argv[])
TColgp_Array1OfPnt AP(0,1);
TColStd_Array1OfReal AW(0,1);
double w1=1.0;
double w2=1.0;
Handle(Geom_BezierCurve) hCurve=new Geom_BezierCurve(AP, AW);

I have seen that the crash occurs for any input that involves the PoleWeights parameter of following constructor:
Standard_EXPORT Geom_BezierCurve(const TColgp_Array1OfPnt& CurvePoles, const TColStd_Array1OfReal& PoleWeights);

The crash does not happen whit the "non rational Bezier curve" defined using following constructor:
Standard_EXPORT Geom_BezierCurve(const TColgp_Array1OfPnt& CurvePoles);

I would like to know if this problem is specific of the liboce version 0.17 (which should correspond with OCC 6.8) or is a OCC bug.

Walter Steffè

walter steffe's picture

Hello, is'nt there anybody who can try this small code snippet ?

I am saying that Geom_BezierCurve constructor is not working at all.
It crashes with all input data that define a rational curve.

Strange that nobody cares about the total failure of a basic function like the BezierCurve constructor.


Arjan Schouten's picture

Hi Walter,

Could you try,

TColStd_Array1OfReal AW(1,2);

Some containers are expected to have index 1 as the first index instead of 0. Didn't try it myself.

Kind regards,

walter steffe's picture

Hello Arjan, many thanks for your hint.

You are right, when the container index starts at 1 it doesn't crash any more.

Kind regards,