Curves 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!
fc_tofu
Posts: 654
Joined: Sun Jan 05, 2020 4:56 pm

Re: Curves workbench

Postby fc_tofu » Mon Apr 20, 2020 12:56 pm

hammax wrote:
Sun Apr 19, 2020 3:34 pm
… sorry fc_tofu, no retrieval. Too long ago.
Today I would do it in another way - and I have "only" FC.18.4.
Thank you.
I find @Chris_G's latest example of blend surface. "blendsurface.FCStd"
https://forum.freecadweb.org/download/f ... ?id=104829
My understanding is that,
The right tool to convert blender suface network into surface is Gordon surface, not Aproximation.
fc_tofu
Posts: 654
Joined: Sun Jan 05, 2020 4:56 pm

Re: Curves workbench

Postby fc_tofu » Mon Apr 20, 2020 2:10 pm

freecad-heini-1 wrote:
Mon Apr 20, 2020 7:29 am
No, unfortunately I have not found a possibility but I have asked several times that we can make Gordon surfaces tangential to neighbouring surfaces.
You can call me Tofu, and many thanks for your explanation.
So basically I know, G1 Tide bottle is impossilbe with CurvesWB for now.
But I am still not very clear about the clause in your translated sentence.
"we can make Gordon surfaces tangential to neighbouring surfaces", is this a fact or a question?
freecad-heini-1
Posts: 7369
Joined: Tue Jan 07, 2014 11:10 am
Contact:

Re: Curves workbench

Postby freecad-heini-1 » Mon Apr 20, 2020 5:06 pm

fc_tofu wrote:
Mon Apr 20, 2020 2:10 pm
"we can make Gordon surfaces tangential to neighbouring surfaces", is this a fact or a question?
It's a translation with:
https://www.deepl.com/en/translator
User avatar
microelly2
Posts: 4690
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Curves workbench

Postby microelly2 » Wed Apr 22, 2020 4:00 pm

fc_tofu wrote:
Mon Apr 20, 2020 12:49 am
freecad-heini-1 wrote:
Thu Dec 14, 2017 3:37 pm
Image
Hi, heini,
have you found a workaround to get a G1 surface Tide bottole?
Where I can get this model?
I want to see the reason why there is this trench.
clamped curves and surfaces must be smooth. https://pages.mtu.edu/~shene/COURSES/cs ... -type.html
I think there is a hard border which can be eliminated.
fc_tofu
Posts: 654
Joined: Sun Jan 05, 2020 4:56 pm

Re: Curves workbench

Postby fc_tofu » Wed Apr 22, 2020 5:08 pm

microelly2 wrote:
Wed Apr 22, 2020 4:00 pm
Where I can get this model?
Discussion:
https://forum.freecadweb.org/viewtopic ... &start=100

https://forum.freecadweb.org/viewtopic. ... 62#p204162

Sample file:
https://www.dropbox.com/s/5d4tbbjqalvwy ... fcstd?dl=0

https://forum.freecadweb.org/download/file.php?id=49055

This topic was posted in 2017, when @Chris_G told this is a limiation.
I am just curious, have some workaround been found during the last 3 years.
User avatar
microelly2
Posts: 4690
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Curves workbench

Postby microelly2 » Thu Apr 23, 2020 10:14 am

fc_tofu wrote:
Wed Apr 22, 2020 5:08 pm

https://forum.freecadweb.org/download/file.php?id=49055

This topic was posted in 2017, when @Chris_G told this is a limiation.
I am just curious, have some workaround been found during the last 3 years.
To get a smooth border the tangents must be perpendicular to the mirror plane (yz).
I do this by given the 2nd and last but ones poles row the same y values as the first and last rows have.
The change is minimal but surfaceand mirror are now tangent.
dp_04_23_001.png
dp_04_23_001.png (208.16 KiB) Viewed 414 times
here the model and the script

tide_bottle3_mod.fcstd
(106.34 KiB) Downloaded 9 times

Code: Select all


f=App.ActiveDocument.Approximastion_Curve.Shape.Face1
c=f.Surface

poles=c.getPoles()
uk = c.getUKnots()
mu = c.getUMultiplicities()
ud = c.UDegree
uperiodic = c.isUPeriodic
vk = c.getVKnots()
mv = c.getVMultiplicities()
vd = c.VDegree
vperiodic = c.isVPeriodic
poles=c.getPoles()

polesa=np.array(poles)
polesb=polesa.swapaxes(0,1)

# polesb=np.round(polesb,1)

polesb[1,:,1]=polesb[0,:,1]
polesb[-2,:,1]=polesb[-1,:,1]


polesc=polesb.swapaxes(0,1)
 
sf=Part.BSplineSurface()
sf.buildFromPolesMultsKnots(polesc,mu,mv,uk,vk,False,False,ud,vd)

a=FreeCAD.ActiveDocument.getObject("ShapeA")
if a is None:
	a=FreeCAD.ActiveDocument.addObject("Part::Feature","ShapeA")

a.Shape=sf.toShape()
fc_tofu
Posts: 654
Joined: Sun Jan 05, 2020 4:56 pm

Re: Curves workbench

Postby fc_tofu » Thu Apr 23, 2020 4:21 pm

microelly2 wrote:
Thu Apr 23, 2020 10:14 am
To get a smooth border the tangents must be perpendicular to the mirror plane (yz).
I do this by given the 2nd and last but ones poles row the same y values as the first and last rows have.
The change is minimal but surfaceand mirror are now tangent.
I donn't know coding, but I know this is a cheerful workaround and deserves a celebration.
Thank you.
User avatar
microelly2
Posts: 4690
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Curves workbench

Postby microelly2 » Thu Apr 23, 2020 6:54 pm

fc_tofu wrote:
Thu Apr 23, 2020 4:21 pm
microelly2 wrote:
Thu Apr 23, 2020 10:14 am
To get a smooth border the tangents must be perpendicular to the mirror plane (yz).
I do this by given the 2nd and last but ones poles row the same y values as the first and last rows have.
The change is minimal but surfaceand mirror are now tangent.
I donn't know coding, but I know this is a cheerful workaround and deserves a celebration.
Thank you.
You can do it by design of the rib sketches without coding: the endings of the arcs must be perpendicular to the yz plane.
fc_tofu
Posts: 654
Joined: Sun Jan 05, 2020 4:56 pm

Re: Curves workbench

Postby fc_tofu » Fri Apr 24, 2020 10:36 am

microelly2 wrote:
Thu Apr 23, 2020 6:54 pm
You can do it by design of the rib sketches without coding: the endings of the arcs must be perpendicular to the yz plane.
In your way, I can got a G1 mirrored surface now. Thank you!

Another question. If you check mirrored surface in "Object Property >View > Lighting = One Side", you will find Mirror command (both PartWB and DraftWB) donnot correct surface normal.
So, after Boolean Union, we finally get a polysurface with adjacent reversed normal. But it looks weird.
fsc_2020-04-24_183014.jpg
fsc_2020-04-24_183014.jpg (20.63 KiB) Viewed 313 times
In this case, PartWB >Reverse shape can be used before Union command to get consistent normals between adjacent faces.

But "Reverse shape" command is crappy for now, it can only handle objects which LCS loates at world origin.
https://forum.freecadweb.org/viewtopic. ... 78#p384478

So, just be careful.
User avatar
microelly2
Posts: 4690
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Curves workbench

Postby microelly2 » Fri Apr 24, 2020 11:18 am

The better way to create such volumes (tubes) is to see them as variant of a torus.
ribs are closed and the surface is cyclic in both directions.See an example here.
https://youtu.be/sWlaE4i2MAQ
There is no need of mirror and normalizing faces.