You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that the mult_matrix_4 function is showing some odd behavior. I defined a 4x4 transformation matrix that should move a shape up by 3 units and then rotate that shape by pi/7 radians about the point (0, 3.5, 0) and about the axis (0,0,1):
There seems to have been an error in polyhedron polyhedron_multmatrix4::operator()( const polyhedron &in ), the function that handled the matrix multiplication for mult_matrix_4. One of the indices in the matrix multiplication routine itself was wrong. I fixed it, and also simplified the function somewhat.
It seems that the mult_matrix_4 function is showing some odd behavior. I defined a 4x4 transformation matrix that should move a shape up by 3 units and then rotate that shape by pi/7 radians about the point (0, 3.5, 0) and about the axis (0,0,1):
I then flattened the matrix in row-major format, as mult_matrix_4 seems to require:
I then made a box in pyPolyCSG and applied the transformation:
In terms of the first 4 vertices (as returned by b.get_vertices()), I get what seems to be a translation + dilation of my shape:
I was expecting to get a translation + rotation of the box, as I do when I multiply the vertex coordinates by the transformation matrix by hand:
Do you know what's causing the discrepancy, and do you know how I can fix it?
The text was updated successfully, but these errors were encountered: