update constraint types to take point indexes
This commit is contained in:
parent
cc3831e235
commit
c8d2f9a82a
9
Connect.py
Normal file
9
Connect.py
Normal file
@ -0,0 +1,9 @@
|
||||
|
||||
from Constraint import Constraint
|
||||
|
||||
class Connect(Constraint):
|
||||
def __init__(self, shape1, pt1, shape2, pt2):
|
||||
self.shape1 = shape1
|
||||
self.pt1 = pt1
|
||||
self.shape2 = shape2
|
||||
self.pt2 = pt2
|
11
Distance.py
Normal file
11
Distance.py
Normal file
@ -0,0 +1,11 @@
|
||||
|
||||
from Constraint import Constraint
|
||||
|
||||
class Distance(Constraint):
|
||||
def __init__(self, shape1, pt1, shape2, pt2, direction, dist):
|
||||
self.shape1 = shape1
|
||||
self.pt1 = pt1
|
||||
self.shape2 = shape2
|
||||
self.pt2 = pt2
|
||||
self.dist = dist
|
||||
self.direction = direction
|
@ -1,10 +0,0 @@
|
||||
|
||||
from Constraint import Constraint
|
||||
|
||||
class DistanceConstraint(Constraint):
|
||||
def __init__(self, shape1, attr1, shape2, attr2, dist):
|
||||
self.shape1 = shape1
|
||||
self.shape2 = shape2
|
||||
self.attr1 = attr1
|
||||
self.attr2 = attr2
|
||||
self.dist = dist
|
@ -2,5 +2,8 @@
|
||||
from Constraint import Constraint
|
||||
|
||||
class Horizontal(Constraint):
|
||||
def __init__(self, shape):
|
||||
self.shape = shape
|
||||
def __init__(self, shape1, pt1, shape2, pt2):
|
||||
self.shape1 = shape1
|
||||
self.pt1 = pt1
|
||||
self.shape2 = shape2
|
||||
self.pt2 = pt2
|
||||
|
@ -2,5 +2,8 @@
|
||||
from Constraint import Constraint
|
||||
|
||||
class Vertical(Constraint):
|
||||
def __init__(self, shape):
|
||||
self.shape = shape
|
||||
def __init__(self, shape1, pt1, shape2, pt2):
|
||||
self.shape1 = shape1
|
||||
self.pt1 = pt1
|
||||
self.shape2 = shape2
|
||||
self.pt2 = pt2
|
||||
|
Loading…
x
Reference in New Issue
Block a user