Attach does not apply rotation with connectors pointing in opposite directions
If you have 2 connector pointing in exactly opposite direction, then attaching 2 parts with these connector will not apply the 180 degree rotation. Supposedly the cross product of the vectors is 0, and therefor the OpenScad rotate() function does nothing, because it is given a zero vector to rotate around.
Example:
c1 = [[0,0,0] , [-1,0,0], 0]; c2 = [[0,0,0] , [1,0,0], 0]; c3 = [[0,0,0] , [1,0.0001,0], 0];
connector(c1);
connector(c2);
connector(c3);
//not working correctly attach(c1,c2) { color("blue") cube([30,10,5]); }
//workaround by moving the connector vector a tiny bit attach(c1,c3) { color("red") cube([30,10,5]); }
I think I've found something. This is because of a problem whith the cross product in two vectors. If they are in the same direction it is [0,0,0]. I've solved it with one if.
I'm new in github, how can I show you it?