I can confirm, that this was indeed my intention. And I agree that it would be appreciated, if loft can be improved, but that's another story.adrianinsaval wrote: ↑Mon Jan 17, 2022 12:46 am this is what I've been trying to tell you and so have david and chris, this method is not applicable to Loft
[finished] project: Making Part Extrude taking care of inner structure
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: project: Making Part Extrude taking care of inner structure
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: project: Making Part Extrude taking care of inner structure
It is not dismissing but not understanding since the thread jumps around.adrianinsaval wrote: ↑Mon Jan 17, 2022 12:46 am I don't like to be that guy but really: this is what I've been trying to tell you and so have david and chris, this method is not applicable to Loft but you have just dismissed it every time apparently without trying to comprehend what we were proposing.
I find this thread very confusing because what do we want?:
- a method to make Part Extrude handle inner wires
But here are debates about shells being splines or not. Then proposals are made which do not keep the existing functionality of Part Extrude. But the topic here is to keep all functionality of Part Extrude PLUS the inner wire handling.
I am open for every proposal but it must fulfill the goal. Now I had a closer look at David's PR and see that it cannot be used for Loft. But the Extrude feature is actually a loft through 2 or 3 sections. Since every shape can be extruded (e.g. a circular B-Spline), this functionality must be kept. There are tons of existing CAD files around using Part Extrude so an improved Extrude must be able to handle them all and cannot cut functionality.
Re: project: Making Part Extrude taking care of inner structure
We completely agree on this one, and the goal is to improve Pad/Extrude.
The difference between your approach and what David has made is:Now I had a closer look at David's PR and see that it cannot be used for Loft. But the Extrude feature is actually a loft through 2 or 3 sections. Since every shape can be extruded (e.g. a circular B-Spline), this functionality must be kept. There are tons of existing CAD files around using Part Extrude so an improved Extrude must be able to handle them all and cannot cut functionality.
- You want to have an implementation where every pad is a special loft. That Loft would create plane faces and cones whereever possible.
That would even allow B-spline edges in angled pads/extrudes, which is currently not possible. - The other approach comes from the other side: do as much as possible using methods where we know in advance that plane faces and cones can do the job. And if that's not possible, e.g. due to B-spline edges involved, then a Loft is used. David had talked about a loft fallback solution. In that case Loft could remain completely untouched.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: project: Making Part Extrude taking care of inner structure
Part Extrude does this already. We cannot change this without breaking existing documents. So it is not about what I want.
But the topic of this thread it to take the existing Extrude feature, keep all its functionality and fix the inner wire handling. So when the loft is untouched, we don't get the inner wire handling fixed.chrisb wrote: ↑Mon Jan 17, 2022 6:17 am [*]The other approach comes from the other side: do as much as possible using methods where we know in advance that plane faces and cones can do the job. And if that's not possible, e.g. due to B-spline edges involved, then a Loft is used. David had talked about a loft fallback solution. In that case Loft could remain completely untouched.
So we divide here into two branches:
Branch A: the initial topic
Branch B: in case we can use Drafts, do this instead of a loft
To sort this out, PR https://github.com/FreeCAD/FreeCAD/pull/5367 does Branch A. This works now :
When this is in, I would like if David could make a PR with his Draft method where he uses the loft as fallback. @ david, please make the PR for Part Extrude.
Concerning PD Pad/Pocket, as I agreed with wmayer, it should use the code of Part Extrude, but before an infrastructure PR is necessary. Therefore we focus here on Part Extrude purposely.
Re: project: Making Part Extrude taking care of inner structure
Not completely:TheMarkster wrote: ↑Tue Jan 11, 2022 5:20 pm With this change (setting solid to false on line 533) it works well for me on OCCT 7.5.2:
- the inner wires must get the opposite offset to make the feature useful in practice (molds etc.)
- it fails if an inner wires is a circle (single-edge wire). This is the case if e.g. a sketch is not a compound but a shape consisting of different wires.
I found now a suitable workaround and quick tests show for me that PR https://github.com/FreeCAD/FreeCAD/pull/5367 works now as it should.
Re: project: Making Part Extrude taking care of inner structure
Thanks to @adrianinsaval I found out that my concept of taking the existing PD Loft code fails when there are several solids as results.uwestoehr wrote: ↑Mon Jan 17, 2022 12:25 pm I found now a suitable workaround and quick tests show for me that PR https://github.com/FreeCAD/FreeCAD/pull/5367 works now as it should.
I implemented now the approach that also @realthunder uses - create the extrude solid by cut operations. This works also for tricky cases like this one:
Please try out the PR and give feedback. (The PR contains some commented-out debug code that i will remove of course later.)
Re: project: Making Part Extrude taking care of inner structure
The PR is in master.
Now also nestings to several levels are supported:
Now also nestings to several levels are supported:
Re: project: Making Part Extrude taking care of inner structure
Nice!
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: project: Making Part Extrude taking care of inner structure
A report shows that real sketch points are not handled: https://forum.freecadweb.org/viewtopic.php?f=3&t=65825
Re: project: Making Part Extrude taking care of inner structure
Please keep this thread clean to keep its focus. This thread is about making Part Extrude taking care of inner structure. Straight extrusion is not touched.kisolre wrote: ↑Sun Jan 30, 2022 6:44 pm A report shows that real sketch points are not handled: https://forum.freecadweb.org/viewtopic.php?f=3&t=65825