Components vs. Groups (Size of Model)

This is essentially a repost from a previous post on my Wall Plugin thread:

I’ve been thinking about the parametric ability of the plugin and the fact that manual edits to the plugin geometry are for the most part discouraged since they will be blown away when the wall panel is updated by the plugin.

With that in mind does it really make sense to use components rather than groups, even for wall studs?

Components are essentially the same thing as groups and actually involve more overhead and hence a heavier model.

I’ve noticed that groups (when copied) are actually using the same definition, so in a sense they are acting like components. Also components have a thumbnail generated which involve more overhead.

Is there a compelling reason why I am using components vs. groups?

Each instance name (stud) will have a unique name associated with it in the model, whether I utilize group or component.

Naming groups make them unique, whereas components can have different instance names and still reference the same definition.

I normally use groups though to not clutter the component browser. I use components only for things that would make sense in a vacuum, e.g. a specific car model, a specific chair or a specific window or any other pre-fabricated object. For things that only makes sense in a context, e.g. a wall (not repeated prefab wall module) or a slab I always stick to groups.

In the end I think the question of using a group or component boils down to whether the user is most likely to want to edit all instances, or just one single instance, if they would want to edit it. If you copy a slab and re-use it, it’s like just similar by chance and not definition, and you probably want to make it unique without affecting the original (e.g. make a hole for stairs). If you edit a door you are likely to want all doors of the same typ to change, e.g. add some details to them, and if not, you can still just make it unique.

When it comes to individual studs I think the user isn’t expected to want to place new ones from the component browser, or want to manually edit them all in one go, so I’d probably use groups.

1 Like

A couple things I’ve run across:

Groups acting like components: I think SketchUp “cheats” a bit and uses component instances for groups when it can. Then when the User opens one to edit, that’s when it gets made unique. I had problems in my MEP software where I changed a custom attribute on a group, and other copies of that group also got changed - not what I expected! I had to add a “Group#make_unique” into my attribute editing routine to avoid this.

Keeping the Component Browser clean: In FlatText, I want the glyphs (characters, etc.) to be components, and the assembled chunks of text to be groups. The User doesn’t need to know about these glyph definitions, but FlatText does. To avoid cluttering up the component browser, I use this:

# 160707 a little hack to hide glyphs in the component browser
if glyph
glyph.set_attribute(‘dynamic_attributes’, ‘_hideinbrowser’, true)

Thanks, ThomThom! :star_struck: