sketchucation logo sketchucation
    • Login
    โ„น๏ธ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    [Plugin] DrawHelix14

    Scheduled Pinned Locked Moved Plugins
    44 Posts 20 Posters 48.6k Views 20 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A Offline
      ATYRAUTONY
      last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • pilouP Offline
        pilou
        last edited by

        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 ๐Ÿ˜‰

        Frenchy Pilou
        Is beautiful that please without concept!
        My Little site :)

        1 Reply Last reply Reply Quote 0
        • TIGT Online
          TIG Moderator
          last edited by

          @unknownuser said:

          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

          1 Reply Last reply Reply Quote 0
          • pilouP Offline
            pilou
            last edited by

            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

            Frenchy Pilou
            Is beautiful that please without concept!
            My Little site :)

            1 Reply Last reply Reply Quote 0
            • pilouP Offline
              pilou
              last edited by

              @ 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

              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'
              

              Frenchy Pilou
              Is beautiful that please without concept!
              My Little site :)

              1 Reply Last reply Reply Quote 0
              • simon le bonS Offline
                simon le bon
                last edited by

                @tig said:

                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

                .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 (

                .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 (

                .0 
                

                )code, this time the helix is drawn.

                4.5 rotations

                http://i274.photobucket.com/albums/jj245/Spendauballet/SketchUp/DrawHelix001.jpg

                Ouf! Hard time for new developper ๐Ÿ˜Ž

                simon

                1 Reply Last reply Reply Quote 0
                • dereiD Offline
                  derei
                  last edited by

                  can't you filter that ? the script to catch the vcb value and remove the leading zero in incompatible version of SU ?

                  DESIGNER AND ARTIST [DEREI.UK](http://derei.uk/l)

                  1 Reply Last reply Reply Quote 0
                  • TIGT Online
                    TIG Moderator
                    last edited by

                    @unknownuser said:

                    @ 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

                    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 < 7
                    changed to
                    if Sketchup.version.to_i < 7
                    will 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

                    1 Reply Last reply Reply Quote 0
                    • pilouP Offline
                      pilou
                      last edited by

                      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

                      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
                      

                      Frenchy Pilou
                      Is beautiful that please without concept!
                      My Little site :)

                      1 Reply Last reply Reply Quote 0
                      • pilouP Offline
                        pilou
                        last edited by

                        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

                        values = [300.mm, 300.mm, 100.mm, 5.0, 24]
                        
                        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'
                        

                        Frenchy Pilou
                        Is beautiful that please without concept!
                        My Little site :)

                        1 Reply Last reply Reply Quote 0
                        • TIGT Online
                          TIG Moderator
                          last edited by

                          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

                          1 Reply Last reply Reply Quote 0
                          • J Offline
                            Jim
                            last edited by

                            Thanks. I've made the changes and updated the download. The version works on SketchUp 6, 7, and 8 for me.

                            Hi

                            1 Reply Last reply Reply Quote 0
                            • TIGT Online
                              TIG Moderator
                              last edited by

                              Thinking about the earlier registry entry potentially messing integer and float, to be on the safe side you could add this

                                      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

                              1 Reply Last reply Reply Quote 0
                              • J Offline
                                Jim
                                last edited by

                                Had the same thought... thanks.

                                Hi

                                1 Reply Last reply Reply Quote 0
                                • pilouP Offline
                                  pilou
                                  last edited by

                                  Ok now that works like a charm in V6! ๐Ÿ˜Ž
                                  Bravo! ๐Ÿ‘
                                  And sorry for the inconvenience ๐Ÿ˜‰

                                  Frenchy Pilou
                                  Is beautiful that please without concept!
                                  My Little site :)

                                  1 Reply Last reply Reply Quote 0
                                  • simon le bonS Offline
                                    simon le bon
                                    last edited by

                                    Ok now that works like a charm in V6! ๐Ÿ˜Ž
                                    Bravo! ๐Ÿ‘

                                    (it is better if I don't touch even one line of code ๐Ÿ˜† )

                                    simon

                                    1 Reply Last reply Reply Quote 0
                                    • mitcorbM Offline
                                      mitcorb
                                      last edited by

                                      Hi:
                                      I tried to use DrawHelix14 last night in SU7 and on opening the program I got a load error.
                                      Text file copy of the error message:
                                      Error Loading File drawhelix14.rb
                                      C:/Program Files/Google/Google SketchUp 7/Plugins/drawhelix14.rb:1: syntax error
                                      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
                                      ^
                                      C:/Program Files/Google/Google SketchUp 7/Plugins/drawhelix14.rb:2: syntax error
                                      <html xmlns="http://www.w3.org/1999/xhtml">
                                      ^
                                      C:/Program Files/Google/Google SketchUp 7/Plugins/drawhelix14.rb:3: syntax error
                                      <head>
                                      ^
                                      C:/Program Files/Google/Google SketchUp 7/Plugins/drawhelix14.rb:5: syntax error
                                      <title xmlns="http://www.google.com/ns/jotspot">Download Attachment</title>
                                      ^
                                      C:/Program Files/Google/Google SketchUp 7/Plugins/drawhelix14.rb:6: syntax error
                                      <style xmlns="http://www.google.com/ns/jotspot">
                                      ^
                                      C:/Program Files/Google/Google SketchUp 7/Plugins/drawhelix14.rb:19: syntax error
                                      content: ".";
                                      ^
                                      C:/Program Files/Google/Google SketchUp 7/Plugins/drawhelix14.rb:70: syntax error
                                      <body xmlns="http://www.google.com/ns/jotspot">
                                      ^
                                      I probably did something wrong. I do have version 1.3

                                      I take the slow, deliberate approach in my aimless wandering.

                                      1 Reply Last reply Reply Quote 0
                                      • J Offline
                                        Jim
                                        last edited by

                                        When you go to download the file, right-click the link and select Save As, or Save Target As.

                                        The file you posted in the error is an html page - probably has the script embedded in it somewhere, but your browser doesn't know what to do with .rb files.

                                        Hi

                                        1 Reply Last reply Reply Quote 0
                                        • mitcorbM Offline
                                          mitcorb
                                          last edited by

                                          Thanks Jim for your quick reply.
                                          That is what I thought. As many plugins as I have downloaded and given others the same advice as yours, you'd think I would know better.
                                          I think I am divesting myself of good sense daily.

                                          I take the slow, deliberate approach in my aimless wandering.

                                          1 Reply Last reply Reply Quote 0
                                          • J Offline
                                            Jim
                                            last edited by

                                            @mitcorb said:

                                            I think I am divesting myself of good sense daily.

                                            I understand, believe me. ๐Ÿ˜†

                                            Hi

                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 3
                                            • 2 / 3
                                            • First post
                                              Last post
                                            Buy SketchPlus
                                            Buy SUbD
                                            Buy WrapR
                                            Buy eBook
                                            Buy Modelur
                                            Buy Vertex Tools
                                            Buy SketchCuisine
                                            Buy FormFonts

                                            Advertisement