
Wed, 05/09/2012 - 14:26
Hi,
I have a step file, which is not imported by Open Cascade. Further investigation showed me, that this step file contains several complex types, which are not placed in alphabetical order.
For Example:
#168=(SHAPE_REPRESENTATION_RELATIONSHIP()REPRESENTATION_RELATIONSHIP_WITH_TRANSFORMATION(
#167)REPRESENTATION_RELATIONSHIP('','',#83,#1));
This line fails, because REPRESENTATION_RELATIONSHIP is lower in the alphabet than REPRESENTATION_RELATIONSHIP_WITH_TRANSFORMATION.
If I change the line to
#168=(REPRESENTATION_RELATIONSHIP('','',#83,#1)
REPRESENTATION_RELATIONSHIP_WITH_TRANSFORMATION(#167)SHAPE_REPRESENTATION_RELATIONSHIP());
the import is working correctly.
Does anybody know, why the alphabetical order is necessary for the complex types?
Regards
Göran
Wed, 05/09/2012 - 17:19
I found the source of the problem of some further investigation in the source code. A wrong alphabetical order usually still works, it doesn't work however if a keyword starts with another keyword (as in my example REPRESENTATION_RELATIONSHIP_WITH_TRANSFORMATION starts with REPRESENTATION_RELATIONSHIP)
It's a problem in the function stepstrcmp in StepData_StepReaderData.cxx
The line
if (name[i] == ' ') { j = i; break; }
has to be changed in
if (name[i] == ' ' && type[i] == '\0') { j = i; break; }
I also reported this issue to the development portal.
Regards
Göran