AlanW Posted May 20, 2016 Share Posted May 20, 2016 (edited) Hi, Been looking at the Mirror node to see why it doesn't work and am finding with my limited Python knowledge that the error message says "'module' object has no attribute 'Mirror'". Does this mean Python does not have a pre-set function for this? There is one called vs.MirrorXY3D. So in the attached file I substituted the 'vs.Mirror" with 'vs.MirrorXZ3D' and a 3D object mirrors down the page but does not leave a copy in place or respond to the P1 & P2 inputs. Maybe this may spark something to resolve this one or maybe a red herring. Second image run if front mode 2 on keyboard. Edited May 20, 2016 by Alan Woodwell Quote Link to comment
Kevin McAllister Posted May 20, 2016 Share Posted May 20, 2016 Hi Alan, I don't believe vs.mirror exists as I mentioned here - https://techboard.vectorworks.net/ubbthreads.php?ubb=showflat&Number=226130#Post226130 . Marissa or Jim haven't commented on why vs.mirror was used. When you do a broader search of the developer wiki using mirror it suggests vs.FlipVer and vs.FlipHor which may give you what you want. Kevin Quote Link to comment
AlanW Posted May 20, 2016 Author Share Posted May 20, 2016 Kevin, Thanks, The Flip3D works but I was trying to solve the issue with the Mirror node and in doing so learn more about Python and scripting. You seem to have a good handle on what's been posted, do you have a filing system or just a great memory? Quote Link to comment
Kevin McAllister Posted May 20, 2016 Share Posted May 20, 2016 Kevin, Thanks, The Flip3D works but I was trying to solve the issue with the Mirror node and in doing so learn more about Python and scripting. You seem to have a good handle on what's been posted, do you have a filing system or just a great memory? Haha neither. I've mastered the forum search function and had a hunch it had already been discussed. I couldn't get vs.FlipHor or vs.FlipVer to work in a Marionette node. How did you know what parameters would work in the brackets for vs.MirrorXZ3D? The wiki doesn't give any real information about the command which is unfortunate..... Kevin Quote Link to comment
AlanW Posted May 21, 2016 Author Share Posted May 21, 2016 I really only changed the vs.Mirror to vs.MirrorXY3D just to see what would happen, The p1,p2 don't appear to be affecting anything yet. I am really just a Modder not a programmer, but am trying to learn Python so I can really understand what I am messing with. Quote Link to comment
AlanW Posted May 21, 2016 Author Share Posted May 21, 2016 (edited) The attached file mirrors a 2D Poly. Need the brains trust to put the principle into a node. Principle is you scale a vector in the negative and rotate the object. In this case I scaled the X vector by -1. Over to the brains trust now. Hope this goes a ways to resolving the Mirror node. Edited May 21, 2016 by Alan Woodwell Quote Link to comment
AlanW Posted May 26, 2016 Author Share Posted May 26, 2016 Hi, So the Simple answer to have a 2d poly rotate around 2 points is to input 2 points and calculate the rotation angle between the points. Maybe calculate the vector direction? I guess this can be done within one node rather than one wrapper? 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.