Group.union() on complex geometry catastrophically deletes entire container in SU2022 — safe alternative?

Hello,

I’m developing a parametric kitchen plugin (Ruby API, target SU2017+, tested on SU2022) that generates wall-appearance panel groups and then uses Solid Tools (.union() / .outer_shell()) to merge them into a single seamless wall surface.

The problem occurs specifically when one of the groups contains complex geometry (a side-niche scavo N2 on a FRIGO section): calling .union(b) on a group a in the container does not fail gracefully — it deletes large portions of the entire container (hundreds of unrelated groups disappear, container.length drops from 400+ to 0 or 1). This happens even when operating on copies of the groups, not originals.

This does NOT happen with simpler geometry (ANTA/NICCHIA sections without N2 scavo).

My questions:

  1. Is this a known SU2022-specific behavior / bug with .union() on non-manifold or complex solids?

  2. Is there a safe way to check (before calling .union()) whether two groups will cause this destructive failure? (.manifold? seems unreliable here)

  3. Is there a recommended alternative to Solid Tools for merging adjacent panel groups into a visually seamless single group, without using boolean operations? (I need coplanar seam edges to disappear)

SU version: 2022 (Windows). The groups are in a ComponentDefinition.entities container (not the model root).

Thank you.

I am not aware of a known bug of this sort, though that doesn’t mean there couldn’t be one.

Here’s a possible scenario that you could investigate (I can’t without having your model to test)

Depending on the details of the geometry in your model, it is possible that the union operation is creating very small edges. SketchUp will delete such edges, causing gaps in faces that will, in turn, cause SketchUp to delete those faces. The process could snowball leaving groups with no remaining contents, and SketchUp is very aggressive about deleting empty groups. If that’s what is going on, scaling up before doing the operation should cure it.

You cannot and should not attempt use any Boolean tools upon non-manifold instances.

In what way do you think #manifold? is unreliable?

It would depend upon whether the “copies” are unique or not. I.e., groups are just special component instances. Instances do not have an entities collection, it is their definition that owns the entities collection. So if you simply copy a group instance, it will still share the definition (and so the entities) with the parent definition.

There is Eneroth’s Solid Tools.

There is also MindSight Studio’s BoolTools 2 (which is a commercial license that requires one of the 3 recent supported SketchUp versions.)