POST
|
That's nice to hear. Thanks for taking the time to post the complement.
... View more
02-03-2017
02:58 PM
|
0
|
0
|
1292
|
POST
|
Just building off the comment from Rasa Ra it would be something like this: #initalize attribute set to a particular value or 0
attr NPisos = 10
attr avgFloorHeight = 3
@StartRule
Lot --> extrude(world.up.flatTop, NPisos * avgFloorHeight)
... View more
01-28-2017
10:52 AM
|
0
|
3
|
1024
|
POST
|
A bit torn on this one - while I'd love to share the rules, they are the product of a lot of time and effort. It gets further complicated by the fact that the work was completed for a client. Sorry.
... View more
01-26-2017
11:33 AM
|
0
|
1
|
1292
|
POST
|
The parking rule is custom - it places in paint, islands, cars. There are several start rules - so I can generate an entire parking lot, a module, or just a row.
... View more
01-26-2017
11:29 AM
|
1
|
0
|
1292
|
POST
|
I spend a lot of time browsing GeoNet, looking for help and seeing where I can help. I thought what might be missing was a place to share some completed work - showcasing how we are using CityEngine and to gather comments and critique by the group. So I thought I'd start one..... feel free to post thoughts, comments, suggestions etc. or shared your own CityEngine work. I've recently completed a project for a client - a redevelopment concept for a prominent 80-acre site occupied by an aging and outdated strip commercial site. I think the process I used was somewhat unique. The site plan was roughly sketched out with pen and paper, moving the primary building closer to the street, while reducing parking in favor of additional outlot commercial buildings. Opportunities for taller mixed-use buildings on the west side of the site were also suggested. The sketch plan was drawn out in SketchUp, and a simple 2D plan was color coded. I exported it as a KML and imported it into CityEngine. In CityEngine I simply applied my rules onto the color coded shapes created in SketchUp. 1. Aerial of the site - 80-acres at a prominent intersection of a regional corridor 2. SketchUp model imported into CityEngine as KML/KMZ 3. Color coding/rule explanation 4. Rules applied and linework on 5. Final CityEngine Exports
... View more
01-12-2017
07:45 AM
|
11
|
7
|
3407
|
POST
|
Awesome Dave. Thanks a lot. I see what you mean - I changed the node to Junction and it works fine. FYI - changing sidewalk widths does absolutely nothing. The behavior is fine I guess, it would be a little easier to code with if the correct units were reporting.
... View more
11-15-2016
01:06 PM
|
1
|
1
|
1125
|
POST
|
I'm running into something I can't wrap my brain around - I'm trying to split a street shape and it looks as though its adding in 4 extra meters - assuming its because of the default sidewalkWidthLeft and sidewalkWidthRight. This is complicating my splits a bit and when I look through the ESRI rules for streets I can't see where this is being accounted for. Am I missing something? Shouldn't this rule put in 4 equal splits between the sidewalks? The console reports 4 equal splits. lenAlongV = geometry.dv(0,unitSpace)
##############################
# Street
@StartRule
Street --> print("Starting Street Width:" + lenAlongV) # Print Width
BuildStreet
BuildStreet-->
split(v, unitSpace, 0) {'0.25:RandomColor print("Split Widths: " + lenAlongV)}* # Print Split Widths
RandomColor-->
color(rand(0,1),rand(0,1), rand(0,1))
Sidewalk --> print("Sidewalk Width:" + lenAlongV) # Print Sidewalk Widths
RandomColor Instead I'm getting this
... View more
11-15-2016
10:49 AM
|
0
|
7
|
2093
|
POST
|
What kind of annotations are you looking to add? I do this all the time - and CLau-esristaff is right - either use a snapshot from CityEngine, or an export to a rendering program - either way place your raster image and label on top of it in Illustrator. You shouldn't need a vector image. You just need to make sure the resolution of your export is high enough to give you a nice image in illustrator - shoot for a minimum of 300dpi.
... View more
11-12-2016
01:59 PM
|
1
|
0
|
675
|
POST
|
Check the grammar and annotations for your attributes. CityEngine 2016 is a little more strict. So although the editor may not show there is an error, you'll see this behavior when you generate.
... View more
09-07-2016
09:17 PM
|
0
|
0
|
320
|
POST
|
Well, it wasn't behaving right for me either - so don't be hard on yourself. When an attribute is named to match a GIS field, the connection should happen automatically. For your data, it wasn't, which was odd - maybe it was the size of the data? Anyway, there is a way to map those attributes manually - see the help file for Connection Editor. Once they were mapped the code below worked perfectly. const unitScale = case Unit=="Feet": 0.3048006096012192 else: 1
@Range("Feet", "Meters")
attr Unit = "Feet"
@Range (0.5,200)
attr STORIES = 0 #Should be a GIS Driven Attribute but I had to "Connect" it manually
@Range (0,10000)
attr MEDIAN_HGT = 0 #Should be a GIS Driven Attribute but I had to "Connect" it manually
@Hidden
attr MEDIAN_HGT_feet = MEDIAN_HGT * unitScale
@StartRule
Footprints--> extrude(MEDIAN_HGT_feet)
split(y) {MEDIAN_HGT_feet/STORIES:Floor}* #comment this out if you don't want floors/horizontal splits I also saw something that was odd and - see above - the building has 20 stories, but the Median Height of the building is only 124 feet. So just a point of caution. Another note, the building in the foreground is 4.5 stories, in case you were wondering what was going on with the short top floor. Hope this helps. Devin
... View more
07-30-2016
12:37 AM
|
1
|
0
|
1401
|
POST
|
I'll take a look, but can you post your zip file, or a sample of it? Also what version of CityEngine are you using?
... View more
07-26-2016
09:34 PM
|
0
|
0
|
1401
|
POST
|
This is pretty simple. This is from the help file: To use these attributes with the CGA grammar you need to declare CGA attributes with matching names. A simple CGA rule file could look like this: attr height = 10 Lot --> extrude(height) After assigning this rule file to the shapes, the CGA attribute height appears in the CGA Attribute Mapping tab of the Inspector. Note that the Source field is set to Object, which denotes that the CGA attribute height is controlled by the object attribute of the lot. So in your case this is all you would need to do attr Your_Shapefile_Field_Name_For_Floors = 10 #value can be anything as it will map to the data
attr avgFloorHeight = 3 #setting this as an attribute will give you the ability to change in each building if necessary
@StartRule
Lot --> extrude(Your_Shapefile_Field_Name_For_Floors * avgFloorHeight) #again you could hardcode "3" here
... View more
07-26-2016
09:30 PM
|
1
|
2
|
1145
|
DOC
|
Chris this is awesome. Who knew there was a generic stump? I'm not sure if I can sort by height with the simple code I wrote, but putting them into 3 different columns is a great idea, and the webscene viewer does a way better job with the overall render and appearance. If you don't mind I'll take a shot at a hybrid of our rules.
... View more
07-26-2016
03:36 PM
|
0
|
0
|
2124
|
POST
|
Got it. I think this should do it.... /**
* File: dirtpile.cga
* Created: 26 Jul 2016 06:25:45 GMT
* Author: devlavigne
*/
version "2016.0"
@Range(1,89)
attr roofAngle=45
@Range(1,89)
attr dirtHeight=1
@StartRule
Start-->
roofHip(roofAngle)
split(y) {dirtHeight:DirtPile | '1:NIL}
DirtPile-->
comp(f){side:Sides| bottom:Base. | top:Top}
Top-->
color(1,0,1)
extrude(40)
... View more
07-26-2016
03:31 PM
|
0
|
0
|
638
|
Title | Kudos | Posted |
---|---|---|
2 | 11-28-2023 09:44 PM | |
1 | 08-22-2023 04:40 PM | |
1 | 07-19-2023 12:02 AM | |
1 | 03-15-2021 12:28 PM | |
1 | 04-08-2020 01:36 PM |
Online Status |
Offline
|
Date Last Visited |
05-20-2024
08:22 PM
|