DC Exploration #3 - Scaling and Copying
-
Here are some Kitchen cabinets that I've been working on. Most proud of the Floor Drawer Unit with it's drawer boxes that scale along with the cabinet on the X axis.
Please note. This is a work in progress.
-
Has anyone figured this out, by chance? I know it's been a while, but I have an application for it, and I'm racking my brain trying to figure out how to make it work. For mine, it's more of a "snake" component, where the user begins with one part, then selects 1 of 3 interactable "buttons" that creates a copy in one of the directions, turning the copy to fit. The link below should make sense of what I'm saying. Thanks in advance!
BT
@chris fullmer said:
Ahh, yes I was thinking about this Jim, and I thought it was simple. But I started playing with it and in about 5 minutes I saw just how not simple it really is. The random width means that the amount of copies will vary depending on the width of the books. That is tricky!
I had a thought on placing them though. Each X should be the X of the previous (called "LastX") + the LenX of the previous (called LastLenX"). So what about each component passes its X and LenX out to a custom attribute in the parent component. So the next copy created would look to "parent!lastX" and "parent!LastLenX" to figure out its new X. Then after it sets its X and LenX, it writes its current state to the parent, overwriting the previous states and the cycle continues. So it runs like this
Copy0
X=parent!LastX + Parent!LastLenX (These values will be zero since they have not been filled yet)
LenX=3 (randomly chosen)
<<<Sends X to parent!LastX>>> (which is 0)
<<<Sends LenX to Parent!LastLenX>>> (which is 3)
Copy1
X=parent!LastX + Parent!LastLenX (Now this reduces to 0 + 3)
LenX=2
<<<Sends X to parent!LastX>>> (which is now 3)
<<<Sends LenX to Parent!LastLenX>>> (which is now 2)
Copy2
X=parent!LastX + Parent!LastLenX (Now this reduces to 3 + 2)
LenX=4
<<<Sends X to parent!LastX>>> (which is now 5)
<<<Sends LenX to Parent!LastLenX>>> (which is 4)Anyhow, its all theoretical since I am not on an SU7 enlightened computer at the moment. I hope that makes sense. In my mind it does, but I'm sure it will probably fall apart due to something I've forgotten. Anyhow, think about it
Chris
Advertisement