Inward thickening

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!
jean.thil
Posts: 202
Joined: Tue Jul 28, 2015 7:28 am

Inward thickening

Postby jean.thil » Wed Jan 25, 2017 6:51 am

One can get inward thickening by offsetting a surface with a negative value.
The problem is that if there is a thin part, instead of just filling in the offset, Freecad create protruding stuff outside the original surface (look at the tail of my tadpole). I do understand that this behavior is the exact translation of « thicken my stuff » but this is not what I want, and I guess what would ask most of the users in a similar situation. Is there a way to get rid of this unwanted part of the volume ?

TIA

OS: Debian GNU/Linux 8.7 (jessie)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.9766 (Git)
Build type: Unknown
Branch: bspline_stage1b_2017
Hash: 4b501f23288d6ba33f36aa8314fc0621092013c7
Python version: 2.7.9
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 7.0.0
Attachments
tadpole.jpeg
tadpole.jpeg (26.67 KiB) Viewed 1196 times
tadpole.fcstd
(11.32 KiB) Downloaded 19 times
User avatar
microelly2
Posts: 4546
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Inward thickening

Postby microelly2 » Wed Jan 25, 2017 7:11 am

The simplest way is to create a outward thickness too and subtract it from your part
jean.thil
Posts: 202
Joined: Tue Jul 28, 2015 7:28 am

Re: Inward thickening

Postby jean.thil » Wed Jan 25, 2017 7:22 am

Thanks.
I will try it
jean.thil
Posts: 202
Joined: Tue Jul 28, 2015 7:28 am

Re: Inward thickening

Postby jean.thil » Wed Jan 25, 2017 2:45 pm

I tried it but didn't succeed.
I made an outer offset. The picture below shows the state of the screen during the dialog for creating the second offset.
tadpole_two_offset.jpeg
tadpole_two_offset.jpeg (37.09 KiB) Viewed 1160 times
When I subtracted the outer offset from the inner, the operation failed.
I guessed this is because the two extrusions have a common face so I tried to use a intermediary offset (tadpole_3_offset) but it failed two.
Attachments
tadpole_3_offset.fcstd
(26.28 KiB) Downloaded 10 times
tadpole_failed.fcstd
(20.84 KiB) Downloaded 8 times
User avatar
NormandC
Posts: 18534
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Inward thickening

Postby NormandC » Thu Jan 26, 2017 3:12 am

Your profile is a closed B-Spline with a very pointed end. It's not easy to offset such a profile and it seems like OCC can't handle it.

In the commercial CAD program I use at work, when I create an offset of a B-Spline curve, the resulting B-Spline has an extremely high number of poles, much higher than the original.
User avatar
microelly2
Posts: 4546
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Inward thickening

Postby microelly2 » Thu Jan 26, 2017 5:36 am

what you need is a function like erosion in image processing
http://docs.opencv.org/trunk/d9/d61/tut ... l_ops.html

I wonder if this is already is implemented for point clouds in FreeCAD.
Discretize the curve, create a closed face
discretize it to get the inner bound
User avatar
NormandC
Posts: 18534
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Inward thickening

Postby NormandC » Thu Jan 26, 2017 5:44 am

The solution is Part 2D Offset! (new in 0.17) :ugeek:
FC017_jean.thil_tadpole_01.png
FC017_jean.thil_tadpole_01.png (21.31 KiB) Viewed 1126 times
  1. Use 2D Offset on Sketch
  2. Extrude both Sketch and Offset2D object with solid option enabled
  3. Apply Part Cut
  4. Voilà ;)
Thanks go to DeepSOIC for adding this tool. :)
Attachments
tadpole_normandc1.fcstd
(32.75 KiB) Downloaded 15 times
User avatar
microelly2
Posts: 4546
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Inward thickening

Postby microelly2 » Thu Jan 26, 2017 8:40 am

NormandC wrote:The solution is Part 2D Offset! (new in 0.17) :ugeek:
thank you for this tipp.one more very useful tool. :D
User avatar
Willem
Posts: 1307
Joined: Fri Aug 12, 2016 3:27 pm
Location: Lisse, The Netherlands

Re: Inward thickening

Postby Willem » Thu Jan 26, 2017 9:01 am

I was not aware of the 2D offset function either. I think it is not logical that this function is not located in the Sketcher and/or the PartDesign workbench, the logical workbenches for 2D functions, but in the Part workbench, which is the ultimate 3D workbench
jean.thil
Posts: 202
Joined: Tue Jul 28, 2015 7:28 am

Re: Inward thickening

Postby jean.thil » Thu Jan 26, 2017 8:57 pm

Thanks for your help. It works for this example because the shape is an extrusion of only one profil. If the shape were a loft or a sweep of non constant profile, the 2D normal to the profile wouldn't be the same as the projection of the 3D normal to the surface. I'd like to find a way that works for most shapes. I have tried some other way but without success.
Last edited by jean.thil on Fri Jan 27, 2017 6:09 am, edited 1 time in total.