(self, buf, oper)
| 43 | self.buf[0].append(p) |
| 44 | |
| 45 | def commit(self, buf, oper): |
| 46 | pgs = [] |
| 47 | if len(buf[0])==0:return False |
| 48 | if buf[0][0]!=buf[0][-1]: |
| 49 | buf[0].append(buf[0][0]) |
| 50 | if len(self.body)==0: |
| 51 | self.body.append(buf) |
| 52 | buf = [[],[]] |
| 53 | self.update, self.infoupdate = True, True |
| 54 | return True |
| 55 | for i in self.body: |
| 56 | pgs.extend(to_segment(i)) |
| 57 | unin = cascaded_union(pgs) |
| 58 | cur = cascaded_union(list(to_segment(buf))) |
| 59 | if oper=='+':rst = unin.union(cur) |
| 60 | if oper=='-':rst = unin.difference(cur) |
| 61 | self.body = parse_mpoly(rst) |
| 62 | self.update, self.infoupdate = True, True |
| 63 | |
| 64 | def snap(self, x, y, z, lim): |
| 65 | if not self.issimple():return None |
nothing calls this directly
no test coverage detected