# Corner depth of imported parcels

Question asked by k.karamitov@esribulgaria.com on May 8, 2018
Latest reply on Jun 4, 2018 by CLau-esristaff

I am currently working on 3D zoning and I face 3 issues for which I looked all over the forum, the help documentation and the tutorials and I can't figure out how to solve them. This post is about the second issue - corner depth of imported parcels. Here is a link to the first and a link to the third one.

There is an automatic attribute for the corner width (not depth) for dynamic shapes created from graph network. But in urban design we already have parcels and need to specify the build up area for them. There are cases in which a corner parcel has no setbacks from the streets and an offset / chamfer from the corner must be set along the bisector of the angle. That offset must have a distance of 2 meters from the corner. You can see the attached sketch for more clarity.

I need to be able to set this corner offset and then to extrude the 3D Volume. I set the setbacks in BuildArea rule and I found a way to distinguish the corner lots from the others - Lot rule. In the BuildArea rule I also try to select somehow the corner and then give it a distance but as far as I get is a rectangular shape and not something that I can use. Furthermore, this distance is not along the bisector but along the x and z axes. Would any mix of split, comp and offset operation do the trick?

Here is the CGA code and I attach a screenshot of my work.

@Group("Setbacks")@Order(1)
attr Front_setback = 5
@Group("Setbacks")@Order(2)
attr Back_setback = 5
@Group("Setbacks")@Order(3)
attr Left_setback = 5
@Group("Setbacks")@Order(4)
attr Right_setback = 5

@Group("Visual")@Order(1)
attr Function = "#ff0000"
@Group("Visual")@Order(2)
attr Opacity = 0.7

@Group("Volume")@Order(1)
attr Eave_height = 0
@Group("Volume")@Order(2)
attr Max_height = 0
@Group("Volume")@Order(3)
attr Roof_angle =
case Max_height == Eave_height : 0
else: 45
@Group("Volume")
attr height = Max_height
@Group("Volume")
attr streetWidth(i) =  0

@StartRule
# SETBACKS
BuildArea -->
setback(Front_setback) { street.front: Lot | remainder:
setback(Back_setback) { street.back: Lot | remainder:
setback(Left_setback) { street.left: Lot | remainder:
setback(Right_setback) { street.right: Lot | remainder:
split(x){scope.sx-1:BuildVolume | 99:split(z){scope.sz-1:BuildVolume|99:Lot}}
}
}
}
}

# CORNER LOTS
Lot -->
CornerRecursion(geometry.nVertices - 1, 0)

CornerRecursion ( edgeID, nStreetEdges ) -->
case edgeID >= 0 :
case streetWidth(edgeID) > 0 :
CornerRecursion ( edgeID - 1, nStreetEdges + 1 )
else:
CornerRecursion ( edgeID - 1, nStreetEdges )
else:
case nStreetEdges >= 2 :
IsCornerLot
else:
IsNotCornerLot

IsCornerLot -->
color("#ff0000")

IsNotCornerLot -->
color("#0000ff")

# EXTRUSION
BuildVolume -->
envelope(world.up, Max_height, Eave_height, Roof_angle, Eave_height, Roof_angle, Eave_height, Roof_angle, Eave_height, Roof_angle)
set(material.opacity, Opacity)