typemytype / booleanOperations

Boolean operations on paths
MIT License
38 stars 18 forks source link

Raise BooleanOperationsError on open contour #43

Closed moyogo closed 6 years ago

moyogo commented 6 years ago

Allow users to better report error when this occurs.

moyogo commented 6 years ago

Specifically for https://github.com/googlei18n/fontmake/blob/6cdf44ea38d17f9bb14fa65c1c9bc6ea82e3b89b/Lib/fontmake/font_project.py#L110

anthrotype commented 6 years ago

for reference, also see https://github.com/googlei18n/fontmake/issues/354

Maybe you could define a subclass of BooleanOperationsError that's raised in this specific case when an input contour is open?

like these: https://github.com/typemytype/booleanOperations/blob/master/Lib/booleanOperations/exceptions.py

moyogo commented 6 years ago

@anthrotype OpenContourError?

anthrotype commented 6 years ago

Yeah

typemytype commented 6 years ago

+1 for OpenContourError and a separate error when this occurs instead of raise

moyogo commented 6 years ago

OK, it raises OpenContourError now. I guess we can have an option not to raise when we support open paths (see #44).