[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!
Post Reply
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 »

Interesting thought saso!
Perhaps someone with programming skills can have a peek at the code to see if it can be made to work as I showed in these three pdf:s
(click on the tiny up-arrow to the right of "wrote")
Pauvres_honteux wrote: Mon Oct 14, 2019 7:11 pm For the interested ; this is how it's done in CATIA:

Tubes_in_spaaace_1.pdf
Tubes_in_spaaace_2.pdf
Tubes_in_spaaace_3.pdf
User avatar
saso
Veteran
Posts: 1920
Joined: Fri May 16, 2014 1:14 pm
Contact:

Re: Surface to surface tangency

Post by saso »

maybe this video can give some info on the internals of the surface continuity

https://www.youtube.com/watch?v=vJvpajL-6aU
https://en.wikipedia.org/wiki/Smoothnes ... d_surfaces

see also links in this older topic https://forum.freecadweb.org/viewtopic. ... 96#p377008
Last edited by saso on Fri Sep 25, 2020 9:48 pm, edited 2 times in total.
User avatar
mnesarco
Posts: 446
Joined: Thu Mar 26, 2020 8:52 pm

Re: Surface to surface tangency

Post by mnesarco »

saso wrote: Fri Sep 25, 2020 12:15 pm Does not the silk WB https://github.com/edwardvmills/Silk provide some of the methods how to do this, with the difference that it implements a very manual workflow to set it up, so the thing to develop would be to automate this and change from using sketches to some internal control curves... ? :|

microelly2 also has developed some methods to do this in his workbenches, but mixing nodes workflow in to standard surfacing is not the way to do it, it has to be a property of the standard surfacing tools...
Silk WB looks amazing, great resource to learn.
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 »

Please just make sure the surface creation tool takes curves/lines as arguements.
Expressed differently; does not demand approximated curves/lines for surface creation.
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Surface to surface tangency

Post by wmayer »

This creation method is now available with git commit 3a8a6aae1b67

This method is already available since 2017 in the Surface wb. Internally it doesn't use BRepOffsetAPI_MakeFilling but BRepFill_Filling. The class BRepOffsetAPI_MakeFilling is anyway only a wrapper for BRepFill_Filling which does all the algorithmic part.

When talking about continuity the best what I have ever got with BRepFill_Filling was G1. According to its documentation it should be able to handle C0, G1 or G2 but I never got the latter.
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 »

wmayer wrote: Sat Sep 26, 2020 2:50 pm This creation method is now available with git commit 3a8a6aae1b67
.
Can't wait till I can lay my hands on it !
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 »

This is how far I could get (with present wb, i.e. without werners magic commit) without resorting to approximated curves/lines.
This was done with Part workbench and Curves workbench.
It was a looot of clicking...
.
Arbitrary_four_sided_surface.png
Arbitrary_four_sided_surface.png (46.96 KiB) Viewed 2071 times
.
To have it working by the book, one must be able to force the sovereign surfaces to be tangent to the planes at each end (could not get it to work). And the surface creation type for them shall be "multi section surface" (in this case only two sections is used).
The empty space in the "rectangle" will be of the surface creation type "fill" (could not get that to work either), which I guess is a nurbs surface? Or can a bezier surface satisfy four arbitrary curves with tangency conditions along all four curves?
.
For larger and more complex areas, just repeat the "Arbitrary four sided surface" but skip the one side and replace it with one of the previously created curves/sovereign surfaces.
.
Everything is governed with two points:
- Vertex_1a_The_no_1_sovereign (under Curve_1 / Corner_1a)
- Vertex_2a_The_no_2_sovereign (under Curve_2 / Corner_2a)
Attachments
Arbitrary_four_sided_surface.FCStd
(41.51 KiB) Downloaded 48 times
wmayer
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Surface to surface tangency

Post by wmayer »

Pauvres_honteux wrote: Sat Sep 26, 2020 3:45 pm
wmayer wrote: Sat Sep 26, 2020 2:50 pm This creation method is now available with git commit 3a8a6aae1b67
.
Can't wait till I can lay my hands on it !
With this code snippet you can create the section curves as in the example:

Code: Select all

import math
c = Part.Circle()
c.Radius=50
c = c.trim(0, math.pi)

e1 = Part.Ellipse()
e1.Center = (0, 0, 75)
e1.MajorRadius = 30
e1.MinorRadius = 5
e1 = e1.trim(0, math.pi)

e2 = Part.Ellipse()
e2.Center = (0, 0, 100)
e2.MajorRadius = 20
e2.MinorRadius = 5
e2 = e2.trim(0, math.pi)
Part.show(c.toShape())
Part.show(e1.toShape())
Part.show(e2.toShape())
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 »

Now we only need the illusive tangency constraint at the ends (no wmayer magic yet, must wait for the next AppImage build).
Here a file to take to the next level, i.e. make the sweep tangent to the blue surfaces (profiles from wmayers code snippet above):
.
Part:
Sweep_end_tangency_Part.png
Sweep_end_tangency_Part.png (52.75 KiB) Viewed 2036 times
Sweep_end_tangency_Part.FCStd
(11.68 KiB) Downloaded 52 times
.
PartDesign:
Sweep_end_tangency_PartDesign.png
Sweep_end_tangency_PartDesign.png (48.03 KiB) Viewed 2036 times
Sweep_end_tangency_PartDesign.FCStd
(22.19 KiB) Downloaded 60 times
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 »

wmayer wrote: Sat Sep 26, 2020 2:50 pm ... available with git commit 3a8a6aae1b67
In what AppImage-release will this commit pop up?
As of this moment in time, the latest AppImage reads 0.19.22492.
.
And under what function/clickable icon did you put it?
Post Reply