Part Workbench > Thickness bug?

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!
GordonHS
Posts: 2
Joined: Sat Mar 12, 2016 8:04 pm
Location: Melbourne, Australia

Part Workbench > Thickness bug?

Postby GordonHS » Sat Mar 12, 2016 8:21 pm

Hi All,
I think I've found a bug with the "Thickness" tool, similar to bug report 0002325.

FreeCAD version info.

OS: "openSUSE 13.2 (Harlequin) (i586)"
Word size of OS: 32-bit
Word size of FreeCAD: 32-bit
Version: 0.16.6596 (Git) (Packman)
Build type: Release
Branch: master
Hash: 37b7334df6c3703d67f43cadc85f5e07e29c4216
Python version: 2.7.8
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.18-dev

My first test file:-
TstPiece3.fcstd
(9.91 KiB) Downloaded 16 times

If I try to "Thickness" this model when I've selected either the outside circumference surface or either of the end faces, there is no problem.
But if I select the inside circumference surface, I get an "Input error" message box.
I produce the problem as follows:-
1. Open file "TstPiece3.fcstd" (in FreeCAD).
2. Switch to "Part" workbench.
3. Select inside circumference surface of rectangular ring.
4. Click on "Thickness" tool.
5. "Thickness" dialogue box in "Tasks" tab opens and thicknessing operation appears to be correct in 3D view of object.
6. Click "OK" and following "Input error" message box appears.
InputError01.png
InputError01.png (19.78 KiB) Viewed 1136 times
7. Click "OK" in error message box.
8. Click "Cancel" in "Thickness" dialog box.
9. Back to original "Cut" object!!!!

If I now try to "Thickness" by selecting either the outside circumference surface or an end face, I get the same error message box as above.
Thicknessing by selecting these other surfaces appeared to work correctly when I first opened the file!!!!!
After the problem with the inside surface above, my procedure was as follows:-
1. Select outside circumference or end face of object.
2. Click on "Thickness" tool.
3. "Thickness" dialogue appears, but no change in 3D view of object.
4. Click on "Faces" button, select say an end face.
5. Click "Done" button, object disappears.
6. Click on "OK" in "Thickness" dialogue.
7. The same "Input error" message box as above appears.
8. Click on "OK" in message box.
9. Click on "Cancel" in "Thickness" dialogue.
10. Back to original "Cut" object!!!!

No error messages in "Report view" or "Python console".

I can get FreeCAD to crash with the following file:-
tstrev1.fcstd
(14.17 KiB) Downloaded 14 times
If I select the outside curved circumference, then click on "Thickness" tool, FreeCAD crashes.
Starting FreeCAD from a terminal shell, I get the following:-

gordon@linux-xfaf:~/Documents/FreeCad> FreeCAD -l
FreeCAD 0.16, Libs: 0.16R6596 (Git) (Packman)
© Juergen Riegel, Werner Mayer, Yorik van Havre 2001-2015
##### #### ### ####
# # # # # #
# ## #### #### # # # # #
#### # # # # # # # ##### # #
# # #### #### # # # # #
# # # # # # # # # ## ## ##
# # #### #### ### # # #### ## ## ##

*** Abort *** an exception was raised, but no catch was found.
... The exception is:SIGSEGV 'segmentation violation' detected. Address 0
gordon@linux-xfaf:~/Documents/FreeCad>

Hope the above is helpful.

Gordon.
User avatar
DeepSOIC
Posts: 7832
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: Part Workbench > Thickness bug?

Postby DeepSOIC » Sat Mar 12, 2016 9:44 pm

Hi!
I've experienced Thickness breaking input shapes, too. That is OpenCascade territory, and there's not much we can do about it. You can try getting newer OCC and then rebuilding FreeCAD.
User avatar
NormandC
Posts: 18534
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Part Workbench > Thickness bug?

Postby NormandC » Sat Mar 12, 2016 11:53 pm

Hello Gordon,

Welcome to the forum. I get the same with your two files, although I'm puzzled by the second test case, what would be the purpose of doing a rounded edge if it's to remove it with Part Thickness? I agree it would be better for FreeCAD not to crash though.

I get that the first file is a very simple test case, but in any case a workaround could be to apply a Part Offset on the first Cylinder (with a negative value so the shape is offset inward), make a Part Cut between the shapes, and then a new Part Cut between the result and Cylinder001.
DeepSOIC wrote:I've experienced Thickness breaking input shapes, too. That is OpenCascade territory, and there's not much we can do about it.
I was pretty excited when Part Thickness was introduced, but it has proven rather unpredictable... For better or for worse, FreeCAD is built on top of OCC, there is no available alternative anyway.

OS: Ubuntu 14.04.4 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6603 (Git)
Build type: None
Branch: master
Hash: 4bccc5cc6ef85805a18a9aa6a7c1b9c46be8f199
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
Attachments
TstPiece3_offset_workaround_normandc1.fcstd
(11.87 KiB) Downloaded 15 times
User avatar
NormandC
Posts: 18534
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Part Workbench > Thickness bug?

Postby NormandC » Sun Mar 13, 2016 12:20 am

OK here's something weird.
  1. Create a sketch on the XY plane with two concentric circles in it; outer one with radius = 10mm, inner one with radius = 5mm.
  2. Create a PartDesign Pad with a distance of 10mm. Basically this reproduces exactly the shape of the TstPiece3.fcstd file, but with a different modeling method.
  3. Follow the steps described in the first list in Gordon's post. There is no error message, and the Thickness operation succeeds.
:?
Attachments
TstPce_Pad_normandc1.fcstd
(12.03 KiB) Downloaded 14 times
GordonHS
Posts: 2
Joined: Sat Mar 12, 2016 8:04 pm
Location: Melbourne, Australia

Re: Part Workbench > Thickness bug?

Postby GordonHS » Sun Mar 13, 2016 12:25 am

Hi Guys,
Thanks for your replies.
NormandC wrote: although I'm puzzled by the second test case, what would be the purpose of doing a rounded edge if it's to remove it with Part Thickness?
No purpose, except to to demo the crash.
Like your work around. Should have known that "There's more than one way to skin a cat."

DeepSOIC. I compiled FreeCAD from source a year or two ago, but I find it much easier these days to update FreeCAD from "Packman" repository. I'm assuming that "Packman" is reasonably up to date.
NormandC wrote: OK here's something weird.

Create a sketch on the XY plane with two concentric circles in it; outer one with radius = 10mm, inner one with radius = 5mm.
Create a PartDesign Pad with a distance of 10mm. Basically this reproduces exactly the shape of the TstPiece3.fcstd file, but with a different modeling method.
Follow the steps described in the first list in Gordon's post. There is no error message, and the Thickness operation succeeds.
Cool.

Thanks again,
Gordon
User avatar
NormandC
Posts: 18534
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Part Workbench > Thickness bug?

Postby NormandC » Sun Mar 13, 2016 12:36 am

GordonHS wrote:I compiled FreeCAD from source a year or two ago, but I find it much easier these days to update FreeCAD from "Packman" repository.
I understand the feeling, this is why I participated in setting up and managing the Ubuntu daily builds PPA, which does the same thing.

Compiling FreeCAD is one thing, what DeepSOIC implies is that you'd have to compile OCC as well, since Packman is compiled with OCC 6.8.0 like the Ubuntu PPA. But OCC 6.9.1 came out last September, and 7.0.0RC just came out last week.
GordonHS wrote: I'm assuming that "Packman" is reasonably up to date.
Yes Packman is pretty much up to date, you are only a few commits behind the PPA which was updated last Thursday. The 4 last digits indicate the number of commits (changes) in the Git repository since switching over from subversion back in 2012 I believe.
GordonHS wrote:Version: 0.16.6596 (Git) (Packman)
NormandC wrote:Version: 0.16.6603 (Git)
User avatar
Kunda1
Posts: 9217
Joined: Thu Jan 05, 2017 9:03 pm

Re: Part Workbench > Thickness bug?

Postby Kunda1 » Fri Jan 27, 2017 1:14 am

Questions:
Is this bug still relevant?
Is issue #2325 related?
If not, please forgive me for being off-topic but would you check if issue #2325 is still reproducible?
Alone you go faster. Together we go farther
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features