STEP reading problem

Dear Forum Readers,
We've been working on an OCC 6.5.4 based plugin to our system that converts IGES and STEP files to our library format. The plugin works well however we have a problem with a specific STEP file. Our plugin and the other OCC based free apps I checked read it improperly (FreeCAD, exoTKAD, HeeksCAD) but for example CAD Exchanger which is also OCC based, reads it properly. Also checked with two non-OCC based product, Autodesk Inventor Fusion read it properly while Bentley Microstation did not. I'm totally confused. I'm curious if I implemented something wrong in our STEP import or the file is incorrect or ambiguous and CAD Exchanger and Inventor Fusion are able to fix it somehow. Based on the import result it seems that beside the assembly, all parts are read additionally without any local placement. I tried to play with setting read.step.assembly.level or with retrieving the list of elements using the predefined operators (step-placed-items, step-assembly etc.) but if the list was not empty (because there were really no elements that met the operator conditions) then it always contained 95 entities regardless of the way I retrieved the list. I looked into the STEP file and there are 95 products defined. I’m not a STEP expert but did not see any relation or difference of the definition of the products that could make one of the products to be an assembly and the only root element.
So I’m totally confused and also it is interesting that two big CAD market participants also read this file differently.
Since the STEP was too big to attach it, attach the PDF with results in different CAD systems and will send the STEP on demand.

Any help would be highly appreciated,
Regards,
Tibor

Dirk B's picture

Hello Tibor,
try
ReadStep DOC "file.step"
XShow INA
in DRAWEXE.

Dirk

Tibor Szentesi's picture

Hello Dirk,
Sorry for the late reply, had to work on another project.

Thanks, going to check that ASAP.

Regards,
Tibor

Dirk B's picture

It should be
ReadStep DOC "file.step"
XShow DOC

Tibor Szentesi's picture

Hello,
tried it out and it worked properly. Since DRAW uses STEPCAFControl_Reader, changed our code as well to use it and it works fine now.

I don not know what happens deep inside in OCC but according to this discovery my original issue description could be translated to the next one:

Why STEPControl_Reader and STEPCAFControl_Reader give different geometry result with certain files? In both ways I just processed the roots.

Honestly I'm happy now with finding a solution to my problem but I think if anyone had any answer on this question above that could be helpful for others as well.

Thanks, Tibor

Baba Ali's picture

Dear All,

I have another question about the step file reading. I hope you can help me. I am using OCC 6.6.0 and I need to OCC library files which are doing step file process. I have looked source code of OCC and there is hundred of files related to STEP files. My object is using this libraries to include in a seperate c++ code and read a step file. Could you please point me if there is any seperated library for .step files or OCC without WOK?

Any help would be appreciated
Thanks