[Sketcher] How to construct a tautochrone curve

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!
Post Reply
Spindoctor
Posts: 189
Joined: Fri Sep 25, 2015 6:19 pm

[Sketcher] How to construct a tautochrone curve

Post by Spindoctor »

Hello!

I want to construct a part that i believe(!) would benefit from having a tautochrone curve shaped "bowl". Once the tautochrone curve is constructed in the sketcher, it should be easy to rotate and form a bowl out of it.

But I have no idea on how to construct a tautochrone curve in the first place.

Can you help me? :?

References:
https://youtu.be/eBc827pwKf0
https://en.wikipedia.org/wiki/Tautochrone_curve
User avatar
NewJoker
Veteran
Posts: 3017
Joined: Sun Oct 11, 2020 7:49 pm

Re: [Sketcher] How to construct a tautochrone curve

Post by NewJoker »

If you can describe this curve using equations then this macro may help: Macro 3D Parametric Curve.
edwilliams16
Veteran
Posts: 3106
Joined: Thu Sep 24, 2020 10:31 pm
Location: Hawaii
Contact:

Re: [Sketcher] How to construct a tautochrone curve

Post by edwilliams16 »

NewJoker wrote: Thu Sep 29, 2022 4:43 pm If you can describe this curve using equations then this macro may help: Macro 3D Parametric Curve.
Attachments
tautochrone.FCStd
(19.45 KiB) Downloaded 40 times
Spindoctor
Posts: 189
Joined: Fri Sep 25, 2015 6:19 pm

Re: [Sketcher] How to construct a tautochrone curve

Post by Spindoctor »

Thank you @NewJoker and @edwilliams16!

This is surely a huge step forward in what I would like to achieve. I still need to wrap my head around the mathematics, but I might be able to do that.

However, what I still don't get is how to transfer the object to a Sketch. I tried the ShapeBinder, but the result looks somehow weird...
edwilliams16
Veteran
Posts: 3106
Joined: Thu Sep 24, 2020 10:31 pm
Location: Hawaii
Contact:

Re: [Sketcher] How to construct a tautochrone curve

Post by edwilliams16 »

Draft|Modification|Draft To Sketch will make a sketch if you need one.
Syres
Veteran
Posts: 2893
Joined: Thu Aug 09, 2018 11:14 am

Re: [Sketcher] How to construct a tautochrone curve

Post by Syres »

This macro creates the curve multiple times (in this case 8) as part of cycloid gear directly in Sketcher, the large radius being location (PCD) from the centre and small radius being the arc to generate the curve. Hopefully it'll give you an alternative or a starting point for learning to automate Sketches:

Code: Select all

import FreeCAD
import Sketcher
import time

start_time = time.time()
LargeRadius = 160.0
SmallRadius = 20.0
nbPas = 480
excentrique = 12.0
EpiCycloidAngle = 0.0

doc = FreeCAD.newDocument()
ActiveSketch = doc.addObject("Sketcher::SketchObject")
# Large line length= sum of the radiuses
ActiveSketch.addGeometry(Part.LineSegment(App.Vector(10,23,0),App.Vector(27.354679,55.016010,0)),False)
ActiveSketch.addConstraint(Sketcher.Constraint('Coincident',0,1,-1,1)) 
c=ActiveSketch.addConstraint(Sketcher.Constraint('Distance',0,LargeRadius+SmallRadius))
ActiveSketch.setVirtualSpace(c, True) 
La=ActiveSketch.addConstraint(Sketcher.Constraint('Angle',-1,1,0,1,2*3.141592653589793*EpiCycloidAngle/360.0))
ActiveSketch.setVirtualSpace(La, True) 
#ActiveSketch.setDatum(La,App.Units.Quantity('0.000000 deg'))

# arc de cercle small radius
ActiveSketch.addGeometry(Part.ArcOfCircle(Part.Circle(App.Vector(25,31,0),App.Vector(0,0,1),12),-2,0.4),False)
c=ActiveSketch.addConstraint(Sketcher.Constraint('PointOnObject',1,1,0))  # start of the Arc on the large line
ActiveSketch.setVirtualSpace(c, True) 
ActiveSketch.addConstraint(Sketcher.Constraint('Coincident',1,3,0,2)) #center at end of the large line
c=ActiveSketch.addConstraint(Sketcher.Constraint('Radius',1,SmallRadius))
ActiveSketch.setVirtualSpace(c, True) 

#  Small line
ActiveSketch.addGeometry(Part.LineSegment(App.Vector(26,35,0),App.Vector(34,38,0)),False)
ActiveSketch.addConstraint(Sketcher.Constraint('Coincident',0,2,2,1)) #start at the end of the large line
c=ActiveSketch.addConstraint(Sketcher.Constraint('Distance',2,excentrique))
ActiveSketch.setVirtualSpace(c, True)
c=ActiveSketch.addConstraint(Sketcher.Constraint('PointOnObject',1,2,2))
ActiveSketch.setVirtualSpace(c, True)
Sa=ActiveSketch.addConstraint(Sketcher.Constraint('Angle',0,2,2,1,0)) #creer contrainte a 0 (radian))
ActiveSketch.setVirtualSpace(Sa, True)          # make the angle constraint invisible to improve drawing understanding  

n=0
Sv= ActiveSketch.Geometry[2].EndPoint
Lad = (360.000000/nbPas)
Sad = Lad * (LargeRadius/SmallRadius)
if True:
  while n < nbPas :
    n += 1
    ActiveSketch.setDatum(La,App.Units.Quantity(str(Lad*n+EpiCycloidAngle) + ' deg'))
    ActiveSketch.setDatum(Sa,App.Units.Quantity(str(Sad*n) + ' deg'))
    Ev= ActiveSketch.Geometry[2].EndPoint
    ActiveSketch.addGeometry(Part.LineSegment(Sv,Ev),False)
    Sv=Ev
    
    #clean up of the geometries used to buid the epicycloid
  ActiveSketch.delGeometry(2)
  ActiveSketch.delGeometry(1)
  ActiveSketch.delGeometry(0)

print("--- %s seconds ---" % (time.time() - start_time))
Gui.SendMsgToActiveView("ViewFit")
User avatar
hammax
Veteran
Posts: 1985
Joined: Thu Jan 19, 2017 5:03 pm
Location: Ammersee DE

Re: [Sketcher] How to construct a tautochrone curve

Post by hammax »

... how to construct => in Sketcher?
I tried it (nearly with "compass and ruler"), besides it is said to be impossible.
First run and perhaps not exact ?

Trochoide.PNG
Trochoide.PNG (29.94 KiB) Viewed 503 times
Attachments
Trochoide_2.FCStd
FC.20.1
(35.42 KiB) Downloaded 27 times
Trochoide.FCStd
FC.20.1
(27.04 KiB) Downloaded 23 times
Spindoctor
Posts: 189
Joined: Fri Sep 25, 2015 6:19 pm

Re: [Sketcher] How to construct a tautochrone curve

Post by Spindoctor »

You guys are awesome!

Thank you!
Post Reply