joostn / OpenJsCad

3D solid CAD using only Javascript
315 stars 128 forks source link

mirroring issue #56

Closed bebbi closed 9 years ago

bebbi commented 9 years ago

re #55 and commit 85d18f (rounding issue): late night correction that I guess is wrong, and so is the original code at that place. Diagonals product doesn't determine mirroring, it needs a determinant. Example: matrix with values +/-1 for idx [1, 4, 10] and 0 otherwise will be mirroring depending on the number of "-1", but this is not determined in diagonal. Determinant is already implemented in m4x4.isMirroring(). I suppose this hasn't been an issue because getTransformationTo never mirrors anyway (its transform is just rotations + base changes), and perhaps it is the only function using the polygon.transform operation inside csg.js. I'll fix that, let me know if there's something I'm missing.

bebbi commented 9 years ago

fixed in 3507fe4. (pull currently open)