I tried to get hole of shape in cityengine, but it doesn't work. I have exported 'vertices' of shapes by python, while the 'vertices' attribute of object includes both outerboundary and innerboundary, which cannot distinguish innerboundary from outerboundary.
Is there any method to get the hole from a shape ?
Maybe you could export the vertices marked on the inner boundary as a separate shape. Then you can apply a rule to that shape.
But I don't know which vertices are inner boundary...
It's obvious that cityengine can recognize inner boundaries and render them correctly, but I cannot get the inner boundaries information by cityengine functions.
Sorry, I misunderstood the situation (I thought you knew the inner and outer boundaries while exporting in Python).
No, I don't think you can get the hole using CGA operations on a shape with a hole. However, if you are creating your shape in Python, then you might be able to create a face for the hole. (I don't really know how you are getting your initial shapes, but if you can create a face for everything including the hole, then the following will work.) Then, if there are multiple faces, you can use the comp split to separate the border faces from the inside faces.
comp(f) { border = Border | inside = Hole }
(Note, the = is used instead of : to keep all the border faces (if there are multiple) together as a single shape, but you can use : if you'd rather separate the faces into different shapes.)