View Issue Details

IDProjectCategoryView StatusLast Update
0002908FreeCADBugpublic2018-09-14 16:18
ReportersherifAssigned Towmayer 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version0.17 
Target Version0.18Fixed in Version0.18 
Summary0002908: stp file import name mismatch (due to some limitation into UTF-8 support & naming convention)
DescriptionThe import of stp files changes the part names stored in the stp file ie:
# 7 = PRODUCT('000-123_q234 23','000-123_q234 23','',(# 8));
is changed to
_00_123_q234_23

The first character is changed to _ if the name begins with a number
Spaces are changed to _
- is changed to _

I believe this happens only if the part has children

The attached stp file is artificial but the problem occurs on real stp files exported from other cad tools
 

git revision FreeCAD master 2780edd9

Can you please write the import code location to a comment thanks
Steps To ReproduceImport attached file
Tags#lowhangingfruit, STEP, unicode

Relationships

related to 0001672 closedwmayer Raytracing Raytracing export to POV-Ray - respect ASCII convention for I/O filenames 

Activities

sherif

2017-02-20 12:16

reporter  

bugreport.stp (Attachment missing)

Kunda1

2017-02-20 22:19

manager   ~0008390

@sherif please paste your Help > About FreeCAD > Copy to Clipboard

@vejmarie when you have a moment, do you mind weighing in on this ticket ?

sherif

2017-02-21 08:34

reporter   ~0008396

OS: Ubuntu 16.04.1 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.9927 (Git)
Build type: Unknown
Branch: master
Hash: 2780edd903e9819eb0d0940ca0e754f1124ac188
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17


also happens in

OS: Ubuntu 16.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10101 (Git)
Build type: Unknown
Branch: master
Hash: 99fa203f323927b0dd027420d4421b577b7420c3
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17

Kunda1

2017-05-31 00:48

manager   ~0009208

@sherif can you re-up the attached step file? (It was lost during a backup restore)

Kunda1

2017-07-03 12:18

manager   ~0009654

@sherif please respond

Kunda1

2017-07-03 17:36

manager   ~0009656

vejmarie wrote

yes I can reproduce this issue, this is coming from some limitation into our UTF-8 support and naming convention. By the way I believe that a part or Assembly name starting with a number is prohibited in STEP file format (but I must recheck that). I soon had a discussion with wmayer about that in the past and we ended up with the current implementation

sherif

2017-09-27 15:32

reporter   ~0010201

@Kunda1 sorry for the late reply I dont have the file anymore. Do you still need it ? If so I will create newone.
We are working on a file conversion tool and I had the oportunity to test many step files form different cad systems (real production assemblies)
This is a reoccurring problem and we are solving it by renaming the parts directly in the stp file before conversion.

Kunda1

2017-09-27 17:05

manager   ~0010203

@sherif yes, please create a new one.

Kunda1

2017-11-24 11:30

manager   ~0010461

@sherif ping

Kunda1

2018-07-03 02:26

manager   ~0011483

@sherif please create a new example stp file. thank you

Kunda1

2018-07-03 02:27

manager   ~0011484

Forum thread: https://forum.freecadweb.org/viewtopic.php?f=8&t=29573

sherif

2018-07-03 15:34

reporter   ~0011488

Here it is.

Another bug / issue /general problem I have faced in the last month is that freecad does not allow to have same part numbers for several parts which can happen and happens often in content of stp files. Its impossible to script a conversion program based on product name as the suffix (00n) is not safely predictable. Im not opening an issue for this as I dont think that a change in label as id principle would be implemented.

error.stp (23,631 bytes)

Kunda1

2018-07-05 00:24

manager   ~0011492

@sherif thank you for re-posting the example file.

sherif wrote

Another bug / issue /general problem I have faced in the last month is that freecad does not allow to have same part numbers for several parts which can happen and happens often in content of stp files. Its impossible to script a conversion program based on product name as the suffix (00n) is not safely predictable. Im not opening an issue for this as I dont think that a change in label as id principle would be implemented.

Please open a forum thread to discuss this. It may inspire a dev to implement, you never know.

wmayer

2018-09-14 16:18

administrator   ~0011741

https://github.com/FreeCAD/FreeCAD/commit/dce4086d64e1680aafe421987e7a973b5957b097

Issue History

Date Modified Username Field Change
2017-02-20 12:16 sherif New Issue
2017-02-20 12:16 sherif File Added: bugreport.stp
2017-02-20 12:16 sherif Tag Attached: STEP
2017-02-20 22:18 Kunda1 Description Updated View Revisions
2017-02-20 22:19 Kunda1 Note Added: 0008390
2017-02-20 22:20 Kunda1 Status new => feedback
2017-02-21 08:34 sherif Note Added: 0008396
2017-02-21 08:34 sherif Status feedback => new
2017-03-10 02:13 Kunda1 Tag Attached: #lowhangingfruit
2017-03-10 02:14 Kunda1 Target Version => 0.17
2017-05-31 00:44 Kunda1 Description Updated View Revisions
2017-05-31 00:47 Kunda1 Description Updated View Revisions
2017-05-31 00:48 Kunda1 Note Added: 0009208
2017-05-31 00:48 Kunda1 Status new => feedback
2017-07-03 12:18 Kunda1 Note Added: 0009654
2017-07-03 17:36 Kunda1 Note Added: 0009656
2017-07-03 17:36 Kunda1 Status feedback => confirmed
2017-07-03 17:38 Kunda1 Summary stp file import name mismatch => stp file import name mismatch (due to some limitation into UTF-8 support & naming convention)
2017-09-27 15:32 sherif Note Added: 0010201
2017-09-27 17:05 Kunda1 Note Added: 0010203
2017-11-24 11:30 Kunda1 Note Added: 0010461
2017-11-24 11:31 Kunda1 Relationship added related to 0002973
2017-11-26 15:06 wmayer Target Version 0.17 => 0.18
2017-12-02 17:11 wmayer Relationship deleted related to 0002973
2017-12-12 17:42 Kunda1 Tag Attached: unicode
2018-07-03 02:26 Kunda1 Description Updated View Revisions
2018-07-03 02:26 Kunda1 Note Added: 0011483
2018-07-03 02:27 Kunda1 Note Added: 0011484
2018-07-03 02:28 Kunda1 Relationship added related to 0001672
2018-07-03 15:34 sherif File Added: error.stp
2018-07-03 15:34 sherif Note Added: 0011488
2018-07-05 00:24 Kunda1 Note Added: 0011492
2018-09-14 12:56 Kunda1 Relationship added related to 0002973
2018-09-14 16:04 wmayer Relationship deleted related to 0002973
2018-09-14 16:18 wmayer Assigned To => wmayer
2018-09-14 16:18 wmayer Status confirmed => closed
2018-09-14 16:18 wmayer Resolution open => fixed
2018-09-14 16:18 wmayer Fixed in Version => 0.18
2018-09-14 16:18 wmayer Note Added: 0011741