[Bug?] Placement issue when saving STP file imported with Link options

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
openBrain
Posts: 2751
Joined: Fri Nov 09, 2018 5:38 pm

[Bug?] Placement issue when saving STP file imported with Link options

Postby openBrain » Thu Nov 14, 2019 3:11 pm

Hi all,

I found a very weird behavior when I save then reopen a STP file that was imported with "Link" options enabled.
Here are the STEP options I use :
STP_options.png
STP_options.png (10.84 KiB) Viewed 276 times
Below is what the part looks like when I import then save it (this is an assembly with nested sub-assemblies):
part_save.png
part_save.png (3.84 KiB) Viewed 276 times
Now how the part looks like after I close the file and reopen it !!! :
part_reopen.png
part_reopen.png (4.67 KiB) Viewed 276 times
Basically assembly is exploded and sub-assemblies are not more well located.
I'm sorry I can't share file or even better screenshots but this is a professional project and it can't be disclosed.
I ATM open this thread so it is reported and known.
If I get some time, I'll try to build a dummy model that reproduces the issue.
openBrain
Posts: 2751
Joined: Fri Nov 09, 2018 5:38 pm

Re: [Bug?] Placement issue when saving STP file imported with Link options

Postby openBrain » Mon Nov 25, 2019 2:24 pm

Hi all,

I finally managed to reproduce the bug with a minimal file I can share here.
Actually the problem isn't really STEP import, but a specific issue when certain types of object are nested (namely compound inside link).

To reproduce :
  1. Download & open attached file
  2. Select the "Rear" compound and rotate it eg. 90° around Y axis (so both pads are one along each other)
  3. Save and close the file
  4. Reopen the file => :!: Pads are back to their original placement. It appears that compound Placement isn't saved. :!:
I did a test with compound not nested inside link and there is no problem anymore in that case.
bug_assembly.gif
bug_assembly.gif (365.1 KiB) Viewed 157 times
Thanks for confirming.
realthunder wrote: Ping
@realthunder, may that be specific to Link introduction ?

---
OS: Windows 7 SP 1 (6.1)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18677 (Git)
Build type: Release
Branch: master
Hash: 3cd487064ee7d2b754f250ca2ce29bb0d2c37374
Python version: 3.6.7
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: French/France (fr_FR)
Attachments
bug_assembly.FCStd
(6.89 KiB) Downloaded 3 times
realthunder
Posts: 1293
Joined: Tue Jan 03, 2017 10:55 am

Re: [Bug?] Placement issue when saving STP file imported with Link options

Postby realthunder » Mon Nov 25, 2019 10:53 pm

PR submitted here
Try Assembly3 (latest version 0.10.2) along with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal
openBrain
Posts: 2751
Joined: Fri Nov 09, 2018 5:38 pm

Re: [Bug?] Placement issue when saving STP file imported with Link options

Postby openBrain » Tue Nov 26, 2019 8:45 am

realthunder wrote:
Mon Nov 25, 2019 10:53 pm
PR submitted here
:+1:
Could you give a clue about what kind of link is the "Product" (root object) one in the file I posted ? I can't figure out how to manually create it (I used a STEP import as base). ;) Thx.
User avatar
easyw-fc
Posts: 2720
Joined: Thu Jul 09, 2015 9:34 am

Re: [Bug?] Placement issue when saving STP file imported with Link options

Postby easyw-fc » Tue Nov 26, 2019 11:15 am

openBrain wrote:
Tue Nov 26, 2019 8:45 am
Could you give a clue about what kind of link is the "Product" (root object) one in the file I posted ? I can't figure out how to manually create it (I used a STEP import as base). ;) Thx.
You can use contextual menu (Right click) on Combo tab.
-
link-group.png
link-group.png (35.94 KiB) Viewed 100 times
openBrain
Posts: 2751
Joined: Fri Nov 09, 2018 5:38 pm

Re: [Bug?] Placement issue when saving STP file imported with Link options

Postby openBrain » Tue Nov 26, 2019 11:53 am

easyw-fc wrote:
Tue Nov 26, 2019 11:15 am
You can use contextual menu (Right click) on Combo tab.
:+1: Many thanks.
Not a big issue, but I'd prefer it is called "LinkGroup" rather than "Link" in property editor, so it better reflects what it is. ;)
realthunder
Posts: 1293
Joined: Tue Jan 03, 2017 10:55 am

Re: [Bug?] Placement issue when saving STP file imported with Link options

Postby realthunder » Tue Nov 26, 2019 12:00 pm

openBrain wrote:
Tue Nov 26, 2019 8:45 am
realthunder wrote:
Mon Nov 25, 2019 10:53 pm
PR submitted here
:+1:
Could you give a clue about what kind of link is the "Product" (root object) one in the file I posted ? I can't figure out how to manually create it (I used a STEP import as base). ;) Thx.
I have changed back to use App::Part as the default STEP import container in some pending PR. And that's why LinkGroup is buried inside some menu action. LinkGroup will continue to work regardless.
Try Assembly3 (latest version 0.10.2) along with my custom build of FreeCAD at here.
And if you'd like to show your support, you can donate through patreon, liberapay, or paypal