try: for cga

1259
3
11-21-2022 09:39 AM
romainjanil
Regular Contributor

Hi, this is a thing which is in my unformulated wish list for a long time. 

Wondering if it would possible to have something similar to the try | except python version, but in cga.

This would be mainly for geometrical manipulation operators which "silently" fail to process a rule geometry (thinking of roofs in certain weird cases, offsets, setbacks etc). When that happens there's no way -in cga, for example with some case/else- to catch those errors because derivation stops at faulty shape and keeps input geometry in its current state (meaning if at beginning of a rule set, most of the cases without a proper material, name etc).

Of course these problems are somehow catchable in cga log afterwards, but I think (imho) it would really streamline and robustify generation process when dealing with massive batches. 

Anyway, this is not urgent...

3 Comments
CherylLau

It's not what you asked for, but resetGeometry might be able to help in some (probably not all) cases (though it might be tedious).

https://doc.arcgis.com/en/cityengine/latest/cga/cga-reset-geometry-operation.htm

romainjanil

HI , no unfortunately, it's impossible to catch those pure geometrical error at the moment, as I said derivation stops and leaves rule geometry -as is- as a terminal leaf. No matter what you code after. This is a very special tricky usecase, I should probably package an exemple. 

ChristianIten
Status changed to: Under Consideration