16 lines
394 B
Python
16 lines
394 B
Python
|
|
from Constraint import Constraint
|
|
|
|
class Fix(Constraint):
|
|
def __init__(self, shape, pt, val):
|
|
self.shape = shape
|
|
self.pt = pt
|
|
self.val = val
|
|
|
|
def toEqu(self):
|
|
varrefs1 = self.shape.toEqu(self.pt)[0]
|
|
coeffs = []
|
|
for i in range(len(varrefs1)):
|
|
coeffs.append((varrefs1[i], (self.shape, i)))
|
|
return [(coeffs, -self.val)]
|