Dynamic Component help
-
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
-
Thanks for sharing your model, I have attached a solution
Some points to keep in mind if you don't already know
-
Copies shows integer but the formula actually contains a float. So remainder = copies-int(copies) will give the difference
-
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/numassuming we increase the spacing until the next full number, then
copies = num-1
new_spacing = spacing+adjustment-
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.
-
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
-
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.
-
-
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
Advertisement