• Login
sketchucation logo sketchucation
  • Login
⚠️ Libfredo 15.4b | Minor release with bugfixes and improvements Update

[REQ SU api] Set component axis

Scheduled Pinned Locked Moved Developers' Forum
5 Posts 3 Posters 570 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.
  • P Offline
    Pixero
    last edited by 4 Jun 2015, 15:55

    @SketchUp team

    Please add a way to set a component definitions origin and axis directly.

    1 Reply Last reply Reply Quote 0
    • T Offline
      TIG Moderator
      last edited by 4 Jun 2015, 19:10

      Although it's convoluted you can do it already... You use:
      definition.entities.transform_entities(Geom::Transformation.translation(ORIGIN.vector_to(some_other_point_in_the_context)), definition.entities.to_a)
      to move the origin/insertion-point of the definition.
      If there are any existing 'instances' you'll also need to apply an inverse transformation to them ?
      If the axes are rotated you can also do a ...Geom::Transformation.rotation(anchor_point, axis_vector, angle)...
      and again you might need to fix any existing 'instances'...

      TIG

      1 Reply Last reply Reply Quote 0
      • P Offline
        Pixero
        last edited by 5 Jun 2015, 05:37

        Yeah, thats what I use but using the inverse transformation IS convoluted.
        It would be so much easier if there was a set origin and axis.

        1 Reply Last reply Reply Quote 0
        • T Offline
          TIG Moderator
          last edited by 5 Jun 2015, 14:22

          @pixero said:

          Yeah, thats what I use but using the inverse transformation IS convoluted.
          It would be so much easier if there was a set origin and axis.
          I agree !
          I was just saying it was possible - albeit convoluted...

          TIG

          1 Reply Last reply Reply Quote 0
          • K Offline
            kimpastro
            last edited by 13 Aug 2015, 17:57

            @tig said:

            Although it's convoluted you can do it already... You use:
            definition.entities.transform_entities(Geom::Transformation.translation(ORIGIN.vector_to(some_other_point_in_the_context)), definition.entities.to_a)
            to move the origin/insertion-point of the definition.
            If there are any existing 'instances' you'll also need to apply an inverse transformation to them ?
            If the axes are rotated you can also do a ...Geom::Transformation.rotation(anchor_point, axis_vector, angle)...
            and again you might need to fix any existing 'instances'...

            Sorry bring back this post but, with this is possible to do the second move (at right)?

            6.png

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

            Advertisement