by Jim » Sat Dec 04, 2010 6:43 pm
This is a enhanced version of Peter Brown's DrawHelix13 script. Main improvements are: * Input box now uses the current model units. * Previous values are saved between each use. It is meant to replace the drawhelix13.rb file, but both can be installed without conflict. Download (right-click, select Save As) drawhelix14.rb
Last edited by Jim on Thu Dec 09, 2010 3:27 pm, edited 3 times in total.
Hi
-
Jim
- Global Moderator
-
- Posts: 4678
- Joined: Mon Nov 12, 2007 10:13 pm
- Location: ohio
- Name: Jim
- Operating system: Windows
- SketchUp version: 2017
- License type: Pro
- SketchUp use: hobby
- Level of SketchUp: Intermediate
-
by dedmin » Sat Dec 04, 2010 7:16 pm
-
dedmin
-
- Posts: 925
- Joined: Thu Oct 02, 2008 10:40 pm
by Rich O Brien » Sat Dec 04, 2010 7:22 pm
Thanks Jim!
-

Rich O Brien
- Administrator
-
- Posts: 13359
- Joined: Fri Oct 31, 2008 9:05 am
- Location: Ireland
- Operating system: Windows
- SketchUp version: 2023
- License type: Pro
- SketchUp use: engineering and mechanical design
- Level of SketchUp: Advanced
by shura » Sat Dec 04, 2010 7:28 pm
Thank you Jim, useful improvement!
-

shura
-
- Posts: 376
- Joined: Wed Jan 21, 2009 12:43 am
- Name: Alexander
- Operating system: Windows
- License type: Pro
- SketchUp use: interior design
- Level of SketchUp: Intermediate
by Bob James » Sat Dec 04, 2010 10:38 pm
Thanks for the improvement!
i7-4930K 3.4Ghz, 2x GTX780 6GB, 32GB DDR3-1600 ECC, OCZ Vertex 4 500GB, WD Black 3TB, 32TB NAS, 4x 27" Monitors, SpaceMouse Pro, X-keys XK-60
-

Bob James
- Premium Member

-
- Posts: 1239
- Joined: Fri Jan 18, 2008 9:29 pm
- Location: Lompoc, CA, USA
- Name: Robert James
- Operating system: Windows
- SketchUp version: 2018
- License type: Pro
- SketchUp use: engineering and mechanical design
- Level of SketchUp: Intermediate
by utiler » Sun Dec 05, 2010 4:28 am
+1 Jim... simple is best!!!!!!
purpose/expression/purpose/....
-

utiler
- Top SketchUcator
-
- Posts: 2432
- Joined: Wed Nov 14, 2007 11:35 am
- Location: Queensland, Australia
- Name: Andrew
- Operating system: Windows
- SketchUp version: 2013
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
by Jim » Sun Dec 05, 2010 1:26 pm
You're welcome. The small things can make all the difference.
Hi
-
Jim
- Global Moderator
-
- Posts: 4678
- Joined: Mon Nov 12, 2007 10:13 pm
- Location: ohio
- Name: Jim
- Operating system: Windows
- SketchUp version: 2017
- License type: Pro
- SketchUp use: hobby
- Level of SketchUp: Intermediate
-
by Gaieus » Sun Dec 05, 2010 1:29 pm
Jim wrote:The small things can make all the difference.
True. Thanks Jim! 
-

Gaieus
-
- Posts: 26832
- 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 pilou » Sun Dec 05, 2010 1:34 pm
Small is beautiful 
-

pilou
- Top SketchUcator
-
- Posts: 22862
- Joined: Wed Jan 23, 2008 10:33 pm
- Name: Pilou
- Operating system: Windows
- SketchUp version: 2017
- License type: Free/Make
- SketchUp use: hobby
- Level of SketchUp: Advanced
-
by PeterCharles » Fri Dec 31, 2010 2:10 pm
Jim wrote:This is a enhanced version of Peter Brown's DrawHelix13 script. Main improvements are: * Input box now uses the current model units. * Previous values are saved between each use. It is meant to replace the drawhelix13.rb file, but both can be installed without conflict. Download (right-click, select Save As) drawhelix14.rb
There must be life in my old dog yet if someone thought to improve it. 
-
PeterCharles
-
- Posts: 224
- Joined: Sat Nov 17, 2007 4:47 pm
by Jim » Fri Dec 31, 2010 8:25 pm
Hi Peter,
Sure, it has plenty of life - I just made it a bit more friendly. Hope you don't mind the update.
Hi
-
Jim
- Global Moderator
-
- Posts: 4678
- Joined: Mon Nov 12, 2007 10:13 pm
- Location: ohio
- Name: Jim
- Operating system: Windows
- SketchUp version: 2017
- License type: Pro
- SketchUp use: hobby
- Level of SketchUp: Intermediate
-
by mitcorb » Fri Dec 31, 2010 11:19 pm
Thanks, Jim.
I take the slow, deliberate approach in my aimless wandering.
-

mitcorb
- Top SketchUcator
-
- Posts: 4002
- 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 PeterCharles » Sun Jan 02, 2011 12:46 pm
Jim wrote:Hi Peter,
Sure, it has plenty of life - I just made it a bit more friendly. Hope you don't mind the update.
You have my blessing to improve it in what ever way you can. 
-
PeterCharles
-
- Posts: 224
- Joined: Sat Nov 17, 2007 4:47 pm
by ATYRAUTONY » Thu Jan 06, 2011 8:43 am
Hi nice tool but is it possible to draw a helix that is not a whole number of turns for example 1.5 I have tried and nothing is drawn.
-
ATYRAUTONY
-
- Posts: 1
- Joined: Tue Nov 16, 2010 11:51 am
by pilou » Thu Jan 06, 2011 10:44 am
Yes you must enter an "Integer" number So cut your volume at the end of the process  Make 3 turns and cut at the middle 
-

pilou
- Top SketchUcator
-
- Posts: 22862
- Joined: Wed Jan 23, 2008 10:33 pm
- Name: Pilou
- Operating system: Windows
- SketchUp version: 2017
- License type: Free/Make
- SketchUp use: hobby
- Level of SketchUp: Advanced
-
by TIG » Thu Jan 06, 2011 10:50 am
Pilou wrote:Yes you must enter an "Integer" number So cut your volume at the end of the process  Make 3 turns and cut at the middle 
It's easily fixed by adjusting the code in the .rb file... on line #23 [edit with Notepad.exe or equivalent plain-text editor - NOT a wrodprocessor] change values = [300.mm, 300.mm, 100.mm, 5, 24]into values = [300.mm, 300.mm, 100.mm, 5.0, 24]then save. Now you can enter decimal values like 1.5 ... The original code froze it as an 'integer' [default=5] and therefore prevented 'partial turn' values being entered... BUT since the rest of the code doesn't rely on it being an 'integer' there's no problems with making it a 'float'... I already had that tweaked in the previous version in my installation...
TIG
-

TIG
- Global Moderator
-
- Posts: 20370
- Joined: Mon Nov 12, 2007 7:24 pm
- Location: Northumbria UK
- Name: TIG
- Operating system: Windows
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
by pilou » Thu Jan 06, 2011 11:11 am
Better and more generalist indeed  And always amazing as just 2 signs can change something! We are few things in the univers, all is inside decimals  By Francesco de Comité  pi.jpg
-

pilou
- Top SketchUcator
-
- Posts: 22862
- Joined: Wed Jan 23, 2008 10:33 pm
- Name: Pilou
- Operating system: Windows
- SketchUp version: 2017
- License type: Free/Make
- SketchUp use: hobby
- Level of SketchUp: Advanced
-
by pilou » Thu Jan 06, 2011 12:48 pm
@ TIG I am in V6 Curious I have an old version Draw Helix 13 make your 5.0 changment inside : works fine I load the new DrawHelix14 nothing is drawing  (same result with your changment) I have this in the Ruby console - Code: Select all
Error: #<ArgumentError: wrong number of arguments(2 for 1)> C:/Program Files/Google/Google SketchUp 6/Plugins/drawhelix14.rb:68:in `start_operation' C:/Program Files/Google/Google SketchUp 6/Plugins/drawhelix14.rb:68:in `drawhelix' C:/Program Files/Google/Google SketchUp 6/Plugins/drawhelix14.rb:78 C:/Program Files/Google/Google SketchUp 6/Plugins/drawhelix14.rb:78:in `call'
-

pilou
- Top SketchUcator
-
- Posts: 22862
- Joined: Wed Jan 23, 2008 10:33 pm
- Name: Pilou
- Operating system: Windows
- SketchUp version: 2017
- License type: Free/Make
- SketchUp use: hobby
- Level of SketchUp: Advanced
-
by simon le bon » Thu Jan 06, 2011 12:50 pm
TIG wrote:It's easily fixed by adjusting the code in the .rb file... on line #23 [edit with Notepad.exe or equivalent plain-text editor - NOT a wrodprocessor] change values = [300.mm, 300.mm, 100.mm, 5, 24] into values = [300.mm, 300.mm, 100.mm, 5.0, 24] then save. Now you can enter decimal values like 1.5 ...
I'm very proud to annouce that this - Code: Select all
.0
added, is my very first rubby scripting  (and may be also the last  ) And then Oh! the problems begin  1)With or without this new code, I discover that DrawHelix14 doesn't work with my Su6 2)DrawHelix14 works fine with my Su7 but the new code ( - Code: Select all
.0
) doesn't work! (if a decimal value is entered, no helix is drawn_ if an Integer value is entered: works fine) 3)If I come back in Su6 to DawHelix13_fr and add the ( - Code: Select all
.0
)code, this time the helix is drawn. 4.5 rotations 
Ouf! Hard time for new developper simon
-

simon le bon
-
- Posts: 1070
- Joined: Sat Jan 26, 2008 10:22 am
- Location: Chouy/ Picardie/ France
- Name: simon le bon
by pilou » Thu Jan 06, 2011 12:52 pm
Cool to see that is the same problem  PS It's the same for the New Double Line! Don't work inside the V6  When press Enter walls are not drawn ! same error message in the Ruby console - Code: Select all
Error: #<ArgumentError: wrong number of arguments(2 for 1)> C:/Program Files/Google/Google SketchUp 6/Plugins/dline2.rb:157:in `start_operation' C:/Program Files/Google/Google SketchUp 6/Plugins/dline2.rb:157:in `onReturn' C:/Program Files/Google/Google SketchUp 6/Plugins/dline2.rb:157
Last edited by pilou on Thu Jan 06, 2011 1:10 pm, edited 3 times in total.
-

pilou
- Top SketchUcator
-
- Posts: 22862
- Joined: Wed Jan 23, 2008 10:33 pm
- Name: Pilou
- Operating system: Windows
- SketchUp version: 2017
- License type: Free/Make
- SketchUp use: hobby
- Level of SketchUp: Advanced
-
by derei » Thu Jan 06, 2011 1:02 pm
can't you filter that ? the script to catch the vcb value and remove the leading zero in incompatible version of SU ?
-

derei
-
- Posts: 846
- Joined: Tue Nov 16, 2010 1:48 pm
- Name: derei
- Operating system: Windows
- SketchUp version: 2015
- License type: Free/Make
- SketchUp use: product design
- Level of SketchUp: Advanced
-
by TIG » Thu Jan 06, 2011 1:08 pm
Pilou wrote:@ TIG I am in V6 Curious I have an old version Draw Helix 13 make your 5.0 changment inside : works fine I load the new DrawHelix14 nothing is drawing  (same result with your changment) I have this in the Ruby console - Code: Select all
Error: #<ArgumentError: wrong number of arguments(2 for 1)> C:/Program Files/Google/Google SketchUp 6/Plugins/drawhelix14.rb:68:in `start_operation' C:/Program Files/Google/Google SketchUp 6/Plugins/drawhelix14.rb:68:in `drawhelix' C:/Program Files/Google/Google SketchUp 6/Plugins/drawhelix14.rb:78 C:/Program Files/Google/Google SketchUp 6/Plugins/drawhelix14.rb:78:in `call'
Line #65 if Sketchup.version_number.to_i < 7changed to if Sketchup.version.to_i < 7will work in SUp v6 too ! Simple typo by Jim meant that you always got a version number in the tens of thousands and not a simple 6, 7 or 8 etc so it would always be > 7 and then try to start_operation with an extra argument and break the tool 
TIG
-

TIG
- Global Moderator
-
- Posts: 20370
- Joined: Mon Nov 12, 2007 7:24 pm
- Location: Northumbria UK
- Name: TIG
- Operating system: Windows
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
by pilou » Thu Jan 06, 2011 1:17 pm
Works now for the Draw Helix 14 in the V6 but now it's your modification 5.0 who don't works in the Draw Helix 14 ! (V6)  I have that - Code: Select all
values = [300.mm, 300.mm, 100.mm, 5.0, 24]
- Code: Select all
Error: #<ArgumentError: invalid value for Integer: "5.5"> C:/Program Files/Google/Google SketchUp 6/Plugins/drawhelix14.rb:31:in `inputbox' C:/Program Files/Google/Google SketchUp 6/Plugins/drawhelix14.rb:31:in `drawhelix' C:/Program Files/Google/Google SketchUp 6/Plugins/drawhelix14.rb:78 C:/Program Files/Google/Google SketchUp 6/Plugins/drawhelix14.rb:78:in `call'
-

pilou
- Top SketchUcator
-
- Posts: 22862
- Joined: Wed Jan 23, 2008 10:33 pm
- Name: Pilou
- Operating system: Windows
- SketchUp version: 2017
- License type: Free/Make
- SketchUp use: hobby
- Level of SketchUp: Advanced
-
by TIG » Thu Jan 06, 2011 2:17 pm
OK looks like float and string clash ? I assume the edited line #23 is clearly values = [300.mm, 300.mm, 100.mm, 5.0, 24] with no string delimter "" or '' around anything... Perhaps your JLF::DrawHelix Registry entry is screwed or locked on the last used 'intger' values? You could delete it... BUT unless you are confident about messing around within a PC's Registry and risking disaster... then I suggest this safer fix... Temporarily disable reading the Registry - go to line #24 v = Sketchup.read_default(reg_key, "values") and add a leading # so it doesn't load at all #v = Sketchup.read_default(reg_key, "values") If you get an error also add a temporary line after it v=nil Run the tool once and close SUp, then remove that # etc from the .rb and retry - it should now be using the last entered values you used which are 'float'...
Also - in passing I now note that in line #36 there is angle = 2*3.14159/sections it would be better as angle = 360.degrees/sections as the over approximated value of 'pi' could produce minor inaccuracies otherwise...
TIG
-

TIG
- Global Moderator
-
- Posts: 20370
- Joined: Mon Nov 12, 2007 7:24 pm
- Location: Northumbria UK
- Name: TIG
- Operating system: Windows
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
by Jim » Thu Jan 06, 2011 2:20 pm
Thanks. I've made the changes and updated the download. The version works on SketchUp 6, 7, and 8 for me.
Hi
-
Jim
- Global Moderator
-
- Posts: 4678
- Joined: Mon Nov 12, 2007 10:13 pm
- Location: ohio
- Name: Jim
- Operating system: Windows
- SketchUp version: 2017
- License type: Pro
- SketchUp use: hobby
- Level of SketchUp: Intermediate
-
by TIG » Thu Jan 06, 2011 2:33 pm
Thinking about the earlier registry entry potentially messing integer and float, to be on the safe side you could add this - Code: Select all
unless v.nil? values = eval(v) values[0] = values[0].to_l values[1] = values[1].to_l values[2] = values[2].to_l values[3] = values[3].to_f values[4] = values[4].to_i end
so that older values' classes are always correctly set?
TIG
-

TIG
- Global Moderator
-
- Posts: 20370
- Joined: Mon Nov 12, 2007 7:24 pm
- Location: Northumbria UK
- Name: TIG
- Operating system: Windows
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
by Jim » Thu Jan 06, 2011 2:36 pm
Had the same thought... thanks.
Hi
-
Jim
- Global Moderator
-
- Posts: 4678
- Joined: Mon Nov 12, 2007 10:13 pm
- Location: ohio
- Name: Jim
- Operating system: Windows
- SketchUp version: 2017
- License type: Pro
- SketchUp use: hobby
- Level of SketchUp: Intermediate
-
by pilou » Thu Jan 06, 2011 5:11 pm
Ok now that works like a charm in V6! Bravo! And sorry for the inconvenience 
-

pilou
- Top SketchUcator
-
- Posts: 22862
- Joined: Wed Jan 23, 2008 10:33 pm
- Name: Pilou
- Operating system: Windows
- SketchUp version: 2017
- License type: Free/Make
- SketchUp use: hobby
- Level of SketchUp: Advanced
-
by simon le bon » Thu Jan 06, 2011 9:09 pm
Ok now that works like a charm in V6! Bravo! (it is better if I don't touch even one line of code  ) simon
-

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