I am trying to import a STEP file provided to me for testing. I was using OpenCascade 7.2.0 until recently, and upgraded to 7.4.0 a few days ago.
The issue I am running into happened in 7.2.0 and still happens in 7.4.0.
I also tried opening the file in FreeCAD. FreeCAD 0.17 opens it, but 0.18 and 0.19 fail to open it.
The STEP file in question was exported from SolidWorks:
ISO-10303-21; HEADER; FILE_DESCRIPTION (( 'STEP AP203' ), '1' ); FILE_NAME ('myStepFile.STEP', '2019-01-14T10:13:00', ( '' ), ( '' ), 'SwSTEP 2.0', 'SolidWorks 2019', '' ); FILE_SCHEMA (( 'CONFIG_CONTROL_DESIGN' )); ENDSEC;
When I import the STEP file (using a STEPCAFControl_Reader) in a DEBUG build of my application, an exception is thrown during the transfer of the document, see these screenshots:
It seems the OrientedEdge is nullptr for some reason, but this hasn't happened to me in many files before.
Now, I am not handling exceptions most of the time, and I could try to do that, though I don't know if that will fix the crash.
I am not sure what is the culprit, and I have trouble working with the file even in FreeCAD. I think a few parts in the file are problematic, I cannot even export them to STEP from FreeCAD.
Nevertheless, I would really like to be able to simply handle any file provided to me, especially if it was exported from something as established as SolidWorks.