Auto-copying a simple component when scaled

I’m trying to sort out how to copy a simple component (a deck board) copy when the component is scaled. Length (Y) is irrelevant (I want it to stretch), but it should repeat on the X axis when scaled (5.5" for the board and .375" gap between) (I don’t care if there’s a partial board either - that’s actually a perk). Z axis is locked at 1".

I just can’t work it out. The sample fence dynamic component uses the rail to determine length, and the tutorial about copying in 1 dimension requires writing in the number of copies.

Advice appreciated!!

Use the copies property to calculate the placement, and also the width of your board. Attached is a working DC.

Deck.skp (45.8 KB)

1 Like

Thanks for this! Sorry for the late reply; been busy.

This works perfectly. I deleted the frame from the component but the shell component around the deckboards is still there, so it seems to work (we do weird framing, so this is a way to lay down decking rapidly. Then we can explode it and trim the angles & holes as necessary.)
I’ve used the copies property by rote, but haven’t quite gotten my head around it. I’ll work on learning more about it.

I appreciate it!

Edit: Without studying the formulas in great detail, it seems like the way to deal with this in the future is put in a “yardstick” component (ie the deck frame) to make the equations work, and then delete the geometry of the yardstick while leaving the equations in place.

The parent component (deck) does not need to include anything but the sub-components (deck boards).
The parent component contains the total size of of the deck as well as the scale behavior. Notice vertical scale handles were turned off. The sub-components reference the main component and use it’s size to calculate their own size and position based on their copy number.

1 Like

That’s exactly what I was stumbling over. I couldn’t figure out how to make a parent component that was measurable without having something in it to measure. It didn’t occur to me that I could make it and then delete the geometry in the parent component and still have the parent component function.

Another way is to make your deck boards first then select the deck boards (plural - more than one object. You can set copies to 1) and chose make component to create the parent component.