copyDecomposedLayer()

That does the trick. Thanks so much! Why is this working? Does the .copy() not include the parent and must be therefore transferred to the copy?

Yes. There is one more thing you need to do. If you apply the parent and then decompose, you mess with the undo manager:

layer.undoManager().disableUndoRegistration()
newLayer.parent = layer.parent
newLayer.removeOverlap()
newLayer.drawBezierPath.stroke()
layer.undoManager().enableUndoRegistration()

Thank you so much. this works nicely :slight_smile:

layer.drawBezierPath apparently returns a NSBezierPath. Is it possible to get a GSPath as well?

I need a GSPath to insert it into a virtual GSLayer.

Why not copy the layer, decompose its corners and components, remove overlaps, and then iterate through the paths? And copyDecomposedLayer() still works. Deprecation does not necessarily mean removal.

I am doing this, but it gives strange results. Just taking some of the corners while ignoring others.

@mekkablue : send you a Mail with a file and snippet.