Hi all,
I have some odd shapes that are produced by the split operation in one of my rules. I'm trying to fill these with an imported asset - I'd like CityEngine to pick the one that best fits the shape.
From what I can tell, this is exactly what the assetBestSize operation should do.
In my case - I've placed 3 assets in the project's /model folder. One is a 6x3 rectangle, another 3x6, and another a 6x6 square.
The code I've used is as below:
Can you see anything wrong that would prevent the wildcard working - or have I misinterpreted what this operation does?
Hello @MattOlsen
Thanks for your question. Your code above looks good. I assume your OBJ files have "zUp". The CityEngine OBJ-exporter writes "yUp" files.
The "assetBestSize" search returns the asset with the best fitting size, from the files specified by searchQuery, according to the specified axisSize string. If the lots are bigger than all assets, it is likely that the biggest asset is returned in all cases. To test this, I suggest creating a shape and assigning your CGA-rule. Then, use the transform tools to adjust the size of the shape to the assets. Eventually, an other OBJ-asset will have the best size.
If you want to randomize the asset insert on the lot, use assetApproxSize function—ArcGIS CityEngine Resources | Documentation