Seems there're errors in City Engine Essential Skills Training project/Essential_street.cga. Specifically, these few lines:
PlantingLayout --> case lenAlongV > 2 && lenAlongU > 8 && heightOverTerrain < 2: split(u,unitSpace,0) { Crosswalk_width * 2: Pavement | split(v,unitSpace,0) { Planting_Width : split(u,unitSpace,0) { Planting_Length : PlantingOrPavement | { Planting_Spacing: Pavement | Planting_Length : PlantingOrPavement }* | ~1 : Pavement } | ~1 : Pavement } | Crosswalk_width * 2: Pavement } else : Pavement
Am I mistaken? If there're errors, how do I fix that?
Thank you!
Solved! Go to Solution.
Try the rule now (attached)...I was able to generate the following with this rule (image)
Remove the Bar after Pavement.
yeah but that created more errors
Hmm. This seemed to fix the error in my code. I know we are using the same file, but could you upload your Essential_Street.cga so I can use it? I might be able to see what is different about your copy.
Thanks!
Uploaded! Thank you Micah!
Try adding this asterisk...This will run this line of code for the entire sidewalk until it ends that segment.
Also, here is a link to the Complete_Street rule. It offers many more options and will most likely be of more use to you.
a wei,
Can you provide a link to the place where you downloaded the code? I can see several errors, but I'd like to see the publically posted version, so I can correct it before others download it.
One thing that seems to be happening here is that there was a change in CGA, so the inside of splits, everything separated by pipes must have a length specified.
Part of the old code shown above, which worked in older versions:
split(u,unitSpace,0) { Crosswalk_width * 2: Pavement | split(v,unitSpace,0) { ...
Must change to have a length in both parts, like this:
split(u,unitSpace,0) { Crosswalk_width * 2: Pavement | SomeValue: split(v,unitSpace,0) { ...
SomeValue could be:
~1 (means just whatever space is left. this is easiest fix)
'0.5 (means relative 50%)
123 (a literal value)
something * somethingElse (a calculated value like Crosswalk_width * 2, as seen above)
So this is just one error I noticed. More might be there. Please send link to download where you got this if possible.
Thanks!
Chris
Hey Chris,
Thanks for the reply. I downloaded the rule from this #6 CityEngine Essential Skills: Importing Streets - YouTube
From the link from that video.