Dynamic Components Sibling Interaction

I have a dynamic component which consists of a top-level component with a few user-editable custom attributes (some dimensions, and a number of copies to create an arched fan). Inside this are two subcomponents:

  1. A copied-with-rotation subcomponent (12 copies total, typically), and
  2. Another group, which needs to rotate along with his sibling.

One of my top level attributes is “OpenAngle”, and it controls the RotY of both of the subcomponents. Oddly, sometimes while animating or setting OpenAngle, sibling 2 (the simpler one) gets distorted grossly (like shifted off the view, stretched 10x along one axis, etc.)

Adding LenX, LenY, LenZ, and X, Y, Z, to sibling two while animating, I see that Z and LenZ in particular are being modified, and once modified do not return to their original values! But the parent component does not have these attributes added!

I’m thinking the only explanation is some attribute information may leak between siblings? In the end, in the sub-component that was being distorted, I “froze” Z and LenZ (set = to the value that they were) to prevent the distortion. This works, but it is quite inconvenient for editing. Does this sound like a reasonable explanation, and is there any simpler solution?

You can prevent interference by using an extra component or group level. Could you share the DC in question or upload to private message if sensitive. Then can check for a possible solution other than the one you used

Strange, is there any documentation on which attributes are shared like this between siblings (i.e. attributes that aren’t explicitly specified in the parent)? I really struggle to see how that would be a sensible model for attribute scope.

Model attached below. The siblings in question are “strap” and “WedgePiece” (and its copies). You can see that I “froze” the strap’s Z, LenX,Y,Z attributes to prevent sibling interference. If you take those away, you can easily see how strap gets squashed/offset/etc. I can’t nest strap in a group since then it can’t access its grandparent’s top level “OpenAngle” attribute, right?

Thanks.

offset_shade.skp (858.4 KB)

PS: It’s for an automated blind for a semi-circular window with offset motor drive.

At a quick glance some of your components are actually groups, not components which could be a problem, also the Z rotation in the model is off axis. Restricting the XYZ attributes in the sub would be the standard/best approach in my opinion, but you can pass the attribute open angle down each level. Just create an attribute in the new wrapper called OpenAngle that is =parent!Open Angle, and the same in the strap. I learned recently that there is a lot more happening behind the scenes in DC’s, refer to the last bit of this post Len X is incorrect on redraw . Are you looking to be able to adjust all of those attributes? If so anything that changes size or position, like the strap lenX, would need a formula as well, my understanding is that if you can define it you should.offset_shade MOD.skp (879.6 KB)

Thanks. Motor group isn’t in the DC, and Strap is a group, but I understood a group to be a singlet component. Z-rotation is off-axis on purpose, since that’s physically how the motor will work (hence the bend in the support strap). So you mean set XYZLenXLenYLenZ= to some value as I’ve done? That really prevents flexible reconfiguration (suppose I wanted to make the strap wider, longer, etc. with a top-level attribute). Maybe I should just go that route and make the straps x,y,z and lengths a custom formula. But it doesn’t seem like I should have to… if I just want them to be left alone.

Your mod of “protecting” the strap sibling by wrapping and propagating the parent OpenAngle attribute seems to work even if I unfreeze X,Y,Z and Len’s of the strap. The wrapper must be a component, not a group, btw (though the final object can be a group). But it feels like an arbitrary hack. Is there a post or writeup anywhere describing which attributes “leak” between siblings in a DC hierarchy, and how (and why!)?

Thanks again.

I am not really sure that anything is leaking, I think as soon as you change one of your variables you change the size of the parent, the child tries to adapt or stretches unless you tell it not to by defining it’s attributes. This is from one of the developers:

https://sketchucation.com/forums/viewtopic.php?f=289&t=14449&p=134583#p134583

1 Like