Hi,
C4D has a complex coordinate system.
- world coordinates
- local coordinates
- object coordinates (we can see them in the outliner, for selected object)
For the problem I am asking, I don't wish to have a general theory answer, concerning the coordinates system, but to obtain precise answers.
Here is my problem:
For a polygon, we can get easily the array of points and then display the position of this points as follows:
tabPoint = polygon.GetAllPoints()
for point in tabPoint:
print point
But I would like to knowhow to display the position of points of this polygon in the World coordinates ?
Then if I change the World coordinates of some points, how to convert this coordinates for modify the array of points for this polygon ?
I indicate below in what order are these two questions:
- Step 1: access the array of points for a polygon and therefore access the coordinates (very easy)
- Step 2: Conversion of these coordinates to world coordinates (first question)
- Step 3: change the position of some points of this polygon in the world coordinates (very easy)
- Step 4: Conversion of these world coordinates to the format of the array of points for this polygon (second question)
- Step 5: Modification of this polygon with the new array of point (very easy)
You may want to know why I am asking these questions, here is the reason.
I have two polygons that represent cliffs, but they do not coincide very well.
I have to bring closer the dots of theses cliffs to obtain a perfect join.
I'm doing this work to make a canyon that I started in opensim (see link below)
my cliffs before the junction of points
My points alignment algorithm works well, but I'm stumbling on that damned C4D coordinate system !