Lines Matching refs:groups
33 if (vals[groups['1']] or vals[groups['3']]) and vals[groups['10']] and vals[groups['20']]:
34 x = vals[groups['10']][0]
35 y = vals[groups['20']][0]
38 if vals[groups['40']] and vals[groups['40']][0]:
39 size = scale*vals[groups['40']][0]
42 if vals[groups['50']]:
43 angle = vals[groups['50']][0]
45 elif vals[groups['21']]:
46 if vals[groups['21']][0] == 1.0:
48 elif vals[groups['21']][0] == -1.0:
53 if vals[groups['3']]:
54 for i in range (0, len(vals[groups['3']])):
55 text += vals[groups['3']][i]
56 if vals[groups['1']]:
57 text += vals[groups['1']][0]
69 if vals[groups['10']] and vals[groups['20']]:
71 generate_gcodetools_point(vals[groups['10']][0], vals[groups['20']][0])
73 generate_ellipse(vals[groups['10']][0], vals[groups['20']][0], w/2, 0.0, 1.0, 0.0, 0.0)
77 if vals[groups['10']] and vals[groups['11']] and vals[groups['20']] and vals[groups['21']]:
78 path = 'M %f,%f %f,%f' % (vals[groups['10']][0], vals[groups['20']][0], scale*(extrude*vals[groups['11']][0] - xmin), height - scale*(vals[groups['21']][0] - ymin))
85 if vals[groups['70']] and len(vals[groups['10']]) == len(vals[groups['20']]) and vals[groups['10']] and vals[groups['20']] and vals[groups['40']]:
86 knots = len(vals[groups['40']])
87 ctrls = len(vals[groups['10']])
91 if vals[groups['40']][i] != vals[groups['40']][i-1] and vals[groups['40']][i] != vals[groups['40']][i+1]:
92 a0 = (vals[groups['40']][i] - vals[groups['40']][i-2])/(vals[groups['40']][i+1] - vals[groups['40']][i-2])
93 a1 = (vals[groups['40']][i] - vals[groups['40']][i-1])/(vals[groups['40']][i+2] - vals[groups['40']][i-1])
94 vals[groups['10']].insert(i-1, (1.0 - a1)*vals[groups['10']][i-2] + a1*vals[groups['10']][i-1])
95 vals[groups['20']].insert(i-1, (1.0 - a1)*vals[groups['20']][i-2] + a1*vals[groups['20']][i-1])
96 vals[groups['10']][i-2] = (1.0 - a0)*vals[groups['10']][i-3] + a0*vals[groups['10']][i-2]
97 vals[groups['20']][i-2] = (1.0 - a0)*vals[groups['20']][i-3] + a0*vals[groups['20']][i-2]
98 vals[groups['40']].insert(i, vals[groups['40']][i])
99 knots = len(vals[groups['40']])
101 if vals[groups['40']][i] != vals[groups['40']][i+2] and vals[groups['40']][i-1] != vals[groups['40']][i+1] and vals[groups['40']][i-2] != vals[groups['40']][i]:
102 a1 = (vals[groups['40']][i] - vals[groups['40']][i-1])/(vals[groups['40']][i+2] - vals[groups['40']][i-1])
103 vals[groups['10']].insert(i-1, (1.0 - a1)*vals[groups['10']][i-2] + a1*vals[groups['10']][i-1])
104 vals[groups['20']].insert(i-1, (1.0 - a1)*vals[groups['20']][i-2] + a1*vals[groups['20']][i-1])
105 ctrls = len(vals[groups['10']])
106 path = 'M %f,%f' % (vals[groups['10']][0], vals[groups['20']][0])
108 path += ' C %f,%f %f,%f %f,%f' % (vals[groups['10']][3*i + 1], vals[groups['20']][3*i + 1], vals[groups['10']][3*i + 2], vals[groups['20']][3*i + 2], vals[groups['10']][3*i + 3], vals[groups['20']][3*i + 3])
109 if vals[groups['70']][0] & 1: # closed path
114 path = 'M %f,%f Q %f,%f %f,%f' % (vals[groups['10']][0], vals[groups['20']][0], vals[groups['10']][1], vals[groups['20']][1], vals[groups['10']][2], vals[groups['20']][2])
118 path = 'M %f,%f Q %f,%f %f,%f Q %f,%f %f,%f' % (vals[groups['10']][0], vals[groups['20']][0], vals[groups['10']][1], vals[groups['20']][1], vals[groups['10']][2], vals[groups['20']][2], vals[groups['10']][3], vals[groups['20']][3], vals[groups['10']][4], vals[groups['20']][4])
124 if vals[groups['10']] and vals[groups['20']] and vals[groups['40']]:
125 generate_ellipse(vals[groups['10']][0], vals[groups['20']][0], scale*vals[groups['40']][0], 0.0, 1.0, 0.0, 0.0)
129 if vals[groups['10']] and vals[groups['20']] and vals[groups['40']] and vals[groups['50']] and vals[groups['51']]:
130 generate_ellipse(vals[groups['10']][0], vals[groups['20']][0], scale*vals[groups['40']][0], 0.0, 1.0, vals[groups['50']][0]*math.pi/180.0, vals[groups['51']][0]*math.pi/180.0)
134 if vals[groups['10']] and vals[groups['11']] and vals[groups['20']] and vals[groups['21']] and vals[groups['40']] and vals[groups['41']] and vals[groups['42']]:
135 generate_ellipse(vals[groups['10']][0], vals[groups['20']][0], scale*vals[groups['11']][0], scale*vals[groups['21']][0], vals[groups['40']][0], vals[groups['41']][0], vals[groups['42']][0])
139 if vals[groups['10']] and vals[groups['20']]:
140 if len(vals[groups['10']]) > 1 and len(vals[groups['20']]) == len(vals[groups['10']]):
141 path = 'M %f,%f' % (vals[groups['10']][0], vals[groups['20']][0])
142 for i in range (1, len(vals[groups['10']])):
143 path += ' %f,%f' % (vals[groups['10']][i], vals[groups['20']][i])
149 if vals[groups['10']] and vals[groups['20']] and vals[groups['70']]:
150 if len(vals[groups['10']]) > 1 and len(vals[groups['20']]) == len(vals[groups['10']]):
154 if vals[groups['70']][0]: # closed path
156 vals[groups['10']].append(vals[groups['10']][0])
157 vals[groups['20']].append(vals[groups['20']][0])
160 path = 'M %f,%f' % (vals[groups['10']][0], vals[groups['20']][0])
161 xold = vals[groups['10']][0]
162 yold = vals[groups['20']][0]
163 for i in range (1, len(vals[groups['10']])):
168 bulge = vals[groups['42']][ibulge]
179 r = math.sqrt((vals[groups['10']][i] - xold)**2 + (vals[groups['20']][i] - yold)**2)
181 path += ' A %f,%f 0.0 %d %d %f,%f' % (r, r, large, sweep, vals[groups['10']][i], vals[groups['20']][i])
183 path += ' L %f,%f' % (vals[groups['10']][i], vals[groups['20']][i])
184 xold = vals[groups['10']][i]
185 yold = vals[groups['20']][i]
186 if vals[groups['70']][0]: # closed path
193 if vals[groups['10']] and vals[groups['20']] and vals[groups['70']] and vals[groups['72']] and vals[groups['92']] and vals[groups['93']]:
194 if len(vals[groups['10']]) > 1 and len(vals[groups['20']]) == len(vals[groups['10']]):
201 for i in range (0, len(vals[groups['93']])):
202 xc = vals[groups['10']][i10]
203 yc = vals[groups['20']][i10]
204 if vals[groups['72']][i72] == 2: # arc
205 rm = scale*vals[groups['40']][i40]
206 a1 = vals[groups['50']][i40]
211 for j in range(0, vals[groups['93']][i]):
212 if vals[groups['92']][i] & 2: # polyline
214 path += 'L %f,%f ' % (vals[groups['10']][i10], vals[groups['20']][i10])
215 if j == vals[groups['93']][i] - 1:
217 elif vals[groups['72']][i72] == 2: # arc
218 xc = vals[groups['10']][i10]
219 yc = vals[groups['20']][i10]
220 rm = scale*vals[groups['40']][i40]
221 a2 = vals[groups['51']][i40]
223 sweep = 1 - vals[groups['73']][i40] # sweep CCW
232 elif vals[groups['72']][i72] == 1: # line
233 path += 'L %f,%f ' % (scale*(extrude*vals[groups['11']][i11] - xmin), height - scale*(vals[groups['21']][i11] - ymin))
238 if vals[groups['70']][0]:
247 if vals[groups['10']] and vals[groups['11']] and vals[groups['13']] and vals[groups['14']] and vals[groups['20']] and vals[groups['21']] and vals[groups['23']] and vals[groups['24']]:
248 dx = abs(vals[groups['10']][0] - vals[groups['13']][0])
249 dy = abs(vals[groups['20']][0] - vals[groups['23']][0])
250 if (vals[groups['10']][0] == vals[groups['14']][0]) and dx > 0.00001:
253 path = 'M %f,%f %f,%f' % (vals[groups['10']][0], vals[groups['20']][0], vals[groups['13']][0], vals[groups['20']][0])
254 elif (vals[groups['20']][0] == vals[groups['24']][0]) and dy > 0.00001:
257 path = 'M %f,%f %f,%f' % (vals[groups['10']][0], vals[groups['20']][0], vals[groups['10']][0], vals[groups['23']][0])
262 x = scale*(extrude*vals[groups['11']][0] - xmin)
263 y = height - scale*(vals[groups['21']][0] - ymin)
265 if vals[groups['3']]:
266 if DIMTXT.has_key(vals[groups['3']][0]):
267 size = scale*DIMTXT[vals[groups['3']][0]]
279 if vals[groups['2']] and vals[groups['10']] and vals[groups['20']]:
280 x = vals[groups['10']][0] + scale*xmin
281 y = vals[groups['20']][0] - scale*ymin - height
282 attribs = {inkex.addNS('href','xlink'): '#' + quote(vals[groups['2']][0].replace(" ", "_").encode("utf-8"))}
284 if vals[groups['41']] and vals[groups['42']]:
285 tform += ' scale(%f, %f)' % (vals[groups['41']][0], vals[groups['42']][0])
291 if vals[groups['2']]:
293 block = inkex.etree.SubElement(defs, 'symbol', {'id': vals[groups['2']][0].replace(" ", "_")})
301 if vals[groups['1']] and vals[groups['2']]:
302 vals[groups['1']][0] = vals[groups['2']][0]
345 groups = {'1': 0, '2': 1, '3': 2, '6': 3, '8': 4, '10': 5, '11': 6, '13': 7, '14': 8, '20': 9, '21': 10, '23': 11, '24': 12, '40': 13, '41': 14, '42': 15, '50': 16, '51': 17, '62': 18, '70': 19, '72': 20, '73': 21, '92': 22, '93': 23, '230': 24, '370': 25}
458 if entity and groups.has_key(line[0]):
477 vals[groups[line[0]]].append(val)
482 elif vals[groups['8']]: # use Common Layer Name
483 if not vals[groups['8']][0]:
484 vals[groups['8']][0] = '0' # use default name
485 layer = layer_nodes[vals[groups['8']][0]]
487 if vals[groups['8']]:
488 if layer_colors.has_key(vals[groups['8']][0]):
489 if colors.has_key(layer_colors[vals[groups['8']][0]]):
490 color = colors[layer_colors[vals[groups['8']][0]]]
491 if vals[groups['62']]: # Common Color Number
492 if colors.has_key(vals[groups['62']][0]):
493 color = colors[vals[groups['62']][0]]
496 if vals[groups['370']]: # Common Lineweight
497 if vals[groups['370']][0] > 0:
498 w = 96.0/25.4*vals[groups['370']][0]/100.0
502 if vals[groups['6']]: # Common Linetype
503 if linetypes.has_key(vals[groups['6']][0]):
504 style += ';' + linetypes[vals[groups['6']][0]]
506 if vals[groups['230']]:
507 extrude = float(vals[groups['230']][0])
509 if vals[groups[xgrp]]:
510 for i in range (0, len(vals[groups[xgrp]])):
511 vals[groups[xgrp]][i] = scale*(extrude*vals[groups[xgrp]][i] - xmin)
513 if vals[groups[ygrp]]:
514 for i in range (0, len(vals[groups[ygrp]])):
515 vals[groups[ygrp]][i] = height - scale*(vals[groups[ygrp]][i] - ymin)
517 if vals[groups['50']] and vals[groups['51']]:
518 temp = vals[groups['51']][0]
519 vals[groups['51']][0] = 180.0 - vals[groups['50']][0]
520 vals[groups['50']][0] = 180.0 - temp