@@ -77,14 +77,8 @@ def __init__(self, parent=None, parent_pos=(0, 0),
77
77
78
78
sol = self .solver
79
79
80
- # These are redundant, but make life easier if
81
- # we define them all. All that is really
82
- # needed is left/right, margin['left'], and margin['right']
83
- self .widths = [Variable (f'{ sn } widths[{ i } ]' ) for i in range (ncols )]
84
80
self .lefts = [Variable (f'{ sn } lefts[{ i } ]' ) for i in range (ncols )]
85
81
self .rights = [Variable (f'{ sn } rights[{ i } ]' ) for i in range (ncols )]
86
- self .inner_widths = [Variable (f'{ sn } inner_widths[{ i } ]' )
87
- for i in range (ncols )]
88
82
for todo in ['left' , 'right' , 'leftcb' , 'rightcb' ]:
89
83
self .margins [todo ] = [Variable (f'{ sn } margins[{ todo } ][{ i } ]' )
90
84
for i in range (ncols )]
@@ -95,9 +89,6 @@ def __init__(self, parent=None, parent_pos=(0, 0),
95
89
self .margins [todo ] = np .empty ((nrows ), dtype = object )
96
90
self .margin_vals [todo ] = np .zeros (nrows )
97
91
98
- self .heights = [Variable (f'{ sn } heights[{ i } ]' ) for i in range (nrows )]
99
- self .inner_heights = [Variable (f'{ sn } inner_heights[{ i } ]' )
100
- for i in range (nrows )]
101
92
self .bottoms = [Variable (f'{ sn } bottoms[{ i } ]' ) for i in range (nrows )]
102
93
self .tops = [Variable (f'{ sn } tops[{ i } ]' ) for i in range (nrows )]
103
94
for todo in ['bottom' , 'top' , 'bottomcb' , 'topcb' ]:
@@ -119,14 +110,14 @@ def __repr__(self):
119
110
for i in range (self .nrows ):
120
111
for j in range (self .ncols ):
121
112
str += f'{ i } , { j } : ' \
122
- f'L( { self .lefts [j ].value ():1.3f} , ' \
113
+ f'L{ self .lefts [j ].value ():1.3f} , ' \
123
114
f'B{ self .bottoms [i ].value ():1.3f} , ' \
124
- f'W{ self .widths [j ].value ():1.3f} , ' \
125
- f'H{ self .heights [i ].value ():1.3f} , ' \
126
- f'innerW{ self .inner_widths [j ].value ():1.3f} , ' \
127
- f'innerH{ self .inner_heights [i ].value ():1.3f} , ' \
115
+ f'R{ self .rights [j ].value ():1.3f} , ' \
116
+ f'T{ self .tops [i ].value ():1.3f} , ' \
128
117
f'ML{ self .margins ["left" ][j ].value ():1.3f} , ' \
129
- f'MR{ self .margins ["right" ][j ].value ():1.3f} , \n '
118
+ f'MR{ self .margins ["right" ][j ].value ():1.3f} , ' \
119
+ f'MB{ self .margins ["bottom" ][i ].value ():1.3f} , ' \
120
+ f'MT{ self .margins ["top" ][i ].value ():1.3f} , \n '
130
121
return str
131
122
132
123
def reset_margins (self ):
0 commit comments