That’s just it, “they seem to be identical”. But apparently they are not. So how is the exporter to blame? Somewhere hidden in SketchUp are the differences between both mirrored instances.
How would they not be? In my test the exporter re-used the same definition for the instance that was flipped using flip and flipped using scale -1. No difference between flip and scale -1, nothing exposed in the Ruby API and no difference in how they are handled by the exporter.
However the exporter created a separate definition for the flipped and non-flipped instances which is a behavior no one can explain.
Okay, after further testing I think I understand the problem. When you use “flip along” you are only flipping on one axis. when you use scale -1 you are flipping on 2 axis or even 3 axis
If you use “flip along” red and then “flip along” green the instancing works again.
Conversely if you do -1 scale but only on one axis instancing breaks. If you -1 scale on 2 axis instancing works again, and -1 scale on 3 axis it also works.
a possible reason instancing breaks is because when you only mirror on 1 axis it will reverse the normals. mirroring on 2 axis will keep the same normals, and mirroring on 3 axis will cause the normals to reverse again.
Perhaps since the normals are reversed when mirroring on an odd number of axis sketchup refuses to instance those components(for some reason it still instances a 3 axis scale even though it breaks the normals).
The applied matrixes are as follows:
(3rd from left) Identity(no mirror): 1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1
(2nd from left) Mirror along red: 1,0,0,0,0,-1,0,0,0,0,1,0,0,0,0,1
(4th from left) Mirror along red and green: -1,0,0,0,0,-1,0,0,0,0,1,0,0,0,0,1
(1st from left) Mirror along red green and blue: -1,0,0,0,0,-1,0,0,0,0,-1,0,0,0,0,1
In an earlier post you said that scaling (once) by -1x did the trick for you.
What you are saying now is that you need to scale twice for the instance to work again properly (through the exporter I guess)
All I was saying is that flipping and scaling by -1x needs to lead to exactly the same mirrored result by SketchUp before the instance is handled by the (or any) exporter. It is not the task of the exporter to filter out seemingly equal mirrored instances that are achieved by different operations. Nowhere in SketchUp there is any mentioning of differences between mirrored instances due to different operations.
Earlier I was scaling on 2 axis by using the corner grabber. I hadn’t thought to try scaling on only one until recently.
Flipping twice on different axes are the geometrical equivalent of rotating 90 degrees along the third axis (given they are all perpendicular). Flip twice and the geometry isn’t mirrored, just moved.
So the exported might have treated instances of both operations the same: both operations in SketchUp that lead to mirrored instances will be made unique instances after exporting. That would indeed be something to be corrected in the exporter and would have nothing to do with in SketchUp.
Scaling in two directions at once by -1;1 or (-1,1) is like scaling in just one direction due to one value being equal to 1
The result is a mirrored selection.
See attached image and note the component’s axes of all the instances:
That is exactly what my experiment 10 days ago suggested. Out of 3 instances, one original, one flip-mirrored and one scale-mirrored two definitions were exported. One definition was used by the original and one definition was just by both the mirrored instances, regardless of how they were mirrored.
