Frequently asked question
Note:
CGA stands for Computer Generated Architecture, a scripting language specific to Esri CityEngine and used to generate 3D content. See the link to the 'Basics of Rule-based Modeling' in the Related Information section below.
Code:
Sidewalk -->
SidewalkShape. # Original shape
PutTrees # Duplicate of the shape for placing trees
Code:
Sidewalk -->
SidewalkGeometry.
SidewalkObjects # shape duplicated!
# idea : we cut off small strips of the original shape sideways and along the length of the sidewalk.
# on the remaining shape 'dots' (small rectangular shapes), we insert a post.
attr placementWidth = 0.05
attr streetDist = 0.2
attr objectDist = 5
attr objectSize = 0.1
attr objectHeigt = 2
SidewalkObjects -->
# split sideways the sidewalk shape
split(v,unitSpace,0) { streetDist : NIL | placementWidth : PlacementStrip | ~1 : NIL }
PlacementStrip -->
# split along the sidewalk shape
split(u,unitSpace,0) {objectDist: NIL | placementWidth : PlacementPoint }*
PlacementPoint -->
alignScopeToGeometry(yUp, 0) # align the shape to the current point shape, thus the street direction!
#r(0,90,0) # toggle 90 degree rotation, e.g. for lamp poles
s(objectSize*2, objectHeigt, objectSize)
i("builtin:cube")
center(xz)
Get help from ArcGIS experts
Download the Esri Support App