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 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 Thanks to Thomthom, I was able to detect and apply correct flipping for objects that are not rotated. 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. I then recreate the geometry in Three.js using the exported data. I'm writing a custom SketchUp export plugin in Ruby.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |