OCCT
OCCT copied to clipboard
How to fix: Nothing to transfer
Description
When importing the attached STEP file, 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?
Expected Behavior
Actual Behavior
When importing the attached STEP file, I encountered this error message: Nothing to transfer. Neither FreeCAD nor CAD Assistant could import it correctly. However, strangely, some other CAD software (unrelated to OCC) managed to import it without issues.
Sample Code or DRAW Tcl Script
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;
}
Operating System
windows
Compiler
visual studio 2022
Bitness
64-bit
OCCT Version
7.8
Additional Files
No response
The issue on FILE side. The corrupted object: #44628 = SHAPE_DEFINITION_REPRESENTATION(#8,#44626,#44627);
Draw[14]> entity #44628
-- DUMP Entity n0 44628 level 1
--- (STEP) Entity 44628:#44628 Type cdl : StepShape_ShapeDefinitionRepresentation
*** NOT WELL LOADED : CONTENT FROM FILE ***
#44628 = SHAPE_DEFINITION_REPRESENTATION(#8,#44626,#44627);
/* On Entity above, Fail Messages recorded at Read time :
Count of Parameters is not 2 for shape_definition_representation */
** Data Check (One Entity) **
Check:1 -- Entity (n0:id) 44628:#44628 Type:SHAPE_DEFINITION_REPRESENTATION
Count of Parameters is not 2 for shape_definition_representation