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
[Sketcher] How to construct a tautochrone curve
Forum rules
and Helpful information
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!
Also, be nice to others! Read the FreeCAD code of conduct!
-
- Posts: 189
- Joined: Fri Sep 25, 2015 6:19 pm
Re: [Sketcher] How to construct a tautochrone curve
If you can describe this curve using equations then this macro may help: Macro 3D Parametric Curve.
-
- Veteran
- Posts: 3108
- Joined: Thu Sep 24, 2020 10:31 pm
- Location: Hawaii
- Contact:
Re: [Sketcher] How to construct a tautochrone curve
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
-
- Posts: 189
- Joined: Fri Sep 25, 2015 6:19 pm
Re: [Sketcher] How to construct a tautochrone curve
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...
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...
-
- Veteran
- Posts: 3108
- Joined: Thu Sep 24, 2020 10:31 pm
- Location: Hawaii
- Contact:
Re: [Sketcher] How to construct a tautochrone curve
Draft|Modification|Draft To Sketch will make a sketch if you need one.
Re: [Sketcher] How to construct a tautochrone curve
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")
Re: [Sketcher] How to construct a tautochrone curve
... 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 ?
I tried it (nearly with "compass and ruler"), besides it is said to be impossible.
First run and perhaps not exact ?
- Attachments
-
- Trochoide_2.FCStd
- FC.20.1
- (35.42 KiB) Downloaded 27 times
-
- Trochoide.FCStd
- FC.20.1
- (27.04 KiB) Downloaded 23 times
-
- Posts: 189
- Joined: Fri Sep 25, 2015 6:19 pm
Re: [Sketcher] How to construct a tautochrone curve
You guys are awesome!
Thank you!
Thank you!