Dynamic Component Nested Group Glitch?

support
help
dynamiccomponents

#1

I’m in the process of creating some dynamic kitchen cabinetry that is adjustable in width and animate opening and closing with the interact tool.

I have come around to creating the double drawer unit and have hit a problem that I can’t understand.

The dynamic component is constructed of a number of groups, not components, as I found that using components created issues when changing widths between repeated units. Whether or not this is wrong to do I am not sure but, until now, it has been an easier process creating these dynamic units out of grouped items.

These grouped items are almost all dynamic in both size and position. The left panel knows it should be 1.6cm wide and in a certain position. The right panel knows it should be 1.6cm wide and in a position relative to the size of the unit etc. I have gone through this process for hinged door units without a problem but now I have reached a problem with ‘nested’ dynamic components.

I’ve made a drawer unit that has a group which, itself, contains grouped items. The grouped items in the ‘nested’ group get their size and position from the total size of the group, and the group itself gets it’s size from the ‘parent’ group. I hope I’ve explained that well enough.

This has led to unexplainable, seemingly glitchy, behavior. Attached is an image showing what can happen if you resize the dynamic component from it’s standard, 1200mm, size to 600mm. At first the drawers are resized correctly but after clicking the drawers, which use the ANIMATE function, they become 1200mm wide again. Note that, despite the fact that the width would actually be measured as 1200mm the width is still displayed as 600mm.

The drawer, in this case, is being drawn at 1200mm wide despite being a group whose width is matching the parent. If I go in to the component attributes after this has all messed up

What is strange is this is actually intermittent. Sometimes it happens and sometimes it doesn’t. You can sometimes fix it by forcing a redraw and sometimes you can’t.

I should explain that I’ve seen other, weird, issues like this pertaining to dynamic components and supposed sizes but have restarted the program to get rid of them. From my perspective the program seems glitchy but I am not sure whether or not I am doing something wrong.

I have attached the component in question so if anyone could have a look at it that would be amazing.

Thanks for the help!

S1 Double Drawer Base Unit.skp (53.4 KB)


#2

Your forum profile does not indicate what SketchUp version & maintenance release you are running.

And have you updated Dynamic Components to the latest available (v 1.4.2) ?


#3

you have some groups out of scale with the current context, this can lead to unexpected results, to view, right click each group via out liner, note that “reset scale” is active in some. It is also recommended you name your groups for easy navigation,
The solution is in the build, that one returns to a non-scaled position before adding or editing when using groups, there as components can be scaled to the definition. This difference leads many to just use components.


#4

ashton: I’m getting similar results with some of my dynamic components made in SU2017 (version 17.1.174). In my case, the component consists of 2 child dynamic components and 1 group. The child components and group size dynamically based on a drop down selection for the parent component. I have a version of this dynamic component that was made with SU2015 and I’ve used it extensively with no issues. I’m now revising the component design in SU2017 and its giving me fits to say the least.

  1. I get the same kind of scaling issue that you’re seeing with your drawers. The scale for one of the child components goes wonky (always) if I select the largest size, click apply, then select another (smaller) size and click apply. Most of the time the scale is fine after the largest size is selected. The abnormal scaling seems to only in one of the child components–will happen in either child component, but never in both at the same time.

  2. Occasionally, the positioning of a child component will change with sizing.

  3. With the revisions in SU2017, I’ve started using the “Parent” reference. Now when if I make a unique variant of the original dynamic component within the same SU model, I’ve found that the group (which is identical in both components) within the components is somehow coupled. When I resize the new component, the group within the original component also resizes, but nothing else in the original component resizes.

Admittedly I am still in work re-building these dynamic components, so there could be bugs of my own making. However, this isn’t my first rodeo and I’ve had/been using the same component for years with none of these issues. I’m currently re-working the new components to remove the “Parent” references.


#5

pcmoor: took your advice to check for scale differences in my components. The three major pieces (2 child components and 1 group) are all on the same scale–no option for “reset scale” is available. However, I did find that a sub-group of the group was on a different scale. Resetting the scale of the sub-sub-group does not appear to fix the issue.

Oddly enough after resetting the scale for the sub-sub-group, one of the child components relocated itself. I’m guessing there’s more at play within my components than just the scale. Admittedly, I’ve not had much luck “repairing” this kind of behavior in an existing component, so I’ll rebuild the component from scratch and pay special attention to scales.


#6

Its hard to be clear as there is no documentation in this area, but from my experience.
The “reset scale” highlights that you have an outer of sync scale, resetting will return it to its original scale, however this will then effect its parent and children. To fix one would have to delete and rebuild all associated formulas, so that their results match the “greyed” values. This has to carefully done in the context, whether the parent or child is the influence on the result. Jumping happens when a child realizes its own environment rather than working in the parents “world”. A redraw can fix this.

However, I agree that rebuilding maybe the best.

changing the group to a component maybe an optional quick fix, however using components in the first instance gives one the ability to scale definition to get all the subs into sync


#7

It’s good to read similar experiences… I was starting to pull my hair out thinking I was missing something big. What you describe matches what I’ve experienced in the past. Hadn’t fully fleshed out the Parent-Child “environments” in my head, but what you say makes a lot of sense.

Oddly enough, the group in this dynamic component was something that I re-created as a component in SU2017; it was originally a group in my previous versions. However, it was acting up and somehow syncing between “unique” components, so I went back to a group. That didn’t really fix anything. My next step is to remove the “Parent” references and I’ll see how that affects things, if at all.

Thanks for your input. I really appreciate it.


#8

I had another look at this case, changing the width to 600mm makes the scale of the subs not an issue, then if one delete the formula for lenx in lower or upper drawer, the drawer jumps to 1200mm then 2400mm, I suggest that the build may had started with 600mm then was changed to 1200 or vise versa(?) A inside scale factor of 2, or half, depending how the relationship was created.

Ashton, I would be interested in knowing at any time the DC size was changed during the build


#9

Thank you all for your replies. Unfortunately I am doing this from the office so wasn’t able to answer some of the questions properly. In response to DanRathbun I am using SketchUp 2017, not sure which maintenance release, and Dynamic Components 1.4.2. I don’t know whether or not this is relevant but, when uninstalling and reinstalling Dynamic Components (an earlier attempt at fixing the described behavior), I was warned that my SketchUp wasn’t compatible.

I was not actually aware of the outliner or that that was the place in which you should name groups! I had been doing so in the component attributes window. I will do this from the outliner from now on.

I was not aware that scaling was an issue either. To answer your questions pcmoor I had used groups as it allowed me to copy previous dynamic components made (hinged door units etc.) and edit the doors in to draws. In doing so I resized the carcase from 600mm to 1200mm which seems to have caused this scaling issue you are talking about.

So, does this mean that I should not edit other dynamic components to make new dynamic components if the size needs to be changed? Or does it mean that I can change the size but I have to use the push/pull function within the groups and not edit the size either by using the component attributes window or scale tool?

Thank you again for your input. It is much appreciated!


#10

You can name groups in the enity info, the out_liner is a convenient tree hierarchy of the groups and components, you only need to name groups for easy reference
If you use components instead of groups for the sub_parts (children) then there is less likelihood or a hidden scaling problem, the components scale to their definition on creation, and any issue made by a changes during further development or editing can be be amended via selecting scale definition from the right click menu on the object or the out-liner list (which you can’t do with groups). The issues you have with them, may be with making them unique, or ?, if you shave any problems with DCs with component subs, may be able to help

If you wish to use groups as the sub parts, then I suggest you return it to the original size before editing and match all the attribute formulas to their grayed values. If say LenX has a value 3 and your formula changes it to 6, then you have scaled it. Have the formula give the same result as it is at rest, then change the DC to change the value, then the whole object scales. As you suggested, one can edit the raw geometry if the size is not what you wanted, but make sure the values having no formulas or are fixed, they must be grey, default, and are able to change to the corrected geometry

edit: The posts above, I suggested that the sub-parts where out of sync by comparing the scales,but by returning to the width to 600mm, I was able to resolved this, I made an incorrect call using the out_liner, however it still was a scaling problem, as deleting a formula showed the groups true state.


#11

Yes, actually the main reason I decided to start using groups is because I had component sizing issues.

Lets say the top carcase panel was called “Top Carcase Panel”, well, if I wanted to make another type of unit and reuse the carcase I had already drawn if I resized the second unit to 800mm wide the original unit would also resize because it has the same component.

I’m not sure if I was doing something wrong there. In my head one solution was to make different components for each kitchen unit type but that required a complicated naming system (each component would have to have a different name) therefore I went with groups.

Either way PCMoor I just redrew the unit from scratch, making sure to keep everything to the same scale (i.e. original scale) and it seems to have worked! Thank you very much for your input on this topic because I must admit I don’t think I would have ever worked that one out.

Kind regards,


#12

I do have another question actually regarding these dynamic components. This is related.

The attached file is the fixed version of the unit first attached in the OP. Notice that, placing one and resizing it, there is no issue.

Now place 2 down one after the other and change the size of the second one. The carcase will resize but the drawers will not. Now change the size of the first one. The first one will size correctly and the drawers of the second one will resize to match the drawers of the first one.

The reliable solution is, when placing a unit, resize it before placing the second unit of the same kind. This is true even if you actually want the standard size. Resize it to something. Put it back as 600mm.

Is this the expected behavior? Am I misunderstanding about how dynamic components work?

S1 Double Drawer Base Unit.skp (54.0 KB)

See below an image showing what I am talking about. Notice that the drawer in the attributes window is said to be 200mm wide, as wide as the carcase, when it is actually 400mm wide, double the size. It should be 200mm wide and has a formula linking it to the total width of the unit forcing it to be so yet it is actually 400mm.

Thanks again for all the help!


#13

if you alter the first one before placing the second you will notice that the second one becomes unique (a #1 is added as viewed in out-liner) whereas if you don’t you get a copy, making it unique afterwards still does not fix this. This seems peculiar to sub_groups,

You can quickly fix it by converting the two drawers to components,(via right click menu on the object or in the list), you can leave the drawer subs as groups

S1 Double Drawer Base Unit.skp (70.1 KB)

attached