• Login
sketchucation logo sketchucation
  • Login
ℹ️ GoFundMe | Our friend Gus Robatto needs some help in a challenging time Learn More

Dynamic cabinets

Scheduled Pinned Locked Moved Dynamic Components
sketchup
13 Posts 6 Posters 3.1k Views
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.
  • K Offline
    kaptin ooono
    last edited by kaptin ooono 12 Dec 2008, 07:05

    Hi all

    I am new to dynamic componets and have made a cabinet
    with adjustable shelves in it but i am wondering if there is an easier way to do the following code as its a little confusing to work out probs when it didnt work ?

    Im am also trying to make a draw unit aswell but this is proving to be much harder,

    Parts of the cabinet I would like to be adjusable

    -the draw box height )(between 3 std blum tandem box heights)
    -the draw front heights (a defalut of equal unless some one enters a specific size)
    -the draw box depth
    -cabinet width
    -cabinet height
    -cabinet depth
    and if possblie an opption to add internal draws behind one main front

    "shelf code"

    =IF(STD CABINET!SHF_QTY>=1,IF(STD CABINET!SHF_QTY>=2,IF(STD CABINET!SHF_QTY>=3,IF(STD CABINET!SHF_QTY>=4,IF(STD CABINET!SHF_QTY>=5,IF(STD CABINET!SHF_QTY=6,STD CABINET!LenZ/7-STD CABINET!CARCASS_MAT/7, STD CABINET!LenZ/6-STD CABINET!CARCASS_MAT/6),STD CABINET!LenZ/5-STD CABINET!CARCASS_MAT/5,0),STD CABINET!LenZ/4-STD CABINET!CARCASS_MAT/4,0),STD CABINET!LenZ/3-STD CABINET!CARCASS_MAT/3,0),STD CABINET!LenZ/2-STD CABINET!CARCASS_MAT/2,0),STD CABINET!LenZ/2-STD CABINET!CARCASS_MAT/2,0)

    thanks for any help

    ..........Yea ha my hooves, my hooves, I can’t feel my hooves..........

    1 Reply Last reply Reply Quote 0
    • C Offline
      Chris Fullmer
      last edited by 15 Dec 2008, 06:47

      Hey, it looks great and it works great too. The drawers open nice and smoothly. Great job!

      Chris

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

      1 Reply Last reply Reply Quote 0
      • K Offline
        kaptin ooono
        last edited by 15 Dec 2008, 07:30

        Thanks Chris 👍

        Im still trying to work out an easy way to add the adjustable draw fronts
        so .....more head scratching, but if anyone would like to help......please 😄

        ..........Yea ha my hooves, my hooves, I can’t feel my hooves..........

        1 Reply Last reply Reply Quote 0
        • K Offline
          kaptin ooono
          last edited by 15 Dec 2008, 08:03

          Hi

          I thought i would add an update as to the draw cabinet i have been working on

          Its working but still needs some tweeks
          I have not yet allowed for any 3mm gaps between draw fronts,
          and the other more major prob is that........

          I would like the draw fronts to be adjustable by user imput but

          • say the cabinet has 3 draws and the used wants the bottom draw to be 500mm high i want to be able to get the other two draws to divide the left over space equaly

          Any ideas on how to do this easily would be great

          I have attached the a model of the draw unit im working on
          and also some pics Drawers 1.jpgDrawers 1.jpgDrawers 2.jpg


          Std Draw Cab Typ 1.skp


          Drawers 3.jpg

          ..........Yea ha my hooves, my hooves, I can’t feel my hooves..........

          1 Reply Last reply Reply Quote 0
          • C Offline
            Chris Fullmer
            last edited by 15 Dec 2008, 08:55

            Yeah, here's a quick idea.

            So the user can change the height of the bottom drawer. And you know what the total height of the unit is. Lets assign some values. Say the Unit is 1 meter tall. And the bottom drawer is 500mm tall. You have 500mm left for the 2 drawers. So their height should equal 250mm each. This is how to set that up mathematically:

            LenZ=(Cabinet!LenZ-LowerDrawer!LenZ)/2

            That resolves down to:

            LenZ=(1000mm-500mm)/2 which equals 250mm.

            So that is how you would set the LenZ for the 2 drawers. Whatever the bottom drawer is set at, the 2 drawers will split the difference.

            Hope that gives you a starting point.

            Chris

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

            1 Reply Last reply Reply Quote 0
            • D Offline
              Dik Harrison
              last edited by 15 Dec 2008, 09:24

              @kaptin ooono said:

              Hi
              ...
              I have not yet allowed for any 3mm gaps between draw fronts...

              This modified version puts gaps between drawers, but not on the top drawer. I didn't make the drawers equal heights, the top drawer is taller by the gap.

              Modified to not put gap on top drawer.

              Have fun...

              Dik

              1 Reply Last reply Reply Quote 0
              • B Offline
                BUDLA
                last edited by 15 Dec 2008, 10:40

                @unknownuser said:

                kaptin ooono wrote:
                Im still trying to work out an easy way to add the adjustable draw fronts
                so .....more head scratching, but if anyone would like to help......please 😄

                Maybe it help you to add more fronts!Colors added by layer.Luukkapp mel riiulid.skp
                BUDLA

                1 Reply Last reply Reply Quote 0
                • K Offline
                  kaptin ooono
                  last edited by 15 Dec 2008, 23:48

                  Hi

                  Thanks all for your help i worked last night on it and sorted the 3mm gap issue as below

                  (box height) - (top gap) - (3mm gaps (this number changes depending on how many draws there are)) /(the number of draws)

                  code :

                  "=IF(STD_DW_CAB!DRAW_QTY=1,STD_DW_CAB!LenZ-STD_DW_CAB!DOOR_T_GP,IF(STD_DW_CAB!DRAW_QTY=2,(STD_DW_CAB!LenZ-DRAW 1!DOOR_T_GP-0.3)/2,IF(STD_DW_CAB!DRAW_QTY=3,(STD_DW_CAB!LenZ-DRAW 1!DOOR_T_GP-0.6)/3,IF(STD_DW_CAB!DRAW_QTY=4,(STD_DW_CAB!LenZ-DRAW 1!DOOR_T_GP-0.9)/4,IF(STD_DW_CAB!DRAW_QTY=5,(STD_DW_CAB!LenZ-DRAW 1!DOOR_T_GP-1.2)/5,0)))))"

                  This is for the bottom draw so it has to work and have different heights for 1,2,3,4 & 5 draws

                  Chris

                  That code you suggested to use i will have to fit into the code above
                  so that will be the difficult part
                  i will work on that soon..........

                  ..........Yea ha my hooves, my hooves, I can’t feel my hooves..........

                  1 Reply Last reply Reply Quote 0
                  • J Offline
                    James Fraser
                    last edited by 16 Dec 2008, 10:26

                    Isn't that code just:

                    =(STD_DW_CAB!LenZ-DRAW 1!DOOR_T_GP-(0.3*(STD_DW_CAB!DRAW_QTY-1)))/STD_DW_CAB!DRAW_QTY

                    ?

                    I may have missed something, but if I am right I think it would be considerably easier dealing with an equation like that than the huge number of IF statements. Much easier to make changes, too.

                    And I think the top equation simplifies to:

                    =(STD_CABINET!LenZ-STD_CABINET!CARCASS_MAT)/(STD_CABINET!SHF_QTY+1)

                    Is this right? Does it help at all?

                    http://www.FormFonts.com

                    1 Reply Last reply Reply Quote 0
                    • K Offline
                      kaptin ooono
                      last edited by 16 Dec 2008, 12:02

                      Hi James

                      thanks heaps i will try that when i get back to work tomorrow
                      and thats exactly what i was after a simple way to do it
                      so much less confusing ...... yaaay
                      i will post back tomorrow to let you now how it goes

                      on a slighty different note if i have the following

                      a draw bottom thats inside a draw
                      & the draw is in a draw box
                      & the draw is in a cabinet

                      how can i get the draw bottom to read a parameter on the draw box

                      to sum up i would like to now the chain of comand in order to refer back to other componets ?

                      but again thanks james and all that have helped 👍

                      ..........Yea ha my hooves, my hooves, I can’t feel my hooves..........

                      1 Reply Last reply Reply Quote 0
                      • J Offline
                        James Fraser
                        last edited by 16 Dec 2008, 12:31

                        Happy to help 😄

                        Because a component can only read an attribute from its parent, a sibling or a child, if you want to read an attribute more levels away than that you have to have something to pass the message along.

                        Generally I just use a custom attribute on the levels in between, which is defined as a direct copy of the attribute you are after.

                        For example, if your drawer bottom needed to know LenX for the cabinet, I would do it as follows:

                        Cabinet:
                        LenX

                        Drawer:
                        cabDepth=parent!LenX

                        Drawer_Bottom
                        attr=parent!cabDepth

                        I use things like that to pass the message along the line, cabDepth could be called whatever you want and you could use Cabinet! and Drawer! in place of the parent! bits, but I like using parent.

                        I hope that makes sense.

                        http://www.FormFonts.com

                        1 Reply Last reply Reply Quote 0
                        • D Offline
                          danieldaniel73
                          last edited by 9 Jan 2009, 11:54

                          Could it really be that silly?
                          that there is no way to call an attibute from a parents parent (grandparent! 😉)?
                          a string equal to the file path version of ../ would make life so much easier.

                          D.

                          1 Reply Last reply Reply Quote 0
                          • C Offline
                            Chris Fullmer
                            last edited by 9 Jan 2009, 16:39

                            Yes, that could make sense to do that. At this point though, you have to pass it through each level manually 😕

                            Chris

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

                            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