Jump to content
3DCoat Forums

understanding different position values


kritskiy
 Share

Recommended Posts

  • Member

I'm trying to understand the object position values. Tool Options Position, Symmetry Bounding Box and API .getTransform() all give absolutely different values. How do they correlate? For example if I want to set the Symmetry center to the object pivot, how do I approach that?

image.thumb.png.c7aa63a769437886e846a352d20fa6e6.png

  • Member
On 10/22/2024 at 11:24 AM, VitalVolokh said:

Hello! Thank you for request. To better understand and solve your problem, please send a part of your python script, it is possible that we have a bug in the API.

Hi Vitaly, I sent via email to Andrew and you! Thank you

Edited by kritskiy
  • Member
On 10/22/2024 at 11:24 AM, VitalVolokh said:

Hello! Thank you for request. To better understand and solve your problem, please send a part of your python script, it is possible that we have a bug in the API.

Didn't get any response via email so I'll post the script here:

import coat

transform = coat.Scene.current().getTransform()
row1 = transform.GetRow0()
row2 = transform.GetRow1()
row3 = transform.GetRow2()
row4 = transform.GetRow3()

print(f"row 1: {row1.w} {row1.x} {row1.y} {row1.z}")
print(f"row 2: {row2.w} {row2.x} {row2.y} {row2.z}")
print(f"row 3: {row3.w} {row3.x} {row3.y} {row3.z}")
print(f"row 4: {row4.w} {row4.x} {row4.y} {row4.z}")

In this example I import a cube with a pivot in its corner:

image.thumb.png.f36774ce69bb5492160818831194c101.png
 
After importing to 3DC the Position values seem to be similar to Blender's. In the Symmetry window if I click "Pick from Bounding Box" I'm getting values that I can't understand, how they correlate with position/location.
image.thumb.png.af31b45ddefa0d6507a93b80dbcdf717.png
 
And then if I print out transformation values from a script I'm getting a matrix like this:
image.png.bac9cf75ca6d6149fed40287b9244c43.png
 
If my move the object by 100 units in Z axis, I'm getting a different matrix with a weird value:
image.png.1134d7c6cf6b66cb5f97864b7f50115d.png
 
Thanks!
Edited by kritskiy
  • Thanks 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...