How to get objects’ global vertices related to the global scope?

2794
1
05-11-2016 07:13 PM
MohsenNazemi1
New Contributor

I am reading the segments’ information via CityEngine Python API. I have a CE model with objects having a different scope from the global scope (probably modified in the CGA file by alignScopeToAxes(y) existing command). When I use getVertices() command, it returns the local values (as appeared in the vertices box in inspector) rather than the global values. In other words, all Z values are symmetrical compared to the global Z values (for example -2.254 instead of +2.254). How can I get the vertices relative to the global coordination of the model?

I think the only way is to modify the CGA file or rotate all local coordination systems in some way.

0 Kudos
1 Reply
CherylLau
Esri Regular Contributor

The Python ce.getVertices() method returns the vertices of the initial shape, the shape onto which the rule is applied.  Thus, the vertices seen in the Inspector are the same vertices that are returned by this Python call.  The CGA rule that is applied to this shape does not affect the vertices returned by this method.  It seems like you want the vertices of the model created by a CGA rule.  Unfortunately, this cannot be done in Python.  Exporting the model would be a way to get the vertices.