add classes for constraints
This commit is contained in:
parent
36c6f092fd
commit
da1c47441e
3
Constraint.py
Normal file
3
Constraint.py
Normal file
@ -0,0 +1,3 @@
|
||||
|
||||
class Constraint(object):
|
||||
pass
|
10
DistanceConstraint.py
Normal file
10
DistanceConstraint.py
Normal file
@ -0,0 +1,10 @@
|
||||
|
||||
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
|
9
EqualConstraint.py
Normal file
9
EqualConstraint.py
Normal file
@ -0,0 +1,9 @@
|
||||
|
||||
from Constraint import Constraint
|
||||
|
||||
class EqualConstraint(Constraint):
|
||||
def __init__(self, shape1, attr1, shape2, attr2):
|
||||
self.shape1 = shape1
|
||||
self.shape2 = shape2
|
||||
self.attr1 = attr1
|
||||
self.attr2 = attr2
|
Loading…
x
Reference in New Issue
Block a user