Frequently asked question

How do I calculate the average slope of a curved street or sidewalk shape?

Last Published: October 1, 2025
The CGA example below can help with calculating the average slope of a curved street or sidewalk shape.

Note:
CGA stands for Computer Generated Architecture, a scripting language specific to Esri CityEngine and used to generate 3D content. See the link to the 'Basics of Rule-based Modeling' in the Related Information section below.


Code:
approxCurvedSlope = asin (scope.sy / geometry.du(0,unitSpace) )
Street -->
alignScopeToAxes(y)
print ( approxCurvedSlope )

Note:
Please note that this is example code and may not be useful in all situations.

Article ID: 000011361

Software:
  • ArcGIS CityEngine Prev

Get support with AI

Resolve your issue quickly with the Esri Support AI Chatbot.

Start chatting now

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Start chatting now

Go to download options