For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings


Need to speed up your development?
Have a look at our:

Samples & Tools


Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

OC5.1 bug

Anonymous's picture

To OC developers!

Recently I updated OC4.0 to OC5.1 for my application and discovered the stable BUG
in TColStd_Array1OfReal class which cause the ASSERT in DEBUG session and completely wrong result in RELEASE session. The ASSERT ended up in the file: Standard_DemensionMismatch_0.cxx
void Standard_DimensionMismatch::Throw() const
throw Standard_DimensionMismatch() ;

This is very serious problem for my applications based on OC library and I put on hold my
transition to OC5.1. I also think that it will cause inconvenience for advance users of OC
with the applications in free form curves and surfaces...


I am sending a couple of lines of code that were running in Cascade 2.0; OC3.0, are running in OC4.0 and failing in OC51:

void Vms_BSplnCurve::OC_CurveToVmsCurve(const Handle(Geom_BSplineCurve)& CasCad_Crv,int *Ierror)

double ts,te;
gp_Pnt sP,eP,sP1,eP1;

ts = CasCad_Crv->FirstParameter();
sP = CasCad_Crv->StartPoint();
te = CasCad_Crv->LastParameter();
eP = CasCad_Crv->EndPoint();

// BS_Crv - is a NURB curve from the VmsCad
BS_Crv.EleNum = -1;
BS_Crv.Period = (boolean) CasCad_Crv->IsPeriodic();
BS_Crv.Rational = (boolean) CasCad_Crv->IsRational();
BS_Crv.Close = (boolean) CasCad_Crv->IsClosed();
BS_Crv.Planar = FALSE;
BS_Crv.Order = CasCad_Crv->Degree() + 1;
BS_Crv.Dimen = CasCad_Crv->NbPoles() + BS_Crv.Order;

TColStd_Array1OfReal Knot(1,BS_Crv.Dimen+1);
// This is exactly the place that ended up with the PROBLEM,
// that was described in the beginning
CasCad_Crv->KnotSequence(Knot); // OC51 Crash 17/01/04 MS
// --------------------------------------------
BS_Crv.Knot = ALLOC( (BS_Crv.Dimen+1), double,Ierror );
if (*Ierror) return;

int i;
for(i=Knot.Lower(); i BS_Crv.Knot[i-1] = Knot.Value(i);
// ...........................................