
Tue, 04/08/2025 - 10:14
When importing the attached STEP file using the following code, I encountered this error message. Neither FreeCAD nor CAD Assistant could import it correctly. However, strangely, some other CAD software (unrelated to OCC) managed to import it without issues. What could be the reason for this, and how should I analyze and resolve the problem?
STEPControl_Reader aReader;
IFSelect_ReturnStatus status = aReader.ReadFile(aFileName);
if (status != IFSelect_RetDone)
return status;
aReader.WS()->TransferReader()->TransientProcess()->SetTraceLevel(2); // increase default trace level
Standard_Boolean failsonly = Standard_False;
aReader.PrintCheckLoad(failsonly, IFSelect_ItemsByEntity);
// Root transfers
Standard_Integer nbr = aReader.NbRootsForTransfer();
aReader.PrintCheckTransfer(failsonly, IFSelect_ItemsByEntity);
for (Standard_Integer n = 1; n <= nbr; n++) {
/*Standard_Boolean ok =*/ aReader.TransferRoot(n);
}
// Collecting resulting entities
Standard_Integer nbs = aReader.NbShapes();
if (nbs == 0) {
return IFSelect_RetVoid;
}
Attachments:
Tue, 04/08/2025 - 10:19
Hello.
Please report the issue: Issues · Open-Cascade-SAS/OCCT
The problem can be related to the inconsistency with the standard or some internal bug. Both of them are possible, but need to validate it as a bug analyze. It can't be avoided by specific command or manipulations.
Best regards, Dmitrii.
Tue, 04/08/2025 - 10:24
Alright then