Is it possible to mirror a function ?

06-26-2012 08:46 AM
New Contributor
Hi everybody,  I'm (a french guy , sorry for my english) discovering City Engine and I was wondering if it is possible to mirror a function ?
I created this building. For the moment I applied the same function on the facades 3 and 5, but I would like them to be symmetricals.


I tried with mirror(xFlip, yFlip, zFlip) function, but it change the random windows(i have windows objects in my assets with a random function), or maybe I missunderstood something...
Does anyone have an idea ?

Hope you will understand me...
Thank you for your help.
0 Kudos
1 Reply
Frequent Contributor II
hi !

CityEngine always works in a tree structure, check the Model Hierarchy Window and enter the Edit Model Mode ( see docs ) how the geometries are created by stepping through the rules.

Check also this video :

Thus, you will find that all CGA operations always work based on the SCOPE and it's current geometry.

You can create such specific symmetries only with the component split ( comp() ) and choose opposing selectors, such as world.west // world.east. Or index-based, e.g. with the modulo operator.

Mirroring always works on the geometry of the current scope and it's geometry. So once you are on the Facade shape, you have mo more access to the geometry of the whole buildings. CityEngine uses a top-down approach, so you can not query 'back up the tree' ( Model Hierarchy).

Let me know if you have more questions.
0 Kudos