sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    [Plugin] Polar line - 20110525

    Scheduled Pinned Locked Moved Plugins
    63 Posts 21 Posters 33.0k Views 21 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.
    • thomthomT Offline
      thomthom
      last edited by

      Yes, like that. πŸ˜„

      Thomas Thomassen β€” SketchUp Monkey & Coding addict
      List of my plugins and link to the CookieWare fund

      1 Reply Last reply Reply Quote 0
      • M Offline
        Matt666
        last edited by

        Thank you Edson and Thomthom !
        I really really don't understand...

        Can someone help me for this bug, please ?

        Frenglish at its best !
        My scripts

        1 Reply Last reply Reply Quote 0
        • thomthomT Offline
          thomthom
          last edited by

          I can have a look on my own Mac when I get home.
          Looks very weird. Does PC SU and MacSU use the same Ruby version?

          Have you tried placing () around lg * Math.cos(ang) . (just a wild guess)

          Thomas Thomassen β€” SketchUp Monkey & Coding addict
          List of my plugins and link to the CookieWare fund

          1 Reply Last reply Reply Quote 0
          • thomthomT Offline
            thomthom
            last edited by

            Hey, I notice you use $lg and then lg. Is it suppose to be two different things?

            Thomas Thomassen β€” SketchUp Monkey & Coding addict
            List of my plugins and link to the CookieWare fund

            1 Reply Last reply Reply Quote 0
            • M Offline
              Matt666
              last edited by

              @unknownuser said:

              Does PC SU and MacSU use the same Ruby version?
              I don't know, but I often have problems...

              @unknownuser said:

              I can have a look on my own Mac when I get home.
              Thank you !

              @unknownuser said:

              Hey, I notice you use $lg and then lg. Is it suppose to be two different things?
              I will look in the code... Thank you!

              Frenglish at its best !
              My scripts

              1 Reply Last reply Reply Quote 0
              • thomthomT Offline
                thomthom
                last edited by

                Got it nailed!

                It's all down to line 69:

                case Sketchup.active_model.options[0][2]
                

                On my mac it returned nil

                Your case switch doesn't account for that value so lg is passed on as a string.

                
                case Sketchup.active_model.options[0][2]
                    when 0;lg = result[0].to_f
                    when 1;lg = result[0].to_f.feet
                    when 2;lg = result[0].to_f.mm
                    when 3;lg = result[0].to_f.cm
                    when 4;lg = result[0].to_f.m
                end
                
                

                My fix was to add a default handler for the switch.

                
                case Sketchup.active_model.options[0][2]
                    when 0;lg = result[0].to_f
                    when 1;lg = result[0].to_f.feet
                    when 2;lg = result[0].to_f.mm
                    when 3;lg = result[0].to_f.cm
                    when 4;lg = result[0].to_f.m
                    else  ;lg = result[0].to_f
                end
                
                

                Not sure why line 69 return nil though, didn't look into that.

                Thomas Thomassen β€” SketchUp Monkey & Coding addict
                List of my plugins and link to the CookieWare fund

                1 Reply Last reply Reply Quote 0
                • M Offline
                  Matt666
                  last edited by

                  Ok cool !! Thank you for your bug research Thomthom !
                  I am pretty sure it works if you try this code below

                  Sketchup.active_model.options["UnitsOptions"]["LengthUnit"]
                  

                  can you try it please ?

                  For "pl" variable, no problem. "$pl" is used to reuse last number entered in the polarline window...

                  Frenglish at its best !
                  My scripts

                  1 Reply Last reply Reply Quote 0
                  • thomthomT Offline
                    thomthom
                    last edited by

                    I'll try it and report back.

                    Thomas Thomassen β€” SketchUp Monkey & Coding addict
                    List of my plugins and link to the CookieWare fund

                    1 Reply Last reply Reply Quote 0
                    • thomthomT Offline
                      thomthom
                      last edited by

                      Yes, that worked. πŸ‘

                      Thomas Thomassen β€” SketchUp Monkey & Coding addict
                      List of my plugins and link to the CookieWare fund

                      1 Reply Last reply Reply Quote 0
                      • M Offline
                        Matt666
                        last edited by

                        Thank you Thomthom!
                        I've updated the first post... Can you try it on Mac please? Thank you!

                        Frenglish at its best !
                        My scripts

                        1 Reply Last reply Reply Quote 0
                        • EdsonE Offline
                          Edson
                          last edited by

                          matt,

                          now nothing happens at all. not even the request for the first point appears.

                          edson mahfuz, architect| porto alegre β€’ brasil
                          http://www.mahfuz.arq.br

                          1 Reply Last reply Reply Quote 0
                          • M Offline
                            Matt666
                            last edited by

                            😒 😒 😒
                            Can you show me the error in the ruby console please?

                            Frenglish at its best !
                            My scripts

                            1 Reply Last reply Reply Quote 0
                            • EdsonE Offline
                              Edson
                              last edited by

                              the console window was filled with a lot of stuff. this is the last piece. if you need the rest, let me know.


                              Picture 13.png

                              edson mahfuz, architect| porto alegre β€’ brasil
                              http://www.mahfuz.arq.br

                              1 Reply Last reply Reply Quote 0
                              • M Offline
                                Matt666
                                last edited by

                                😳 😳
                                Excuse me Edson... A silly error... Shame on me !

                                http://msnsmileys.net/p/smileys/Popo/Shame.png

                                I updated the code...
                                Sorry !

                                Frenglish at its best !
                                My scripts

                                1 Reply Last reply Reply Quote 0
                                • EdsonE Offline
                                  Edson
                                  last edited by

                                  YESSSSSS! it does work!

                                  and thanks, matt, for the great scripts you have been creating. count on me anytime to help you with testing scripts on mac.

                                  edson mahfuz, architect| porto alegre β€’ brasil
                                  http://www.mahfuz.arq.br

                                  1 Reply Last reply Reply Quote 0
                                  • M Offline
                                    Matt666
                                    last edited by

                                    😍 😍 😍
                                    It does work, AT LAST !! Ouf... Thank you for your patience Edson!

                                    @unknownuser said:

                                    and thanks, matt, for the great scripts you have been creating.
                                    Thank you, Edson 😳

                                    @unknownuser said:

                                    count on me anytime to help you with testing scripts on mac.
                                    Ok, cool! There is also one only script that doesn't work on Mac... I'll try to do smt on it...

                                    Frenglish at its best !
                                    My scripts

                                    1 Reply Last reply Reply Quote 0
                                    • thomthomT Offline
                                      thomthom
                                      last edited by

                                      I got a Mac Mini at disposal on a OSX 10.4 system. Slow as heck, but works to see if it runs.

                                      Thomas Thomassen β€” SketchUp Monkey & Coding addict
                                      List of my plugins and link to the CookieWare fund

                                      1 Reply Last reply Reply Quote 0
                                      • M Offline
                                        Matt666
                                        last edited by

                                        Ok, Thank you Thomthom!

                                        Frenglish at its best !
                                        My scripts

                                        1 Reply Last reply Reply Quote 0
                                        • M Offline
                                          Matt666
                                          last edited by

                                          sorry Thomthom, but can you have a Mac look on this script, please?

                                          Frenglish at its best !
                                          My scripts

                                          1 Reply Last reply Reply Quote 0
                                          • thomthomT Offline
                                            thomthom
                                            last edited by

                                            @matt666 said:

                                            sorry Thomthom, but can you have a Mac look on this script, please?

                                            Sorry, dude! I completely forgot. I'll see if I can have a look at it tomorrow.

                                            Thomas Thomassen β€” SketchUp Monkey & Coding addict
                                            List of my plugins and link to the CookieWare fund

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

                                            Advertisement