Select to view content in your preferred language

CGA

2371
3
10-28-2015 07:28 AM
ChrisHolmes
Frequent Contributor

Hello everyone, just thought I'd throw this out there. Any likelihood we'll one day see a cga debugger which would allow us to step through our code line by line? Something like that sure would help me out.

Cheers!

Tags (1)
0 Kudos
3 Replies
by Anonymous User
Not applicable

Do you use the Model Hierarchy? It is kind of like that, but not quite. In any case, the Inspect Model mode is a necessity for debugging CGA. Printing to the console is also very useful.

Chris

CC: Pascal Mueller

ChrisHolmes
Frequent Contributor

Thanks Chris. I am fairly new to CityEngine/CGA and don’t know of the model hierarchy. I will investigate it.

Thanks!

0 Kudos
DavidWasserman
Frequent Contributor

Along with the methods suggested by Chris, I have found color flagging to be surprisingly very helpful for debugging and getting relative location. I usually define rules named red, white and blue is most rules I write to determine where I am spatially in each model. Essentially it help to define rules that create visual representations of potential problems, but all the conventional debugging methods Chris mentioned are also critical (inspect model is the easiest way to determine shape scope/alignment etc).

#Debugging Rules

#White-->

#envelope(world.up, .1016, .05, 50, .05, 50,.05,60)
#alignScopeToAxes(y)
#t(0,1,0)
#color(1,1,1)

#Red-->

#alignScopeToAxes(y)
#t(0,1,0)
#color(1,0,0)

#Blue-->

#alignScopeToAxes(y)
#t(0,1,0)
#color(0,0,1)
David Wasserman, AICP
0 Kudos