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

    Sub-component to copy equidistant along main component

    Scheduled Pinned Locked Moved Dynamic Components
    sketchup
    4 Posts 2 Posters 7.2k 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.
    • SJS66S Offline
      SJS66
      last edited by

      Just wondering if anyone can help me with a dc formula to get a sub-component to copy equidistant along a main component if the main component is resized or scaled.
      I've attached a model of a cabinet door which has a backing frame that I would like the door rail to copy equidistant up along the door stiles or height if the door height is changed. I just can't get the copy equidistant to the length of the door stile or overall height part of the component to work. I just can't seem to get the copy and/or PosZ formulas to work. Any help much appreciated.


      CabinetDoor_Scalable.skp

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

        hi

        when using copies, the DC creates a number of copies each with a notation copy which is sequential.
        So if there are four copies, then copies will be produced with an attribute called Copy with a value 1...up to 4

        Capture.PNG

        one uses this copy attribute to identify and manipulate each copy

        the first idea is generally create equal sized copies and have them space themselves evenly. Assuming the first copy is the top rail, then its location would be the height of the door minus the width of the rail
        =DoorPanel!LenZ-LenZ
        if I times this by copy
        =copy*(DoorPanel!LenZ-LenZ)

        then if copy=0, this expression =0, which is true for the original.
        if copy =1, the expresion = DoorPanel!LenZ-LenZ. the position of the top rail

        now I introduced a attribute option for the number of rails (including the first)

        Capture2.PNG

        now copies of DoorRail will be =DoorPanel!number_rails-1

        now their position will be divided by one less than the number of posts as per a fence construction, that is the same as the copies value

        so for the position
        =copy*(DoorPanel!LenZ-LenZ)/Copies

        hence the solution as attached

        one could add conditional statements as well to create variances via optional input for intermediate mullions, or different panel sizes, will help if you require and you explain any detailing


        CabinetDoor_Scalable.skp

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

          this is a slight modification where one can choose the maximum rail position


          CabinetDoor_Scalable_max panel size.skp

          1 Reply Last reply Reply Quote 0
          • SJS66S Offline
            SJS66
            last edited by

            That is exactly what I was trying to do.
            Your now on the "Legend" list.
            Thanks mate.

            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