Plugin:Union() upon failure does not delete created union

When performing a PartOperation, Studio creates a default UnionOperation in the workspace which is then manipulated until all of the parts have been added to / cut from the first part in the selection. However, when the union operation fails, what happens to these created unions? If the operation was done through studio’s tools, it is deleted and the parts are reverted. If the operation was done through a plugin, these unions are left in the workspace.

Create the simplest set of parts that is guarunteed to fail when unioned – a square part and a duplicate square part with a cylinder mesh placed inside and then negated. Union those with a plugin and the empty, failed unions will be left in the workspace.


Still happens and is very annoying.

We recently released a fix for this. If it is indeed still happening, can we get a repro? We may have missed something with the fix.

I’m using version and haven’t upgraded because I hear there’s a bug with the most recent studio release that breaks TextBoxes which really messes with building plugins, so I’ve refrained from updating. If it’s fixed then that’s awesome – whenever that textbox bug is fixed I’ll upgrade immediately.

I haven’t heard of/seen this bug. What’s the issue with TextBoxes?

I just upgraded to test it out – I’m still experiencing the same issue.

Repro plugin

Repro file in confidential tags:

Repro steps:
Unbind studio’s union from Ctrl+Shift+G (the plugin uses it)
Select all of the parts at once
(the plugin starts to try the union in different selection orders - blank unions are created at the origin and never go away)

I was also crashing a lot (unexpected error) when I was using my plugin on the latest release – with the same repro file and plugin, repeat it a couple of times and you’ll probably crash. I wasn’t crashing at all with the plugin on the version I mentioned earlier if that helps.

That repro file also provides a weird color blending bug with the union (union everything except the two cylinders on the underside of the barrel)

Thanks for the repro! We’ll take a look. Is this related to the TextBox issue?

I wouldn’t think so. TextBoxes and CSG are completely unrelated, right? The issue just happens to be present in the same release that the textbox issue is present in I assume. My plugin doesn’t use any textboxes, so that wouldn’t result in any crashing if that was what you were asking.