by remus » Sun Oct 04, 2009 2:16 pm
A quick little plugin i put together. Its very basic Usage: draw->simple catenary curve, then rotate and scale the curve in to place. A small warning is also attached, ive used a method that can some times crash sketchup, although it hasnt done so during my testing. If i ever get round to learning how to make proper tools (in the ruby sense) i'll try and make it more point-and-click. And if your wondering what a catenary curve is, its the shape an unloaded string/chain/cable/wire will make when suspended between 2 points. e.g. power cables, washing lines etc. http://en.wikipedia.org/wiki/Catenary_curve
Last edited by thomthom on Tue Dec 08, 2009 9:49 pm, edited 1 time in total.
Reason: Just cleaning up and organizing the Plugin forum. Correcting [Plugin] tag
-
remus
-
- Posts: 8044
- Joined: Fri Nov 30, 2007 8:48 am
- Location: UK
- Name: remus
-
by JClements » Sun Oct 04, 2009 4:10 pm
Hey Remus: Next step is "chain maker" or "rope maker"..  User inputs parameters of a link or the name of an Link component and the links are strung properly on a series of connected Catenary curves.
John Illustrator Beaverton, Oregon
-

JClements
- Premium Member

-
- Posts: 955
- Joined: Wed Nov 14, 2007 4:32 pm
- Location: Portland/Beaverton, Oregon
- Name: JClements
- Operating system: Windows
- SketchUp version: 2016
- License type: Pro
- SketchUp use: engineering and mechanical design
- Level of SketchUp: Intermediate
by Khai » Sun Oct 04, 2009 4:16 pm
thank you  this is going to be very very useful..
-
Khai
-
- Posts: 618
- Joined: Sun Mar 15, 2009 4:53 pm
- Location: Onboard his TARDIS
- Name: Khai
- Operating system: Windows
- SketchUp version: 2017
- License type: Free/Make
- SketchUp use: architecture
- Level of SketchUp: Intermediate
by mitcorb » Sun Oct 04, 2009 4:22 pm
Yes, I'd vote for JClements idea. It would certainly keep the file small.
I take the slow, deliberate approach in my aimless wandering.
-

mitcorb
- Top SketchUcator
-
- Posts: 4007
- Joined: Sat Mar 22, 2008 2:32 pm
- Location: USA
- Name: mitcorb
- Operating system: Windows
- SketchUp version: 2016
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Intermediate
by thomthom » Sun Oct 04, 2009 4:47 pm
Ah. I was wondering when we'd see this plugin. I'm curious to look at the code. 
-

thomthom
- PluginStore Author

-
- Posts: 19332
- Joined: Tue Nov 13, 2007 12:47 pm
- Location: Trondheim, Norway
- Name: Thomas Thomassen
- Operating system: Windows
- SketchUp version: 2013
- License type: Pro
- SketchUp use: other
- Level of SketchUp: Advanced
-
by remus » Sun Oct 04, 2009 5:03 pm
its really nothing special thom. i was initially going for the whole point and click thing but i kept getting confused 
-
remus
-
- Posts: 8044
- Joined: Fri Nov 30, 2007 8:48 am
- Location: UK
- Name: remus
-
by Gaieus » Sun Oct 04, 2009 11:46 pm
And as for how to quickly model a catenary in SU, see this model in the Warehouse: http://sketchup.google.com/3dwarehouse/ ... revstart=0(but of course, this is not to lessen this cool plugin, Remus  )
-

Gaieus
-
- Posts: 27379
- Joined: Sat Oct 20, 2007 8:24 am
- Location: Pécs, Hungary
- Name: Csaba Pozsárkó
- Operating system: Windows
- SketchUp version: 2013
- License type: Pro
- SketchUp use: historical reconstruction
- Level of SketchUp: Advanced
-
by remus » Mon Oct 05, 2009 8:00 am
Fairly sure thats a parabola, not a catenary curve.
-
remus
-
- Posts: 8044
- Joined: Fri Nov 30, 2007 8:48 am
- Location: UK
- Name: remus
-
by Gaieus » Mon Oct 05, 2009 11:17 am
Is it really? Hm... I last studied maths more than 26 years ago. Anyway, I can model parabolas then!  Thanks! 
-

Gaieus
-
- Posts: 27379
- Joined: Sat Oct 20, 2007 8:24 am
- Location: Pécs, Hungary
- Name: Csaba Pozsárkó
- Operating system: Windows
- SketchUp version: 2013
- License type: Pro
- SketchUp use: historical reconstruction
- Level of SketchUp: Advanced
-
by remus » Mon Oct 05, 2009 11:32 am
Doubled checked on wikipedia and it seems it is a parabola. Part of the conic sections if you fancy investigating further.
-
remus
-
- Posts: 8044
- Joined: Fri Nov 30, 2007 8:48 am
- Location: UK
- Name: remus
-
by kwistenbiebel » Mon Oct 05, 2009 12:05 pm
Hi remus, that's a wonderful idea.(Didn't know the term Catenary though). By the way, could multiple Catenary curves define a tensile structure?
-
kwistenbiebel
-
- Posts: 2726
- Joined: Thu Nov 22, 2007 6:13 pm
by remus » Mon Oct 05, 2009 12:24 pm
You probably could, but i dont think it would be physically accurate. Catenary curves only describe lines with no forces (other than gravity) acting along their length.
I know that in simple cases like a suspension bridge the curve is a parabola, but i dont know if this would still be true for more complicated tensile structures.
-
remus
-
- Posts: 8044
- Joined: Fri Nov 30, 2007 8:48 am
- Location: UK
- Name: remus
-
by Gaieus » Mon Oct 05, 2009 12:26 pm
remus wrote:Doubled checked on wikipedia and it seems it is a parabola. Part of the conic sections if you fancy investigating further.
I believe you, Remus, truely. 
-

Gaieus
-
- Posts: 27379
- Joined: Sat Oct 20, 2007 8:24 am
- Location: Pécs, Hungary
- Name: Csaba Pozsárkó
- Operating system: Windows
- SketchUp version: 2013
- License type: Pro
- SketchUp use: historical reconstruction
- Level of SketchUp: Advanced
-
by remus » Mon Oct 05, 2009 12:33 pm
I just though other people might be interested (although i realise maths geeks are probably in short supply around here  )
-
remus
-
- Posts: 8044
- Joined: Fri Nov 30, 2007 8:48 am
- Location: UK
- Name: remus
-
by thomthom » Mon Oct 05, 2009 1:22 pm
I'm no math geek - but that cursed curve had me stumped when I wanted to make a chain/rope plugins.
I've still not looked at the code, but can it be used to specify two 3D points and the total length of the curve?
-

thomthom
- PluginStore Author

-
- Posts: 19332
- Joined: Tue Nov 13, 2007 12:47 pm
- Location: Trondheim, Norway
- Name: Thomas Thomassen
- Operating system: Windows
- SketchUp version: 2013
- License type: Pro
- SketchUp use: other
- Level of SketchUp: Advanced
-
by remus » Mon Oct 05, 2009 2:15 pm
2 3d points is fairly easy as long as the 2 points are level, if not you have to start messing around with numerical solutions and it all gets rather messy.
Its similarly difficult to specify a length if i remember correctly.
-
remus
-
- Posts: 8044
- Joined: Fri Nov 30, 2007 8:48 am
- Location: UK
- Name: remus
-
by thomthom » Mon Oct 05, 2009 2:43 pm
Yea, that's what I tried. Different heights. And also specifying length. Only solution to the length I could find was a method that did loop of approximation until it came within a given tolerance...
-

thomthom
- PluginStore Author

-
- Posts: 19332
- Joined: Tue Nov 13, 2007 12:47 pm
- Location: Trondheim, Norway
- Name: Thomas Thomassen
- Operating system: Windows
- SketchUp version: 2013
- License type: Pro
- SketchUp use: other
- Level of SketchUp: Advanced
-
by fredo6 » Tue Oct 06, 2009 6:35 pm
Remus,
I am glad you show the way to Users to get their own automation via Ruby. Obviously, Sketchup needs to be complemneted by some generic Rubies that does geometrical operations that SU does not do in native.
But Ruby is also a very convenient way for individual users to speed up their workflow with some adhoc, simple programming. It's a little bit like Excel macros. They are meant for users to help with a few lines of code. But of course, some specialists could also write complete applications with thousands of lines of VB Scripts for Excel and share them to a community of users.
Your program is 10 lines of code and does the work of creating a catenary curve. For the purpose of what it does for an individual user, it is very concise and elegantly written. Ruby is not very complex for simple things and you demonstrate it in your script.
Now, yes, for writing a general plugin drawing any catenary curve in 3D between 2 points, with options, live feeback and postedition, the script would have to go one level beyond, and may not be an easy task for an occasional programmer (but do not worry, there is also a strong community of script writers!).
So, I can only send you my support for showing what Ruby can do with a few lines of code, to automate repetitive tasks or make simple calculations.
Fredo
-

fredo6
- PluginStore Author

-
- Posts: 3891
- Joined: Mon Nov 12, 2007 9:07 pm
- Location: France
- Name: Fredo6
- Operating system: Windows
- SketchUp version: 2018
- License type: Pro
- SketchUp use: interior design
- Level of SketchUp: Intermediate
by tomot » Tue Oct 06, 2009 8:19 pm
remus wrote:I just though other people might be interested (although i realise maths geeks are probably in short supply around here  )
count me in the math geek column! great little program, Ive been using it to learn more about Ruby. - Code: Select all
=begin Simple Catenary Curve script
Author: Remus Knowles =end
module RTK
def self.simple_cat_curve
ents = Sketchup.active_model.active_entities pts = [] # add or delete interval to be evaluated intervals = [-3,-2.75,-2.5,-2.25,-2,-1.75,-1.5,-1.25,-1,-0.75,-0.5,-0.25,0,0.25,0.5,0.75,1,1.25,1.5,1.75,2,2.25,2.5,2.75,3]
intervals.each{|e| # main math formula, try x = (Math.sinh(e)), or (Math.sin(e)) x = (Math.cosh(e))
# pts.push([e,20,x]) entering 20 moves the curve along green axis 20 units # pts.push([e,x,0]) draws the curve in plan view # pts.push([x,0,e,]) draws the curve in elevation view
pts.push([x,10,e]) pts.push([x,0,e,]) pts.push([x,-10,e]) }
cat_curve = ents.add_curve(pts)
cat_curve_grp = ents.add_group(cat_curve)
end#method
end#module
UI.menu("Draw").add_item("Simple Catenary Curve") {RTK.simple_cat_curve}
my attached code documents some of the things I have tried
-
tomot
- PluginStore Author

-
- Posts: 706
- Joined: Mon Apr 07, 2008 12:18 am
- Operating system: Windows
- SketchUp version: 8
- License type: Free/Make
- SketchUp use: architecture
- Level of SketchUp: Advanced
-
by remus » Tue Oct 06, 2009 10:40 pm
Fred, thanks, it means a lot coming from someone of your experience.
Tomot, good effort on the mods, best way to start learning ruby in my opinion.
-
remus
-
- Posts: 8044
- Joined: Fri Nov 30, 2007 8:48 am
- Location: UK
- Name: remus
-
by CADAddict » Wed Oct 07, 2009 8:45 pm
Hey REmus, no need to be a Math Geek to find a use to it. Anytime someone needs to model lets say the electric highvoltage cables supported by high voltage towers, this comes to a use. Also for a more architecture realted topic, most of the Vaults designed by Antoni Gaudí's(the catalan architect author of the Sagrada familia in Barcelona)were actually inverted catenary curves, so anyone trying to model his buildings igh also find a use to it! Thanks a lot!
-
CADAddict
-
- Posts: 14
- Joined: Sun Feb 22, 2009 7:45 pm
by mitcorb » Mon Oct 19, 2009 2:45 pm
Hey, CADAddict: Glad you mentioned Antonio Gaudi's Familia Sagrada, because that is the first thing I thought of when someone questioned the usefulness of catenary curves, besides suspended cables in equilibrium. mitcorb
I take the slow, deliberate approach in my aimless wandering.
-

mitcorb
- Top SketchUcator
-
- Posts: 4007
- Joined: Sat Mar 22, 2008 2:32 pm
- Location: USA
- Name: mitcorb
- Operating system: Windows
- SketchUp version: 2016
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Intermediate
by simon le bon » Sat Nov 14, 2009 2:58 pm
Remus's Catenary suspension bridge 
taken in: Copy Array Along Path tool...have a look.( Catenary Curve for the general shape of the bridge. The ropes are handmade using Bezier Spline with only one intermediate point driven in order to simulate the weight of the rope. A remark to Remus: Your Catenary Curve is made with only 16 segments. It's probably too few in many cases. It would be better to add the choice of this number(  ) JClements wrote:Hey Remus: Next step is "chain maker" or "rope maker".. 
The first tool exists right now with courtesy of Chris Fullmer : [Plugin] Component Stringer  simon
-

simon le bon
-
- Posts: 1070
- Joined: Sat Jan 26, 2008 10:22 am
- Location: Chouy/ Picardie/ France
- Name: Simon Bonnet
by thomthom » Sat Nov 14, 2009 3:14 pm
simon le bon wrote:The first tool exists right now with courtesy of Chris Fullmer :[Plugin] Component Stringer
I think Remus is talking about a tool to simulate rope or chains - which is not what Chris' tool is doing.
-

thomthom
- PluginStore Author

-
- Posts: 19332
- Joined: Tue Nov 13, 2007 12:47 pm
- Location: Trondheim, Norway
- Name: Thomas Thomassen
- Operating system: Windows
- SketchUp version: 2013
- License type: Pro
- SketchUp use: other
- Level of SketchUp: Advanced
-
by remus » Sat Nov 14, 2009 8:19 pm
simon le bon wrote:A remark to Remus: Your Catenary Curve is made with only 16 segments. It's probably too few in many cases. It would be better to add the choice of this number(  )
I'll have a look at it 
-
remus
-
- Posts: 8044
- Joined: Fri Nov 30, 2007 8:48 am
- Location: UK
- Name: remus
-
by simon le bon » Sat Nov 14, 2009 8:24 pm
thomthom wrote:I think Remus is talking about a tool to simulate rope or chains - which is not what Chris' tool is doing.
Hi thomthom, You are rigth! I had probably been taken by the hurry of enjoyment. Chris's "Component Stringer" is a very cool tool, but intending to do a different job. We can make a chain with it but it very uneasy and far from perfection! TIG wrote:Make half chain link (U) and use this tool then edit that chain and copy/hand the U geometry into an O loop of say 2.2 the original length, now you have your links; us 'make unique' on one of the links, edit it and rotate its contents 90 degrees. Select every other link and replace with this rotated one... a chain... done.


In such case, it will be better to do this way: 
And for making a rope, I'm sure we can do a good job with our same Chris Fullmer's Shape Bender. *simon
-

simon le bon
-
- Posts: 1070
- Joined: Sat Jan 26, 2008 10:22 am
- Location: Chouy/ Picardie/ France
- Name: Simon Bonnet
by remus » Sat Nov 14, 2009 8:34 pm
Try this, it's untested so give us a shout if it's broken.
-
remus
-
- Posts: 8044
- Joined: Fri Nov 30, 2007 8:48 am
- Location: UK
- Name: remus
-
by simon le bon » Sat Nov 14, 2009 10:43 pm
Hi Remus, Something is wrong for me. "Simple Catenary Curve" opens and asks the number of segments (cool), but after validation, nothing happens.. *s
-

simon le bon
-
- Posts: 1070
- Joined: Sat Jan 26, 2008 10:22 am
- Location: Chouy/ Picardie/ France
- Name: Simon Bonnet
by remus » Sun Nov 15, 2009 9:56 am
Sorry, it was a silly bug as i was distracted while writing it last night. Hopefully this version should work.
-
remus
-
- Posts: 8044
- Joined: Fri Nov 30, 2007 8:48 am
- Location: UK
- Name: remus
-
by simon le bon » Mon Nov 16, 2009 12:34 am
Sorry Remus, Something is still wrong! The Catenary curve is drawn so small that I can't zoom on it. 
I have reloaded your first one to experiment FredoScale Strech tool to figure out something like my suspension bridge's ropes. seems not bad. I have no mathematic element to say if that remains a Catenary Curve. 
*simon
-

simon le bon
-
- Posts: 1070
- Joined: Sat Jan 26, 2008 10:22 am
- Location: Chouy/ Picardie/ France
- Name: Simon Bonnet
by Ad Machine » 5 minutes ago
-
Ad Machine
- Robot
-
- Posts: 2012
-
Return to Plugins
|