[finished] project: Making Part Extrude taking care of inner structure

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: project: Making Part Extrude taking care of inner structure

Post by uwestoehr »

Draft is no option. This is applied on faces - a nightmare because of toponaming. Moreover you need several draft operations to get your example. Furthermore you cannot draft to a result I showed in the first image of
https://forum.freecadweb.org/viewtopic. ... 22#p560422

Extrude is already doing it right - building shells from the sketch wires, the only thing we need to add is that it takes care of the inner wires. At the moment it takes the outermost wire only.

I don't understand your concerns with B-Splines. What is the issue with this? Do people have issues with the existing Extrude features?

I will not change too much. Extrude is THE main feature when going from 2D to 3D therefore "never change a working method" applies here in particular.
davidosterberg
Posts: 529
Joined: Fri Sep 18, 2020 5:40 pm

Re: project: Making Part Extrude taking care of inner structure

Post by davidosterberg »

uwestoehr wrote: Mon Jan 10, 2022 1:08 pm I don't understand your concerns with B-Splines. What is the issue with this? Do people have issues with the existing Extrude features?
You cannot make a sketch on a BSpline. So the most basic workflow of a feature based cad software vanishes. This may be fine for Part that can rely on CSG workflow. But for PartDesign it is not good.
User avatar
-alex-
Veteran
Posts: 1861
Joined: Wed Feb 13, 2019 9:42 pm
Location: France

Re: project: Making Part Extrude taking care of inner structure

Post by -alex- »

davidosterberg wrote: Mon Jan 10, 2022 3:28 pm You cannot make a sketch on a BSpline. So the most basic workflow of a feature based cad software vanishes. This may be fine for Part that can rely on CSG workflow. But for PartDesign it is not good.
+1
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: project: Making Part Extrude taking care of inner structure

Post by uwestoehr »

davidosterberg wrote: Mon Jan 10, 2022 3:28 pm You cannot make a sketch on a BSpline. So the most basic workflow of a feature based cad software vanishes.
I still don't understand. Can you therefore explain it a bit more please. Where do you need to make the sketch that you cannot do?

Most of my real-life sketches contains B-Splines (I even wrote this Wiki page: https://wiki.freecadweb.org/B-Splines ;) ). B-Splines are a basic feature of CAD in my opinion.
Therefore I need to understand the issue properly.

Note that also @realthunder's approach to implement tapered extrudes uses the same OCC method like the existing Extrude feature. Only the way he creates the top and back faced is different. However, as I understand @chrisb, the B-Spline issue is something with the shells, not the faces. @realthunder wrote that there is an option to create the shells in a different way, but also this one has drawbacks.
User avatar
adrianinsaval
Veteran
Posts: 5551
Joined: Thu Apr 05, 2018 5:15 pm

Re: project: Making Part Extrude taking care of inner structure

Post by adrianinsaval »

uwestoehr wrote: Mon Jan 10, 2022 1:08 pm Draft is no option. This is applied on faces - a nightmare because of toponaming.
I don't entirely understand, is it impossible to identify the faces that need to be drafted? can't we extrude without making a solid, then draft all faces and then generate the missing 2 faces? TNP shouldn't affect this.
Moreover you need several draft operations to get your example. Furthermore you cannot draft to a result I showed in the first image of https://forum.freecadweb.org/viewtopic. ... 22#p560422
however I don't think this type of taper is the desired behavior, I agree with david here: https://forum.freecadweb.org/viewtopic. ... 10#p560292 we would normally want inner wires to shrink when outer wire grows, and draft apparently does exactly that in a single feature
Attachments
draft-inn-out.FCStd
(20.32 KiB) Downloaded 18 times
User avatar
uwestoehr
Veteran
Posts: 4961
Joined: Sun Jan 27, 2019 3:21 am
Location: Germany
Contact:

Re: project: Making Part Extrude taking care of inner structure

Post by uwestoehr »

adrianinsaval wrote: Mon Jan 10, 2022 5:46 pm
uwestoehr wrote: Mon Jan 10, 2022 1:08 pm Draft is no option. This is applied on faces - a nightmare because of toponaming.
I don't entirely understand, is it impossible to identify the faces that need to be drafted?
The draft feature is applied to a face and the face number changes during the design process. Therefore I never use drafts in real-life documents anymore. It is just pain to repair the drafts again and again (like with fillets).

However, we speak here about different things. The important thing is how the shells are built with the OCC kernel. There is a difference in getting wires (the technical term of OCC for closed paths) or taking an existing face and modify it.
adrianinsaval wrote: Mon Jan 10, 2022 5:46 pm I don't think this type of taper is the desired behavior, I agree with david here: https://forum.freecadweb.org/viewtopic. ... 10#p560292 we would normally want inner wires to shrink when outer wire grows, and draft apparently does exactly that in a single feature
If this the desired behavior, can implement it this way. Note however, as I found out, the OCC kernel has problems to shrink small wires - the smaller e.g. the diameter of an inner circle, the more likely it crashes, no matter how small you make the negative offset (negative angle).

Therefore I am once more convinced that taking care of inner wires should be the second step for PD Pad/Pocket.
davidosterberg
Posts: 529
Joined: Fri Sep 18, 2020 5:40 pm

Re: project: Making Part Extrude taking care of inner structure

Post by davidosterberg »

uwestoehr wrote: Mon Jan 10, 2022 6:37 pm There is a difference in getting wires (the technical term of OCC for closed paths) or taking an existing face and modify it.
I guess this is the question. Would this be a workable way to implement the feature? Create the normal pad. Then modify it to have the taper?
I have not thought about it deeply. But it is an appealing thought that taper could be modified from 0, and still have the same face numbering and face types.
chrisb
Veteran
Posts: 54197
Joined: Tue Mar 17, 2015 9:14 am

Re: project: Making Part Extrude taking care of inner structure

Post by chrisb »

uwestoehr wrote: Mon Jan 10, 2022 5:38 pm
davidosterberg wrote: Mon Jan 10, 2022 3:28 pm You cannot make a sketch on a BSpline. So the most basic workflow of a feature based cad software vanishes.
I still don't understand. Can you therefore explain it a bit more please. Where do you need to make the sketch that you cannot do?
In the current version of OCC it is indeed possible to attach sketches to flat BSplineCurves. However, I would not rely on that. Furthermore I guess that BSplineCurves will raise many more coplanar issues, that plane faces would do.

I have to admit that I am getting tired of this. It takes quite some effort to creata all of these finally useless counter examples. If I see it right it boils down to a decision between having
- simpler implementation at the cost of more complicated models - and a BSplineCurve is more complicated
- vs. simpler models at the cost of a more complex implementation.

I would always prefer the latter, because it's the models I want to keep. (Off topic: I don't store summer clothes over the winter without having them washed).

And I dare to doubt that using the already existing Draft technique is really more complex than creating a loft.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
user1234
Veteran
Posts: 3502
Joined: Mon Jul 11, 2016 5:08 pm

Re: project: Making Part Extrude taking care of inner structure

Post by user1234 »

Just my sight as a user.
uwestoehr wrote: Mon Jan 10, 2022 1:08 pm I don't understand your concerns with B-Splines. What is the issue with this? Do people have issues with the existing Extrude features?
There are more limitations of b-splines. For example while projecting (or sectioning) in 2D, then a plane is no line more. Setting sketches on it is mentions from other above. You can not use it as reference for a mirror or other planes basis and so on. So the usecase is then pretty limited.


uwestoehr wrote: Mon Jan 10, 2022 1:08 pm Draft is no option. This is applied on faces - a nightmare because of toponaming.
To be honest, this is not, at least for me, a valid argument. Because

- then it is no extrude/pad
- a draft is or can be more capable then a in build extrude/pad draft function, because it is their main function
- it is a obsolete function, when the TNP is solved. What will you do when then? Then you have duplicate functions in FreeCAD. When deleting the functions, maybe then the documents are not backwards compatible
- it messes the body tree, on larger objects the searching for the correct parametric to change is a nightmare in build in functions
( - FreeCAD should act like there is no TNP, but this in only my strange opinion)

I will not be unthankful, you made very good changes in FreeCAD, they i really appreciate! Thanks for that!

Greetings
user1234
chrisb
Veteran
Posts: 54197
Joined: Tue Mar 17, 2015 9:14 am

Re: project: Making Part Extrude taking care of inner structure

Post by chrisb »

uwestoehr wrote: Mon Jan 10, 2022 1:08 pm Draft is no option. This is applied on faces - a nightmare because of toponaming.
You are right, that draft currently is a toponaming nightmare. But even more so would a non breaking replacement be very welcome. I am not sure, if draft is no option, because all of this would be done in a siingle operation. And there you have it in your own hands to use the right faces. If it is all done in a single op, it may work, if it is done in two it can break.

The same holds for the example with the different angles in both directions. While you are creating it, you can well iinsert the necessary seams.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Post Reply