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!
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
Thanks Chris. I am fairly new to CityEngine/CGA and don’t know of the model hierarchy. I will investigate it.
Thanks!
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) |