# How do I place the building footprint areas properly in the block(parcel) area ?

754
1
04-19-2019 12:06 AM
by
New Contributor III

Hello, I want to put a lot of buildings in a large parcel area. However, there should be some distances between the buildings and no buildings overflowing outside the parcel area.(Like in the attached png.)

How do I create a rule, I'm new to writing rules. Can you help me with the method?

1 Solution

Accepted Solutions
Esri Regular Contributor

You can split your parcel shape into a grid of building footprints and use geometry.isRectangular to discard the ones that are not rectangular.

``````Parcel -->
split(x) { { ~spacing: NIL
| width: ParcelSlice }*
| ~spacing: NIL }

ParcelSlice -->
split(z) { { ~spacing: NIL
| width: TestFootprint }*
| ~spacing: NIL }

TestFootprint -->
case geometry.isRectangular(0.1):
Footprint.
else:
NIL
‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍``````

https://doc.arcgis.com/en/cityengine/latest/cga/cga-split.htm

https://doc.arcgis.com/en/cityengine/latest/cga/cga-geometry-function.htm#ESRI_SECTION1_7DBA4E7E8618...

If you want an aligned grid, use the noAdjust option in the split.

Esri Regular Contributor

You can split your parcel shape into a grid of building footprints and use geometry.isRectangular to discard the ones that are not rectangular.

``````Parcel -->
split(x) { { ~spacing: NIL
| width: ParcelSlice }*
| ~spacing: NIL }

ParcelSlice -->
split(z) { { ~spacing: NIL
| width: TestFootprint }*
| ~spacing: NIL }

TestFootprint -->
case geometry.isRectangular(0.1):
Footprint.
else:
NIL
‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍``````

https://doc.arcgis.com/en/cityengine/latest/cga/cga-split.htm

https://doc.arcgis.com/en/cityengine/latest/cga/cga-geometry-function.htm#ESRI_SECTION1_7DBA4E7E8618...

If you want an aligned grid, use the noAdjust option in the split.