Can you perform multiple orientation changes through the API?

I have a model created via the API with incorrect orientation that I would like to be able to correct either with patches or some other way. I think I would need to correct the orientation in two different ways, for example both {“axis”: [1, 0, 0], “angle”: -90} and then {“axis”: [0, 0, 1], “angle”: 180}.

I tried chaining them together with 2 different patches, but the 2nd seemed to overwrite the first. Is there a way to do both of these transformations via “orientation” in options? Do I need to use the “matrix” function?


To get the desired effect, you need to describe the target rotation as a single rotation instead of two rotations. I believe you need to multiply the two quaternions.
setmatrix uses the same idea, but describes your rotation as a full matrix. You can use either.

1 Like

Thanks for the reply! I’ll work on trying to figure out matrix. is a useful js library to help with that

1 Like