• Login
sketchucation logo sketchucation
  • Login
ℹ️ GoFundMe | Our friend Gus Robatto needs some help in a challenging time Learn More

Ruby transformation issue?

Scheduled Pinned Locked Moved Developers' Forum
4 Posts 2 Posters 93 Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    tomot
    last edited by 8 Feb 2012, 21:32

    I'm trying to graphically explain the following coding problem I'm having, please see the attachment.
    Under 5, I would like to use a move transformation of that face, only, to a new location, without it affecting the entire transformation which follows in 6. How would I code that move transformation to affect 5 only?


    panel.jpg

    [my plugins](http://thingsvirtual.blogspot.ca/)
    tomot

    1 Reply Last reply Reply Quote 0
    • T Offline
      TIG Moderator
      last edited by 8 Feb 2012, 22:28

      I don't think that .move! is really what you are after...
      to rotate the group itself try...
      group.transform!(t)
      OR if you want to change the contents WITHIN the group use...
      group.entities.transform_entities(t, group.entities.to_a)
      If you want to JUST affect the 'base' inside the group use...
      group.entities.transform_entities(t, base)
      BUT 't' can be any 'transformation' you want...
      🤓

      TIG

      1 Reply Last reply Reply Quote 0
      • T Offline
        tomot
        last edited by 8 Feb 2012, 22:52

        the rotation works as written, It just happens the 4 new points defining the new face in 5 need to be moved/centered before 6 rotates all of these entities (think about moving a glass plane to the center of a window frame before the entire window frame and glass gets rotated)
        The alternative naturally would be to simply create 4 new points defining a face at the center of the window frame. in which case I would not be asking for help.

        [my plugins](http://thingsvirtual.blogspot.ca/)
        tomot

        1 Reply Last reply Reply Quote 0
        • T Offline
          TIG Moderator
          last edited by 9 Feb 2012, 00:10

          So as I thought I had explained... make a transformation [tb] for 'base' and use it just on that entity
          group.entities.transform_entities(tb, **base**)

          THEN make and use another transformation [t] on the whole 'group'...

          Also note that your approximations of PI etc could be replaced by 60.degrees or other values in degrees, to give consistently accurate angles...

          TIG

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          1 / 1
          • First post
            1/4
            Last post
          Buy SketchPlus
          Buy SUbD
          Buy WrapR
          Buy eBook
          Buy Modelur
          Buy Vertex Tools
          Buy SketchCuisine
          Buy FormFonts

          Advertisement