Checking if a Union's shape is the same compared to another Union

i’m working right now on an internal tool and i want to compare 2 unions.

how can i check to see if they’re the same shape?

There is no built-in way to compare the geometry of two UnionOperations directly. You would have to compare the actual vertex data or use a hash of the geometry if you have access to the underlying mesh data, but that is not easily accessible via standard API.

Can you explain more about what you’re trying to do? If I were in your position, I’d probably give it an attribute.

Attributes are a fine workaround for a manual workflow, but they do not help if the tool needs to detect changes automatically. If you are just checking for basic overlap, comparing the CFrame and Size might catch some obvious differences, but it will not catch subtle geometry changes.

Unions are messy. You could have a cube shaped Union with a completely flat face that was negated out of it at an angle.
Copy the cube and the negated Part and Union the copies.
You could take those 2 identical looking Unions and export them to Blender. You’ll most likely see 2 very similar shapes, but the vertices Roblox Unioning creates within the flat faces are probably going to be very different.
In other words, even if you could compare 2 identical Unions their not likely to be the same.

That is the main issue with the CSG engine. The vertex density and topology are too unpredictable to rely on for a direct comparison. If you need actual geometric consistency, you are better off using MeshParts and comparing those instead.

to summarize what i’m trying to do:
i’m attempting to check the shape of 2 unions is equal to eachother

We understood.
If you are creating Unions in game that physically appear to be identical, they may not actually be because one might have 14 vertices in what looks like a straight edge, and the other might have 3. Roblox unions are very messy with vertices. If you take 2 Unions that you make separately then export them to Blender you’ll see what I mean.
If you have multiple Unions already in the game you could either tag them and compare tags, or by by the Union’s Serial Number (I can’t recall the correct Property name, but each item has it’s own number, so you could compare their numbers).