Nebeor Posted June 11, 2019 Share Posted June 11, 2019 (edited) I made some progress: But i'm not quite there, i changed the object variables like this: TVariableBlock value = TVariableBlock ((Sint16) 3); gSDK->SetObjectVariable(*rect, ovSymbolScaleType,value); TVariableBlock value2 = TVariableBlock ((Real64) -1.0); gSDK->SetObjectVariable(*rect, ovSymbolYScaleFactor,value2); this does almost what I want, but unfortunately this does not work with the rectangle objects that are in my group. I suppose this is a bug? Apparently I need to 'Flip' this object without scale. I'm looking forward to your reply. Edited June 11, 2019 by Nebeor Quote Link to comment
Nebeor Posted June 11, 2019 Author Share Posted June 11, 2019 apparently using scale on VWTransform is the way to go, It will keep everything 2D as long the z offset equals 0. Quote Link to comment
Nicolas Goutte Posted June 11, 2019 Share Posted June 11, 2019 10 minutes ago, Nebeor said: apparently using scale on VWTransform is the way to go, It will keep everything 2D as long the z offset equals 0. Using a transform matrix was what I was about to recommend, but I was unsure for a 2D-Symbol, especially in VW 2015. (However, sorry, I had no time to test it, even on a newer VW.) Quote Link to comment
JBenghiat Posted June 11, 2019 Share Posted June 11, 2019 Scale has nothing to do with mirroring, either with the object variables or the transformation matrix. A mirror is a flip of the transformation matrix and an offset from the line of reflection (twice the vector from the object to the reflection axis) Using matrix transformations can be a bit tricky: you can get and set an object’s transformation matrix directly, which is its location and rotation in space, as well as transform by a matrix (effectively multiply the object’s matrix by the transformation matrix). The order of applying the transformation also makes a difference VWTransformationMatrix also has a method returning whether a matrix is flipped. Quote Link to comment
Nebeor Posted June 11, 2019 Author Share Posted June 11, 2019 I think the use of matrices is the only sensible way to transform objects.(sorry Vectorscript and Python) The good part now is that I can use almost the same transform for my 2D and 3D parts (hybrid objects), I just have to drop the Z-offfset back to 0 on the transform before applying it to the 2D part. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.