

I was able to get correct results by detecting the simpler case (only flipped, not rotated or scaled), then setting for example = * -1 in Three.js for such components. I can't get this matrix work correctly in Three.js, and the component is never mirrored, resulting in the behaviour that can be seen in the picture. This works correctly in my exporter/importer, I can reapply this matrix on Three.js side.īut when that already rotated component is also mirrored, the matrix looks like this: 0.33, 0.58, -0.74 So I can detect that flip easily and all is fine.īut if I arbitrarily rotate the same component (unflipped) an a couple of axes, the matrix looks like this: -0.33, -0.58, 0,74 To view the contents of the folder, in the top bar, next to your account name. and you can remove them whenever you want. For a plain unrotated/unscaled/unflipped component the matrix is: 1.0, 0.0, 0.0įor a flipped (mirrored) component the matrix can be: -1.0, 0.0, 0.0 From today it is possible to add, as a reminder, the textures you prefer in the personal folder called FAVORITES. There is 2 way to mirror in sketchup, st the way is use default tool, nd is use extension(see chart) 2.1Mirror extension 2.2 Mirror JHS Powerbar extension. We can select the object we want to mirror, right click on it and select Flip Along: This will give us the chance to select which plane (red, green or blue) of the object to use as a mirror plane. Thanks to Thomthom, I was able to detect and apply correct flipping for objects that are not rotated. Mirror isnt a standard tool in SketchUp, but there are several ways to Mirror objects using different methods. Still struggling to apply this information, but getting closer based on this information: Note 3) If the geometries are flipped / mirrored using the scale tool instead of flip along tool (effectively the same result), they work correctly. Note 2) Although I believe this to be a SketchUp Ruby API issue, I tagged this with Three.js just in case there is something obvious I'm missing in regards to mirroring and Matrixes. Note 1) I have observed similar buggy behaviour in the built-in SketchUp Collada exporter (when loading them with Three.js ColladaLoader). How can I properly take these flipped geometries into account? Do they have some kind of separate matrix, or entity flag in SU Ruby? Here's an example result the rest of the model is fine, but the boat is obviously created using flipped boat halves, and in this picture they appear all over the place: I can get a transformation matrix, and convert it (see this question of mine how), however it does not work for these flipped objects. I can not find any SU Ruby method to find out whether any given entity has this flip along applied. Simply put, the flip along is not respected.

I'm having troubles with some component/group transformations, and tracked it down to mirroring, or geometry that has "flip along" applied for some axis. Flipping, Mirroring, Rotating and Arrays With SketchUps flipping and rotating tools, your geometry becomes as nimble as an acrobatic troupe. I then recreate the geometry in Three.js using the exported data. I'm writing a custom SketchUp export plugin in Ruby.
