Pocket operation, Through All, strange behaviour

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!
mslonik
Posts: 40
Joined: Mon Jan 25, 2016 7:42 pm
Location: Poland
Contact:

Pocket operation, Through All, strange behaviour

Postby mslonik » Sat Feb 27, 2016 10:30 am

Dear Forum,

My problem is quite easy to demonstrate, so I've attached file
Jetrike_Item31.fcstd
(27.74 KiB) Downloaded 28 times
There is solid body, model of SHS 20 x 1.6 mm:
SHS.jpeg
SHS.jpeg (9.38 KiB) Viewed 1361 times

Now I want to cut it from one side. So I've put triangle (Sketch002) at one side:
Triangle.jpeg
Triangle.jpeg (15.91 KiB) Viewed 1361 times
at tried to use Pocket operation. Unfortunately if I use Pocket of defined length less than 20 mm:
Length.jpeg
Length.jpeg (16.89 KiB) Viewed 1361 times
it works fine. But my intention is to use ThroughAll option:
ThroughAll.jpeg
ThroughAll.jpeg (17.23 KiB) Viewed 1361 times
Unfortunately if I apply this option, Pocket disappears. My question is: why is that?

Required information about my version of FreeCAD:
OS: Ubuntu 14.04.4 LTS
Word size of OS: 32-bit
Word size of FreeCAD: 32-bit
Version: 0.16.6476 (Git)
Build type: None
Branch: master
Hash: 28b6c825553dc462a96a3d138374b8b55b6e4cf6
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17

Kind regards, mslonik
User avatar
bejant
Posts: 6076
Joined: Thu Jul 11, 2013 3:06 pm

Re: Pocket operation, Through All, strange behaviour

Postby bejant » Sat Feb 27, 2016 3:58 pm

mslonik wrote:But my intention is to use ThroughAll option:
...Snip...
Unfortunately if I apply this option, Pocket disappears. My question is: why is that?
It looks like you've found a bug. I copied your steps and made another file from scratch, but with Constraints applied differently, to confirm:
20160227c-ThroughAll.fcstd
(31.18 KiB) Downloaded 19 times
I'll update my FreeCAD version and will try again...

OS: Ubuntu 14.04.4 LTS
Word size of OS: 32-bit
Word size of FreeCAD: 32-bit
Version: 0.16.6456 (Git)
Build type: None
Branch: master
Hash: 9e551e0fdb4321de57471d18a17449e4df0015a6
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
User avatar
bejant
Posts: 6076
Joined: Thu Jul 11, 2013 3:06 pm

Re: Pocket operation, Through All, strange behaviour

Postby bejant » Sat Feb 27, 2016 4:23 pm

Same problem using:

OS: Ubuntu 14.04.4 LTS
Word size of OS: 32-bit
Word size of FreeCAD: 32-bit
Version: 0.16.6476 (Git)
Build type: None
Branch: master
Hash: 28b6c825553dc462a96a3d138374b8b55b6e4cf6
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17

But "Through All" does work for me on other models. I don't know why it's failing here...
User avatar
quick61
Posts: 3803
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: Pocket operation, Through All, strange behaviour

Postby quick61 » Sat Feb 27, 2016 6:23 pm

In Sketch002, change the distance constraint from 25mm to 25.1mm and it should work just fine. It looks like OCE is having a bit of a problem with the rounded edges. I've seen this a number of times before.

I'll also offer some observations on your model. First, you're using more constraints than is needed in your sketches and more distance constraints than required. This might help you understand a bit more or at least get you pointed in the right direction - Sketcher Micro Tutorial - Constraint Practices. Next, the second sketch - wew - that was used to make a Cut would of been just as well used as a Pocket. No need to switch Workbenches for that operation.

I have attached the file with the Sketches reconstrained and the Pocket working through all by making Sketch002 a bit larger than the part being Pocketed. This is a bit of a bug in OCE and we don't have much we can do about it on this end. However, the workaround is a very simple one.
Jetrike_Item31-001.fcstd
(23.22 KiB) Downloaded 20 times
Mark

OS: Kubuntu 14.04.4 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6476 (Git)
Build type: Release
Branch: master
Hash: 28b6c825553dc462a96a3d138374b8b55b6e4cf6
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.18-dev
This post made with 0.0% Micro$oft products - GOT LINUX?
User avatar
bejant
Posts: 6076
Joined: Thu Jul 11, 2013 3:06 pm

Re: Pocket operation, Through All, strange behaviour

Postby bejant » Sat Feb 27, 2016 7:37 pm

quick61 wrote:In Sketch002, change the distance constraint from 25mm to 25.1mm and it should work just fine. It looks like OCE is having a bit of a problem with the rounded edges.
Yes, I see that changing the length works. In my file it seems the problem happens at the lower edge of the model where Y = -12.5 mm and Z = 0 mm when the edge of the Pocket also goes through Y = -12.5 mm and Z = 0 mm along the X axis. It's where the hypotenuse crosses the horizontal axis in this screen grab of my Sketch003 in the attached file:
20160227c1-ThroughAll.png
20160227c1-ThroughAll.png (10.29 KiB) Viewed 1307 times
I thought that having a vertex in the Pocketing Sketch at Y = -12.5 mm and Z = 0 mm caused the problem, but that's not it. The problem is that if any portion of the hypotenuse passes through those points, the Pocket fails. A Cut using a solid that has a face along these points also fails. But if I move my Sketch and Sketch001 down 1 mm so they are at Z = -1 mm, which makes the bottom face of the tube steel at Z = -1 mm, Pocketing "Through All" works, and a Cut also works. The following model is forked at Cut to show the different scenarios while Sketch and Sketch001 have been moved to Z = -1 mm.
20160227d-ThroughAll.fcstd
(48.11 KiB) Downloaded 20 times
quick61 wrote:First, you're using more constraints than is needed in your sketches and more distance constraints than required.
Also, Sketch zew" has Redundant Constraints (which I mistakenly thought might be causing the problem), and it would have been simpler to apply Point To Point Tangency Constraints between the line segments and arcs.
mslonik
Posts: 40
Joined: Mon Jan 25, 2016 7:42 pm
Location: Poland
Contact:

Re: Pocket operation, Through All, strange behaviour

Postby mslonik » Sat Feb 27, 2016 8:31 pm

Dear bejant and quick61,
In Sketch002, change the distance constraint from 25mm to 25.1mm and it should work just fine.
Indeed, it works just fine :) Workaround is simple indeed, but I guess I have to keep it mind. Is there any chance to get warning from FreeCAD about such a problem?
I'll also offer some observations on your model.
Thank you for this lesson. I'm a newbie to 3D modelling and in particular to FreeCAD, just started about 2 months ago. My background is automatics and electronics. Never before I had any practise with 3D programs. Nevertheless I don't afraid of new challenges, so I'm very grateful for any remarks which will help me to improve my workflow.
This is a bit of a bug in OCE and we don't have much we can do about it on this end.
Should I do something about it, e.g. report a bug to OCE team (http://tracker.dev.opencascade.org/bug_report_page.php)?

Kind regards, mslonik
User avatar
quick61
Posts: 3803
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: Pocket operation, Through All, strange behaviour

Postby quick61 » Sat Feb 27, 2016 9:18 pm

First, you're welcome, and I'm sure that the OCC/OCE guys are aware. (I seem to remember one of the guys here that is very familiar with OCE making note of it with a very similar case) This particular problem has been persistent across several versions of the CAD kernel and if it were an easy fix, it would've probably be taken care of long ago.

Mark
This post made with 0.0% Micro$oft products - GOT LINUX?
wmayer
Site Admin
Posts: 16309
Joined: Thu Feb 19, 2009 10:32 am

Re: Pocket operation, Through All, strange behaviour

Postby wmayer » Sun Feb 28, 2016 3:15 pm

FYI, everything works perfectly well with:

OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6494 (Git)
Build type: Release
Branch: master
Hash: 67257633d6478197d4d9847c23d4efe7c50cd9f5
Python version: 2.7.6
Qt version: 4.8.5
Coin version: 4.0.0a
OCC version: 6.6.0
jmaustpc
Posts: 10016
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Pocket operation, Through All, strange behaviour

Postby jmaustpc » Sun Feb 28, 2016 4:16 pm

wmayer wrote:OCC version: 6.6.0
and does not work with the latest OCE from tanderson's OCC 6.9.1 with OCE patches.

OS: Ubuntu 12.04.5 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6506 (Git)
Build type: Release
Branch: master
Hash: 9e01a08eaf82b86f0b079006b021a588e5b6c0c8
Python version: 2.7.3
Qt version: 4.8.2
Coin version: 3.1.3
OCC version: 6.9.1.oce-0.18-dev



also does not work with an old FreeCAD 0.14

OS: Ubuntu 12.04.5 LTS
Platform: 64-bit
Version: 0.14.3647 (Git)
Branch: master
Hash: c05801d6edff634a4edab338e4f66ceca6da3b72
Python version: 2.7.3
Qt version: 4.8.2
Coin version: 3.1.3
SoQt version: 1.5.0
OCC version: 6.7.1


So perhaps it is a regression since OCC 6.6.0?
mslonik
Posts: 40
Joined: Mon Jan 25, 2016 7:42 pm
Location: Poland
Contact:

Re: Pocket operation, Through All, strange behaviour

Postby mslonik » Wed Mar 02, 2016 8:31 pm

Ok, again thank you for your support. I've opened a thread about spotted problem also here: http://dev.opencascade.org/index.php?q=node/1150

Kind regards, mslonik