TopoDS::Face error when doing an Additive Sweep in Part Design Workbench

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!
FlyingSaucrDude
Posts: 5
Joined: Mon Feb 22, 2021 7:53 pm

TopoDS::Face error when doing an Additive Sweep in Part Design Workbench

Postby FlyingSaucrDude » Mon Feb 22, 2021 8:19 pm

Hi there! I'm trying to do (what I hope! :?: ) is a very simple additive sweep from one sketch to another, to create a shell that smoothly transitions from a circular curvature to an oval curvature as it rotates (kind of like doing a 90° revolution, except I want the profile of the revolution to gradually change as it goes from 0° to 90°.)

However, every time I try I get a "TopoDS::Face" error. Here's what I do:
  1. In the attached file activate the Part Design WB, activate Body as the active body, and select SideSketch from the tree
  2. Start the Additive Sweep tool, and select the sketch named Path as the object to sweep along
  3. Change the Section Transformation from Constant to Multisection, and add BottomSketch as a section
  4. Click OK to finish the Additive Sweep, and get your TopoDS::Face error
Any help with what I'm doing wrong? This seems like it should be a fairly straightforward operation, but I'm new to CAD in general and FreeCAD specifically, so I might be approaching this the wrong way.

Thanks in advance for the help!

Here's the version/OS info:

OS: Ubuntu 18.04.5 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.4.
Build type: Release
Python version: 3.6.8
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
Attachments
Test2.FCStd
(8.42 KiB) Downloaded 5 times
Screenshot from 2021-02-22 12-17-15.png
Screenshot from 2021-02-22 12-17-15.png (44.59 KiB) Viewed 234 times
chrisb
Posts: 31986
Joined: Tue Mar 17, 2015 9:14 am

Re: TopoDS::Face error when doing an Additive Sweep in Part Design Workbench

Postby chrisb » Mon Feb 22, 2021 9:58 pm

Sections must not touch.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
FlyingSaucrDude
Posts: 5
Joined: Mon Feb 22, 2021 7:53 pm

Re: TopoDS::Face error when doing an Additive Sweep in Part Design Workbench

Postby FlyingSaucrDude » Mon Feb 22, 2021 10:08 pm

Thanks for the quick reply, Chris!

Since your reply indicated the problem was two touching sections, I tried doing it without the second section. (More specifically, I followed all the steps in my original post, but skipped step #3.) I still got a TopoDS::Face error even without trying to do Multisection.

Is there something else I'm doing wrong?
chrisb
Posts: 31986
Joined: Tue Mar 17, 2015 9:14 am

Re: TopoDS::Face error when doing an Additive Sweep in Part Design Workbench

Postby chrisb » Mon Feb 22, 2021 11:26 pm

The problem is the edge in the center of the rotation. It creates continuous self intersections and those are forbidden in sweeps. I have exaggerated in the image here, where I have moved the edge out of the center.
Bildschirmfoto 2021-02-23 um 00.23.29.png
Bildschirmfoto 2021-02-23 um 00.23.29.png (28.4 KiB) Viewed 193 times
In this case a perfect solution is much simpler: don't use a sweep, use a revolve instead.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
FlyingSaucrDude
Posts: 5
Joined: Mon Feb 22, 2021 7:53 pm

Re: TopoDS::Face error when doing an Additive Sweep in Part Design Workbench

Postby FlyingSaucrDude » Mon Feb 22, 2021 11:36 pm

Thanks, that makes sense!

In that case, going back to my original goal: Is there any way in FreeCAD to accomplish what is effectively a revolve with different profiles over the course of the revolution where the center of rotation is an edge of the sketch?
chrisb
Posts: 31986
Joined: Tue Mar 17, 2015 9:14 am

Re: TopoDS::Face error when doing an Additive Sweep in Part Design Workbench

Postby chrisb » Mon Feb 22, 2021 11:42 pm

FlyingSaucrDude wrote:
Mon Feb 22, 2021 11:36 pm
Is there any way in FreeCAD to accomplish what is effectively a revolve with different profiles over the course of the revolution where the center of rotation is an edge of the sketch?
No, you have to apply some tricks. If my solution from above is not even acceptable with a tiny µm offset, then you could offset the center of the path making the part slightly (i.e. again some µm) too big and cut the excess afterwards off with a pocket.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
FlyingSaucrDude
Posts: 5
Joined: Mon Feb 22, 2021 7:53 pm

Re: TopoDS::Face error when doing an Additive Sweep in Part Design Workbench

Postby FlyingSaucrDude » Mon Feb 22, 2021 11:56 pm

I tried the μm offset approach, but it gave me issues later on when I tried to add additional features to the part. (E.g. when I tried to add pads that attached to the various flat faces of the curved shape, my part became invalid because there were tiny gaps between vertices/edges/faces that should have been coincident. If that doesn't make sense, let me know and I'll try to make a simplified example of the resulting problems I was having.)

Thank you again for all your patience with this!

P.S. Do you happen to know if the "no self/section intersections" rule for the Sweep tool is a constraint enforced by FreeCAD itself, or by OpenCascade? (Or am I missing some fundamental mathematical reason why a Sweep couldn't allow for self/section intersections?) If it's just FreeCAD, maybe I'll try to dive into the code or try to create a workbench that will do what I want.. :geek:
chrisb
Posts: 31986
Joined: Tue Mar 17, 2015 9:14 am

Re: TopoDS::Face error when doing an Additive Sweep in Part Design Workbench

Postby chrisb » Tue Feb 23, 2021 12:03 am

I'm pretty sure that it's an OCC issue.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
papyblaise
Posts: 3066
Joined: Thu Jun 13, 2019 4:28 pm
Location: France

Re: TopoDS::Face error when doing an Additive Sweep in Part Design Workbench

Postby papyblaise » Tue Feb 23, 2021 10:02 am

We can make a flattened bullet using your 2 sketches and your path
For fun I added a piece of body
Attachments
ogive aplatie.FCStd
(126.26 KiB) Downloaded 4 times
ogive aplatie.PNG
ogive aplatie.PNG (59.67 KiB) Viewed 90 times
FlyingSaucrDude
Posts: 5
Joined: Mon Feb 22, 2021 7:53 pm

Re: TopoDS::Face error when doing an Additive Sweep in Part Design Workbench

Postby FlyingSaucrDude » Tue Feb 23, 2021 2:26 pm

Wow! That's awesome! How did you manage to make it work? When I open your attachment and try to edit any of the components, I get a "No object linked" or "No valid profile linked" errors (also all of the components beside the sketches show up as "Unnamed").
Attachments
Screenshot from 2021-02-23 06-24-46.png
Screenshot from 2021-02-23 06-24-46.png (32.27 KiB) Viewed 59 times