Glyphs 3 removeOverlap bug?

Hi,

Please, take a look at the screencast I prepared:

https://www.youtube.com/watch?v=CwB8JnjjdZM

RemoveOverlap function doesn’t work correctly. Do it?

@GeorgSeifert can You, please, refer to this bug?

The box is clock wise and that causes problems. What shape do you like in the end? You might draw a box, select the ‘S’ and subtract it with the button in the transform panel.

I do everything with a script.
I copy decomposed layer to the background and I draw a box that fills xHeight area. Then reverse that rectangle, append to the background’s shapes and removeOverlap.

In Glyphs2 it works (see image below). In Glyphs3 it fails with shapes with overshoots.

I need this shape:

This script should do that:

from Foundation import NSMakeRect, NSMaxX

box = GSPath.rectWithRect_(NSMakeRect(0, 0, 10000, Layer.master.capHeight))
newPaths = NSMutableArray.arrayWithArray_([box])
cuttingPaths = NSMutableArray.arrayWithArray_(list(Layer.shapes))
GSPathFinder.subtractPaths_from_error_(cuttingPaths, newPaths, None)
idx = 0
for path in newPaths:
	bounds = path.bounds
	if NSMaxX(bounds) == 10000:
		del(newPaths[idx])
		break
	idx += 1
Layer.shapes = newPaths