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

Moving component axes

Scheduled Pinned Locked Moved Developers' Forum
4 Posts 3 Posters 363 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.
  • C Offline
    cjthompson
    last edited by 19 Aug 2009, 17:45

    I'm sure this is a pretty common topic, but do you know if there is an easy way to set the component axes to the corner of a component if you push/pull one of the sides. I've tried using the bounding box, but that doesn't work if you have the component at an angle.

    thanks,
    Chris

    1 Reply Last reply Reply Quote 0
    • T Offline
      TIG Moderator
      last edited by 19 Aug 2009, 18:50

      Try something like this...

      Add a new Group to the Model
      Add the Definition's Instance to that Group's Entities - at the Origin, without scaling or rotation.
      Explode the Instance inside the Group.
      Find that Group's bounds.
      Move the Group so that its Bounds.min is now at the Origin.
      [You can also rotate etc as desired]
      Make variables copying the Definition's Name, Description, Behaviors [always_face_camera?, cuts_opening?, is2d?, no_scale_mask?, shadows_face_sun? and snapto]. You could also get the Definition's Attributes [and Observers ???] if you think they'll be any ?
      Rename the Definition with a 'scrap' name.
      Get the Definition's Name in case it incremented, because the scrap name was already used !
      Make the Group into a Component.
      Get the Definition of that Instance and give it the Name, Description and Behaviors etc of the original one.
      Erase that Instance to tidy up.
      Process the original Definition.instances in the Model,entities and inside any Definitions.entities and change them all to be this new Definition.
      Now for all intents and purposes all of the Instances of the original Definition have moved Axes etc, but are otherwise unchanged.
      To tidy up Erase all of the original Definition's Entities; as an empty definition is removed from the Definitions List and Compo-Browser IF the whole operation is kept inside a 'start/commit' pairing.

      A bit convoluted but it works...

      TIG

      1 Reply Last reply Reply Quote 0
      • C Offline
        cjthompson
        last edited by 19 Aug 2009, 21:26

        Thanks for the suggestion. I was able to do almost the opposite of your suggestion, and put the components entities inside of a group, create a vector between the groups origin and the components, and transform the two so they match. Does anyone know of a simpler way to do this?

        1 Reply Last reply Reply Quote 0
        • T Offline
          takesh h
          last edited by 21 Aug 2009, 03:16

          Not sure if this is what you want to do...
          Select the component, context-click and [Save as], save it to a folder as a new component file.
          Open the saved file, [select all] - [Cut] - [Paste]
          Now your cursor is at the corner of the new volume, click at the origin point and paste it there. Save the file and close it.
          Go back to the file you were previously working on, context-click the component and [Reload], select the saved component file and you're done. Everything your component had as its definitions should be inherited to the reloaded component.

          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