ID_MODELING_AXIS



  • On 05/12/2014 at 05:44, xxxxxxxx wrote:

    Hi all,

    I'm a little confused how I should change the axis of an object.
    Like shown in the SDK, you can enable/disable the modeling axis with c4d.CallCommand(c4d.ID_MODELING_AXIS).

    But when I call it, move my object, and call it again, nothing happens.
    When I looked on google, I only saw workarounds (saving the points, moving the object, set the points position again). But for my case it gives me tons of extra work, which I don't want.

    Does somebody know another way how to do this?
    Doing it without code isn't an option, because its a reaction on a condition.

    Greetings,

    Casimir



  • On 05/12/2014 at 08:19, xxxxxxxx wrote:

    Hello,

    technically the only way to "edit the axis" is to transform the geometry one way in object space and the object itself the other way in world space. When "Enable Axis" is enabled this tells the tools that they should do this. The same is true for the "Center Axis to" command. Just try to edit the axis of a million polygon mesh to see what happens.

    Best wishes,
    Sebastian



  • On 05/12/2014 at 11:04, xxxxxxxx wrote:

    Hi,

    So, if I understand you correctly, it should all work fine the way I did it?
    Because, if I enable the Axis and move the axis/object, Cinema 4D should transform the geometry one way in object space and the object itself the other way in world space. So I should only give one transformation (the movement of the axis).

    Guess I went wrong somewhere, but can't find out where...

    Greetings,
    Casimir



  • On 08/12/2014 at 02:31, xxxxxxxx wrote:

    Hello,

    as I said "Enable Axis" tells the current tool (or command) to behave differently (if this tool supports this). How do you "move" the object?

    Best wishes,
    Sebastian



  • On 09/12/2014 at 08:08, xxxxxxxx wrote:

    Hi,

    I move the object with: L_Foot_Control.SetAbsPos(c4d.Vector(L_Foot_Control_Position.x, L_Foot_Control_Position.y, L_Foot_Control_Position.Z + 1.2))

    Doesn't the "Enable Axis" work with absolute position setting?

    Greetings,
    Casimir



  • On 10/12/2014 at 04:10, xxxxxxxx wrote:

    Hello,

    "Enable Axis" is a hint for tools what to do. SetAbsPos() is not a tool; it will directly edit the object's position.

    A tool will move the object (using SetAbsPos()) and then compensate this movement by moving the point object's points in the other direction. It seems that there is no tool available via the API so you have to rebuild this process.

    Best wishes,
    Sebastian



  • On 10/12/2014 at 05:54, xxxxxxxx wrote:

    Hello Sebastian,

    if I get you right, than there is no option in sendmodelling command for a simple translation/rotation?
    We are forced to calculate every new point position by ourselves?
    Additionally, if the axis of the object were moved and rotated in the first place and we want to reset them to e.g. the orientation and origin of world space we have to do those calculations twice ?

    If not, do you have an example to optimize this procedure?

    Thanks in advance !
    Martin



  • On 10/12/2014 at 07:22, xxxxxxxx wrote:

    Hello,

    there seem to be no tools or commands available to handle this specific task.

    The "axis" is not a "thing". There is only a point object's (world space) matrix and the position of it's points in object space. So technically you cannot move the axis as the axis does not exist. You have to move the object and then it's points (or vice versa). If you have a complex transformation you may be able to describe this transformation in a final matrix and then you have only to apply this matrix.

    Best wishes,
    Sebastian



  • On 19/12/2014 at 09:35, xxxxxxxx wrote:

    Hello Casimir,

    was your question answered?

    best wishes,
    Sebastian


Log in to reply