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

    Roof.rb v1

    Scheduled Pinned Locked Moved Plugins
    80 Posts 20 Posters 10.0k 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.
    • E Offline
      ehaflett
      last edited by

      No problemo, I'm on WinXP Pro, SU6 Pro. I plan on using this script a bunch next week on a project I'm starting up, I'll let you know if I find any gremlins. And thanks for the pdf, it's very helpful and will help me learn my architectural terminology quicker.

      Have a good weekend!

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

        Thanks, have a good weekend too...

        TIG

        1 Reply Last reply Reply Quote 0
        • boofredlayB Offline
          boofredlay
          last edited by

          It is not working for me. I select the face and get the first dialog box, click ok and nothing happens. No roofs, no second dialog box for layers etc...

          This is all I am getting:

          http://www.sketchucation.com/forums/scf/sas/Ruby/Roof-Trial.jpg

          I click ok and all I get is what you see minus the dialog box.
          Hmmmm.
          I tried it with all of them; Gable, Mansard...

          http://www.coroflot.com/boofredlay

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

            i have the same problem

            The grass is always GREENER on the roof.

            1 Reply Last reply Reply Quote 0
            • boofredlayB Offline
              boofredlay
              last edited by

              BTW, I am on a PC running XP 5.1

              http://www.coroflot.com/boofredlay

              1 Reply Last reply Reply Quote 0
              • R Offline
                rhankc
                last edited by

                tjis is pretty cool, I have not been on long enough to matter lately and when I sign on this afternoon there si a new roof ruby waiting to be tested. I'll try her out. thanks TIG.

                Hank

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

                  Thanks for the feedback so far - even if some of it's reporting problems...

                  Can those of you getting problems please report back with PC/Mac ver, SUp version etc and exact nature of problem - e.g. "after dialog nothing gets made and there are no error dialogs either"... [it would help when you get the problems if you have the Ruby Console Window open and copy me in on any errors that pop up there too]... so I can see if there's a common problem...

                  Works fine for me (and several others) with PC XP SP2 and Vista SUp 60515.

                  TIG

                  1 Reply Last reply Reply Quote 0
                  • boofredlayB Offline
                    boofredlay
                    last edited by

                    TIG, I tried it out at home and I get the same results as above.

                    Both computers=
                    PC
                    XP service pack 2
                    SU 6.0.515

                    http://www.coroflot.com/boofredlay

                    1 Reply Last reply Reply Quote 0
                    • D Offline
                      dylan
                      last edited by

                      PC XP Service Pack 2
                      SU 6.0.515

                      Will not work, nothing happens.

                      I create a rectangle and push/pull.
                      Highlite top surface/plugins/roof
                      Choose whichever version, mansard,gable etc, but nothing happens after this when I would expect the roof to be created.

                      I will give it a go shortly on my Vista Laptop, see if it works with that system.

                      http://dmdarchitecture.co.uk/

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

                        @unknownuser said:

                        TIG, I tried it out at home and I get the same results as above.

                        Both computers=
                        PC
                        XP service pack 2
                        SU 6.0.515

                        Same spec' as I have tested it on and it's perfect ! Very confusing...
                        Videos cards [long-shot] ?

                        Any Ruby Console Error Messages when it is failing ?

                        TIG

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

                          works perfect for me. thank you, great script.

                          i use xp sp 2 and SU 6.0.515 and it works, it must be anything else...

                          http://xs218.xs.to/xs218/07346/Untitled1234134.jpg

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

                            @marne said:

                            works perfect for me. thank you, great script.

                            i use xp sp 2 and SU 6.0.515 and it works, it must be anything else...

                            Thanks for some positive feedback.

                            Perhaps it's a script clash - this might show in the Console messages ?
                            The script is packed but its classes include:
                            class Geom::Vector3d >>> to_flat_angle
                            class Geom::Point3d >>> is_on_face?
                            class Sketchup::Face >>> offset_eaves(dist)
                            and then...
                            Roof itself has a class 'Roof' with methods:
                            Roof::hip()
                            Roof::mansard()
                            Roof::gable()
                            Roof::pyramid()
                            Roof::get_slope()
                            Roof::help()

                            • plus for data manipulation...
                              Roof::ordered_edge_points(face)

                            Anyone know of clashing class/methods in other scripts etc ?

                            TIG

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

                              Eric, you had trouble with the .mht file showing images.

                              Does you Internet Options > Advanced window look like this ?
                              It should.

                              http://www.sketchucation.com/forums/scf/sas/Ruby/IOsettings.jpg

                              TIG

                              1 Reply Last reply Reply Quote 0
                              • R Offline
                                rhankc
                                last edited by

                                I am happy to report, initial test produced a roof, a gable roof over a rectangle. I toggled all the menu settings, included the carat, used degrees rather than rise/run, inches rather than ft in,
                                made a rectangle 30 degree pitch gable

                                attempt to make another gable, I get the attached jpg.

                                Then I work with the hip settings:
                                this is the ruby console error when making hip w/ ^45 pitch
                                BulkChange: 1
                                1
                                BulkChange: 2
                                2
                                Error: #<NoMethodError: undefined method to_f' for ["^45"]:Array> (eval):163:in dialog_hip'
                                (eval):189:in hip' (eval):2720 (eval):2720:in call'

                                using 45 w/out the carat doesnt change anything

                                The most prevelant message is th jpg, it isnt allowing any repeat roofs

                                Nvidia GE Force 7300 LE
                                XP SP2
                                SU vers 6.0.515

                                anything else I can test, let me know

                                Hank

                                1 Reply Last reply Reply Quote 0
                                • R Offline
                                  rhankc
                                  last edited by

                                  I am getting better with it!
                                  I am getting repeat roofs in the smae file. When it quits I close itt down and start another and do it till it gets the jpg. posted earlier
                                  if I enter for pitch; ^45, it seems to me I would get a 12:12 pitch, but I get 12.4 degrees
                                  enter ^68 I get a roof at 20.9 degrees.

                                  In the help guide It says enter decimals or on the menu enter inches and when inches are entered on the menu, it shows as feet. example enter 24", it shows as 2'

                                  Hank

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

                                    rhankc

                                    I think you are misunderstanding how to enter the roof 'slopes'. It is done differently for hip/mansard and gable/pyramid roofs.

                                    For a hip or mansard/sprocket roof you can only enter the roof slope as an angle in degrees [a number] e.g. 22.5, OR the slope as a ratio [separated by ':'] e.g. 2:5. For these types you CAN'T enter a ridge/apex height using a ^. If you do it should return an error thinking you've entered zero degrees

                                    For a gable or pyramid roof you can enter the angle or ratio as above OR additionally you can specify the ridge/apex height above the fascia in current units by prefixing it with a ^, e.g. ^1234 (here assuming mm this puts the ridge/apex at 1234mm high). Don't use a units suffix or try '/" - so 1234.5 (in mm) is OK as is 18 (in inches) or 1.5 (in feet) but NOT 1'6".

                                    When you make a hip or mansard you need to have one horizontal face selected otherwise you'll get error messages.

                                    When you make a gable you need to select one face that's both horizontal and forms a rectangle, AND also select an edge that's near where you want the 1st gable to be (that's needed to tell the tool which of the rectangle's sides are to form gables and which of them is the 1st one, since you can apply different settings to the 1st and 2nd gables).

                                    When you make a pyramid you need to select one face that's both horizontal and forms a rectangle, AND also select an edge that's on a side where you want the angle for the slope to be taken from - with a non-square pyramid the two pairs of opposing faces have different slopes so you need to do this to indicate which gets the degrees/ratio you've given. Note that you need to select one of this rectangle's edges even if you intend later to use ^1234 as the height of the apex instead of entering degrees or a ratio, as at the point where you set off the tool has no way of knowing what options you might choose later...

                                    Your item about it saying inches in the menu prompts and it showing it in feet is a function of SketchUp: if you are working in Architectural units - inches - and you enter 18" it's taken OK but when you reopen the dialog it will show 1' 6" - the prompt simply tells you that your current units are set to inches [or feet or cm or whatever] - SketchUp displays Architectural inches as feet+inches if it's >12".

                                    TIG

                                    1 Reply Last reply Reply Quote 0
                                    • boofredlayB Offline
                                      boofredlay
                                      last edited by

                                      @tig said:

                                      Does you Internet Options > Advanced window look like this ?
                                      It should.

                                      Here is mine at home, I won't be able to check work until Monday.

                                      http://www.sketchucation.com/forums/scf/sas/Ruby/Internet-Properties.jpg

                                      http://www.coroflot.com/boofredlay

                                      1 Reply Last reply Reply Quote 0
                                      • R Offline
                                        rhankc
                                        last edited by

                                        Thanks for the detailed explanation.
                                        I get pyramid roof no problem. I havent tried a mansard, but I will.

                                        The only way I can get gable to respond is using a ^ before a specified height. The other techniques dont produce anything. I was seeing the difference in what was entered for eaves etc. and thought it was a SU thing so I had changed my units to decimal-inches and was still getting the ft-in after entering a value in inches. That is why I mentioned it. it is now entering as expected.

                                        After a few roof sessions, (keep making different roof modules) I get the image I posted earlier even though I have the edge and horizontal surface selected. It wont get over the message until I start a new file.

                                        This is going to be a great tool. thanks

                                        Hank

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

                                          @rhankc said:

                                          The only way I can get gable to respond is using a ^ before a specified height. The other techniques dont produce anything...
                                          After a few roof sessions, (keep making different roof modules) I get the image I posted earlier even though I have the edge and horizontal surface selected. It wont get over the message until I start a new file.

                                          IF you open a new model, open the Ruby Console and then make a rectangle + push'pulled to a volume, then run Roof...Gable and accept all of the defaults that appear in the dialog what happens ?

                                          With your 'non-rectangle' error... it's as if multiple editing make what is a rectangle slightly skewed. Maybe I need to build in some 'tolerance' as to what makes a 'rectangle'...

                                          TIG

                                          1 Reply Last reply Reply Quote 0
                                          • R Offline
                                            rhankc
                                            last edited by

                                            that is the perfect question...
                                            the first run after the initial boot, I built a rectangular cube, and ran the roof tool on gable after selecting one edge and the top plane. I saw nothing happen.

                                            I did it again exactly as you described for a gable: nothing happened.

                                            To get a roof model the first attempt, this is what I tried: I went thru the menu and toggled each setting, basically rekeyed everything there and entered 12:12 for a pitch. I got nothing; then I noticed the ^ wasn't included in the pitch indicator, so I set ^12 , and got a low pitch roof.

                                            here is the ruby console script:
                                            Added: 1 :: #Sketchup::Face:0x4e3ad38
                                            Cleared: #Sketchup::Selection:0x4e58480
                                            Added: 1 :: #Sketchup::Face:0x4e3a0c0
                                            Cleared: #Sketchup::Selection:0x4e58480
                                            Added: 1 :: #Sketchup::Face:0x4e3a0c0
                                            Cleared: #Sketchup::Selection:0x4e58480
                                            BulkChange: 1
                                            1
                                            BulkChange: 2
                                            2
                                            Error: #<NoMethodError: undefined method to_f' for ["1", "2"]:Array> (eval):1385:in dialog_gable'
                                            (eval):1494:in gable' (eval):2722 (eval):2722:in call'

                                            Hank

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

                                            Advertisement