moving the axes and let the polygon stay [SOLVED]

  • On 19/11/2014 at 13:59, xxxxxxxx wrote:

    Hi all,
    I want to move a polygon with his axis to Y=0 and let the polygon
    stay above it?
    To move the axis to 0 is no Problem.
    But what do I have to do that the polygon will stay above?

    Any ideas.

    Thanks a lot

  • On 20/11/2014 at 08:39, xxxxxxxx wrote:


    it seems there is no dedicated function to do this. You can edit the axis of an point object by moving the object and then transform the points of the object:

      if op == None:  
      if op.IsInstanceOf(c4d.Opoint) == False:  
      # the offset of the axis  
      offset = c4d.Vector(100,0,0)  
      # move object  
      m = op.GetMg() = + offset  
      # transform points  
      padr = op.GetAllPoints()  
      pcnt = op.GetPointCount()  
      for i, point in enumerate(padr) :  
          point = point - offset  

    In a more complex situation you may have to work with a offset matrix.

    best wishes,

  • On 21/11/2014 at 00:56, xxxxxxxx wrote:

    Hey you arre my hero :-)

    Thanks for your code.

Log in to reply