Relatively new to dynamic components and working on a library of components I use often. Im having trouble with position of a nested dynamic component, inside a larger component. My goal it to make a scalable octagonal deck band. Ive been able to copy and rotate around the center, and scale each side based on the geometry of an octagon, but the position of the sides doesn’t change relative to the overall dimension of the deck, which is controlled by user input. For example, I started with a 10’ overall dimension, but after new input for deck width, the sides grow/shrink based on the new dimension, but their location doesnt change relative to the center of the shape and remain 5’ from center. Thanks in advance for any help here
I immediately see two problems. First, those band pieces need to have PosX and PosY attributes that are based off of the user entered dimensions. Currently you have the attributes included but you haven’t done anything to tie them to the size of the deck.
Keep in mind that those attributes determine the location of the component’s origin. Since you’ve placed the component’s origin at the center of the deck, your math for the position will be based off that. So the component’s origin won’t remain at the center of the deck as the dimension of the deck changes.
It would probably be more clear in your setup if you move the component’s origin to say the midpoint of the outside edge. Then I think, as an example, the position of the right side band would look something like this for PosX: =deck!LenX/2 The one on the left would be =(deck!LenX/2)*-1 because you need it to move in the minus X direction. Similar attributes would need to be set up for the rest.
Is there any way to use the axis of the “child” component as a reference since the green axis is always perpendicular to the band and located in the center of the shape?