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

STEPControl_Reader cuase ASSERT failed

liuhuiwei's picture
Forums: 

Hello everyone,my application use OCCT mfc,in Debug mode,using STEPControl_Reader to import STEP file,will cause Assert failed in file Standard_Type.cxx line 128.The OCCT 7.2.0 and 7.3.0 beta have this error.I test import IGES file also cause thie error.I complie OCCT with static lib.my code like this:

TopoDS_Shape aResShape;

Kernel_Utils::Localizer loc;

STEPControl_Reader aReader;

Interface_Static::SetCVal("xstep.cascade.unit", "M");

Interface_Static::SetIVal("read.step.ideas", 1);

Interface_Static::SetIVal("read.step.nonmanifold", 1);

std::string aNameExt;

BRep_Builder B;

TopoDS_Compound compound;

B.MakeCompound(compound);

try

{

OCC_CATCH_SIGNALS;

IFSelect_ReturnStatus status = aReader.ReadFile(aFileName.ToCString());

if (status == IFSelect_RetDone)

{

}

}

can anyone help me?thanks