3D offset failing after certain scaling operations

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!
Post Reply
jescombe
Posts: 90
Joined: Tue Mar 09, 2021 4:19 pm

3D offset failing after certain scaling operations

Post by jescombe »

Hi,

As an occasional wood-turner, I'm sometimes asked to make wooden urns. I've got a workflow where I model these in FreeCAD in order to calculate the internal volume..

  • Create or trace a b-spline curve in Inkscape for body outline to centre line
  • Import SVG as geometry, transform to XZ plane, with bottom centre at 0,0
  • Part->Revolve around Z axis to form shape for inner wall
  • Draft->Clone the revolve, and then scale the cloned object to achieve required volume
    (Can measure the volume using FCInfo macro, or in Python console - App.ActiveDocument.Clone.Shape.Volume)
  • Part->3D Offset (outwards) for required wall thickness
This all works well, as long as the Clone object is scaled by a consistent value in all 3 axis. However, If I want to scale any axis (typically Z) by a different value - then the 3D Offset fails with a "BRepOffsetAPI_MakeOffsetShape not done" error. In addition, if I run Part->Check Geometry on the scaled clone, this also shows "BOPAlgo GeomAbs_C0" errors if it has been scaled by different values.

Wondering whether this is a bug, or whether there is something wrong with my process. Quite happy to do it another way if there is a better option, but do need to be able to easily change the scale and verify internal volume..

Attaching an example FreeCAD project to demonstrate the issue. The clone is currently scaled by the same factor in all axis, just change the Z axis scale and recompute the 3D offset to see the error.

Thanks in advance,
Jon.

OS: Fedora 33 (Workstation Edition) (GNOME/gnome)
Word size of FreeCAD: 64-bit
Version: 0.20.25157 (Git) AppImage
Build type: Release
Branch: master
Hash: 257cdd8f423f1530b8df6f53e242de629fee4e85
Python version: 3.9.5
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.2
Locale: English/United Kingdom (en_GB)
Attachments
Hollow vessel example.FCStd
Example file
(16.43 KiB) Downloaded 20 times
User avatar
Cekuhnen
Posts: 443
Joined: Sat Jul 10, 2021 11:37 pm

Re: 3D offset failing after certain scaling operations

Post by Cekuhnen »

Sorry for asking but when I open your file I see no sketches or the SVG import
MacOS Big Sur / Win 10

Designer | Faculty
Wayne State University
Interior - Industrial Design
jescombe
Posts: 90
Joined: Tue Mar 09, 2021 4:19 pm

Re: 3D offset failing after certain scaling operations

Post by jescombe »

Cekuhnen wrote: Fri Jul 23, 2021 6:12 pm Sorry for asking but when I open your file I see no sketches or the SVG import
The original import is there as a path (is how "import as geometry" creates it), but the visibility wasn't toggled on in the file. You are right that there is no sketch, wasn't necessary for me, as the profile was already drawn in inkscape..
Cheers, Jon.
Screenshot from 2021-07-23 19-28-34.png
Screenshot from 2021-07-23 19-28-34.png (89.28 KiB) Viewed 718 times
User avatar
Vincent B
Veteran
Posts: 4713
Joined: Sun Apr 05, 2015 9:02 am
Location: La Rochelle, France

Re: 3D offset failing after certain scaling operations

Post by Vincent B »

Make the clone from the offset, then the scale works with any value. ;)
User avatar
Cekuhnen
Posts: 443
Joined: Sat Jul 10, 2021 11:37 pm

Re: 3D offset failing after certain scaling operations

Post by Cekuhnen »

whoa scary thats how svg imports look ?

So I rebuild you design with a sketch but the asymmetric scaling of the clone breaks the offset - yep

Surface Offset is also a very delicate tool in many apps I know - I would have assumed this not being an issue when the input is scaled

but yeah scale the clone from the offset.
MacOS Big Sur / Win 10

Designer | Faculty
Wayne State University
Interior - Industrial Design
jescombe
Posts: 90
Joined: Tue Mar 09, 2021 4:19 pm

Re: 3D offset failing after certain scaling operations

Post by jescombe »

Thanks both, that was useful.

I wanted to keep the 3D offset as the final operation - as that gives me a consistent wall thickness in all dimensions regardless of scaling. However, your suggestions prompted me to experiment with some different orders of operation..

What does always seem to work is cloning & scaling the path object first, then making the revolve and the 3D offset from that.

Cheers, Jon.
Post Reply