• Login
sketchucation logo sketchucation
  • Login
🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

Roof.rb v1

Scheduled Pinned Locked Moved Plugins
80 Posts 20 Posters 10.0k Views
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
    TIG Moderator
    last edited by 8 Dec 2007, 03:54

    Version 1 of my new script Roof.rb... (zipped)

    Click here: http://www.sketchucation.com/forums/scf/viewtopic.php?f=153&t=1516

    Please try and feedback...

    TIG

    1 Reply Last reply Reply Quote 0
    • E Offline
      ehaflett
      last edited by 8 Dec 2007, 03:54

      TIG, this script is awesome. I tested it out a bit and it did everything I would expect it to do without a hitch. I work mostly in geographically large models where I need to build many houses in a neighborhood or along a steet and this will be a huge timesaver for me, especially on overhangs. I like that I can simply input the rise:run ratio and other desired dimensions and presto (I just need to learn the terminology a bit better, I'm a GIS guy by trade). Great guidance while working with it too, making sure things are selected correctly.

      I did notice that none of the images show up on your help page, is that something I overlooked at install?

      Solid work, thanks.
      Eric

      1 Reply Last reply Reply Quote 0
      • T Offline
        TIG Moderator
        last edited by 8 Dec 2007, 03:57

        @ehaflett said:

        TIG, this script is awesome. I tested it out a bit and it did everything I would expect it to do without a hitch. I work mostly in geographically large models where I need to build many houses in a neighborhood or along a steet and this will be a huge timesaver for me, especially on overhangs. I like that I can simply input the rise:run ratio and other desired dimensions and presto (I just need to learn the terminology a bit better, I'm a GIS guy by trade). Great guidance while working with it too, making sure things are selected correctly.

        I did notice that none of the images show up on your help page, is that something I overlooked at install?

        Solid work, thanks.
        Eric

        Thanks

        Not sure about the missing images in the Help mht file... It's a combined file type containing all images and text. What system are you on ? Here's a pdf of it anyway (for some yet to be fixed reason pdfs are about the only file format that won't open via ruby UI.openURL on Vista... so I made something I knew (thought !) would work) ! Unfortunately this pdf is much bigger too and you'll need to open it manually...

        Others please report any probs...

        301 Moved Permanently

        favicon

        (www.sketchucation.com)

        TIG

        1 Reply Last reply Reply Quote 0
        • E Offline
          ehaflett
          last edited by 8 Dec 2007, 03:58

          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
          • T Offline
            TIG Moderator
            last edited by 8 Dec 2007, 03:58

            Thanks, have a good weekend too...

            TIG

            1 Reply Last reply Reply Quote 0
            • B Offline
              boofredlay
              last edited by 8 Dec 2007, 03:59

              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 8 Dec 2007, 03:59

                i have the same problem

                The grass is always GREENER on the roof.

                1 Reply Last reply Reply Quote 0
                • B Offline
                  boofredlay
                  last edited by 8 Dec 2007, 04:00

                  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 8 Dec 2007, 04:00

                    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
                    • T Offline
                      TIG Moderator
                      last edited by 8 Dec 2007, 04:02

                      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
                      • B Offline
                        boofredlay
                        last edited by 8 Dec 2007, 04:02

                        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 8 Dec 2007, 04:03

                          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
                          • T Offline
                            TIG Moderator
                            last edited by 8 Dec 2007, 04:04

                            @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 8 Dec 2007, 04:20

                              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
                              • T Offline
                                TIG Moderator
                                last edited by 8 Dec 2007, 04:21

                                @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
                                • T Offline
                                  TIG Moderator
                                  last edited by 8 Dec 2007, 04:23

                                  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 8 Dec 2007, 04:24

                                    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 8 Dec 2007, 04:26

                                      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
                                      • T Offline
                                        TIG Moderator
                                        last edited by 8 Dec 2007, 04:26

                                        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
                                        • B Offline
                                          boofredlay
                                          last edited by 8 Dec 2007, 04:27

                                          @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
                                          • 1
                                          • 2
                                          • 3
                                          • 4
                                          • 1 / 4
                                          1 / 4
                                          • First post
                                            8/80
                                            Last post
                                          Buy SketchPlus
                                          Buy SUbD
                                          Buy WrapR
                                          Buy eBook
                                          Buy Modelur
                                          Buy Vertex Tools
                                          Buy SketchCuisine
                                          Buy FormFonts

                                          Advertisement