Hi there folks.
My first real question here after stumbling my way through a few approaches that gave me mixed results.
What I wish to do is define a base shape, in CityEngine, for a car park level then on top of that I would like to add some podium definitions via externally created DAE shapes, extrude them to different heights then on top of those podiums again place some more DAE tower shapes and again extrude them individually to different heights. It's the last part that's got me stuck at this stage. When I place the podium DAE I use comp(f) to split them into their individual indices. The part I'm struggling with is how do I then approach the placement of the towers, which come in as one DAE, then need to be split into separate shapes, and would then need to be each raised to the individual podium levels before extrusion ? My guess is that I need to somehow keep tabs on what I do to each podium and have to cater for that per the corresponding tower.
Thanks.
Hey !
It's easiest that you do the following:
(I didn't test this code, may contain errors.)
of course, add the attributes ..
Footprint -->
extrude(world.y, buildingHeight)
split(y) {~floorHeight: FloorVolume}*
FloorVolume -->
case split.index == split.total -1:
# top base floor
FloorVolume.
# copy the shape now ..
comp(f){top: # scopezUp !
alignScopeToAxes(y) # rotate scope yUp
i(upperFootprint) # note that assets needs to be modeled yUp.
Continue.
}
else:
# other base floors. note you can also do a '== 0' test to get the ground floor !
FloorVolume.
Matthias Buehler
Head of 3D Technologies
twitter: @MattB3D
-------------------------------
Garsdale Design Limited
Thanks a lot Matthias, I will test this out as soon as I get a chance and report back.