Hi,
Is there a way to specify the exact number of times a shape is split?
For example (from the manual):
A--> split(x){ 2 : X(2) | 1 : Y(1) }*
will give as many of the "2 1 2 1 ..." pattern as can fit.
But what if I want to have exactly 3, as in "2 1 2 1 2 1" and leave the rest of the shape unused?
I can always do:
A--> split(x){ 2 : X(2) | 1 : Y(1) | 2 : X(2) | 1 : Y(1) | 2 : X(2) | 1 : Y(1) }
But I want the number of times to repeat to be an attribute. Something like:
A--> split(x){ 2 : X(2) | 1 : Y(1) } * repeat
Thanks!
No, unfortunately, there is no easy way to specify how many times you want the pattern to repeat.
You would have to calculate the length of the last part and put that in the split.
OR
You would have to write it recursively to keep splitting until the desired count is reached.
Thanks. How does one go about making a feature request?
GeoNet users can make CityEngine feature requests on ArcGIS Ideas - CityEngine
Other users with the same request can vote on it and add comments.
This section is moderated by the CityEngine development team.