sketchucation logo sketchucation
    • Login
    🛣️ Road Profile Builder | Generate roads, curbs and pavements easily Download

    [REQ] Mix plugins to make windows better

    Scheduled Pinned Locked Moved Plugins
    11 Posts 4 Posters 2.1k Views 4 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.
    • T Offline
      toxicvoxel
      last edited by

      What could be useful is if there was a generic lib for a series of GET functions (getPt, getPts, GetAngle (with protractor), getDistance, getpath etc.) that could be used by all developers in a consistent way to return select input to functions and dialogs.

      1 Reply Last reply Reply Quote 0
      • bagateloB Offline
        bagatelo
        last edited by

        I trying to do make myself what I want for this situation, and Sketchup has show me crazy behavior. When I write, for exemplo, 2 * 200, sketchup does not show me 400 as result, but 508. I think Sketchup thinks "2" is inches, not units. What is happening?

        While the cat's away, the mice will play

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

          Sketchup's internal units are inches. Always. But 2 * 200.mm 😉

          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

            You seem to use a lot of global variables? Any reason for that? could potentially cause conflict.

            But globals aside:

            Sketchup uses inches internally. It assumes that all numbers given is in inches.

            If you type 200 - then SU assumes 200 inches. If you want it to be in mm - then you must type 200.mm
            The numeric class has several methods to convert to and from different units: http://code.google.com/intl/nb/apis/sketchup/docs/ourdoc/numeric.html

            When you type 200.mm - then you get a variable of the Length class: http://code.google.com/intl/nb/apis/sketchup/docs/ourdoc/length.html

            ` x = 200.mm
            7.8740157480315

            x.to_mm
            200.0`

            So you must ensure that at any point, all variables that refer to a measurement unit - that it's made into a Length class so that the unit is represented in SU in inches.

            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

              ` wglass = (200.mm - ((8.mm) + ( 1.mm) + (6.mm))) / 3

              2.42782152230971

              wglass.to_mm

              61.6666666666667`

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

              1 Reply Last reply Reply Quote 0
              • bagateloB Offline
                bagatelo
                last edited by

                I make some improvements in the plugin. Now this is more usefull.


                WindowTools.zip

                While the cat's away, the mice will play

                1 Reply Last reply Reply Quote 0
                • bagateloB Offline
                  bagatelo
                  last edited by

                  Thank you for the answer

                  If I have :
                  $larguraVIDRO = ($larguraJANELA - (( 2 * $larguraFORRA) + ( 2 * $afastaFOLHAS) + ( $larPERFIL * ( $numePORTAS - 1 )))) / $numePORTAS
                  UI.messagebox $larguraVIDRO
                  what means:

                  wglass = (200 - (( 2 * 4) + ( 2 * 0,5) + ( 3 * ( 3 - 1 )))) / 3
                  wglass = (200 - ((8) + ( 1) + (6)) / 3
                  wglass = 61,6666 >>>> this is result that I want, but the Script show me 24.75....

                  How can I correct this expression so that it presents me the correct result?

                  Thanks anyway...

                  While the cat's away, the mice will play

                  1 Reply Last reply Reply Quote 0
                  • D Offline
                    DIEGO-RODRIGUEZ
                    last edited by

                    hi. thanks for your plugins.
                    But the first two tools do not work.
                    could repair it?

                    Error: #<NameError: uninitialized constant WindowTools::Jaluminio>
                    C:/Archivos de programa/Google/Google SketchUp 6/Plugins/WindowTools.rb:24
                    Error: #<NameError: uninitialized constant WindowTools::FOLHAALUMINIO>
                    C:/Archivos de programa/Google/Google SketchUp 6/Plugins/WindowTools.rb:31
                    C:/Archivos de programa/Google/Google SketchUp 6/Plugins/WindowTools.rb:24:in `call'
                    C:/Archivos de programa/Google/Google SketchUp 6/Plugins/WindowTools.rb:24

                    1 Reply Last reply Reply Quote 0
                    • bagateloB Offline
                      bagatelo
                      last edited by

                      @diego-rodriguez said:

                      hi. thanks for your plugins.
                      But the first two tools do not work.
                      could repair it?

                      Error: #<NameError: uninitialized constant WindowTools::Jaluminio>
                      C:/Archivos de programa/Google/Google SketchUp 6/Plugins/WindowTools.rb:24
                      Error: #<NameError: uninitialized constant WindowTools::FOLHAALUMINIO>
                      C:/Archivos de programa/Google/Google SketchUp 6/Plugins/WindowTools.rb:31
                      C:/Archivos de programa/Google/**Google SketchUp 6/**Plugins/WindowTools.rb:24:in `call'
                      C:/Archivos de programa/Google/Google SketchUp 6/Plugins/WindowTools.rb:24

                      Is the very first two tools that I have made. Is strange this situation, because this is working fine for me, but I have Sketchup 7.1, and seems that you have the same version that me. Have you extract de zip file in the right place?
                      I don't understand nothing about RUBY, and yet, I make this improvements...

                      While the cat's away, the mice will play

                      1 Reply Last reply Reply Quote 0
                      • D Offline
                        DIEGO-RODRIGUEZ
                        last edited by

                        if. is right.
                        in sketchup 7.1 Functions well.
                        I had only tested on sketchup 6.
                        thanks for answering

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

                        Advertisement