Mirror copying in SU

In the example, the faces are not oriented in the source. Can you expect the product of mirror, flip, rotate or even cartwheel to orient them?

Shep

It’s known that SketchUp decides the orientation of a face based on the order in which its vertices are traced as it is drawn (the vertices normally go in counter-clockwise order when viewed from the front face normal - right hand rule). But it’s also known that there are some cases in which this logic isn’t followed, usually for inscrutable reasons. I suspect that is what happens when you mirror ungrouped geometry because the plugin has to create new entities instead of just applying a new transformation to the ones in the ComponentDefinition.

Steve’s explanation of what happens with loose geometry seems to make sense to me - some faces could reverse, some not, depending on which order the originals were drawn, and in which order the Mirror code encounters them.

Once drawn, does the order of the points round a face stay invariant? Probably not, I would guess, because you can draw (for example) a rectangle whose points are ABCD clockwise (say) just as well with one or two of the edges ‘reversed’ - say AB - CB- CD- then either DA or AD. It will still form a rectangle, but I don’t know in what order the edges or corner points are stored in such a case. Or indeed which way ‘up’ the face would first appear. If on the ground plane (red-green) probably with the face reverse ‘up’.

My Mirror plugin does no more that make a temporary group of the selected geometry/groups/instances etc.
It then places a second instance of it located on the picked 3 point plane [rotated into place as needed], and scaled -1 to mirror it. That’s the usual workflow.
The user then chooses to keep/delete the original.
If kept both temporary groups are exploded.
If deleted the original group is deleted and the mirrored copy is exploded.
There is no ‘replication’ of geometry in the tool [at least not for many many versions].
So this face flipping might be a result of insufficiencies of the API - can you replicate it when doing the steps manually ?
When you use Mirror you usually choose 3 points to define a plane.
However, if you choose a 2 point line the copy ‘flips over’ about the line [perhaps reversing the face in the process?] and using one point has similar flipping results…

I think I have the measure of this now.

If you use your plugin with 3 points, the face does not reverse. Because I often use it with 2D geometry, I don’t really have a third point to choose and simply use 2 point. As you say, doing that does reverse the face.

It’s probably asking a lot, but what about adding an option when using 2 point mirroring to reverse faces? Or is that a bit tricky?

It’s not mirroring as you think of it, it’s mirroring along a line (only German Wikipedia-Link because of the better images than in the English version of that page…)

The plugin can mirror regarding a point too (one click only), it’s described there too.

I use TIG’s Mirror plugin daily - works great for me

http://sketchucation.com/pluginstore?pln=Mirror

1 Like