Skip to content

Commit f5fb0d4

Browse files
authored
Merge pull request #49 from typemytype/fix_path_with_zero_area
dont check on the path area
2 parents bda7c32 + 85ac3e8 commit f5fb0d4

1 file changed

Lines changed: 8 additions & 12 deletions

File tree

Lib/booleanOperations/booleanOperationManager.py

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,15 @@ def clipExecute(subjectContours, clipContours, operation, subjectFillType="nonZe
3535
pc = pyclipper.Pyclipper()
3636

3737
for i, subjectContour in enumerate(subjectContours):
38-
# ignore paths with no area
39-
if pyclipper.Area(subjectContour):
40-
try:
41-
pc.AddPath(subjectContour, pyclipper.PT_SUBJECT)
42-
except pyclipper.ClipperException:
43-
raise InvalidSubjectContourError("contour %d is invalid for clipping" % i)
38+
try:
39+
pc.AddPath(subjectContour, pyclipper.PT_SUBJECT)
40+
except pyclipper.ClipperException:
41+
raise InvalidSubjectContourError("contour %d is invalid for clipping" % i)
4442
for j, clipContour in enumerate(clipContours):
45-
# ignore paths with no area
46-
if pyclipper.Area(clipContour):
47-
try:
48-
pc.AddPath(clipContour, pyclipper.PT_CLIP)
49-
except pyclipper.ClipperException:
50-
raise InvalidClippingContourError("contour %d is invalid for clipping" % j)
43+
try:
44+
pc.AddPath(clipContour, pyclipper.PT_CLIP)
45+
except pyclipper.ClipperException:
46+
raise InvalidClippingContourError("contour %d is invalid for clipping" % j)
5147

5248
try:
5349
solution = pc.Execute(_operationMap[operation],

0 commit comments

Comments
 (0)