Assembly 4 + TechDraw problem on FC 0.20 weekly

Discussion about the development of the Assembly workbench.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
fred-3d
Posts: 16
Joined: Sat Sep 26, 2020 5:09 am

Assembly 4 + TechDraw problem on FC 0.20 weekly

Post by fred-3d »

I previously created some Assembly 4 assemblies with FreeCAD 0.19 and used TechDraw to make simple drawings of these assemblies. No problem. But, when I open any of those files with FreeCAD 0.20 (weekly build 0.20.27936 (Git) AppImage), I find that any TechDraw drawings that reference either an Assembly 4 "Assembly" container or Part containers display nothing for the referenced "objects". The Report View errors reported by FreeCAD 0.20 are:

Code: Select all

16:47:49  SE::getSourceShapes - source shape is empty!
16:47:49  DVP::execute - source shape is invalid - (but document is restoring) - View
I am not sure if this is something that I am doing wrong or a "bug". So, I created a simple example that others can use to try to reproduce what I am seeing. I have attached the example below. I have also attached screen captures of both versions of FreeCAD to show the problem on FreeCAD 0.20.

Could someone please try to open the attached example and reply to this post what happens? Thanks!

Detailed version information follows:
Both versions of FreeCAD are using the same version of Assembly 4 (0.11.10).
FreeCAD 0.20 version info:

Code: Select all

OS: openSUSE Leap 15.1 (KDE//usr/share/xsessions/plasma5)
Word size of FreeCAD: 64-bit
Version: 0.20.27936 (Git) AppImage
Build type: Release
Branch: (HEAD detached at 66f3474)
Hash: 66f34746c8e8e2b18f308d705b6a98d9d6942791
Python 3.9.10, Qt 5.12.9, Coin 4.0.0, OCC 7.5.3
Locale: English/United States (en_US)
Installed mods: 
  * dodo
  * sheetmetal 0.2.49
  * CurvedShapes 1.0.1
  * Lithophane
  * IconThemes
  * dxf-library
  * CfdOF 1.11.6
  * CubeMenu
  * Assembly4 0.11.10
  * Plot
  * Curves 0.3.0
  * fcgear 1.0.0
  * 3D_Printing_Tools
  * fasteners 0.3.38
FreeCAD 0.19 version info:

Code: Select all

OS: Ubuntu 18.04.6 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Branch: unknown
Hash: 7a9aa7edf2f44e3eb6a8e3e61c753368496b1399
Python version: 3.6.9
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.5.2
Locale: C/Default (C)
Attachments
Screen capture of FreeCAD 0.20
Screen capture of FreeCAD 0.20
FreeCAD0.20.png (115.84 KiB) Viewed 3348 times
Screen capture of FreeCAD 0.19
Screen capture of FreeCAD 0.19
FreeCAD0.19.png (118.78 KiB) Viewed 3348 times
td_test1.FCStd
Simple example
(18.5 KiB) Downloaded 78 times
The first principle is that you must not fool yourself, and you are the easiest person to fool.
-Richard Feynman
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Assembly 4 + TechDraw problem on FC 0.20 weekly

Post by Kunda1 »

JFTR latest version of v0.20dev is r28130
You're using r27936
Please always test on the latest dev version
my bad, the appimage is at r27936 but FreeCAD development is moving so quickly.

cancel clear
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Assembly 4 + TechDraw problem on FC 0.20 weekly

Post by Kunda1 »

I see this:

Code: Select all

21:41:53  Line Group File: /snap/freecad-ppd/191/usr/share/Mod/TechDraw/LineGroup/LineGroup.csv is not readable
21:41:53  SE::getSourceShapes - source shape is empty!
21:41:53  DVP::execute - source shape is invalid - (but document is restoring) - View
21:41:53  SE::getSourceShapes - source shape is empty!
21:41:53  DVP::execute - source shape is invalid - (but document is restoring) - View

Code: Select all

OS: Ubuntu Core 20 (KDE/plasma)
Word size of FreeCAD: 64-bit
Version: 0.20.28116 (Git)
Build type: Release
Branch: master
Hash: 122e137939d3feeaabb025bb5773e2191eff94c4
Python 3.8.10, Qt 5.15.3, Coin 4.0.0, OCC 7.6.1
Locale: English/United States (en_US)
Installed mods: 
  * ToolbarStyle
  * Assembly4 0.11.10
  * stickframe
  * sheetmetal 0.2.49
  * Behave-Dark-Colors 0.0.1
  * Curves 0.3.0
  * Ship
  * BIM 2021.12.0
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
fred-3d
Posts: 16
Joined: Sat Sep 26, 2020 5:09 am

Re: Assembly 4 + TechDraw problem on FC 0.20 weekly

Post by fred-3d »

Kunda1 wrote: Thu Mar 17, 2022 1:35 am JFTR latest version of v0.20dev is r28130
You're using r27936
Please always test on the latest dev version
my bad, the appimage is at r27936 but FreeCAD development is moving so quickly.

cancel clear
It just so happens that I recently setup FreeCAD to build in a docker container. I just rebuilt today after a git pull. I tried with that version and got the same results. See attached screen capture.
Attachments
Retest on "built from source" version git 28125
Retest on "built from source" version git 28125
FC0.20.28125.png (188.11 KiB) Viewed 3309 times
The first principle is that you must not fool yourself, and you are the easiest person to fool.
-Richard Feynman
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Assembly 4 + TechDraw problem on FC 0.20 weekly

Post by Kunda1 »

Zolko wrote:ping
Hey @Zolko <poke>
was wondering if you can reproduce this issue as well ?
Thanks in advance!
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: Assembly 4 + TechDraw problem on FC 0.20 weekly

Post by Zolko »

Kunda1 wrote: Thu Mar 17, 2022 2:03 am was wondering if you can reproduce this issue as well ?
yes, I see the same here with self-compiled 0.20:

Code: Select all

OS: Debian GNU/Linux 10 (buster) (KDE//usr/share/xsessions/plasma)
Word size of FreeCAD: 64-bit
Version: 0.20.27913 (Git)
Build type: Unknown
Branch: master
Hash: f602fc872b0f5c26d34d213c99dcc375d0c4be0a
Python 3.7.3, Qt 5.11.3, Coin 4.0.0a, OCC 7.3.0
Locale: English/UnitedKingdom (en_GB)
Installed mods: 
  * A2plus
  * Assembly4_v0.11.8.zip
  * Assembly4_GitHub 0.11.10
  * CurvedShapes 1.0.1
  * Curves 0.3.0
  * fasteners 0.3.38
  * fcgear 1.0.0
  * sheetmetal 0.2.49
  * TabBar
  * Render 2022.1.0
Works perfectly with v0.19. I also made my own test example and I see the same: TechDraw doesn't display things in Part containers. It's independent from Asm4 though, happens with any Std_Part. It's also independent from App::Link, as it happens with any object in any Std_Part, even solids from the Part WB (create a Part, insert into it a cylinder => TechDraw doesn't display)

I don't use TechDraw very much, that's why I didn't see it before

EDIT : we had this thread about something that seems similar:

https://forum.freecadweb.org/viewtopic. ... 10#p504129
try the Assembly4 workbench for FreCAD — tutorials here and here
User avatar
Zolko
Veteran
Posts: 2213
Joined: Mon Dec 17, 2018 10:02 am

Re: Assembly 4 + TechDraw problem on FC 0.20 weekly

Post by Zolko »

fred-3d wrote: Thu Mar 17, 2022 1:03 am I am not sure if this is something that I am doing wrong or a "bug".
This looks like a regression in TechDraw for FreeCAD v0.20: it works as expected in v0.19, but not in v0.20. The problem comes from bad handling of datum objects: if the datum objects are visible, then the TechDraw views make that error. If the datum objects are NOT visible, the view update correctly. Interestingly, TechDraw handles correctly datum objects inside PartDesignWB Bodies (blue icon), but not inside PartWB Parts (yellow icon)

Therefore, there is a workaround: select the object you want to draw, click the "Hide LCS" function, which will hide all datum objects, and then the drawing updates correctly.
try the Assembly4 workbench for FreCAD — tutorials here and here
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Assembly 4 + TechDraw problem on FC 0.20 weekly

Post by Kunda1 »

wandererfan wrote:ping
Hi @WandererFan question: do you want a ticket in the tracker for this regression?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
wandererfan
Veteran
Posts: 6317
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Assembly 4 + TechDraw problem on FC 0.20 weekly

Post by wandererfan »

fred-3d wrote: Thu Mar 17, 2022 1:03 am Could someone please try to open the attached example and reply to this post what happens? Thanks!
Assembly's shape from Part.getShape is very different in v019 vs v020. There is now a face for LCS_Origin included in the shape.

The LCS's shape doesn't have edges or vertices, which seems weird.
LCSShape.png
LCSShape.png (16.68 KiB) Viewed 2755 times
Assembly's shape in v019 doesn't include the face for LCS_Origin.
v019AssemblyShape.png
v019AssemblyShape.png (14.71 KiB) Viewed 2755 times
realthunder wrote: Is the face for LCS_Origin supposed to be included in the result of Part.getShape?
User avatar
wandererfan
Veteran
Posts: 6317
Joined: Tue Nov 06, 2012 5:42 pm
Contact:

Re: Assembly 4 + TechDraw problem on FC 0.20 weekly

Post by wandererfan »

Kunda1 wrote: Fri Mar 18, 2022 3:24 pm
wandererfan wrote:ping
Hi @WandererFan question: do you want a ticket in the tracker for this regression?
Not a regression in TD. Seems to be a change in Part.getShape or maybe 'PartDesign::CoordinateSystem'.
Post Reply