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.
    • M Offline
      Matt666
      last edited by

      Thank you 😉 😄

      @remus said:

      More update ideas: perhaps an option to draw the line on the plane of a selected face? it would make drawing weird lines a lot easier.

      Why not, but give an angle depending on what Trigonometric origin?
      Originally trigonometric drawing or side of the longest edge of the selected face ?

      @watkins said:

      Perhaps I'm being a little dense, but why would you want to rotate the line after creation?

      To creat a 3d polarline ! I think it's too complicated (not to develop, but calculate two angles in two different 2d plans). Or easier to rotate yourself after line creation.

      @unknownuser said:

      polar grid....

      Salut Malaise ! Qu'entends-tu par là ? what do you mean by this?

      Frenglish at its best !
      My scripts

      1 Reply Last reply Reply Quote 0
      • MALAISEM Offline
        MALAISE
        last edited by

        Salut Matt

        Je pensais aux autres systèmes de coordonnées ( cylindrique, polaire )
        Un maillage polaire au sens cartographique par exemple...

        Merci de ton attention

        Translation:
        I thought to polar grid like the one found on maps.
        MALAISE

        La Connaissance n'a de valeur que partagée

        1 Reply Last reply Reply Quote 0
        • Z Offline
          zhuangsuph
          last edited by

          [Plugin] Polar line

          1 Reply Last reply Reply Quote 0
          • CadFatherC Offline
            CadFather
            last edited by

            wow, can't believe i missed one of Matt's plugins! 😲 😍

            1 Reply Last reply Reply Quote 0
            • L Offline
              linea
              last edited by

              Matt

              👍 Simple but powerful.

              Thanks, I'm digging a big hole in anticipation of throwing out all my cad software.

              1 Reply Last reply Reply Quote 0
              • JClementsJ Offline
                JClements
                last edited by

                Matt:

                1st. Thanks!

                2nd. Seems to have a problem. I typed in " 100**'** " and it drew a line 8'4".

                  Perhaps the  %(#FF0040)[****'****]  character is the problem?
                

                Regards, John

                John | Illustrator | Beaverton, Oregon

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

                  @jclements said:

                  Perhaps the ' character is the problem?

                  Hi ! I think This plugin doesn't support Feet / Inch units... I will have a look ! 😉

                  Frenglish at its best !
                  My scripts

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

                    sorry, but it does not work for me on mac.

                    i click on the icon, it asks me to specify the first point, which i do. then a dialogue box appears for me to enter the length and the angle. i do do that and click OK. nothing happens!

                    what else should i do? any ideas?

                    edson mahfuz, architect| porto alegre • brasil
                    http://www.mahfuz.arq.br

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

                      Hum... Another Pac problem!! Damned. I don't know what's the problem, and I've no mac... Can you copy here the error in the ruby console please ?
                      Thank you...
                      Matt.

                      Frenglish at its best !
                      My scripts

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

                        here you have it.


                        Picture 6.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

                          I don't understand the problem... Again !! Grmbl.
                          Can you try line below in the ruby console, please ?

                          Math.cos(45.degrees)
                          

                          And these lines

                          a = Geom;;Point3d.new(12.5,12.5,25.2)
                          a[0]
                          a[1]
                          a[2]
                          

                          On each line, can you give me the results, please ?
                          Thank you again for your patience, Edson!

                          Frenglish at its best !
                          My scripts

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

                            is this what you wanted?


                            Picture 7.png

                            edson mahfuz, architect| porto alegre • brasil
                            http://www.mahfuz.arq.br

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

                              Edson: you wrote 0 = Geom:: and 1 = Geom:: . That's not what he wanted. Just type exactly what he listed.

                              First:

                              a = Geom;;Point3d.new(12.5,12.5,25.2)
                              

                              Then

                              a[0]
                              

                              and so on.

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

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

                                is this it?


                                Picture 8.png

                                edson mahfuz, architect| porto alegre • brasil
                                http://www.mahfuz.arq.br

                                1 Reply Last reply Reply Quote 0
                                • 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
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 2 / 4
                                            • First post
                                              Last post
                                            Buy SketchPlus
                                            Buy SUbD
                                            Buy WrapR
                                            Buy eBook
                                            Buy Modelur
                                            Buy Vertex Tools
                                            Buy SketchCuisine
                                            Buy FormFonts

                                            Advertisement