[bug] Pocket through all

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!
kisolre
Posts: 2253
Joined: Wed Nov 21, 2018 1:13 pm

[bug] Pocket through all

Postby kisolre » Sat Jun 06, 2020 11:55 am

Recently I noticed at least twice PartDesign pocket Through all failing to produce proper pocket. This is with quite simple models. Same pocket with length works as expected:
.
PocketThroughAll.JPG
PocketThroughAll.JPG (44.88 KiB) Viewed 239 times
PocketLength.JPG
PocketLength.JPG (33.74 KiB) Viewed 239 times
.
The two circular holes are also through all but thew work as expected.
OS: Windows 8.1 (6.3)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.21501 (Git)
Build type: Release
Branch: master
Hash: 457dba4fee90410d682f47300afda6e0a10c4fc1
Python version: 3.6.6
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: Bulgarian/Bulgaria (bg_BG)
Attachments
CurtainHolder.FCStd
(39.3 KiB) Downloaded 9 times
User avatar
Willem
Posts: 1351
Joined: Fri Aug 12, 2016 3:27 pm
Location: Lisse, The Netherlands

Re: [bug] Pocket through all

Postby Willem » Sat Jun 06, 2020 12:17 pm

Checking the dependency grtaph I see "Red Lines "
Schermafdruk van 2020-06-06 14-14-30.png
Schermafdruk van 2020-06-06 14-14-30.png (251.6 KiB) Viewed 231 times
kisolre
Posts: 2253
Joined: Wed Nov 21, 2018 1:13 pm

Re: [bug] Pocket through all

Postby kisolre » Sat Jun 06, 2020 12:28 pm

Willem wrote:
Sat Jun 06, 2020 12:17 pm
Checking the dependency grtaph I see "Red Lines "
@wmayer is modifying the Origin handling but this should not affect the way pocket is created.
wmayer
Site Admin
Posts: 15978
Joined: Thu Feb 19, 2009 10:32 am

Re: [bug] Pocket through all

Postby wmayer » Sat Jun 06, 2020 2:07 pm

kisolre wrote:
Sat Jun 06, 2020 12:28 pm
Willem wrote:
Sat Jun 06, 2020 12:17 pm
Checking the dependency grtaph I see "Red Lines "
@wmayer is modifying the Origin handling but this should not affect the way pocket is created.
This is unrelated to my recent changes. When I load this project with v0.19 then it gets loaded correctly and the dependency graph doesn't show anything abnormal.

However, when I load it with v0.18 then it crashes straight away. I had to comment out a line "assert(0)". Afterwards I could load it and it shows the exact same problems as in Willem's screen shot. This means the tree view is messed up and the dependency graph shows the red lines.

Additionally in the output window I get these errors:

Code: Select all

Invalid Document.xml: End of document reached
No extension found of type 'PartGui::ViewProviderAttachExtension'
No extension found of type 'PartGui::ViewProviderAttachExtension'
No extension found of type 'PartGui::ViewProviderAttachExtension'
No extension found of type 'PartGui::ViewProviderAttachExtension'
No extension found of type 'PartGui::ViewProviderAttachExtension'
No extension found of type 'PartGui::ViewProviderAttachExtension'
The issue about the missing extension is probably not that dramatic but the error message "Invalid Document.xml: End of document reached" seems more serious. The crash above happened inside XMLReader::getAttributeAsInteger().

So, obviously here we have created a Document.xml with v0.19 that cannot be loaded with v0.18.

Anyway, your actual problem with the pocket is something else. Please check the bug tracker if you can find a reported issue about this problem, otherwise create a ticket.
kisolre
Posts: 2253
Joined: Wed Nov 21, 2018 1:13 pm

Re: [bug] Pocket through all

Postby kisolre » Sat Jun 06, 2020 2:11 pm

wmayer wrote:
Sat Jun 06, 2020 2:07 pm
When I load this project with v0.19 then it gets loaded correctly and the dependency graph doesn't show anything abnormal.
That file was created and saved after recent origin modifications. It displays same broken dependencies graph with
OS: Windows 8.1 (6.3)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.20839 (Git)
Build type: Release
Branch: master
Hash: 09005766f10539dfe32314c33c2cd3efe9141d0b
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: Bulgarian/Bulgaria (bg_BG)
wmayer
Site Admin
Posts: 15978
Joined: Thu Feb 19, 2009 10:32 am

Re: [bug] Pocket through all

Postby wmayer » Sat Jun 06, 2020 2:43 pm

kisolre wrote:
Sat Jun 06, 2020 2:11 pm
That file was created and saved after recent origin modifications. It displays same broken dependencies graph with
But this doesn't automatically mean that my recent changes are the reason for it. I have locally reverted my recent changes and I still could load your file. So, IMO the reason must be the changes between 0.19.20839 and 0.19.21501, so 662 possibilities.

Do you mind to create your model from scratch with 0.19.20839? Then I can have a look at the differences of the Document.xml files and see what are the important changes.
User avatar
papyblaise
Posts: 1988
Joined: Thu Jun 13, 2019 4:28 pm
Location: France

Re: [bug] Pocket through all

Postby papyblaise » Sat Jun 06, 2020 3:49 pm

When I tray to open your file : Unomed is empty , so Pad isn't legal
Sketch003 and 004 are lost
But , I can't cofirm , it seam that sketch003 is coplanar whith the face
Attachments
Kisoire.PNG
Kisoire.PNG (30.08 KiB) Viewed 158 times
freedman
Posts: 1451
Joined: Thu Mar 22, 2018 3:02 am
Location: Washington State, USA

Re: [bug] Pocket through all

Postby freedman » Sat Jun 06, 2020 5:26 pm

I see the same here in 0.19.204 when I open the file, a bunch of Unnamed origins at the bottom. I can try to recreate the model if needed....

OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.20477 (Git)
Build type: Release
Branch: master
Hash: 7d8ab175a68e476427e6e337fe3099b52da49dc8
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United States (en_US)
TheMarkster
Posts: 1580
Joined: Thu Apr 05, 2018 1:53 am

Re: [bug] Pocket through all

Postby TheMarkster » Sat Jun 06, 2020 5:59 pm

I can confirm with a new build from source. Works as expected if using length or up to face. When unchecking reverse mode it works to remove some material, but then fails. Works okay if I use a subtractive box to create a flat edge for it to detect. Problem seems to be in detecting the curved edge.
Snip macro screenshot-c38dec.png
Snip macro screenshot-c38dec.png (127.92 KiB) Viewed 128 times
Snip macro screenshot-6cf5c6.png
Snip macro screenshot-6cf5c6.png (155.18 KiB) Viewed 128 times
OS: Ubuntu 18.04.4 LTS (LXDE/LXDE)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.21505 (Git)
Build type: Debug
Branch: master
Hash: 9801519409c992fb964490abdefc35ae79e0b473
Python version: 3.6.9
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
My FreeCAD video series on youtube: https://www.youtube.com/c/mwganson
wmayer
Site Admin
Posts: 15978
Joined: Thu Feb 19, 2009 10:32 am

Re: [bug] Pocket through all

Postby wmayer » Sat Jun 06, 2020 9:46 pm

In the meantime I did a manual git bisect and up to git commit 1521b256bcfb FreeCAD crashes when loading the file. NOTE, that this already includes the change to add group behaviour to the origin feature.

After applying git commit 457dba4fee9 FreeCAD doesn't crash any more. My intention was to avoid that the App::Origin doesn't export further properties but somehow this causes a regression and possibly invalidates the Document.xml file. So, I will revert this change.

But nevertheless the (broken?) project file is a good example that FreeCAD should also handle such input without crashing.