sketchucation logo sketchucation
    • Login
    πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    ComponentDefinition.insertion_point ?

    Scheduled Pinned Locked Moved Developers' Forum
    3 Posts 3 Posters 190 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.
    • thomthomT Offline
      thomthom
      last edited by

      I'm confused.
      I thought ComponentDefinition.insertion_point was the point where the component axis was located. But no. It is not so. In a test component I made where the axis is set to inside the component, .insertion_point returns [0,0,0].

      instance.transformation.origin is what I'm after by the looks of it. But that leaves the question of what ComponentDefinition.insertion_point does?

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

      1 Reply Last reply Reply Quote 0
      • Chris FullmerC Offline
        Chris Fullmer
        last edited by

        EDIT: I think it is something different than that.

        Insertion point is the last point that that used as the "move" base on a component. Try this test. Open the component browser. Insert a component into the model. Pay attention to what point on the component is glued to the mouse cursor. Now go to the in model tab, insert that same component. The same spot should be glued to the mouse. Now in the model, move the component by grabbing a different spot on the component. Now insert another instance of the component. The spot most recently used to move the component is what will be glued to the mouse, and it is called the insertion_point.

        It seems to only recognize vertices. If I grab and move on a face or edge, it does not rememeber that location on the next component insertion I guess.

        Chris

        Lately you've been tan, suspicious for the winter.
        All my Plugins I've written

        1 Reply Last reply Reply Quote 0
        • C Offline
          cjthompson
          last edited by

          it's basically the where the origin is at in the context of the definition.

          normally it will always be [0,0,0], but will change to the edit_transform.origin if one of it's instances is in edit mode.

          EDIT: it is the last point the user grabbed, not the origin. (see below)

          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