Search code examples
modelicadymolaopenmodelica

Polygon creation in OpenModelica


While creating a regular polygon in the Icon/Diagram Layer in OpenModelica, I can understand that the origin is the centre/centroid of the polygon and the co-ordinates of the points of the polygon are calculated using the origin as a reference.

Can anyone tell me how the origin co-ordinate and the point co-ordinates of an irregular ploygon are generated in OpenModelica?


Solution

  • Each graphic shape has a bounding rectangle http://qt-project.org/doc/qt-4.8/qgraphicsitem.html#boundingRect. The center of this rectangle is used as an origin.

    What do you want to achieve?