Hi all
Say you have a lot which you have subdivided in several minilots using CGA attributes.
All minilots belong to the same shape. All minilots are extruded upward and their vertical facades are separated with split comp.
Is it possible to use the new function edgeAttr.getFloat(attributeName) to sample the streetWidth Object Attribute of each miniLot facade?
To add extra complexity, all the streets are curved, not straight, so there are not 1 single street value per side, but several.
Simon Haegler , Cheryl Lau, any idea?
Thanks
A
Solved! Go to Solution.
Hi there,
Shapes generated via CGA cannot sample other values on a per-leaf basis. Means you'll get one initial attribute that will be constant for all the shape (and it's successor shapes you create via CGA.
Cheers,
matt
matthias buehler | founder & CTO | msc arch eth zurich
Hi there,
Shapes generated via CGA cannot sample other values on a per-leaf basis. Means you'll get one initial attribute that will be constant for all the shape (and it's successor shapes you create via CGA.
Cheers,
matt
matthias buehler | founder & CTO | msc arch eth zurich
If you have lots that are not dynamic (i.e. not generated automatically by street networks) and streets in the scene, then it is possible to use edge attributes to sample street widths.
To mimic your case, I created a lot with 4 buildings on it.
Lot -->
split(x) { ~cell_size: split(z) { ~cell_size: Cell }* }*
Cell -->
offset(-offset_dist, inside)
extrude(10)
Mass
The lot is surrounded by streets with widths as indicated in the (last) screenshot below. Select the lot, go to Shapes -> Compute Edge Attributes. This will create object attributes with the prefix /edgeattr/. Streetwidths are calculated based on the streets near the shape.
Compute edge attributes tool—ArcGIS CityEngine Resources | Documentation
This code samples the edge attribute streetwidths for each side of each building and resizes the facade according to the sampled value.
Mass -->
comp(f) { side: Side }
Side -->
s('1, edgeAttr.getFloat("streetwidths"), '1)
set(material.opacity, 0.5)
Sampling happens by projecting the current shape geometry onto the outline of the initial shape. Note that in your case with curvy streets where a building side might correspond to multiple streets, the function will only sample one of the streets.
edgeAttr functions—ArcGIS CityEngine Resources | Documentation
Hi Cheryl
Thanks! Makes sense now.
So if I understand correctly these attributes are only created when Lots are not dynamic then and there is no way to do a similar thing for Dynamic lots, correct? To query the streetWidth list of a dynamic shape.
A.
Shapes -> Compute Edge Attributes can only be done on shapes that are not dynamic.
The streetWidth attribute can be used for dynamic lot shapes that are automatically created by street networks. However, note that this attribute is different than the edge attribute /edgeattr/streetwidths that is calculated for non-dynamic shapes. The streetWidth attribute does not include sidewalk widths, and it does not project to the nearest street (lot sides not touching a street get 0).
See also:
https://community.esri.com/thread/199406-designate-multiple-street-edges#comment-722386
and
https://community.esri.com/message/852677-re-streetwidth-used-in-setback#comment-855075