Moderator: Jim
by thomthom » Sun May 31, 2009 12:09 pm
This plugin is a work in progress. It's made public because it is a collaboration project.This is in it's very early beginning, so lots of things will change, and lots of bugs are to be expected. Feel free to share your ideas or join in on this project. See this thread for the discussion of the overall project. This thread is an overview of the related modules and the development thread for the core files. CityGen - CoreCore and Installation CheckThis is the main file that centralise information and load the other modules. Modules are located in Plugins\CityGen\modules\. Please remove any old CityGen installations prior to installing.Menu entry is located under the Tools menu. Should this be under Plugins you think? ModulesFor Module DevelopersCore and Installation CheckYou can add this code to your module to check if the core is installed and that the module is installed in the correct location. - Code: Select all
### CORE & INSTALLATION CHECK ### ------------------------------------------------------------------ # Core check if not file_loaded?('city_gen.rb') if Sketchup.find_support_file('city_gen.rb', 'Plugins') == nil UI.messagebox('The CityGen\'s core files is missing. Install the required core files.') else UI.messagebox('The CityGen\'s core files is not loaded. Ensure you installed this plugin correctly.') end raise 'CityGen Core error.' end # Correct installation check if Sketchup.find_support_file('City_Gen/' + File.basename(__FILE__), 'Plugins') == nil UI.messagebox("This module (#{File.basename(__FILE__)}) has not been installed properly. It should be installed under Plugins\\City_Gen\\") raise 'CityGen Module path error.' end
module City_Gen module Some_Module # stuff end end
- Code: Select all
# CHANGELOG # 0.1.0a - 31.05.2009 (Thom) # * Initial build. # # 0.1.1a - 31.05.2009 (Thom) # * Change in the module error checking routine. # # 0.1.2a - 31.05.2009 (Thom) # * Added version constant. # # 0.1.3a - 31.05.2009 (Thom) # * Updated to the new file structure for use with Tortoise.
Please, register (free) to access all the attachments on the forums.
Last edited by thomthom on Sat Sep 19, 2009 3:16 pm, edited 9 times in total.
-

thomthom
- Global Moderator
-
- Posts: 17556
- Joined: Tue Nov 13, 2007 12:47 pm
- Location: Trondheim, Norway
- Name: thomthom
- Operating system: Windows
- SketchUp version: 8
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
-
by kwistenbiebel » Sun May 31, 2009 1:17 pm
Hi Thomas, great initiative! I have been following the development thread a bit and, although I didn't understand all the technical coding bits, this is really a good idea. A little suggestion: Architects often have 2D .DWG input plans of the street blocks and road lines surrounding their project. We start cleaning up the DWG lines and try to recreate the existing buildings. Will the CityGen plugin also take into account DWG imports to start form? I can imagine that it could automate the process a little so we easily can generate the 'city' surroundings and then start finetuning the buildings to reality. It would be cool if street furniture (street lights, road textures with markings etc...) would be implemented as well in a later phase....but maybe that's dreaming  Good luck with the project to all who are working on it. 
-
kwistenbiebel
-
- Posts: 2666
- Joined: Thu Nov 22, 2007 6:13 pm
by thomthom » Sun May 31, 2009 1:45 pm
kwistenbiebel wrote:Will the CityGen plugin also take into account DWG imports to start form? I can imagine that it could automate the process a little so we easily can generate the 'city' surroundings and then start finetuning the buildings to reality. It would be cool if street furniture (street lights, road textures with markings etc...) would be implemented as well in a later phase....but maybe that's dreaming 
That will depend on the module. I'm currently working on the Street Generator. It takes the centre lines for the streets and generate faces given a width. DWG plans usually includes such a centre line, so there is a potential it can be used. However, currently everything has to be planar. No 3D road maps. Also, it assumes a symmetrically placed centre line. It doesn't take into account the centre line in relationship to the edge road lines which you get in DWG files. Working out that is much more complex and would be something further down the line. Most likely a separate module to process DWG plans. As for building, I'd think that'd be possible, taking the footprint and extruding it. It's easy if the footprints are fully connected. I often find that lots of time the data I get from DWG plans have lines with gaps. Working out such a plan instantly makes it more complicated. Also, if you want something that can take the foot print and extrude it to the correct height, that's also something that will make it even more complicated. I'm not sure how accurate you where thinking? First and foremost this project will start out simple. Getting a simple way of quickly populating a city area. Illustration is the key word here, not simulation. But I work in an architectural office myself as a modelmaker and illustrator, so tools to generate geometry from DWG plans is something that is in my own interest. I certainly hope this can develop into something that could make good use of DWG data. This is after all a very open project with the intention that anyone can add their own module to build upon the existing work. My main concern about DWG data is that I find so much of it inaccurate. That you'd need to 'understand' the data it has and interpret it. kwistenbiebel wrote:It would be cool if street furniture (street lights, road textures with markings etc...) would be implemented as well in a later phase
Entourage and Textures are two likely separate modules. Both which of interests me once we've got the basics going.
-

thomthom
- Global Moderator
-
- Posts: 17556
- Joined: Tue Nov 13, 2007 12:47 pm
- Location: Trondheim, Norway
- Name: thomthom
- Operating system: Windows
- SketchUp version: 8
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
-
by thomthom » Sun May 31, 2009 3:18 pm
We should keep close in mind how the API for the communication between the modules should be. I think this is very important to get established as early as possible. But lets see how this thing evolves.
-

thomthom
- Global Moderator
-
- Posts: 17556
- Joined: Tue Nov 13, 2007 12:47 pm
- Location: Trondheim, Norway
- Name: thomthom
- Operating system: Windows
- SketchUp version: 8
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
-
by sepo » Sun May 31, 2009 5:48 pm
gingerly  Thom could you please explain how the plugin decides the radius of join between 2 roads. It would be good to have some sort of control over it so it can be used in real situations rather than purely for visual/game stuff. I have not install it yet so I might be shooting blanks here. 
-
sepo
-
- Posts: 1559
- Joined: Wed Nov 14, 2007 1:19 pm
- Location: Northampton UK
- Operating system: Windows
- SketchUp version: 8
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
by thomthom » Sun May 31, 2009 5:52 pm
Close, but still not 100% the correct thread. This is the Core thread. Not the Street Generator.  (I had a feeling making all there threads would be confusing. But how would you avoid confusion of the discussion on all the modules where in one thread?  Someone got a suggestion to how we can do this?) (I'll post the answer in the Street Generator thread sepo.  )
-

thomthom
- Global Moderator
-
- Posts: 17556
- Joined: Tue Nov 13, 2007 12:47 pm
- Location: Trondheim, Norway
- Name: thomthom
- Operating system: Windows
- SketchUp version: 8
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
-
by thomthom » Sun May 31, 2009 10:22 pm
Small update: Added version constant to the core module so it can be identified by the modules.
-

thomthom
- Global Moderator
-
- Posts: 17556
- Joined: Tue Nov 13, 2007 12:47 pm
- Location: Trondheim, Norway
- Name: thomthom
- Operating system: Windows
- SketchUp version: 8
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
-
by Jernej Vidmar » Mon Jun 01, 2009 12:29 am
thomthom wrote:Close, but still not 100% the correct thread. This is the Core thread. Not the Street Generator.  (I had a feeling making all there threads would be confusing. But how would you avoid confusion of the discussion on all the modules where in one thread? Someone got a suggestion to how we can do this?) (I'll post the answer in the Street Generator thread sepo.  )
I am affraid that forum is not the best option to collaborate on project like this... at least not in the long run. I do not want to turn you away from SketchUcation forum, which is great to discuss things, yet it does not provide (nor does any other forum) things like version control, task tracking, ... which you will definitely want. Maybe you shuould consider something like GitHub, which seems to be very popular choice for OS projects these days? It can make collaboration on project like CityGen much more manageable and easy...
-
Jernej Vidmar
- Modelur
-
- Posts: 34
- Joined: Thu Dec 20, 2007 6:08 pm
- Name: Jernej Vidmar
-
by Chris Fullmer » Mon Jun 01, 2009 5:53 am
I think that is a good suggestion. I don't want to take the conversation away from here (where the creative juices freeloy flow), but at the same time, I"m afraid that realisticly, the logistics of working colaboratively on this will get tricky quickly - until Google Wave gets implemented in the near future! But for now, perhaps a code hosting place might be necessary. What about Google Code? I've created a test account. I'll add both Remus and Thoms as project owners so you can log in and test it out if you'd like. PM your emails addresses. http://code.google.com/p/clftester/Chris
-

Chris Fullmer
- SketchUp Team
-
- Posts: 6680
- Joined: Wed Nov 21, 2007 3:21 am
- Location: Davis, CA
- Name: Chris Fullmer
- Operating system: Windows
- SketchUp version: 8
- License type: Pro
- SketchUp use: landscape architecture
- Level of SketchUp: Advanced
-
by Chris Fullmer » Mon Jun 01, 2009 5:59 am
OK, I got Remus signed up, but I need a gmail account from you Thom (or youll have to create it first before you can sign in and use the project admin).
This is just a test. To see if its something we want to try to use. It only offers opensource licenses. So PM me your gmail address and I'll add you.
Chris
-

Chris Fullmer
- SketchUp Team
-
- Posts: 6680
- Joined: Wed Nov 21, 2007 3:21 am
- Location: Davis, CA
- Name: Chris Fullmer
- Operating system: Windows
- SketchUp version: 8
- License type: Pro
- SketchUp use: landscape architecture
- Level of SketchUp: Advanced
-
by thomthom » Mon Jun 01, 2009 6:21 am
Yea... I was thinking that some version management (and possible project management) would help us here. But I've never done such a collaboration project, so I wasn't sure what I was looking for.
-

thomthom
- Global Moderator
-
- Posts: 17556
- Joined: Tue Nov 13, 2007 12:47 pm
- Location: Trondheim, Norway
- Name: thomthom
- Operating system: Windows
- SketchUp version: 8
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
-
by thomthom » Mon Jun 01, 2009 7:21 am
I see SourceForge often used, anyone had any experience with that? http://sourceforge.net/
-

thomthom
- Global Moderator
-
- Posts: 17556
- Joined: Tue Nov 13, 2007 12:47 pm
- Location: Trondheim, Norway
- Name: thomthom
- Operating system: Windows
- SketchUp version: 8
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
-
by Chris Fullmer » Mon Jun 01, 2009 8:22 am
I download from there, but I've never used it before. I've never used any before really. So I'm open to pretty much anything, especially free  Chris
-

Chris Fullmer
- SketchUp Team
-
- Posts: 6680
- Joined: Wed Nov 21, 2007 3:21 am
- Location: Davis, CA
- Name: Chris Fullmer
- Operating system: Windows
- SketchUp version: 8
- License type: Pro
- SketchUp use: landscape architecture
- Level of SketchUp: Advanced
-
by troyhome » Mon Jun 01, 2009 2:23 pm
I don't know about coding at all, and I appreciate this ruby very much. I am "into" urban design and wonder if there is a way to select different streets for different widths- for example main streets and alleys will have different widths... ? Thanks for this collaborative effort!
Etch-A-RenderSU Pro 8.0.4810 Mac/ SU Pro 8.0.4811 PC Thea: (MacOSX 32bit) RV481_v1.0.7 (SU2TH .86)/ (PC 64bit) RV481_v1.0.7 (SU2TH .86) Vray: VfSU 1.49.01
-
troyhome
-
- Posts: 283
- Joined: Sun Mar 09, 2008 1:21 am
- Location: Michigan
- Name: Troy
- Operating system: Mac
- SketchUp version: 8
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
by Chris Fullmer » Mon Jun 01, 2009 5:46 pm
I know nothing about how the different distribution tools work. I've heard of subversion before, but never the onther ones. Do you prefer mercurial TBD?
Chris
-

Chris Fullmer
- SketchUp Team
-
- Posts: 6680
- Joined: Wed Nov 21, 2007 3:21 am
- Location: Davis, CA
- Name: Chris Fullmer
- Operating system: Windows
- SketchUp version: 8
- License type: Pro
- SketchUp use: landscape architecture
- Level of SketchUp: Advanced
-
by tbd » Mon Jun 01, 2009 7:09 pm
yeah, Mercurial is my main version control (all my projects are in mercurial), but I also use git from time to time. Mercurial on Windows is smaller and faster on small sized projects that git. I also like the commands more http://hgbook.red-bean.com/read/ - the book about mercurial with examples
-

tbd
-
- Posts: 1018
- Joined: Wed Nov 14, 2007 10:47 am
- Location: Romania
- Name: TBD
-
by Jernej Vidmar » Mon Jun 01, 2009 8:45 pm
We use Mercurial for Modelur development, too. It's great and provides GUI for windows - TortoiseHg.
-
Jernej Vidmar
- Modelur
-
- Posts: 34
- Joined: Thu Dec 20, 2007 6:08 pm
- Name: Jernej Vidmar
-
by thomthom » Mon Jun 01, 2009 10:46 pm
Are any of these free services?
-

thomthom
- Global Moderator
-
- Posts: 17556
- Joined: Tue Nov 13, 2007 12:47 pm
- Location: Trondheim, Norway
- Name: thomthom
- Operating system: Windows
- SketchUp version: 8
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
-
by thomthom » Mon Jun 01, 2009 10:47 pm
troyhome wrote:I don't know about coding at all, and I appreciate this ruby very much. I am "into" urban design and wonder if there is a way to select different streets for different widths- for example main streets and alleys will have different widths... ? Thanks for this collaborative effort!
Yes. I'm working on that. 
-

thomthom
- Global Moderator
-
- Posts: 17556
- Joined: Tue Nov 13, 2007 12:47 pm
- Location: Trondheim, Norway
- Name: thomthom
- Operating system: Windows
- SketchUp version: 8
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
-
by Jernej Vidmar » Mon Jun 01, 2009 11:29 pm
thomthom wrote:Are any of these free services?
If you decide to go with Mercurial, bitbucket free version offers 150Mb of space. As mentioned, github is free for open source projects and it offers 300Mb of space. You can use Hg-Git plugin to use Mercurial for version control. I never tried it, though. Maybe the Git itself is good choice (the man behind it is Linus Torvalds...)? Or you can go free with Google code (it uses both Subversion - you can use tortoise if you want GUI frontend and Mercurial for version control), or Sourceforge or something similar...
Last edited by Jernej Vidmar on Tue Jun 02, 2009 12:19 am, edited 1 time in total.
-
Jernej Vidmar
- Modelur
-
- Posts: 34
- Joined: Thu Dec 20, 2007 6:08 pm
- Name: Jernej Vidmar
-
by Chris Fullmer » Tue Jun 02, 2009 12:01 am
Crazy, I had no idea there were so many options! I really appreciate you guys with experience helping point us in the right directions. I'll dig around the ones you have listed and see if I come to any conclusions (not likely  ) Chris
-

Chris Fullmer
- SketchUp Team
-
- Posts: 6680
- Joined: Wed Nov 21, 2007 3:21 am
- Location: Davis, CA
- Name: Chris Fullmer
- Operating system: Windows
- SketchUp version: 8
- License type: Pro
- SketchUp use: landscape architecture
- Level of SketchUp: Advanced
-
by mpowell1234567890 » Wed Jun 03, 2009 4:43 am
Is there a way to fix this error? Error Street Gen.JPG Nazz78 wrote:thomthom wrote:Close, but still not 100% the correct thread. This is the Core thread. Not the Street Generator.  (I had a feeling making all there threads would be confusing. But how would you avoid confusion of the discussion on all the modules where in one thread? Someone got a suggestion to how we can do this?) (I'll post the answer in the Street Generator thread sepo.  )
I am affraid that forum is not the best option to collaborate on project like this... at least not in the long run. I do not want to turn you away from SketchUcation forum, which is great to discuss things, yet it does not provide (nor does any other forum) things like version control, task tracking, ... which you will definitely want. Maybe you shuould consider something like GitHub, which seems to be very popular choice for OS projects these days? It can make collaboration on project like CityGen much more manageable and easy...
Please, register (free) to access all the attachments on the forums.
-
mpowell1234567890
-
- Posts: 108
- Joined: Sat May 17, 2008 5:30 am
by Chris Fullmer » Wed Jun 03, 2009 5:31 am
I think that error was already reported and fixed. Try re-downloading and installing it. Let me know if that does not work,
Chris
-

Chris Fullmer
- SketchUp Team
-
- Posts: 6680
- Joined: Wed Nov 21, 2007 3:21 am
- Location: Davis, CA
- Name: Chris Fullmer
- Operating system: Windows
- SketchUp version: 8
- License type: Pro
- SketchUp use: landscape architecture
- Level of SketchUp: Advanced
-
by mpowell1234567890 » Wed Jun 03, 2009 7:39 am
I Tried re-downloading and installing it. I got the following errors: City Gen Modul Error.JPG Street Gen Path Error.JPG Chris Fullmer wrote:I think that error was already reported and fixed. Try re-downloading and installing it. Let me know if that does not work,
Chris
Please, register (free) to access all the attachments on the forums.
-
mpowell1234567890
-
- Posts: 108
- Joined: Sat May 17, 2008 5:30 am
by thomthom » Wed Jun 03, 2009 7:43 am
Did you place it in the correct folder? It's going into the "Plugins\City_Gen\" folder, not "Plugins\".
-

thomthom
- Global Moderator
-
- Posts: 17556
- Joined: Tue Nov 13, 2007 12:47 pm
- Location: Trondheim, Norway
- Name: thomthom
- Operating system: Windows
- SketchUp version: 8
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
-
by Chris Fullmer » Wed Jun 03, 2009 7:44 am
So now its letting you know that you've got it installed in the wrong spot.
put the city_gen.rb file in the plugins folder, then there should be a folder called City_Gen and the street file should go in there.
This is project is in the VERY easrly development phases, so its buggy and not well organized. And its only going to get worse as we keep adding to it. Just a warning.
Chris
-

Chris Fullmer
- SketchUp Team
-
- Posts: 6680
- Joined: Wed Nov 21, 2007 3:21 am
- Location: Davis, CA
- Name: Chris Fullmer
- Operating system: Windows
- SketchUp version: 8
- License type: Pro
- SketchUp use: landscape architecture
- Level of SketchUp: Advanced
-
by mpowell1234567890 » Wed Jun 03, 2009 7:54 am
Yes.. thomthom wrote:Did you place it in the correct folder? It's going into the "Plugins\City_Gen\" folder, not "Plugins\".
-
mpowell1234567890
-
- Posts: 108
- Joined: Sat May 17, 2008 5:30 am
by thomthom » Wed Jun 03, 2009 7:57 am
And there isn't a copy left in the plugins folder? Is the Core file also updated?
btw: are you on a mac?
-

thomthom
- Global Moderator
-
- Posts: 17556
- Joined: Tue Nov 13, 2007 12:47 pm
- Location: Trondheim, Norway
- Name: thomthom
- Operating system: Windows
- SketchUp version: 8
- License type: Pro
- SketchUp use: architecture
- Level of SketchUp: Advanced
-
by beauphilippe » Wed Jun 03, 2009 8:06 am
ok great , idea
i have to iterrest to help for project but iam not coder
i propose my help for test your module and make feedback
best regard
philippe BEAU
-
beauphilippe
-
- Posts: 10
- Joined: Thu Jun 05, 2008 1:36 pm
by Ad Machine » 5 minutes ago
Need SketchUp Books, Models, Styles or Textures? Check out our One Stop Shop for SketchUp. Premium Members get 20% discount!
-
Ad Machine
- Robot
-
- Posts: 2012
-
Return to City Generator
|