update constraint types to take point indexes
This commit is contained in:
1 parent
cc3831e235
commit
c8d2f9a82a
5 files changed
+30
-14
No files matched your search
@@ -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
@@ -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
|
||||
+5
-2
@@ -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
|
||||
+5
-2
@@ -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
|
||||
Reference in new issue
Block a user