DiscussionsIssue archiveOCCT:Data Exchange

Archived issue #0032421

STEP parsing problem: incorrect PRODUCT text

CommunityOCCT:Data Exchangeclosed5 public notes

Search issues

Description

When reading a STEP file with a PRODUCT name that contains multiple single apostrophes, only one apostrophe is retained.

Steps to reproduce

I loaded a STEP file, and compared the PRODUCT lines of the STEP file from which the names are taken to the names displayed on screen using a CAD viewer I am developing.

One part in particular is named "C''''''''SK HD SCREW M4 x 12_ISO 10642 - M4 x 12 - 12C", but when parsed becomes "C'SK HD SCREW M4 x 12_ISO 10642 - M4 x 12 - 12C", i.e. seven of the eight apostrophes have been removed.

I also reproduced the bug with FreeCAD, which I believe also relies on Open Cascade.

I'm sorry that I can't share the STEP file that caused me to find the bug, due to confidentiality. However, I expect it can be reproduced with any PRODUCT name containing that combination of characters.

Additional information

I am using Open Cascade view PythonOCC 7.5.1.

Public activity

5 archived notes

Participants are labeled by their role within this record.

01Commenter 2
> I'm sorry that I can't share the STEP file that caused me to find the bug, due to confidentiality.
> However, I expect it can be reproduced with any PRODUCT name containing that combination of characters.
I'm afraid we wouldn't be able processing the issue without a reproducer.

Either - try preparing a reproducer from a non-confidential shape (e.g. by modifying STEP file in a text editor or another CAD software for producing similar effect), or consider sharing file privately with development team (using Contact Us form).

02Author
Apologies for not being able to attach a file earlier, I've created another that is not subject to any confidentiality. I've added some apostrophes to the second text field of the PRODUCT line for the part named "TORCH BODY - UPPER" and the bug is reproduced.
03Commenter 3
The current problem has been fixed with #0032310
The attached test file is not valid, because "''" is a decoded as a single apostrophe. To create a sequence of apostrophes, need to double a number of expected apostrophes in the file.
Test case for #0032310 issue contains a case of sequence of apostrophes and tested for import and export process.
04Commenter 3
Dear Commenter 4
please close the issue
05Commenter 5
closed.

Related records