Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TransformationArray.chain() doesnt return the expected rotation #3

Open
jpasserin opened this issue Dec 15, 2021 · 0 comments
Open

Comments

@jpasserin
Copy link

In the following example the 3rd transform as an incorrect orientation. The Z axis isn't aligned with the chain plane
I think it must come from the parallelTransport()

from math3d.vectorN import Vector3, Vector3Array
from math3d.transformation import TransformationArray
from maya import cmds

positions = Vector3Array(
	[Vector3([-7.3,  7.7,  7.5]), 
	Vector3([-7.5, 13.4,  1.2]), 
	Vector3([-2.9,  8.2, -3.6 ]), 
	Vector3([-0.1,  3.9, -5.3])]
	)

normal = Vector3.planeNormal(*positions[:3])
chain = TransformationArray.chain(positions, normal=normal, axis="xz", negativeSide=False, endTransform=True)

for tfm in chain:
	loc = cmds.spaceLocator(name="pos1")
	cmds.xform(loc, matrix=tfm.asMatrix().flattened())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant