WIP: make libraries and names first-class!
This commit is contained in:
parent
f834ec6be5
commit
7aaf73cb37
34 changed files with 1780 additions and 1812 deletions
28
examples/nested_poly_test.py
Normal file
28
examples/nested_poly_test.py
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
import numpy
|
||||
from pyclipper import (
|
||||
Pyclipper, PT_CLIP, PT_SUBJECT, CT_UNION, CT_INTERSECTION, PFT_NONZERO,
|
||||
scale_to_clipper, scale_from_clipper,
|
||||
)
|
||||
p = Pyclipper()
|
||||
p.AddPaths([
|
||||
[(-10, -10), (-10, 10), (-9, 10), (-9, -10)],
|
||||
[(-10, 10), (10, 10), (10, 9), (-10, 9)],
|
||||
[(10, 10), (10, -10), (9, -10), (9, 10)],
|
||||
[(10, -10), (-10, -10), (-10, -9), (10, -9)],
|
||||
], PT_SUBJECT, closed=True)
|
||||
p.Execute2?
|
||||
p.Execute?
|
||||
p.Execute(PT_UNION, PT_NONZERO, PT_NONZERO)
|
||||
p.Execute(CT_UNION, PT_NONZERO, PT_NONZERO)
|
||||
p.Execute(CT_UNION, PFT_NONZERO, PFT_NONZERO)
|
||||
p = Pyclipper()
|
||||
p.AddPaths([
|
||||
[(-10, -10), (-10, 10), (-9, 10), (-9, -10)],
|
||||
[(-10, 10), (10, 10), (10, 9), (-10, 9)],
|
||||
[(10, 10), (10, -10), (9, -10), (9, 10)],
|
||||
[(10, -10), (-10, -10), (-10, -9), (10, -9)],
|
||||
], PT_SUBJECT, closed=True)
|
||||
r = p.Execute2(CT_UNION, PFT_NONZERO, PFT_NONZERO)
|
||||
r
|
||||
r.Childs
|
||||
%history -f nested_poly_test.py
|
||||
Loading…
Add table
Add a link
Reference in a new issue