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

    Dynamic Component help

    Scheduled Pinned Locked Moved Dynamic Components
    sketchup
    3 Posts 2 Posters 1.4k Views 2 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.
    • N Offline
      nbull145
      last edited by

      Just a quick question related to keeping the gap between multiple components equal.

      I'm drawing a plinth box for a cabinet unit that can be manipulated in length and width easily, whilst keeping even gaps between support dividers.

      What I want to achieve is having the support dividers remain equal distances from both ends of the plinth box, no matter the width. What's more, if the gap between support dividers and end gables/other support dividers exceeds 400mm, it adds an additional support and re positions them all to equal distances again.

      Ive managed to achieve the multiple formula, with support dividers appearing as the plinth box gain length, but cannot manage to keep the gaps equal.

      Any help would be greatly appreciated.

      Nick


      Plinth Box .skp

      1 Reply Last reply Reply Quote 0
      • P Offline
        pcmoor
        last edited by

        Thanks for sharing your model, I have attached a solution

        Some points to keep in mind if you don't already know

        1. Copies shows integer but the formula actually contains a float. So remainder = copies-int(copies) will give the difference

        2. There is a 2.54 bug for metric use, which crops up when using the current or facearea formula. It can appear when trying to use copies, which I found when trying to place formulas at the left.plinth nested level
          So if you get some unexpected result when you are creating DCs using centimeters check it to see if it is a factor of 2.54 (conversion inch to cm) whether multiple or division. For example: Current("lenX")*2.54 will give the correct return for metric. I am hoping this issue will be fixed soon.

        In regards to your model I found it easier to do the workings in the rails component, so I did not have to worry about the 2.54 bug

        the technique: require a whole number and a remainder, can use the int or floor functions to get this

        num= int(length/spacing)
        remain = length - spacing*num
        adjustment = remainder/num

        assuming we increase the spacing until the next full number, then

        copies = num-1
        new_spacing = spacing+adjustment

        1. To make it easier to view your model in Outliner, I suggest you name the components rather than using the default. Outliner is a good tool to select, move, swap ...components as one can easily go to the deepest level and out in two clicks.

        2. Another aspect you could consider is a quantity system, current I use the summary attribute to place specific sizes in metric like "Front Plinth: MDF, Ivory, 150x18, left 45deg mitre, right 45deg mitre, 1205 length". So that I only need to take the summary column of the Generated report for my quantity lists. This report currently uses inches, hopefully it will be fixed with the next release

        3. When it comes to swapping a component and having it update to the current size, which would be the case for doors, one has to reference the LenX,LenY,LenZ to make this happen. I suggest you use aLenX,aLenY,aLenZ as a consistent method so that anyone can swap their style door on the model. So lenX = alenX, then the component will up date to the current lenX when swapped.


        Plinth Box (1).skp

        1 Reply Last reply Reply Quote 0
        • N Offline
          nbull145
          last edited by

          Thank you very much

          Not only is the written information very useful in understanding dynamic components better, but the model (which works perfectly) gives me something to deconstruct and reference to for future models.

          Dynamic components has a steep learning curve but am slowly grasping the basics with practise and help from people like yourself.

          Your time and patience is greatly appreciated.

          Thank you again

          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