|Anonymous | Login||2021-01-20 06:00 MSK|
|My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0031589||Community||[OCCT] OCCT:Data Exchange||public||2020-06-02 17:08||2020-12-02 17:12|
|Product Version||[OCCT] 7.2.0|
|Target Version||[OCCT] 7.5.0||Fixed in Version||[OCCT] 7.5.0|
|Summary||0031589: Data Exchange - unable to read STEP file containing mangled characters|
|Description||I downloaded a STEP file from GrabCAD and CAD Assistant. The STEP file can be downloaded from https://grabcad.com/library/snowblower-2 [^]|
Some of the text strings have characters that are not correctly encoded. For example, in the FILE_NAME in the header section, # 98, # 625, and more. There is even a note in the HEADER section indicating that the \X\ encoding is not used.
Although the characters do not correctly use Unicode characters, CAD Assistant should be able to handle them in some way. Every other viewer that I have tried does not have any problem with those characters.
|Steps To Reproduce||Import the STEP file available at https://grabcad.com/library/snowblower-2 [^] and test with CAD Assistant.|
|Tags||No tags attached.|
|Test case number||bugs step bug30397|
|This works for me on current master; Dmitry, can you check this please and see whether we need to add a test case for this issue?|
please close the issue.
The current bug case has been fixed with #30397, so its test case is enough for check read unsupported symbol.
edited on: 2020-10-23 08:58
We have improved OCCT to handle different types of character encodings possible in STEP files. You can try this on beta version of OCCT 7.5.0 (see https://dev.opencascade.org/index.php?q=node/1305 [^]).
One point to note is that STEP file normally is expected to contain strings in UTF-8 encoding (or old \X* control directives), which is not the case for the file you mentioned in the issue description. In order to read correctly strings within this kind of files (written using 8-bit encoding in some - unknown in general case! - code page), you will need to specify explicitly what encoding is to be used. This is now possible with Interface_Static parameter read.step.codepage.
If this parameter is set to "CP1252", then we can successfully read names of entities encoded using CP1252 encoding, such as
# 625=NEXT_ASSEMBLY_USAGE_OCCURRENCE('szíj_elsõ_feszített', 'szíj_elsõ_feszített','szíj_elsõ_feszített',#247096,#247181,'');
However, some of the test strings in that file seem to be completely broken and cannot be converted into anything sensible. In particular, the first entity you mentioned:
# 98=MANIFOLD_SOLID_BREP( 'Ä‚â€šÄ¹Â±Ã„â€˜Ã„ÅŸÄ‚Â§-Ä‚â€šÄ¹Â±Ä¹ÂˆÃ‹â„¢Ä‚ÂÄ‚Å‚Ä¹ÂˆÄ‚Ä½7',#130254);
You wrote that "Every other viewer that I have tried does not have any problem with those characters.". Does this mean that these viewers are able to show this string as some reasonable text? If so, could you please give examples of what viewers you have used, and this text is displayed (snapshots would be OK)?
Thank you in advance!
edited on: 2020-10-26 21:33
There are three free viewers that I test STEP files with, C3D Viewer, Solidworks eDrawings Viewer, and VariCAD. Links to all of them are on https://www.cax-if.org/step_viewers.php [^]
eDrawings does not show the correct characters. C3D viewer does show the correct characters but I haven't check that closely. I don't know how to see the characters in VariCAD.
At least CAD Assistant shouldn't crash with this file.
Here's another file with cyrillic characters to test.
|I forwarded the information about the beta version to my developer. Hopefully, he can test it out soon.|
I have checked the original file with C3D viewer:
- it does not show names of solids, thus name of entity #98 cannot be seen there
- it loads all texts as if they were in CP1251, even if the file is saved in UTF-8
- it does not support characters encoded using STEP control directives except \X2\
Thus it cannot be used as reference for correct reading of characters from STEP.
I consider now this issue as verified, please comment if you find any issues on the subject (or create separate issue).
occt: master e0a25f3d
Timestamp: 2020-09-09 10:02:39
|0030397: Data Exchange - STEP Reader extension to support entities which have a text description field with not supported symbols
STEP file is now opened in binary mode (instead of text mode) to avoid unexpected handling of control symbols inside string constants.
|mod - src/StepFile/stepread.c|
|add - tests/bugs/step/bug30397|
|2020-06-02 17:08||robertlipman||New Issue|
|2020-06-02 17:08||robertlipman||Assigned To||=> gka|
|2020-06-04 14:29||kgv||Summary||CAD Assistant will not read STEP file => Data Exchange - CAD Assistant will not read STEP file|
|2020-06-04 14:29||kgv||Description Updated||View Revisions|
|2020-06-04 14:40||kgv||Relationship added||related to 0030397|
|2020-06-04 14:45||kgv||Product Version||=> 7.2.0|
|2020-06-04 14:45||kgv||Target Version||=> 7.5.0|
|2020-06-04 14:45||kgv||Summary||Data Exchange - CAD Assistant will not read STEP file => Data Exchange - unable to read STEP file containing mangled characters|
|2020-07-16 23:17||robertlipman||Assigned To||gka => robertlipman|
|2020-07-16 23:59||robertlipman||Assigned To||robertlipman => gka|
|2020-07-24 13:03||kgv||Relationship added||related to 0031670|
|2020-09-10 13:21||abv||Relationship added||related to 0030848|
|2020-09-11 17:23||gka||Target Version||7.5.0 => 7.6.0*|
|2020-10-06 22:33||abv||Note Added: 0095767|
|2020-10-06 22:33||abv||Assigned To||gka => dpasukhi|
|2020-10-06 22:33||abv||Status||new => assigned|
|2020-10-06 22:33||abv||Target Version||7.6.0* => 7.5.0|
|2020-10-21 11:08||dpasukhi||Note Added: 0096094|
|2020-10-21 11:08||dpasukhi||Assigned To||dpasukhi => bugmaster|
|2020-10-21 11:08||dpasukhi||Status||assigned => feedback|
|2020-10-21 12:30||abv||Changeset attached||=> occt master e0a25f3d|
|2020-10-21 12:31||abv||Test case number||=> bugs step bug30397|
|2020-10-21 12:32||abv||Assigned To||bugmaster => abv|
|2020-10-23 08:29||abv||Assigned To||abv => robertlipman|
|2020-10-23 08:58||abv||Note Added: 0096160|
|2020-10-23 08:58||abv||Note Edited: 0096160||View Revisions|
|2020-10-26 21:07||robertlipman||Note Added: 0096281|
|2020-10-26 21:08||robertlipman||Note Added: 0096282|
|2020-10-26 21:33||robertlipman||Note Edited: 0096281||View Revisions|
|2020-10-31 09:19||abv||Note Added: 0096417|
|2020-10-31 09:20||abv||Status||feedback => verified|
|2020-10-31 09:20||abv||Resolution||open => fixed|
|2020-12-02 16:22||emo||Fixed in Version||=> 7.5.0|
|2020-12-02 17:12||emo||Status||verified => closed|
|Copyright © 2000 - 2021 MantisBT Team|