45/45 axon drawing
-
Hey guys,
I am trying to learn how to code a script that will allow me to view and produce axon drawings similar to what an architect would produce with a 45 degree triangle. The difference between what I would like to produce vs what sketchup can natively create is that the red/green axis would appear to be at a 45 degree angle to the blue versus the 30/60 that sketchup creates now.
As I understand it, Sketchup's Iso view rotates the camera to some angle and due to trig you can get all lines to be scaled in 1:1 proportion to each other.
Because of these same trig rules, I don't think we can rotate the camera and use parallel projection to create a 45/45 axon with all sides being scaled 1:1 relative to each other. But, I believe that we should be able to write a scrip that tells sketchups real time rendering engine to look at the model as if it were plan view with the red and green pointing up and right with the blue coming to you (so that you are looking at what would be a normal plan view), then rotating everything 45degrees along the blue axis and then RENDER all points to "vertex location = current x location + tan z location, current y + tan z location". In this way I hope to be able to create a real time view that will look like the classic architectural 45/45 degree axon but not ruin the actual geometric location of vertices.
I am new to programming in general and have looked through sketchup's ruby website but have not found anything that discusses modifying the real time rendering engine. Does anyone know about doing this or if I'm even barking up the right tree?
Thanks for the help,
Scott
-
Hi Scott, it is not possible to modify SU's real time rendering like this.
However, I'm pretty sure you can do what you want. In my mind, the script would work like this:
Take all geometry and add it to a group. Then transform that group with a skew transformation (you'll need to brush up on your transformations for that, but I'm sure someone around here can help figure it out). So the skew will effectively turn the model into the skewed view you want. Then you just have to align the camera correctly.
And optimally the script would also un-skew the entire model when the user needs to get back to normal mode.
Chris
-
My
axo+iso.rb
could already set your view so that it was axo 30/60 or iso 30/30...
I have posted an updated version here http://forums.sketchucation.com/viewtopic.php?p=252273#p252273 - it now also does axo 60/30 and axo 45/45... -
Hey TIG, is it true that the model has to be skewed to obtain one or more of those views? Or can it all be achieved through standard cameras and viewing angles?
-
No 'skewing' is necessary BUT to get the height looking right [as if it were a hand-drawn Axo] then you need to scale the grouped model up in the Z by a factor before printing, it's something like ~9.524 for an Axo: the Iso is OK...
-
Hey guys thanks so much.
Chris: I was afraid you would say that. I would have preferred a script that does everything at render time and not messing with geometry. I'm just afraid that one time its going to mess something up or texture mapping might get messed up. Definitely worth a shot though.
TIG: Thanks for making this. I will have to try it out! Getting the vertical to scale properly will be necessary so thanks for the tip.
Advertisement