[Issue #6189] Surface to surface tangency

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
freecad-heini-1
Veteran
Posts: 7791
Joined: Tue Jan 07, 2014 11:10 am
Contact:

Re: Surface to surface tangency

Post by freecad-heini-1 »

vanuan wrote: Wed Sep 16, 2020 5:48 amAm I describing it correctly?
Yes.
vanuan wrote: Wed Sep 16, 2020 5:58 am This seems to be supported by Open Cascade:

https://dev.opencascade.org/doc/refman/ ... ction.html
Whow, great news.
vanuan wrote: Wed Sep 16, 2020 5:58 am The question is how it should be modeled in FreeCAD: should it be a new object representing the blend, a new "blend" operation or a simple surface which isn't recomputed when two other surfaces change.

Which workbench should it be? Appears to be applicable to the Surface workbench?
Please contact Werner Mayer, he has developed the Surface Workbench.
wmayer wrote:Ping
wmayer
Founder
Posts: 20319
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Surface to surface tangency

Post by wmayer »

Please contact Werner Mayer, he has developed the Surface Workbench.
No, I have adopted and extended it but it was started by a guy who quickly lost interest (as using OCC is quite ambitious).
See also:
https://forum.freecadweb.org/viewtopic.php?f=10&t=8045
https://forum.freecadweb.org/viewtopic.php?f=10&t=8297
https://forum.freecadweb.org/viewtopic.php?f=10&t=8488
https://forum.freecadweb.org/viewtopic.php?f=10&t=9526
User avatar
Pauvres_honteux
Posts: 728
Joined: Sun Feb 16, 2014 12:05 am
Location: Far side of the moon

Re: Surface to surface tangency

Post by Pauvres_honteux »

vanuan wrote: Tue Sep 15, 2020 3:21 pm ... what is surface tangency and what is the workflow from the user perspective.
.
I stumbled over this tangency problem when I tried to make a multi-section surface once upon a time.
It turns out that making a surface tangent to an already existing surface is, as of now, only possible when selecting an edge of an surface. This is the very culprit: to have a rock solid model one must utilize a common line/curve, not a surface edge. Further; this common line/edge is/will be used by other operations before and after surface creation. And it's a crucial start for really advanced strictly ruled models.
.
So the workflow could be as follows:
- Create line/curve in 3D-space. Extrude a surface from this line/curve. Note that the curve can be a 3D-curve.
- Create another line/curve somewhere else in 3D-space. Repeat the above.
- Click on first line/curve, then the extruded first surface, then tangency or curvature continuity.
- Click on second line/curve, then the extruded second surface, then tangency or curvature continuity.
.
See the pdf:s I created to explain the multi section surface workflow for a very simple example:
Pauvres_honteux wrote: Mon Oct 14, 2019 7:11 pm
Click on the tiny up-arrow to the right of ... wrote:

and check out "Tubes_in_space_1,2,3.pdf"
freecad-heini-1
Veteran
Posts: 7791
Joined: Tue Jan 07, 2014 11:10 am
Contact:

Re: Surface to surface tangency

Post by freecad-heini-1 »

On this topic I had made a comparison between PTC Creo and Freecad some time ago.
https://www.dailymotion.com/video/x6ahzc5
https://www.dailymotion.com/video/x6as1a7
User avatar
vanuan
Posts: 539
Joined: Wed Oct 24, 2018 9:49 pm

Re: Surface to surface tangency

Post by vanuan »

Pauvres_honteux wrote: Wed Sep 16, 2020 4:49 pm So the workflow could be as follows:
- Create line/curve in 3D-space. Extrude a surface from this line/curve. Note that the curve can be a 3D-curve.
- Create another line/curve somewhere else in 3D-space. Repeat the above.
- Click on first line/curve, then the extruded first surface, then tangency or curvature continuity.
- Click on second line/curve, then the extruded second surface, then tangency or curvature continuity.
So you're talking only about surfaces extruded linearly, not the free-form surfaces?
User avatar
Pauvres_honteux
Posts: 728
Joined: Sun Feb 16, 2014 12:05 am
Location: Far side of the moon

Re: Surface to surface tangency

Post by Pauvres_honteux »

vanuan wrote: Wed Sep 16, 2020 7:42 pm So you're talking only about surfaces extruded linearly, not the free-form surfaces?
.
All types of surfaces for tangency must of course be supported.
What I typed above was just an extreamly simple example.
.
Priority one is to have at least bezier surfaces working for tangency (C1 - continuity).
Priority two will be bezier + one parameter acceleration curvature (C2 - continuity).
Priority three will be bezier + multi parameter acceleration along the curvature (C3 - continuity).
Priority four will be nurbs + multi parameter acceleration along the curvature (C3 - continuity).
.
Here acceleration will be understood as the sideways force an imaginary particle feels when traveling along the simplified case of a straight line then an arc. While the imaginary particle travels along the straight line it doesn't feel any sideways forces. Exactly when it transits to the start of the arc it will experience a sideway force of magnitude 100%.
So the transition from zero sideforce to 100% sideforce is what we ultimately want to rule (manually set acceleration).
The distance over which this will happen is of course determined by the newly formed surface, in other words, the surface between the ruling surfaces.
User avatar
Pauvres_honteux
Posts: 728
Joined: Sun Feb 16, 2014 12:05 am
Location: Far side of the moon

Re: Surface to surface tangency

Post by Pauvres_honteux »

vanuan wrote:
.
Anything the community can do to aid you in your effort?
User avatar
Pauvres_honteux
Posts: 728
Joined: Sun Feb 16, 2014 12:05 am
Location: Far side of the moon

Re: Surface to surface tangency

Post by Pauvres_honteux »

vanuan wrote:
.
Did you throw in the towel?
User avatar
mnesarco
Posts: 475
Joined: Thu Mar 26, 2020 8:52 pm

Re: Surface to surface tangency

Post by mnesarco »

Pauvres_honteux wrote: Tue Sep 22, 2020 1:24 pm Did you throw in the towel?
I have been trying to achieve surface to surface tangency using OCCT (c++) but free documentation is very poor. The OCCT forum is quite steril, I believe it is doable using OCCT but it requires some obscure API that you can access only from paid support or from the OCCT Commercial platform.

Another approach is to develop the algorithm from scratch on top on OCCT fundation and modeling classes:
The basic idea is to connect both surfaces with bezier curves (It is very easy to control tangency with beziers) and then create some constrained filling based on that curves, but again it si very difficult to find the right documentation to achieve that. I have read a lot OCCT source code looking for a way to make it work. There are classes like GeomFill_ConstrainedFilling (https://old.opencascade.com/doc/occt-7. ... lling.html) but there are no working examples or documentation on how to use that.

Maybe someone with a better knowledge of OCCT internals have more luck.
User avatar
vanuan
Posts: 539
Joined: Wed Oct 24, 2018 9:49 pm

Re: Surface to surface tangency

Post by vanuan »

Pauvres_honteux wrote: Tue Sep 22, 2020 1:24 pm
vanuan wrote:
.
Did you throw in the towel?
I don't have enough math/geometry background. It would require me several months to only understand the basics of surface mathematics: https://en.wikipedia.org/wiki/Surface_(mathematics)
Then, I would need to understand how all the different surface types are modeled in FreeCAD.
Then I would need to design a model to represent the tangency operation both visually and parametrically.

Unfortunately, as of now, I don't have an interest in learning math. Currently, I'm focusing on making FreeCAD GUI more flexible and making existing types of DocumentObjects easier to use.
Post Reply