• Login
sketchucation logo sketchucation
  • Login
🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

Move point?

Scheduled Pinned Locked Moved Developers' Forum
6 Posts 3 Posters 257 Views 3 Watching
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.
  • A Offline
    alz
    last edited by 2 Feb 2010, 21:24

    (newb question here)

    With "ComponentInstance" and "tranformation" you can move a selected component around.

    Is there a way to move a selected point around? Or does it get complicated by having to select an edge, then find the points in it to move?

    1 Reply Last reply Reply Quote 0
    • T Offline
      TIG Moderator
      last edited by 2 Feb 2010, 22:26

      You can move Instances/Groups, Points and Vertices.

      You apply transformations to most but for vertices you must use another method
      'Transformations' can be points, translations, rotations and scaling etc...

      tr=Geom::Transformation.translation([0,0,1]) ### =='changes' something; here == move it up 1 unit...
      group.transform!(tr) ### =='changes' the group by 'tr', up 1 unit...
      or
      point.transform!(tr) ### =='changes' point by 'tr', up 1 unit...

      but for a vertex or vertices you need to use...
      entities.transform_entities(tr,[vertices])

      here an array (list) of vertices have 'tr' applied...

      or
      entities.transform_by_vectors([vertices],[vectors])

      you take an array of vertices and apply an array of vectors to do the translation...

      So for one vertex
      entities.transform_by_vectors([vertex],[[0,0,1]]) ### moves vertex by vector up 1 unit in Z...

      You can also apply these 'entities.transform....' methods to any collection of 'things' like an array of group.entities...

      TIG

      1 Reply Last reply Reply Quote 0
      • A Offline
        alz
        last edited by 2 Feb 2010, 22:48

        Very cool! Thanks for the examples, TIG!

        The difference between 'point' and 'vertex' is construction point vs. edge point?

        1 Reply Last reply Reply Quote 0
        • T Offline
          thomthom
          last edited by 3 Feb 2010, 07:25

          ConstructionPoint is a construciton point Entity.
          Vertex is the end points of Edges.

          Point3d is just a point in 3d space.

          Thomas Thomassen — SketchUp Monkey & Coding addict
          List of my plugins and link to the CookieWare fund

          1 Reply Last reply Reply Quote 0
          • T Offline
            TIG Moderator
            last edited by 3 Feb 2010, 07:57

            ...and vertex.position returns the point in space that the vertex is 😄

            TIG

            1 Reply Last reply Reply Quote 0
            • A Offline
              alz
              last edited by 3 Feb 2010, 17:34

              Awesome -- all very helpful bits of info!

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

              Advertisement