# How to determine the dimensions of a face on a CGA created building.

3158
4
06-02-2016 11:50 AM
New Contributor II

I've created my own CGA rule for creating buildings in a city, so this isn't from a template that I can reference.

I keep running into building footprints that have curved portions to them with lots of verticies which cause, via the CGA rule, a lot of vertical faces. The number of faces isn't an issue, but the CGA rule goes on to create faces on top of faces, giving me artifacts on the face. I have been using the geometry.area function to determine if there are any that are super small, but when the buildings get 50m tall or taller, I have to increase the number for the area check, and it starts to mess with other buildings.

So, I'm looking for a way to measure the x,y (or in my case, the x, z) of the face before splitting or extruding it. Hopefully it exists and I've just been overlooking it.

Tags (8)
1 Solution

Accepted Solutions
by
Regular Contributor

I think you're looking for scope.sx/y/z. Example:

```Lot -->
extrude(rand(40,60))
comp(f){left: DoSomething}

DoSomething -->
case scope.sy > 50: print ("it's bigger than fifty!")
else: print ("it's not!")```
4 Replies
by
Regular Contributor

I think you're looking for scope.sx/y/z. Example:

```Lot -->
extrude(rand(40,60))
comp(f){left: DoSomething}

DoSomething -->
case scope.sy > 50: print ("it's bigger than fifty!")
else: print ("it's not!")```
New Contributor II

Dang, it never occurred to me that scope.s could be used for a case check. Thank you so much.

How do I petition for this information to make it into the help file for scope as it doesn't seem to allude to the face you can use it for this.

Esri Regular Contributor

Thanks for the suggestion.  We will try to incorporate this into the next version of the help.

Esri Regular Contributor

Yes, and to support Z R's answer, here's the reference page for scope.sx, scope.sy, and scope.sz: