News:

BB code in posts seems to be working again!
I haven't turned on every single tag, so please let me know if there are any that are used/needed but not activated.

Main Menu

Custom shape scale behavior

Started by rickscr, November 30, 2012, 04:01:27 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

rickscr

I'm trying to create a custom master shape for a building.  I want to be able to re-size it, but have the angle of the roof stay the same.  Anyone know how to do this?

vojo

two options

1)  Simple, lock perspective and scale via corners
2)  Complex, in the shape geometry, factor in the angle
     Something like
              Geometry1.X3 = Geometry1.X2+ 1/2*width*cos(angle)
              Geometry1.Y3 = Geometry1.Y2+ 1/2*width*sin(angle)
              Geometry1.X4 = Geometry1.X3+ 1/2*width*cos(angle)
              Geometry1.Y4 = Geometry1.Y3 - 1/2*width*sin(angle)
     Probably have to play with the formulas...but I think you get the idea (take previous point and add 1/2 width and factor in angle)
     If you want to protect these cells from any user action, use guard() on the formula

rickscr

Option 2 it is, since I need the shape to scale in both directions.  I'm beginning to see why the shapesheet is so important.... :)

Thanks for your help!

Browser ID: smf (possibly_robot)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 165 (show)
Files included: 32 - 1207KB. (show)
Memory used: 1016KB.
Tokens: post-login.
Cache hits: 13: 0.00193s for 26,747 bytes (show)
Cache misses: 3: (show)
Queries used: 17.

[Show Queries]