Issue #7245 - Draw Style have some problems with External file Parts`s Link objects

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!
User avatar
xsuper9988
Posts: 223
Joined: Sat Oct 24, 2020 4:20 am

Issue #7245 - Draw Style have some problems with External file Parts`s Link objects

Post by xsuper9988 »

1.DrawStyle_WireFrame
If the source object uses the external file Parts Link object
It will cause the DrawStyle_WireFrame mode to fail

2.DrawStyle_Display mode sync update
No Display mode sync update when file switching


PS1:
I found that this problem seems to have happened in ASM4 before but I didn't keep looking for the answer?
But now I found the source of the problem,
Could it come from the "Link Object" function?

Extended reference topic
https://forum.freecadweb.org/viewtopic.php?t=66465

PS2:
The DrawStyle 1st and 2nd issues work fine in the LinkBranch version


3.ShapColor
ShapColor will fail after using RandomColor(solved)
PS: I found that "remove all" in "Override Color" can solve (2022.07.22)

FreeCAD_weekly-builds-29485-2022-07-21-conda-Windows-x86_64-py38

Code: Select all

OS: Windows 10 (10.0)
Word size of FreeCAD: 64-bit
Version: 0.21.29485 (Git)
Build type: Release
Branch: master
Hash: a236ca843fdd6674afb6d7ed1454fbd3b547f5ea
Python 3.8.13, Qt 5.12.9, Coin 4.0.0, Vtk 9.1.0, OCC 7.5.3
Locale: Chinese/Taiwan (zh_TW)
Installed mods: 
  * A2plus 0.4.56a
  * Assembly3 0.11.3
  * Assembly4 0.12.2
  * Curves 0.5.0
  * Design456 0.0.1
  * DynamicData 2.46.0
  * ExplodedAssembly
  * fasteners 0.3.46
  * lattice2 1.0.0
  * Manipulator 1.4.9
  * parts_library
  * pcb
  * sheetmetal 0.2.49
Attachments
Draw&Color_LinkSource.FCStd
(6.72 KiB) Downloaded 28 times
Draw&Color_Link.FCStd
(3.2 KiB) Downloaded 27 times
DrawStyleIssue.gif
DrawStyleIssue.gif (258.93 KiB) Viewed 1831 times
RandomColorIssue.gif
RandomColorIssue.gif (634.58 KiB) Viewed 1831 times
Last edited by Kunda1 on Wed Dec 21, 2022 1:45 pm, edited 11 times in total.
Reason: added GH ticket to title
User avatar
xsuper9988
Posts: 223
Joined: Sat Oct 24, 2020 4:20 am

Re: DrawStyle & ShapColor have some problems with Link objects

Post by xsuper9988 »

Link Branch Ver.

1.DrawStyle_WireFrame
No problems

2.DrawStyle_Display mode sync update
No problems

3.ShapColor
ShapColor will fail after using RandomColor(solved)
PS: I found that "remove all" in "Override Color" can solve (2022.07.22)

FreeCAD-asm3-Stable-Win64-Py3-Qt5-20220430

Code: Select all

OS: Windows 10 Version 2009
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 2022.430.28641 (Git)
Build type: Release
Branch: LinkStage3
Hash: a77045488092c24ece25d63c91f362cbd2181d36
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.0
Locale: Chinese/Taiwan (zh_TW)
Attachments
LinkBranchVerDrawStyle.gif
LinkBranchVerDrawStyle.gif (185.46 KiB) Viewed 1807 times
LinkBranchVerRandomColor.gif
LinkBranchVerRandomColor.gif (566.65 KiB) Viewed 1807 times
Last edited by xsuper9988 on Fri Jul 22, 2022 2:08 am, edited 2 times in total.
User avatar
xsuper9988
Posts: 223
Joined: Sat Oct 24, 2020 4:20 am

Re: Draw Style have some problems with Link objects

Post by xsuper9988 »

3.ShapColor
ShapColor will fail after using RandomColor(solved)
PS: I found that "remove all" in "Override Color" can solve (2022.07.22)
Attachments
OverrideColors.png
OverrideColors.png (80.37 KiB) Viewed 1742 times
LinBranchVerOverrideColors.png
LinBranchVerOverrideColors.png (82.46 KiB) Viewed 1742 times
User avatar
xsuper9988
Posts: 223
Joined: Sat Oct 24, 2020 4:20 am

Re: Draw Style have some problems with External file Parts`s Link objects

Post by xsuper9988 »

When there is no external file Link object DrawStyle_WireFrame can be executed normally
Attachments
NoExtFilePartsLinkObj.FCStd
(6.1 KiB) Downloaded 25 times
NoExtFilePartsLinkObj.png
NoExtFilePartsLinkObj.png (92.67 KiB) Viewed 1681 times
User avatar
xsuper9988
Posts: 223
Joined: Sat Oct 24, 2020 4:20 am

Re: Draw Style have some problems with External file Parts`s Link objects

Post by xsuper9988 »

This example picture is only a small part of the assembly
In FC standard version if using too many external files Parts Link object
That will affect the "perspective" results of the overall project

I encountered this problem today because I couldn't see through with ASM4 before
Now I try to use more Parts to transform the coordinates
But when too many STEP files are concentrated in the project
It will make the project too fat
Whenever I have to press save it gets very slow
So change the STEP file to "external reference file"
But now I have these problems
Attachments
DrawStyle_LinkProject.png
DrawStyle_LinkProject.png (197.18 KiB) Viewed 1671 times
LinkBranchVer_DrawStyle_LinkProject.png
LinkBranchVer_DrawStyle_LinkProject.png (159.35 KiB) Viewed 1671 times
User avatar
Roy_043
Veteran
Posts: 8544
Joined: Thu Dec 27, 2018 12:28 pm

Re: Draw Style have some problems with External file Parts`s Link objects

Post by Roy_043 »

xsuper9988 wrote: Thu Jul 21, 2022 1:50 pm 1.DrawStyle_WireFrame
If the source object uses the external file Parts Link object
It will cause the DrawStyle_WireFrame mode to fail
Confirmed: an external Link to a Part will not adopt the Std_DrawStyle Wireframe override. Please create an issue on GitHub.

Code: Select all

OS: Windows 8.1 (6.3)
Word size of FreeCAD: 64-bit
Version: 0.21.29485 (Git)
Build type: Release
Branch: master
Hash: a236ca843fdd6674afb6d7ed1454fbd3b547f5ea
Python 3.8.13, Qt 5.12.9, Coin 4.0.0, Vtk 9.1.0, OCC 7.5.3
Locale: English/United States (en_US) [ OS: Dutch/Netherlands (nl_NL) ]
Installed mods: 
User avatar
xsuper9988
Posts: 223
Joined: Sat Oct 24, 2020 4:20 am

Re: Draw Style have some problems with External file Parts`s Link objects

Post by xsuper9988 »

Roy_043 wrote: Sat Jul 23, 2022 7:18 pm Confirmed: an external Link to a Part will not adopt the Std_DrawStyle Wireframe override. Please create an issue on GitHub.
I have created an Issue #7245 on Github
Thank you very much for your help and reply
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: Draw Style have some problems with External file Parts`s Link objects

Post by realthunder »

The reason is because the draw style is a per view setting. Since the external linked object lives in another document with a view of different draw style, it is displayed differently. I do have a solution implemented in my branch, but it is not trivial to split it out, and I am quite busy right now. A simpler fix is to just change all depending documents to the same draw style, but I am not sure this is what user wants.
Try Assembly3 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
User avatar
xsuper9988
Posts: 223
Joined: Sat Oct 24, 2020 4:20 am

Re: Draw Style have some problems with External file Parts`s Link objects

Post by xsuper9988 »

realthunder wrote: Mon Jul 25, 2022 12:00 pm A simpler fix is to just change all depending documents to the same draw style, but I am not sure this is what user wants.
Does this method give the project(DrawStyle_LinkProject.png) full perspective?
Thank you very much for your help and reply
realthunder
Veteran
Posts: 2190
Joined: Tue Jan 03, 2017 10:55 am

Re: Draw Style have some problems with External file Parts`s Link objects

Post by realthunder »

xsuper9988 wrote: Mon Jul 25, 2022 12:40 pm Does this method give the project(DrawStyle_LinkProject.png) full perspective?
Thank you very much for your help and reply
It is as if you manually set the same draw style (e.g. wireframe) for both document, and you'll get the correct visual.
Try Assembly3 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
Post Reply