SketchUcation Plugin Store

 

 

[Plugin] WireTool (Catenary) (1.4.1) – updated 06.03.2013

[Plugin] WireTool (Catenary) (1.4.1) – updated 06.03.2013

Postby Aerilius » Sun May 27, 2012 3:05 am

This Plugin allows to draw physically accurate wires and ropes (catenary curves) between two points with only two clicks.

preview.png

ae_WireTool_1_4_1.rbz

Version: 1.4.1

Date: 06.03.2013

Usage:
(Menu) Plugins → Draw Wires

  • Type a number + s to change the number of curve segments:
    24s
  • Type a number + % to set an arc length (relative to the distance between source and target point):
    120%
  • Type a length to set a fixed arc length:
    72.5m
    30.66"

History:
version 1.4.1: 06.03.2013
- added Spanish translation
- fixed non-convergent numerical approximation for curve lengths near 100% of distance
version 1.4.0: 01.03.2013
- converted into a SketchUp Extension
- image and cursor added
version 1.3: 03.06.2012
- fixed wrong segment length (only noticeable with big sag like 200%)
- changed segments to have equal angles (visually best result, but not all segments have the same length)
- added optional parameter @@segment_distribution_mode in the script to toggle back to equal length segments (edit the ruby file)
version 1.2: 30.05.2012
- now all segments have equal arc length (no more equal x length)
- error with translation in activate didn't properly activate the tool
- @state=0 fixed
version 1.1: 27.05.2012
- translations
- better precision (changed threshold for numerical calculations)
version 1.0: 27.05.2012
Please, register (free) to access all the attachments on the forums.
Last edited by Aerilius on Wed Mar 06, 2013 12:27 pm, edited 10 times in total.
Aerilius
Top SketchUcator
 
Posts: 1133
Joined: Tue Dec 23, 2008 11:00 pm
Location: Kaiserslautern

Re: [Plugin] WireTool (Catenary)

Postby Krisidious » Sun May 27, 2012 5:00 am

sweet thanks.
Kristoff Rand
Home Designer
Custom House Plans with a Point of View
User avatar
Krisidious
 
Posts: 3262
Joined: Mon Oct 22, 2007 1:52 pm
Location: Springfield, Missouri. USA
Name: Krisidious
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] WireTool (Catenary)

Postby Bob James » Sun May 27, 2012 8:21 am

I can really use this! Thank you. :thumb:
"If you don't plan ahead you'll be at the mercy of those that do" - Ashleigh Brilliant

"Bad is not good until worse happens" - Bob James
User avatar
Bob James
Premium Member
Premium Member
 
Posts: 608
Joined: Fri Jan 18, 2008 9:29 pm
Location: Lompoc, CA, USA
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: other
Level of SketchUp: Intermediate

Re: [Plugin] WireTool (Catenary)

Postby thomthom » Sun May 27, 2012 12:18 pm

Aerilius wrote:Type a length to set a fixed arc length:

!!! I tried on this a couple of years ago! Never worked out how to do a fixed length curve. I need to snoop around in your code. I wanted to make a tool that would anchor the end point to other geometry so when you moved of the the object it was attached it the curve would update.
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom
Global Moderator
 
Posts: 17673
Joined: Tue Nov 13, 2007 12:47 pm
Location: Trondheim, Norway
Name: thomthom
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] WireTool (Catenary)

Postby iichiversii » Sun May 27, 2012 12:24 pm

Now this is a great plugin, thanks :thumb:
Bring on the Rain...
User avatar
iichiversii
Premium Member
Premium Member
 
Posts: 978
Joined: Mon Apr 27, 2009 6:45 pm
Location: Tipperary, Ireland
Name: iichiversii
Operating system: Windows
SketchUp version: 8
License type: Free/Make
SketchUp use: game and/or sci-fi modelling
Level of SketchUp: Intermediate

Re: [Plugin] WireTool (Catenary)

Postby gullfo » Sun May 27, 2012 2:39 pm

very cool! this is one of the more useful shapes in acoustics!
User avatar
gullfo
 
Posts: 101
Joined: Mon Dec 10, 2007 5:19 am
Location: Old Tappan, NJ USA
Name: Glenn Stanton
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] WireTool (Catenary)

Postby thomthom » Sun May 27, 2012 3:03 pm

gullfo wrote:very cool! this is one of the more useful shapes in acoustics!

That I wasn't aware of. Guess I need to read up on it again.
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom
Global Moderator
 
Posts: 17673
Joined: Tue Nov 13, 2007 12:47 pm
Location: Trondheim, Norway
Name: thomthom
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] WireTool (Catenary)

Postby mitcorb » Sun May 27, 2012 3:54 pm

Another good tool concept. By the way, Remus Knowles has another version in the Plugins Index.
I take the slow, deliberate approach in my aimless wandering.
User avatar
mitcorb
Top SketchUcator
 
Posts: 3408
Joined: Sat Mar 22, 2008 2:32 pm
Location: USA
Name: Tim
Operating system: Windows
SketchUp version: 8
License type: Free/Make
SketchUp use: architecture
Level of SketchUp: Intermediate

Re: [Plugin] WireTool (Catenary)

Postby iichiversii » Sun May 27, 2012 7:06 pm

mitcorb wrote:Another good tool concept. By the way, Remus Knowles has another version in the Plugins Index.


Any idea what his version is called?
Bring on the Rain...
User avatar
iichiversii
Premium Member
Premium Member
 
Posts: 978
Joined: Mon Apr 27, 2009 6:45 pm
Location: Tipperary, Ireland
Name: iichiversii
Operating system: Windows
SketchUp version: 8
License type: Free/Make
SketchUp use: game and/or sci-fi modelling
Level of SketchUp: Intermediate

Re: [Plugin] WireTool (Catenary)

Postby Aerilius » Sun May 27, 2012 7:22 pm

Remus' plugin is the Simple Catenary Curve. It "just" calculates the curve for a given set of 17 points but it put me on the right path to look on Wikipedia after I had a paper full of integrals that didn't want get further simplified.
Aerilius
Top SketchUcator
 
Posts: 1133
Joined: Tue Dec 23, 2008 11:00 pm
Location: Kaiserslautern

Re: [Plugin] WireTool (Catenary)

Postby urgen » Sun May 27, 2012 8:35 pm

HA!...cool idea.thanks Aerilius :thumb:
--pupil forever...------
User avatar
urgen
 
Posts: 624
Joined: Mon Nov 12, 2007 10:06 pm

Re: [Plugin] WireTool (Catenary)

Postby nektares » Tue May 29, 2012 5:35 am

I always did this with splines, this is a much better and precise way to do it, Thank you!
nektares
 
Posts: 101
Joined: Fri Jun 20, 2008 3:38 pm

Re: [Plugin] WireTool (Catenary)

Postby sdmitch » Tue May 29, 2012 3:38 pm

When I tried the plugin, I kept getting a canatnary drawn from the origin to my first pick point. Adding a @state = 0 to the def initialize method fixed this problem.
Nothing is worthless, it can always be used as a bad example.

http://sdmitch.blogspot.com/
User avatar
sdmitch
 
Posts: 617
Joined: Wed Mar 02, 2011 9:21 pm
Name: Sam
Operating system: Windows
SketchUp version: 8
License type: Free/Make
SketchUp use: hobby
Level of SketchUp: Beginner

Re: [Plugin] WireTool (Catenary)

Postby Aerilius » Tue May 29, 2012 4:37 pm

Hi Sam,
thanks for the tip. I wonder why this happens, although the initialize method does not have @state=0, this should be set when the activate method calls reset.
Is someone else having this problem?
Aerilius
Top SketchUcator
 
Posts: 1133
Joined: Tue Dec 23, 2008 11:00 pm
Location: Kaiserslautern

Re: [Plugin] WireTool (Catenary)

Postby massimo » Tue May 29, 2012 5:13 pm

Is someone else having this problem?

Yes the same here. Thanks for the plugin btw. :thumb:
User avatar
massimo
Global Moderator
 
Posts: 1314
Joined: Thu Mar 19, 2009 10:52 am
Location: Italy
Name: Massimo Siracusa
Operating system: Windows
SketchUp version: 7
License type: Pro
SketchUp use: other
Level of SketchUp: Intermediate

Re: [Plugin] WireTool (Catenary)

Postby thomthom » Tue May 29, 2012 5:30 pm

create_geometry and draw_geometry can be refactored into one method that returns an array of point3d objects - the only difference between these methods are the final statement. DRY
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom
Global Moderator
 
Posts: 17673
Joined: Tue Nov 13, 2007 12:47 pm
Location: Trondheim, Norway
Name: thomthom
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] WireTool (Catenary)

Postby Dave R » Tue May 29, 2012 6:00 pm

I didn't experience the same thing that Sam reported.
Inspecting mirrors is a job I could easily see myself doing.
User avatar
Dave R
Global Moderator
 
Posts: 9018
Joined: Tue Nov 13, 2007 11:52 pm
Location: SE Minnesota
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: woodworking
Level of SketchUp: Advanced

Re: [Plugin] WireTool (Catenary)

Postby gullfo » Tue May 29, 2012 10:42 pm

i added the @state=0 and it made a difference in terms of being able to select the first point. very nice tool!
User avatar
gullfo
 
Posts: 101
Joined: Mon Dec 10, 2007 5:19 am
Location: Old Tappan, NJ USA
Name: Glenn Stanton
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] WireTool (Catenary)

Postby Dave R » Tue May 29, 2012 10:57 pm

So why don't I have this same problem? I didn't modify the script and it works fine for me.
Inspecting mirrors is a job I could easily see myself doing.
User avatar
Dave R
Global Moderator
 
Posts: 9018
Joined: Tue Nov 13, 2007 11:52 pm
Location: SE Minnesota
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: woodworking
Level of SketchUp: Advanced

Re: [Plugin] WireTool (Catenary)

Postby wind-borne » Tue May 29, 2012 11:13 pm

Dave R wrote:So why don't I have this same problem? I didn't modify the script and it works fine for me.


Which version are you using?
initial version works fine for me, updated version moves to origin.
"To read between the lines was easier than to follow the text."OSX 10.8.3 _ _ _ _ _ SU 8.0.16845 pro
User avatar
wind-borne
Premium Member
Premium Member
 
Posts: 152
Joined: Thu Sep 17, 2009 4:05 am
Location: HI

Re: [Plugin] WireTool (Catenary)

Postby Dave R » Tue May 29, 2012 11:19 pm

That would explain it. I didn't catch that there was an update because the thread title wasn't edited to show that as is SOP here.
Inspecting mirrors is a job I could easily see myself doing.
User avatar
Dave R
Global Moderator
 
Posts: 9018
Joined: Tue Nov 13, 2007 11:52 pm
Location: SE Minnesota
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: woodworking
Level of SketchUp: Advanced

Re: [Plugin] WireTool (Catenary)

Postby Dave R » Wed May 30, 2012 12:15 am

So now I've updated the plugin and added the line as mentioned. I get some rather strange behavior now. See the video.

Inspecting mirrors is a job I could easily see myself doing.
User avatar
Dave R
Global Moderator
 
Posts: 9018
Joined: Tue Nov 13, 2007 11:52 pm
Location: SE Minnesota
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: woodworking
Level of SketchUp: Advanced

Re: [Plugin] WireTool (Catenary)

Postby TIG » Wed May 30, 2012 12:33 am

I have the original version [that works] if anyone wants it... :?
TIG
User avatar
TIG
Global Moderator
 
Posts: 14002
Joined: Mon Nov 12, 2007 7:24 pm
Location: Northumbria UK
Name: TIG
Operating system: Windows
SketchUp version: 2013
License type: Pro
SketchUp use: architecture
Level of SketchUp: Advanced

Re: [Plugin] WireTool (Catenary)

Postby Dave R » Wed May 30, 2012 12:34 am

I guess I'd be interested.
Inspecting mirrors is a job I could easily see myself doing.
User avatar
Dave R
Global Moderator
 
Posts: 9018
Joined: Tue Nov 13, 2007 11:52 pm
Location: SE Minnesota
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: woodworking
Level of SketchUp: Advanced

Re: [Plugin] WireTool (Catenary)

Postby raineysky » Wed May 30, 2012 12:44 am

I would very much like to have it if it makes rope. I tried it but got results like Dave shows in the video.
raineysky
 
Posts: 96
Joined: Fri Sep 09, 2011 6:46 pm
Location: Louisiana
Name: Paul
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: other
Level of SketchUp: Intermediate

Re: [Plugin] WireTool (Catenary) — updated 30.05.2012

Postby Aerilius » Wed May 30, 2012 8:42 am

Tools normally don't have weird behavior without reason. Running it with the Ruby console open gives often more definable results.
So I found and fixed an unobvious bug with the translations that stirred up all methods and I changed that the x-width of segments is variable to give always the same segment length.
Last edited by Aerilius on Thu May 31, 2012 4:32 pm, edited 1 time in total.
Aerilius
Top SketchUcator
 
Posts: 1133
Joined: Tue Dec 23, 2008 11:00 pm
Location: Kaiserslautern

Re: [Plugin] WireTool (Catenary) — updated 30.05.2012

Postby Dave R » Wed May 30, 2012 10:22 am

That apparently fixed it. Thank you.
Inspecting mirrors is a job I could easily see myself doing.
User avatar
Dave R
Global Moderator
 
Posts: 9018
Joined: Tue Nov 13, 2007 11:52 pm
Location: SE Minnesota
Operating system: Windows
SketchUp version: 8
License type: Pro
SketchUp use: woodworking
Level of SketchUp: Advanced

Re: [Plugin] WireTool (Catenary) — updated 30.05.2012

Postby McGyver » Thu May 31, 2012 4:30 pm

This is very cool! Thank you!



Edited to add- This is REALLY cool! I was just messing around with it and it works great for something I was making. THANKS!
McGyver
 
Posts: 115
Joined: Wed Feb 04, 2009 5:46 pm

Re: [Plugin] WireTool (Catenary) — updated 30.05.2012

Postby Michaelv » Sat Jun 02, 2012 7:25 pm

Great Thanks.

There was another catenary tool (and other geometric curves too) here:
viewtopic.php?t=41310

I needed to make them like this though.

See below however, the first segment is much longer and they become smaller as they go on the curve:
Please, register (free) to access all the attachments on the forums.
Michaelv
 
Posts: 95
Joined: Wed Mar 03, 2010 11:02 pm
Name: Michael

Re: [Plugin] WireTool (Catenary) — updated 03.06.2012

Postby Aerilius » Sun Jun 03, 2012 10:36 pm

@Michaelv: Thanks for noticing this! It was not much visible with little sagging (110%) but with big sagging. Sorry that it took some time (it's not easy to do math with curve lengths).
I fixed it now.

I also thought about the problem and find that the corners/endpoints a even less noticeable when I use equal angles between the segments. If you prefer equal segment lengths, you can change the parameter @@segments_distribution_mode to 1 inside the script.
Aerilius
Top SketchUcator
 
Posts: 1133
Joined: Tue Dec 23, 2008 11:00 pm
Location: Kaiserslautern

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago

Not a Premium Member yet? Check out the great time-limited deal we are offering.

Ad Machine
Robot
 
Posts: 2012

Next

Return to Plugins

Who is online

Users browsing this forum: Bing [Bot], brisbane, guenz, Kami10 and 7 guests