sketchucation logo sketchucation
    • Login
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    πŸ”Œ Smart Spline | Fluid way to handle splines for furniture design and complex structures. Download

    [Plugin] [CityGen] - Street Generator [WIP] (0.5.2a)

    Scheduled Pinned Locked Moved City Generator
    124 Posts 37 Posters 118.9k Views 37 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

      Yea, I often find that it's easer to select the lines I want to colour and use the Entity info to apply materials. Lines just have too small hit-area.
      But I don't see any better way to pre-visualize the road construction. Or any other means of defining road width without it quickly becoming too complicated and bulky.

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

      1 Reply Last reply Reply Quote 0
      • Chris FullmerC Offline
        Chris Fullmer
        last edited by

        We could also offer a way for users to select all boulevards and then pop up a dialog for "assign road widths" and then the plugin does the coloring for the user also.

        Chris

        Lately you've been tan, suspicious for the winter.
        All my Plugins I've written

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

          @chris fullmer said:

          We could also offer a way for users to select all boulevards and then pop up a dialog for "assign road widths" and then the plugin does the coloring for the user also.

          But how do you define a road as boulevards?
          Applying materials to the lines was what I meant to be the method of defining what the road was. The Material name contained the road type name and width, and the colour was the means of providing visual feedback to the user.

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

          1 Reply Last reply Reply Quote 0
          • Chris FullmerC Offline
            Chris Fullmer
            last edited by

            Right, I just meant that they could have all their default black road cenerlines set up. Then they selec the ones they want to be a certain type - lets say they choose all the ones they want to 40m wide. Then they have the option of painting them, or they can pop up a road width assigning window that allows them to enter the width and the color, and the plugin does the width association and the coloring for them.

            Its just another method of associating the color and the width to the centerlines. Its not necessary, but I think some might like it?

            Chris

            Lately you've been tan, suspicious for the winter.
            All my Plugins I've written

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

              I'm working on some webdialogs to provide a UI for the read widths.

              There would be one that would list the road widths and their associated colour. The default setting would be at the top. You could then select the items on the list to make changes to them. Or create new definition. So when you generate the streets you won't be promted every time. It just uses what you've set up. And if nothing is set up, it uses the defaults. (Defaults would be a setting that's stored between sessions.)

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

              1 Reply Last reply Reply Quote 0
              • J Offline
                Jim
                last edited by

                I have been adding webdialog support to my inputbox class. Same dialog using UI or WebDialog, persistent storage, array and hash-like access to the values.

                I could add it to the repository, if you like it. The plugin page is here.


                157.jpg


                158.jpg

                Hi

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

                  Thanks Jim, but I'm making some illustrations and extra description to go along with the UI elements. So I need to do this by hand. And the Road Type list will require some special UI elements.

                  But good to know that that plugin class exists. I hadn't noticed it before.

                  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

                    thomas,

                    what if a boulevard had its lanes divided by median strips? how would SG deal with it? and how would one have to introduce the lines before running SG?

                    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 said:

                      what if a boulevard had its lanes divided by median strips? how would SG deal with it?

                      At the moment you'd have to create the lanes as separate streets. Though I'd expect there'd be issues with the rounding as I've yet not made it handle radius' that doesn't fit the space.

                      I think that median strips would be an advanced feature to add. So when you define custom street types you can specify median strips - I expect that an offset from centre would be useful here in case the lanes are not symmetric. (though asymmetric lines would complicate things...)

                      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

                        Test comment.

                        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

                          Pushed my work on SG 0.5.1 into the repository. Added a base for webdialogs. I added the jQuery Javascript framework to the project.
                          I'll make the Street Property editor before I publish the 0.5.x version here. I also want to test it against Mac before 0.5.x goes gold.


                          0.5.1 - New Webdialog UI

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

                          1 Reply Last reply Reply Quote 0
                          • Chris FullmerC Offline
                            Chris Fullmer
                            last edited by

                            Looking great Thom! I guess I am going to have to learn me some Javascript now so I can keep up πŸ˜„

                            Chris

                            Lately you've been tan, suspicious for the winter.
                            All my Plugins I've written

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

                              If you use the jQuery framework you save yourself allot of work. Does much of the nitty gritty boring stuff for you.

                              I'm also planning to better organize the CSS files. What I'm doing now is that the ui.css in the citygen folder defines the looks of the core UI widgets. For each webdialog I make it's mostly a matter of just defining the correct class to the HTML elements and position them within the window.

                              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

                                Btw, does the descriptive text and illustration of the Angle Threshold property make sense? You can understand how it works from that?

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

                                1 Reply Last reply Reply Quote 0
                                • Chris FullmerC Offline
                                  Chris Fullmer
                                  last edited by

                                  My understanding from the text is that any angle less than 30deg will not be rounded. But the image looks like its showing something different because the green 90deg is rounded, but the red 125deg angle is not. Neither is the white 145deg angle.

                                  So I think I am mis-reading something.

                                  Lately you've been tan, suspicious for the winter.
                                  All my Plugins I've written

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

                                    @chris fullmer said:

                                    but the red 125deg angle is not. Neither is the white 145deg angle.

                                    Which angles are these? The illustration shows one 90 degrees and one 55. ❓

                                    The idea was to illustrate how it determines what's rounded; with a starting point in the white line with the arrow - coming in from the bottom. The Right edge (Red) breaks of in a 55 degree angle from the white - with a threshold of 60 degrees that means this corner won't be rounded. The left edge (Green) breaks off in a 90 degree angle - above the theshold; so it is rounded.

                                    How can this be better described / illustrated?

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

                                    1 Reply Last reply Reply Quote 0
                                    • Chris FullmerC Offline
                                      Chris Fullmer
                                      last edited by

                                      The angles that are labeled don't correspond to the sidewalk that will or won't be curved. I was thinking the angle threshold would correspond to the angles I am pointing at in the picture. I'm sure I'm just misunderstanding how the script is supposed to work.

                                      angle_rounding.png

                                      Chris

                                      Lately you've been tan, suspicious for the winter.
                                      All my Plugins I've written

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

                                        I see.

                                        The reason the angles differ, is because I based it off the centre line. You see the Red and Green arc? That's the angles I measure.

                                        I was thinking of the angles as in how much it rotated away from the centre line - like if you'd be driving down the street; how many degrees you'd have to turn.

                                        That's why the red and green radius is located by the centre line instead of the street edge. The colour coding was meant to illustrate which edge corner the angle related to.

                                        Interesting how you had a different approach to it. That's what I was curious of. It'd be good if more people could let me know how they'd expect it to work. What feels more intuitive.

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

                                        1 Reply Last reply Reply Quote 0
                                        • soloS Offline
                                          solo
                                          last edited by

                                          Not sure where to post this or even if it's relevent, if anyone wants to be part of this city gen app follow link: http://www.fileplanet.com/promotions/cities-xl/?_cmpid=fp161

                                          http://www.solos-art.com

                                          If you see a toilet in your dreams do not use it.

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

                                            @chris fullmer said:

                                            @thomthom said:

                                            Yea, I was thinking of maybe adding a brush painting tool. Where you can sweep. Or maybe have a large hit-radius.

                                            I think that would be a welcome addition to the plugin. I was having frustration issues when I tried to paint lines earlier for my demo too.... They are tricky little things to pin down with the bulky paintbucket.

                                            Chris

                                            This is my first look at this forum.

                                            Painting edges; that was what initiated the request I posted a day or so ago here:
                                            http://forums.sketchucation.com/viewtopic.php?f=180&t=21125

                                            John | Illustrator | Beaverton, Oregon

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

                                            Advertisement