config_ats.js 35.7 KB
Newer Older
Scott Sun's avatar
s  
Scott Sun committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
(function(){return {
	"formats": {
		"ODB": {},
		"ODB_1": { 
			"comments": "", 
			"arrStep": "stp",
			"isMerge": "yes"
		 },
		"Gerber274x_1": { 
			"nf1": 3,
			"nf2": 4,
			"units": "mm",
			"zeroes": "leading",
			"decimal": "no",
			"nf_comp": 0,
			"break_sr": "yes",
			"data_type": "ascii",
			"separator": "*",
			"threshold": 200,
			"drill_only": "no",
			"multiplier": 1,
			"resolution": 3,
			"tool_units": "inch",
			"coordinates": "absolute",
			"merge_by_rule": "no",
			"signed_coords": "no",
			"text_line_width": 0.0024
		},
		"Gerber274x_2": {   
			"nf1": 3,
			"nf2": 5,
			"units": "inch",
			"zeroes": "leading",
			"decimal": "no",
			"nf_comp": 0,
			"break_sr": "yes",
			"data_type": "ascii",
			"separator": "*",
			"threshold": 200,
			"drill_only": "no",
			"multiplier": 1,
			"resolution": 3,
			"tool_units": "inch",
			"coordinates": "absolute",
			"merge_by_rule": "no",
			"signed_coords": "no",
			"text_line_width": 0.0024
		},
Scott Sun's avatar
Scott Sun committed
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
		"Gerber274x_3": {
			"nf1": 3,
			"nf2": 5,
			"units": "mm",
			"zeroes": "leading",
			"decimal": "no",
			"nf_comp": 0,
			"break_sr": "yes",
			"data_type": "ascii",
			"separator": "*",
			"threshold": 200,
			"drill_only": "no",
			"multiplier": 1,
			"resolution": 3,
			"tool_units": "inch",
			"coordinates": "absolute",
			"merge_by_rule": "no",
			"signed_coords": "no",
			"text_line_width": 0.0024
		},
		"Gerber274x_4": {
			"nf1": 2,
			"nf2": 3,
			"units": "mm",
			"zeroes": "none",
			"decimal": "no",
			"nf_comp": 0,
			"break_sr": "yes",
			"data_type": "ascii",
			"separator": "*",
			"threshold": 200,
			"drill_only": "no",
			"multiplier": 1,
			"resolution": 3,
			"tool_units": "mm",
			"coordinates": "absolute",
			"merge_by_rule": "no",
			"signed_coords": "no",
			"text_line_width": 0.0024
		},
Scott Sun's avatar
s  
Scott Sun committed
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108
		"Gerber274x_5": {
			"nf1": 2,
			"nf2": 3,
			"units": "mm",
			"zeroes": "leading",
			"decimal": "no",
			"nf_comp": 0,
			"break_sr": "yes",
			"data_type": "ascii",
			"separator": "*",
			"threshold": 200,
			"drill_only": "no",
			"multiplier": 1,
			"resolution": 3,
			"tool_units": "mm",
			"coordinates": "absolute",
			"merge_by_rule": "no",
			"signed_coords": "no",
			"text_line_width": 0.0024
		},
Scott Sun's avatar
s  
Scott Sun committed
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188
		"Excellon1_1":{ 
			"nf1": 3,
			"nf2": 0,
			"units": "mm",
			"zeroes": "leading",
			"decimal": "yes",
			"nf_comp": 0,
			"break_sr": "yes",
			"data_type": "ascii",
			"separator": "nl",
			"threshold": 200,
			"drill_only": "no",
			"multiplier": 1,
			"resolution": 3,
			"tool_units": "mm",
			"coordinates": "absolute",
			"merge_by_rule": "no",
			"signed_coords": "no",
			"text_line_width": 0.0024
		},
		"Excellon2_1": {   
			"nf1": 3,
			"nf2": 5,
			"units": "mm",
			"zeroes": "leading",
			"decimal": "no",
			"nf_comp": 0,
			"break_sr": "yes",
			"data_type": "ascii",
			"separator": "nl",
			"threshold": 200,
			"drill_only": "no",
			"multiplier": 1,
			"resolution": 3,
			"tool_units": "mm",
			"coordinates": "absolute",
			"merge_by_rule": "no",
			"signed_coords": "no",
			"text_line_width": 0.0024
		},
		"Excellon2_2": {
			"nf1": 2,
			"nf2": 3,
			"units": "inch",
			"zeroes": "leading",
			"decimal": "no",
			"nf_comp": 0,
			"break_sr": "yes",
			"data_type": "ascii",
			"separator": "nl",
			"threshold": 200,
			"drill_only": "no",
			"multiplier": 1,
			"resolution": 3,
			"tool_units": "inch",
			"coordinates": "absolute",
			"merge_by_rule": "no",
			"signed_coords": "no",
			"text_line_width": 0.0024
		},
		"Excellon2_3": { 
			"nf1": 2,
			"nf2": 5,
			"units": "inch",
			"zeroes": "trailing",
			"decimal": "no",
			"nf_comp": 0,
			"break_sr": "yes",
			"data_type": "ascii",
			"separator": "nl",
			"threshold": 200,
			"drill_only": "no",
			"multiplier": 1,
			"resolution": 3,
			"tool_units": "mm",
			"coordinates": "absolute",
			"merge_by_rule": "no",
			"signed_coords": "no",
			"text_line_width": 0.0024
		},
Scott Sun's avatar
Scott Sun committed
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209
		"Excellon2_4": { 
			"nf1": 2,
			"nf2": 3,
			"units": "mm",
			"zeroes": "leading",
			"decimal": "no",
			"nf_comp": 0,
			"break_sr": "yes",
			"data_type": "ascii",
			"separator": "nl",
			"threshold": 200,
			"drill_only": "no",
			"multiplier": 1,
			"resolution": 3,
			"tool_units": "mm",
			"coordinates": "absolute",
			"merge_by_rule": "no",
			"signed_coords": "no",
			"text_line_width": 0.0024
		},
		"Excellon2_5": { 
Scott Sun's avatar
Scott Sun committed
210 211
			"nf1": 2,
			"nf2": 3,
Scott Sun's avatar
Scott Sun committed
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229
			"units": "mm",
			"zeroes": "leading",
			"decimal": "no",
			"nf_comp": 0,
			"break_sr": "yes",
			"data_type": "ascii",
			"separator": "nl",
			"threshold": 200,
			"drill_only": "no",
			"multiplier": 1,
			"resolution": 3,
			"tool_units": "mm",
			"coordinates": "absolute",
			"merge_by_rule": "no",
			"signed_coords": "no",
			"text_line_width": 0.0024
		},
		"Excellon2_6": { 
Scott Sun's avatar
Scott Sun committed
230
			"nf1": 3,
Scott Sun's avatar
Scott Sun committed
231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248
			"nf2": 4,
			"units": "mm",
			"zeroes": "leading",
			"decimal": "no",
			"nf_comp": 0,
			"break_sr": "yes",
			"data_type": "ascii",
			"separator": "nl",
			"threshold": 200,
			"drill_only": "no",
			"multiplier": 1,
			"resolution": 3,
			"tool_units": "mm",
			"coordinates": "absolute",
			"merge_by_rule": "no",
			"signed_coords": "no",
			"text_line_width": 0.0024
		},
Scott Sun's avatar
s  
Scott Sun committed
249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268
		"Excellon2_7": { 
			"nf1": 3,
			"nf2": 4,
			"units": "inch",
			"zeroes": "none",
			"decimal": "no",
			"nf_comp": 0,
			"break_sr": "yes",
			"data_type": "ascii",
			"separator": "nl",
			"threshold": 200,
			"drill_only": "no",
			"multiplier": 1,
			"resolution": 3,
			"tool_units": "inch",
			"coordinates": "absolute",
			"merge_by_rule": "no",
			"signed_coords": "no",
			"text_line_width": 0.0024
		},
Scott Sun's avatar
s  
Scott Sun committed
269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288
		"Excellon2_8": { 
			"nf1": 2,
			"nf2": 5,
			"units": "inch",
			"zeroes": "none",
			"decimal": "no",
			"nf_comp": 0,
			"break_sr": "yes",
			"data_type": "ascii",
			"separator": "nl",
			"threshold": 200,
			"drill_only": "no",
			"multiplier": 1,
			"resolution": 3,
			"tool_units": "inch",
			"coordinates": "absolute",
			"merge_by_rule": "no",
			"signed_coords": "no",
			"text_line_width": 0.0024
		},
Scott Sun's avatar
s  
Scott Sun committed
289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310
		"IPC356_1": {  
			"nf1": 2,
			"nf2": 4,
			"units": "inch",
			"zeroes": "none",
			"decimal": "no",
			"nf_comp": 0,
			"break_sr": "yes",
			"data_type": "ascii",
			"separator": "*",
			"threshold": 200,
			"drill_only": "no",
			"multiplier": 1,
			"resolution": 3,
			"tool_units": "inch",
			"coordinates": "absolute",
			"merge_by_rule": "no",
			"signed_coords": "no",
			"text_line_width": 0.0024
		}
	},
	"customer": {
Scott Sun's avatar
s  
Scott Sun committed
311
		"2171": {
Scott Sun's avatar
s  
Scott Sun committed
312 313 314 315 316
			"step": "cad",
			"rules": [
				{ 
					"valid": function(props){
						var file = props.file;
Scott Sun's avatar
s  
Scott Sun committed
317
						return /.+\.tgz$/ig.test(file.name)
Scott Sun's avatar
s  
Scott Sun committed
318 319 320 321
					}, 
					"type": "ODB",		
					"format": "ODB"
				},
Scott Sun's avatar
s  
Scott Sun committed
322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411
				{
					"valid": function(props){
						var file = props.file;
						return /.+\.art$/ig.test(file.name)
					},  
					"type": "Gerber274x",		
					"format": "Gerber274x_2",
					"format_params": function(props){
						var params = props.params
						if(params.art_param){
							var leading = params.art_param["SUPPRESS_LEAD_ZEROES"]
							var trailing = params.art_param["SUPPRESS_TRAIL_ZEROES"]
							var zeroes = "none"
							if(/yes/ig.test(leading)){
								zeroes = "leading"
							}
							if(/yes/ig.test(trailing)){
								zeroes = "trailing"
							}
							var nf1,nf2
							if(params.art_param.hasOwnProperty("FORMAT")){
								var tmp = params.art_param["FORMAT"].split(".")
								if(/\d+/ig.test(tmp[0])){nf1 = Number(tmp[0])}
								if(/\d+/ig.test(tmp[1])){nf2 = Number(tmp[1])}
							}
							return {
								"nf1": nf1 || 3,
								"nf2": nf2 || 5,
								"units": /METRIC|MM/ig.test(params.art_param["OUTPUT_UNITS"])? "mm" :"inch",
								"zeroes": zeroes,
								"decimal": "no",
								"nf_comp": 0,
								"break_sr": "yes",
								"data_type": "ascii",
								"separator": "*",
								"threshold": 200,
								"drill_only": "no",
								"multiplier": 1,
								"resolution": 3,
								"tool_units": /METRIC|MM/ig.test(params.art_param["OUTPUT_UNITS"])? "mm" :"inch",
								"coordinates": "absolute",
								"merge_by_rule": "no",
								"signed_coords": "no",
								"text_line_width": 0.0024
							}
						}
					}
				},
				{
					"valid": function(props){
						var file = props.file;
						return /.+\.drl$/ig.test(file.name)
					},  
					"type": "Excellon2",		
					"format": "Excellon2_1",
					"format_params": function(props){
						var params = props.params
						if(params.nc_param){
							var leading = params.nc_param["SUPPRESS_LEAD_ZEROES"]
							var trailing = params.nc_param["SUPPRESS_TRAIL_ZEROES"]
							var zeroes = "none"
							if(/yes/ig.test(leading)){
								zeroes = "leading"
							}
							if(/yes/ig.test(trailing)){
								zeroes = "trailing"
							}
							return {
								"nf1": params.nc_param["INTEGER_PLACES"]? Number(params.nc_param["INTEGER_PLACES"]) : 3,
								"nf2": params.nc_param["DECIMAL_PLACES"]? Number(params.nc_param["DECIMAL_PLACES"]) : 5,
								"units": /METRIC|MM/ig.test(params.nc_param["OUTPUT_UNITS"])? "mm" :"inch",
								"zeroes": zeroes,
								"decimal": "no",
								"nf_comp": 0,
								"break_sr": "yes",
								"data_type": "ascii",
								"separator": "nl",
								"threshold": 200,
								"drill_only": "no",
								"multiplier": 1,
								"resolution": 3,
								"tool_units": /METRIC|MM/ig.test(params.nc_param["OUTPUT_UNITS"])? "mm" :"inch",
								"coordinates": params.nc_param["COORDINATES"]? params.nc_param["COORDINATES"].toLowerCase() :"absolute",
								"merge_by_rule": "no",
								"signed_coords": "no",
								"text_line_width": 0.0024
							}
						}
					}
				},
Scott Sun's avatar
s  
Scott Sun committed
412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429
				{
					"valid": function(props){
						var file = props.file;
						return /.+\.drd$/ig.test(file.name)
					},  
					"type": "Excellon1",		
					"format": "Excellon1_1"
				},
				{
					"valid": function(props){
						var file = props.file;
						return /.+\.phd$/ig.test(file.name)
					},  
					"type": "Gerber274x",		
					"format": "Gerber274x_1"
				}
			],
			"tl_name": [
Scott Sun's avatar
s  
Scott Sun committed
430 431
				{"orig_name" : ["top_enig","top-enig","enig_top"], "tl_name" : "enig_top" }, 
				{"orig_name" : ["bot_enig","bot-enig","enig_bot"], "tl_name" : "enig_bot" }, 
Scott Sun's avatar
Scott Sun committed
432 433 434 435 436 437
				{"orig_name" : ["top_paste","^spt$","^past_top$"], "tl_name" : "past_top" }, 
				{"orig_name" : ["bottom_paste","^spb$","^past_botm$"], "tl_name" : "past_botm" },
				{"orig_name" : ["top_silk","^sst$","^silk_top$"], "tl_name" : "silk_top" },
				{"orig_name" : ["bottom_silk","^ssb$","^silk_bot$"], "tl_name" : "silk_bot" },
				{"orig_name" : ["top_solder","^smt$","^sm_top$"], "tl_name" : "sm_top" },
				{"orig_name" : ["bottom_solder","^smb$","^sm_botm$"], "tl_name" : "sm_botm" },
Scott Sun's avatar
s  
Scott Sun committed
438 439
				{"orig_name" : "^top$", "tl_name" : "top" },
				{"orig_name" : "^drill$", "tl_name" : "drill" },
Scott Sun's avatar
Scott Sun committed
440
				{"orig_name" : ["^board_outline$","outline.art","^outline$"], "tl_name" : "outline" },
Scott Sun's avatar
s  
Scott Sun committed
441
				{"orig_name" : ["^rout$","\\.rou$"], "tl_name" : "rout" },
Scott Sun's avatar
s  
Scott Sun committed
442
				{"orig_name" : "^bottom$", "tl_name" : "bottom" },
Scott Sun's avatar
Scott Sun committed
443
				{"orig_name" : ["^l(\\d+)","^isl(\\d+)$","^layer_(\\d+)$"], "tl_name" : "l_($1)"},
Scott Sun's avatar
s  
Scott Sun committed
444 445 446 447 448
				{"orig_name" : ["_isl(\\d+)_isl(\\d+)","d(\\d+)-(\\d+)"], "tl_name" : "d_($1)-($2)"},
				{"orig_name" : ["_top_isl(\\d+)"], "tl_name" : "d_1-($1)"},
				{"orig_name" : ["_isl(\\d+)_bottom"], "tl_name" : "d_($1)-($1+1)"}
			]
		},
Scott Sun's avatar
s  
Scott Sun committed
449
		"Yucca": {
Scott Sun's avatar
s  
Scott Sun committed
450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567
			"step": "cad",
			"rules": [
				{ 
					"valid": function(props){
						var file = props.file;
						return /.+\.tgz$/ig.test(file.name)
					}, 
					"type": "ODB",		
					"format": "ODB"
				},
				{
					"valid": function(props){
						var file = props.file;
						return /.+\.ipc$/ig.test(file.name)
					},  
					"type": "IPC356",		
					"format": "IPC356_1"
				},
				{
					"valid": function(props){
						var file = props.file;
						return /.+\.rou$/ig.test(file.name)
					},  
					"type": "Excellon2",		
					"format": "Excellon2_3"
				},
				{
					"valid": function(props){
						var file = props.file;
						return /.+\.art$/ig.test(file.name)
					},  
					"type": "Gerber274x",		
					"format": "Gerber274x_2",
					"format_params": function(props){
						var params = props.params
						if(params.art_param){
							var leading = params.art_param["SUPPRESS_LEAD_ZEROES"]
							var trailing = params.art_param["SUPPRESS_TRAIL_ZEROES"]
							var zeroes = "none"
							if(/yes/ig.test(leading)){
								zeroes = "leading"
							}
							if(/yes/ig.test(trailing)){
								zeroes = "trailing"
							}
							var nf1,nf2
							if(params.art_param.hasOwnProperty("FORMAT")){
								var tmp = params.art_param["FORMAT"].split(".")
								if(/\d+/ig.test(tmp[0])){nf1 = Number(tmp[0])}
								if(/\d+/ig.test(tmp[1])){nf2 = Number(tmp[1])}
							}
							return {
								"nf1": nf1 || 3,
								"nf2": nf2 || 5,
								"units": /METRIC|MM/ig.test(params.art_param["OUTPUT_UNITS"])? "mm" :"inch",
								"zeroes": zeroes,
								"decimal": "no",
								"nf_comp": 0,
								"break_sr": "yes",
								"data_type": "ascii",
								"separator": "*",
								"threshold": 200,
								"drill_only": "no",
								"multiplier": 1,
								"resolution": 3,
								"tool_units": /METRIC|MM/ig.test(params.art_param["OUTPUT_UNITS"])? "mm" :"inch",
								"coordinates": "absolute",
								"merge_by_rule": "no",
								"signed_coords": "no",
								"text_line_width": 0.0024
							}
						}
					}
				},
				{
					"valid": function(props){
						var file = props.file;
						return /.+\.drl$/ig.test(file.name)
					},  
					"type": "Excellon2",		
					"format": "Excellon2_1",
					"format_params": function(props){
						var params = props.params
						if(params.nc_param){
							var leading = params.nc_param["SUPPRESS_LEAD_ZEROES"]
							var trailing = params.nc_param["SUPPRESS_TRAIL_ZEROES"]
							var zeroes = "none"
							if(/yes/ig.test(leading)){
								zeroes = "leading"
							}
							if(/yes/ig.test(trailing)){
								zeroes = "trailing"
							}
							return {
								"nf1": params.nc_param["INTEGER_PLACES"]? Number(params.nc_param["INTEGER_PLACES"]) : 3,
								"nf2": params.nc_param["DECIMAL_PLACES"]? Number(params.nc_param["DECIMAL_PLACES"]) : 5,
								"units": /METRIC|MM/ig.test(params.nc_param["OUTPUT_UNITS"])? "mm" :"inch",
								"zeroes": zeroes,
								"decimal": "no",
								"nf_comp": 0,
								"break_sr": "yes",
								"data_type": "ascii",
								"separator": "nl",
								"threshold": 200,
								"drill_only": "no",
								"multiplier": 1,
								"resolution": 3,
								"tool_units": /METRIC|MM/ig.test(params.nc_param["OUTPUT_UNITS"])? "mm" :"inch",
								"coordinates": params.nc_param["COORDINATES"]? params.nc_param["COORDINATES"].toLowerCase() :"absolute",
								"merge_by_rule": "no",
								"signed_coords": "no",
								"text_line_width": 0.0024
							}
						}
					}
				}
			],
			"tl_name": [
Scott Sun's avatar
s  
Scott Sun committed
568 569
				{"orig_name" : ["assytop\\.art","past_top","paste_top"], "tl_name" : "past_top" },
				{"orig_name" : ["assybot\\.art","past_bot","paste_bot"], "tl_name" : "past_botm" },
Scott Sun's avatar
Scott Sun committed
570 571
				{"orig_name" : ["pleg\\.art","^ss_top","silk_top"], "tl_name" : "silk_top" },
				{"orig_name" : ["sleg\\.art","^ss_bot","silk_bot"], "tl_name" : "silk_bot" },
Scott Sun's avatar
s  
Scott Sun committed
572 573
				{"orig_name" : ["mask_top\\.art","psm\\.art","sm_top"], "tl_name" : "sm_top" },
				{"orig_name" : ["mask_bot\\.art","ssm\\.art","sm_bot"], "tl_name" : "sm_botm" },
Scott Sun's avatar
s  
Scott Sun committed
574
				{"orig_name" : ["^top$","^top.art$"], "tl_name" : "top" },
Scott Sun's avatar
Scott Sun committed
575
				{"orig_name" : ["^0?(\\d+)_.*\\.art$","^l(\\d+)\\.art$","^0(\\d+).*ccp_ms","^s(\\d+)\\.art","lay(\\d+)\\.art","layer_(\\d+)"], "tl_name" : "l_($1)"},
Scott Sun's avatar
Scott Sun committed
576 577
				{"orig_name" : ["^bottom$","^bottom\\.art$"], "tl_name" : "bottom" },
				{"orig_name" : ["-(\\d+)-(\\d+)\\.drl$","(\\d+)-(\\d+)-laser\\.drl$","d(\\d+)-(\\d+)"], "tl_name" : "d_($1)-($2)"},
Scott Sun's avatar
s  
Scott Sun committed
578
				{"orig_name" : ["\\.rou$","^rout$"], "tl_name" : "rout" },
Scott Sun's avatar
s  
Scott Sun committed
579 580
				{"orig_name" : "fab.art", "tl_name" : "fab.art" },
				{"orig_name" : ["multipack.art","^array$"], "tl_name" : "array" },
Scott Sun's avatar
Scott Sun committed
581
				{"orig_name" : ["outline"], "tl_name" : "outline" },
Scott Sun's avatar
Scott Sun committed
582
				{"orig_name" : ["^pst\\.art$","top-enig","enig_top"], "tl_name" : "enig_top" },
Scott Sun's avatar
Scott Sun committed
583
				{"orig_name" : ["^sst\\.art$","bot-enig","enig_bot"], "tl_name" : "enig_bot" }
Scott Sun's avatar
s  
Scott Sun committed
584 585 586
			],
			"mergerule" : {
				profile:["past_top"]
Scott Sun's avatar
s  
Scott Sun committed
587 588 589
			},
			"extra": [
				{
Scott Sun's avatar
Scott Sun committed
590 591 592 593
					"verification": function(info){
						if(!info.type){return false}
						return /gerber/ig.test(info.type)
					},
Scott Sun's avatar
s  
Scott Sun committed
594
					"fn": function(props){
Scott Sun's avatar
Scott Sun committed
595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637
						var fileInfo = props.fileInfo;
						var step = props.step;
						fileInfo.forEach(function(item){
							var layer = item.file.name.toLowerCase().split(" ").join("-")
							var path = item.file.path
							var filectx = fs.readFile(path)
							var tmp = filectx.match(/Holesize \d\. = [\d\.]+ Tolerance = [\S]+ [\S]+ [\S]+ Quantity = \d+\n/igm)
							if(tmp && tmp.length) {
								var res = tmp.map(function(v,i) {
									var tmp2 = /Holesize \d\. = ([\d\.]+) Tolerance = ([\S]+) ([\S]+) ([\S]+) Quantity = \d+\n/igm.exec(v);
									return {
										size: tmp2[1],
										tolerance: tmp2[2],
										type: tmp2[3],
										unit: tmp2[4],
										row: i+1
									}
								})
								// [{"size":"0.100300","tolerance":"+0.020000/-0.020000","type":"PLATED","unit":"MM","row":1}]
								GEN.units({type:"mm"})
								var toolsInfo = GEN.getTool({job:job, step:step, layer:layer, units:"mm"})
								GEN.COM("tools_show,layer="+layer)
// {"1":{"count":"01156","num":"1","type":"plated","min_tol":"0","max_tol":"0","finish_size":"1","drill_size":"1","slot_len":"0","type2":"standard","shape":"hole","bit":0}}
								GEN.COM("tools_tab_reset")
								var alltype = {
									plated: "plate"
								}
								Object.keys(toolsInfo).forEach(function(row){
									var info = toolsInfo[row];
									var numberrow = row - 1;
									var type = res[numberrow]? res[numberrow].type.toLowerCase() : info.type.toLowerCase();
									var min_tol = res[numberrow]? Math.abs( res[numberrow].tolerance.split("/")[1] * 1000 ): info.min_tol;
									var max_tol = res[numberrow]? Math.abs(res[numberrow].tolerance.split("/")[0] * 1000) : info.max_tol;
									var drill_size = res[numberrow]? res[numberrow].size * 1000 : info.drill_size;
									
									GEN.COM("tools_tab_add,num="+row+",shape="+info.shape+",type="+alltype[type]
									+",min_tol="+min_tol+",max_tol="+max_tol+",bit=,finish_size="+drill_size+",drill_size="+drill_size);
								})
								GEN.COM("tools_set,layer="+layer+",thickness=0,user_params=,slots=by_length")
								// {"layer":"gfp2_1216_lte_rl03_am_m1610201_r01-bl-2-3-laser.drl",
								// "info":[{"size":"0.090300","tolerance":"+0.020000/-0.020000","type":"PLATED","unit":"MM","row":1}]}
							}
						})
Scott Sun's avatar
s  
Scott Sun committed
638 639 640
					}
				}
			]
Scott Sun's avatar
s  
Scott Sun committed
641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744
		},
		"New_data": {
			"step": "cad",
			"rules": [
				{ 
					"valid": function(props){
						var file = props.file;
						return /.+\.tgz$/ig.test(file.name)
					}, 
					"type": "ODB",		
					"format": "ODB"
				},
				{
					"valid": function(props){
						var file = props.file;
						return /.+\.art$/ig.test(file.name)
					},  
					"type": "Gerber274x",		
					"format": "Gerber274x_2",
					"format_params": function(props){
						var params = props.params
						if(params.art_param){
							var leading = params.art_param["SUPPRESS_LEAD_ZEROES"]
							var trailing = params.art_param["SUPPRESS_TRAIL_ZEROES"]
							var zeroes = "none"
							if(/yes/ig.test(leading)){
								zeroes = "leading"
							}
							if(/yes/ig.test(trailing)){
								zeroes = "trailing"
							}
							var nf1,nf2
							if(params.art_param.hasOwnProperty("FORMAT")){
								var tmp = params.art_param["FORMAT"].split(".")
								if(/\d+/ig.test(tmp[0])){nf1 = Number(tmp[0])}
								if(/\d+/ig.test(tmp[1])){nf2 = Number(tmp[1])}
							}
							return {
								"nf1": nf1 || 3,
								"nf2": nf2 || 5,
								"units": /METRIC|MM/ig.test(params.art_param["OUTPUT_UNITS"])? "mm" :"inch",
								"zeroes": zeroes,
								"decimal": "no",
								"nf_comp": 0,
								"break_sr": "yes",
								"data_type": "ascii",
								"separator": "*",
								"threshold": 200,
								"drill_only": "no",
								"multiplier": 1,
								"resolution": 3,
								"tool_units": /METRIC|MM/ig.test(params.art_param["OUTPUT_UNITS"])? "mm" :"inch",
								"coordinates": "absolute",
								"merge_by_rule": "no",
								"signed_coords": "no",
								"text_line_width": 0.0024
							}
						}
					}
				},
				{
					"valid": function(props){
						var file = props.file;
						return /.+\.drl$/ig.test(file.name)
					},  
					"type": "Excellon2",		
					"format": "Excellon2_1",
					"format_params": function(props){
						var params = props.params
						if(params.nc_param){
							var leading = params.nc_param["SUPPRESS_LEAD_ZEROES"]
							var trailing = params.nc_param["SUPPRESS_TRAIL_ZEROES"]
							var zeroes = "none"
							if(/yes/ig.test(leading)){
								zeroes = "leading"
							}
							if(/yes/ig.test(trailing)){
								zeroes = "trailing"
							}
							return {
								"nf1": params.nc_param["INTEGER_PLACES"]? Number(params.nc_param["INTEGER_PLACES"]) : 3,
								"nf2": params.nc_param["DECIMAL_PLACES"]? Number(params.nc_param["DECIMAL_PLACES"]) : 5,
								"units": /METRIC|MM/ig.test(params.nc_param["OUTPUT_UNITS"])? "mm" :"inch",
								"zeroes": zeroes,
								"decimal": "no",
								"nf_comp": 0,
								"break_sr": "yes",
								"data_type": "ascii",
								"separator": "nl",
								"threshold": 200,
								"drill_only": "no",
								"multiplier": 1,
								"resolution": 3,
								"tool_units": /METRIC|MM/ig.test(params.nc_param["OUTPUT_UNITS"])? "mm" :"inch",
								"coordinates": params.nc_param["COORDINATES"]? params.nc_param["COORDINATES"].toLowerCase() :"absolute",
								"merge_by_rule": "no",
								"signed_coords": "no",
								"text_line_width": 0.0024
							}
						}
					}
				}
			],
			"tl_name": [
Scott Sun's avatar
s  
Scott Sun committed
745
				{"orig_name" : ["pasttop.art","^past_top$","top_solderpaste"], "tl_name" : "past_top" },
Scott Sun's avatar
Scott Sun committed
746
				{"orig_name" : ["^silk_top\\.art$","pleg\\.art","^silk_top$","top_silkscreen"], "tl_name" : "silk_top" },
Scott Sun's avatar
s  
Scott Sun committed
747
				{"orig_name" : ["_r1\\.phd$","_r1\\.fph$","^smt\\.art$","soldtop.art","^sm_top$","top_soldermask"], "tl_name" : "sm_top" },
Scott Sun's avatar
Scott Sun committed
748
				{"orig_name" : ["^top\\.art$","^top$"], "tl_name" : "top" },
Scott Sun's avatar
s  
Scott Sun committed
749
				{"orig_name" : ["_l(\\d+)\\.phd$","_l(\\d+)\\.fph$","^in_(\\d+)\\.art$","^l(\\d+)\\.art$","inner_(\\d+)\\.art","layer_(\\d+)"], "tl_name" : "l_($1)"},
Scott Sun's avatar
Scott Sun committed
750
				{"orig_name" : ["^bot\\.art$","^bottom\\.art","^bottom$"], "tl_name" : "bottom" },
Scott Sun's avatar
s  
Scott Sun committed
751
				{"orig_name" : ["_r\\d\\.phd$","_r\\d\\.fph$","^smb\\.art$","soldbotm.art","^sm_botm$","bot_soldermask"], "tl_name" : "sm_botm" },
Scott Sun's avatar
Scott Sun committed
752 753
				{"orig_name" : ["^silk_bottom\\.art$","sleg\\.art","^silk_bot$","bot_silkscreen"], "tl_name" : "silk_bot" },
				{"orig_name" : ["pastbotm\\.art","^past_botm$","bot_solderpaste"], "tl_name" : "past_botm" },
Scott Sun's avatar
s  
Scott Sun committed
754
				{"orig_name" : ["^nc_drill$","^drill$"], "tl_name" : "drill" },
Scott Sun's avatar
Scott Sun committed
755
				{"orig_name" : "multipack\\.art", "tl_name" : "array" },
Scott Sun's avatar
s  
Scott Sun committed
756 757
				{"orig_name" : ["\\.rou$","^rout$"], "tl_name" : "rout" },
				{"orig_name" : ["outline.art","^outline$"], "tl_name" : "outline" },
Scott Sun's avatar
Scott Sun committed
758
				{"orig_name" : ["fab.art","fab"], "tl_name" : "fab" },
Scott Sun's avatar
s  
Scott Sun committed
759 760 761
				{"orig_name" : "top-enig", "tl_name" : "top-enig" },
				{"orig_name" : "bot-enig", "tl_name" : "bot-enig" },
				{"orig_name" : "fab_page2", "tl_name" : "fab_page2" },
Scott Sun's avatar
s  
Scott Sun committed
762
				{"orig_name" : ["_d(\\d)(\\d+)\\.drd","_d(\\d)(\\d+)\\.fdr","^d(\\d)(\\d+)\\.art$","(\\d+)-(\\d+)-laser\\.drl","d(\\d+)-(\\d+)"], "tl_name" : "d_($1)-($2)"}
Scott Sun's avatar
s  
Scott Sun committed
763
			]
Scott Sun's avatar
Scott Sun committed
764 765 766 767 768 769 770 771 772 773 774 775 776 777 778
		},
		"Wistron":{
			"step": "cad",
			"rules": [
				{ 
					"valid": function(props){
						var file = props.file;
						return /.+\.tgz$/ig.test(file.name)
					}, 
					"type": "ODB",		
					"format": "ODB"
				},
				{
					"valid": function(props){
						var file = props.file;
Scott Sun's avatar
s  
Scott Sun committed
779
						return /.+\.btd$/ig.test(file.name)
Scott Sun's avatar
Scott Sun committed
780
					},  
Scott Sun's avatar
s  
Scott Sun committed
781 782
					"type": "IPC356",		
					"format": "IPC356_1"
Scott Sun's avatar
Scott Sun committed
783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859
				},
				{
					"valid": function(props){
						var file = props.file;
						return /.+\.ger$/ig.test(file.name) || /\.gdo$|\.bol$|\.gdo$|\.pma$|\.sma$|\.smb$|\.ssa$|\.ssb$/ig.test(file.name) ||
						/.+\.l\d+$/ig.test(file.name)
					},  
					"type": "Gerber274x",		
					"format": "Gerber274x_3"
				},
				{
					"valid": function(props){
						var file = props.file;
						return /.+\.ncd$/ig.test(file.name)
					},  
					"type": "Excellon2",		
					"format": "Excellon2_4"
				},
				{
					"valid": function(props){
						var file = props.file;
						return /.+\.d\d+$/ig.test(file.name)
					},  
					"type": "Excellon2",		
					"format": "Excellon2_6"
				},
				{
					"valid": function(props){
						var file = props.file;
						return /.+\.art$/ig.test(file.name)
					},  
					"type": "Gerber274x",		
					"format": "Gerber274x_3",
					"format_params": function(props){
						var params = props.params
						if(params.art_param){
							var leading = params.art_param["SUPPRESS_LEAD_ZEROES"]
							var trailing = params.art_param["SUPPRESS_TRAIL_ZEROES"]
							var zeroes = "none"
							if(/yes/ig.test(leading)){
								zeroes = "leading"
							}
							if(/yes/ig.test(trailing)){
								zeroes = "trailing"
							}
							var nf1,nf2
							if(params.art_param.hasOwnProperty("FORMAT")){
								var tmp = params.art_param["FORMAT"].split(".")
								if(/\d+/ig.test(tmp[0])){nf1 = Number(tmp[0])}
								if(/\d+/ig.test(tmp[1])){nf2 = Number(tmp[1])}
							}
							return {
								"nf1": nf1 || 3,
								"nf2": nf2 || 5,
								"units": /METRIC|MM/ig.test(params.art_param["OUTPUT_UNITS"])? "mm" :"inch",
								"zeroes": zeroes,
								"decimal": "no",
								"nf_comp": 0,
								"break_sr": "yes",
								"data_type": "ascii",
								"separator": "*",
								"threshold": 200,
								"drill_only": "no",
								"multiplier": 1,
								"resolution": 3,
								"tool_units": /METRIC|MM/ig.test(params.art_param["OUTPUT_UNITS"])? "mm" :"inch",
								"coordinates": "absolute",
								"merge_by_rule": "no",
								"signed_coords": "no",
								"text_line_width": 0.0024
							}
						}
					}
				},
				{
					"valid": function(props){
						var file = props.file;
Scott Sun's avatar
s  
Scott Sun committed
860
						return /.+\.drl$|\.rou$/ig.test(file.name)
Scott Sun's avatar
Scott Sun committed
861 862 863 864 865
					},  
					"type": "Excellon2",		
					"format": "Excellon2_4",
					"format_params": function(props){
						var params = props.params
Scott Sun's avatar
Scott Sun committed
866
						if (params.ncdrill && !params.nc_param){params.nc_param = params.ncdrill}
Scott Sun's avatar
Scott Sun committed
867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901
						if(params.nc_param){
							var leading = params.nc_param["SUPPRESS_LEAD_ZEROES"]
							var trailing = params.nc_param["SUPPRESS_TRAIL_ZEROES"]
							var zeroes = "none"
							if(/yes/ig.test(leading)){
								zeroes = "leading"
							}
							if(/yes/ig.test(trailing)){
								zeroes = "trailing"
							}
							return {
								"nf1": params.nc_param["INTEGER_PLACES"]? Number(params.nc_param["INTEGER_PLACES"]) : 3,
								"nf2": params.nc_param["DECIMAL_PLACES"]? Number(params.nc_param["DECIMAL_PLACES"]) : 5,
								"units": /METRIC|MM/ig.test(params.nc_param["OUTPUT_UNITS"])? "mm" :"inch",
								"zeroes": zeroes,
								"decimal": "no",
								"nf_comp": 0,
								"break_sr": "yes",
								"data_type": "ascii",
								"separator": "nl",
								"threshold": 200,
								"drill_only": "no",
								"multiplier": 1,
								"resolution": 3,
								"tool_units": /METRIC|MM/ig.test(params.nc_param["OUTPUT_UNITS"])? "mm" :"inch",
								"coordinates": params.nc_param["COORDINATES"]? params.nc_param["COORDINATES"].toLowerCase() :"absolute",
								"merge_by_rule": "no",
								"signed_coords": "no",
								"text_line_width": 0.0024
							}
						}
					}
				}
			],
			"tl_name": [
Scott Sun's avatar
s  
Scott Sun committed
902 903
				{"orig_name" : ["^pmt\\.art$","\\.pma$","SoldPasteTop\\.ger","past_top"], "tl_name" : "past_top" },
				{"orig_name" : ["^pmb\\.art$","\\.pmb$","SoldPasteBot\\.ger","past_botm"], "tl_name" : "past_botm" },
Scott Sun's avatar
Scott Sun committed
904 905 906 907
				{"orig_name" : ["tsilk","^sst\\.art$","\\.ssa$","SilkScrnTop\\.ger","silk_top"], "tl_name" : "silk_top" },
				{"orig_name" : ["bsilk","^ssb\\.art$","\\.ssb$","SilkScrnBot\\.ger","silk_bot"], "tl_name" : "silk_bot" },
				{"orig_name" : ["tmask","^smt\\.art$","\\.sma$","SoldMask1Top\\.ger","sm_top"], "tl_name" : "sm_top" },
				{"orig_name" : ["bmask","^smb\\.art$","\\.smb$","SoldMask1Bot\\.ger","sm_bot"], "tl_name" : "sm_botm" },
Scott Sun's avatar
Scott Sun committed
908
				{"orig_name" : ["^top$","^top.art$"], "tl_name" : "top" },
Scott Sun's avatar
Scott Sun committed
909
				{"orig_name" : ["^l(\\d+).*\\.art$","^v(\\d+)\\.art$","^g(\\d+)\\.art$","^s(\\d+)\\.art$","\\.l(\\d+)$","Copper(\\d+)\\.ger$","^layer_(\\d+)"], "tl_name" : "l_($1)"},
Scott Sun's avatar
Scott Sun committed
910 911
				{"orig_name" : ["^bot\\.art$","^bottom$","^bottom.art$"], "tl_name" : "bottom" },
				{"orig_name" : ["\\.d(\\d+)$"], "tl_name" : "d_($1)-($1+1)"},
Scott Sun's avatar
s  
Scott Sun committed
912
				{"orig_name" : ["thruHolePlated_(\\d+)_(\\d+)\\.ncd","(\\d+)-(\\d+)\\.drl$","^drill(\\d+)-(\\d+)$","^d_(\\d+)-(\\d+)$"], "tl_name" : "d_($1)-($2)"},
Scott Sun's avatar
Scott Sun committed
913
				{"orig_name" : ["ThruHoleNonPlated\\.ncd$","^drill$"], "tl_name" : "drill" },
Scott Sun's avatar
Scott Sun committed
914 915 916
				{"orig_name" : ["\\.rou$","^rout$"], "tl_name" : "rout" },
				{"orig_name" : "fab.art", "tl_name" : "fab.art" },
				{"orig_name" : ["multipack.art","^array$"], "tl_name" : "array" },
Scott Sun's avatar
Scott Sun committed
917
				{"orig_name" : ["outline\\.art$","\\.bol$","PnlContourNonPlated\\.ger","^outline"], "tl_name" : "outline" },
Scott Sun's avatar
Scott Sun committed
918 919
				{"orig_name" : ["top-enig","enig_top"], "tl_name" : "enig_top" },
				{"orig_name" : ["bot-enig","enig_bot"], "tl_name" : "enig_bot" },
Scott Sun's avatar
Scott Sun committed
920
			]
Scott Sun's avatar
Scott Sun committed
921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943
		},
		"Vivo":{
			"step": "cad",
			"rules": [
				{ 
					"valid": function(props){
						var file = props.file;
						return /.+\.tgz$/ig.test(file.name)
					}, 
					"type": "ODB",		
					"format": "ODB"
				},
				{
					"valid": function(props){
						var file = props.file;
						return /.+\.btd$|.+\.rou$/ig.test(file.name)
					},  
					"type": "IPC356A",		
					"format": "IPC356A_1"
				},
				{
					"valid": function(props){
						var file = props.file;
Scott Sun's avatar
s  
Scott Sun committed
944
						return /\.gdo$|\.pho$/ig.test(file.name)
Scott Sun's avatar
Scott Sun committed
945 946 947 948 949 950 951
					},  
					"type": "Gerber274x",		
					"format": "Gerber274x_4"
				},
				{
					"valid": function(props){
						var file = props.file;
Scott Sun's avatar
s  
Scott Sun committed
952
						return /.+\.ncd$/ig.test(file.name) || /.+\.d\d+$/ig.test(file.name)
Scott Sun's avatar
Scott Sun committed
953 954 955
					},  
					"type": "Excellon2",		
					"format": "Excellon2_5"
Scott Sun's avatar
s  
Scott Sun committed
956 957 958 959 960 961 962 963
				},
				{
					"valid": function(props){
						var file = props.file;
						return /.+\.drl/ig.test(file.name) || /.+\.d\d+$/ig.test(file.name)
					},  
					"type": "Excellon2",		
					"format": "Excellon2_7"
Scott Sun's avatar
Scott Sun committed
964 965 966
				}
			],
			"tl_name": [
Scott Sun's avatar
s  
Scott Sun committed
967 968
				{"orig_name" : ["osp-top\\.pho","solderpastetop","past_top"], "tl_name" : "past_top" },
				{"orig_name" : ["osp-bottom\\.pho","solderpastebottom","past_botm"], "tl_name" : "past_botm" },
Scott Sun's avatar
Scott Sun committed
969 970
				{"orig_name" : ["pleg\\.art","^ss_top","silk_top"], "tl_name" : "silk_top" },
				{"orig_name" : ["sleg\\.art","^ss_bot","silk_bot"], "tl_name" : "silk_bot" },
Scott Sun's avatar
s  
Scott Sun committed
971 972 973 974 975
				{"orig_name" : ["soldermask-top","top-solder-mask\\.pho","soldermasktop","sm_top"], "tl_name" : "sm_top" },
				{"orig_name" : ["soldermask-bottom","bottom-solder-mask\\.pho","soldermaskbottom","sm_bot"], "tl_name" : "sm_botm" },
				{"orig_name" : ["top\\.pho","^top$","layertop"], "tl_name" : "top" },
				{"orig_name" : ["^lay(\\d+)","layer(\\d+)\\.gdo","layer_(\\d+)"], "tl_name" : "l_($1)"},
				{"orig_name" : ["^bottom\\.pho$","^bottom$","layerbottom"], "tl_name" : "bottom" },
Scott Sun's avatar
s  
Scott Sun committed
976
				{"orig_name" : ["^drill(\\d+)-(\\d+)$","^d(\\d+)-(\\d+)$"], "tl_name" : "d_($1)-($2)"},
Scott Sun's avatar
s  
Scott Sun committed
977
				{"orig_name" : ["^drill$"], "tl_name" : "drill" },
Scott Sun's avatar
Scott Sun committed
978 979
				{"orig_name" : ["\\.rou$","^rout$"], "tl_name" : "rout" },
				{"orig_name" : "fab.art", "tl_name" : "fab.art" },
Scott Sun's avatar
s  
Scott Sun committed
980
				{"orig_name" : ["pcb-set\\.gdo","^pcb-set\\.pho$","^pcb-set$","^array$"], "tl_name" : "array" },
Scott Sun's avatar
Scott Sun committed
981
				{"orig_name" : ["^outline"], "tl_name" : "outline" },
Scott Sun's avatar
s  
Scott Sun committed
982 983
				{"orig_name" : ["au_mask-bottom\\.gdo","au_mask_bottom\\.gdo","enig_top"], "tl_name" : "enig_top" },
				{"orig_name" : ["au_mask-top\\.gdo","au_mask_top\\.gdo","enig_bot"], "tl_name" : "enig_bot" },
Scott Sun's avatar
Scott Sun committed
984 985
				{"orig_name" : ["cavitytop","cavity_top"], "tl_name" : "cavity_top" },
				{"orig_name" : ["cavitybottom","cavity_bot"], "tl_name" : "cavity_bot" },
Scott Sun's avatar
s  
Scott Sun committed
986 987
			],
			"mergerule" : {
Scott Sun's avatar
s  
Scott Sun committed
988
				drill_second: ["(\\d+)-(\\d+)\\.drl$"],
Scott Sun's avatar
s  
Scott Sun committed
989 990 991 992 993 994
				drill: [
					{orig_rule:["contournonplated"],drill_type:"non_plated",shape:"slot"},
					{orig_rule:["contourplated"],drill_type:"plated",shape:"slot"},
					{orig_rule:["thruholenonplated"],drill_type:"non_plated",shape:"hole"},
					{orig_rule:["thruholeplated"],drill_type:"plated",shape:"hole"},
				],
Scott Sun's avatar
s  
Scott Sun committed
995
				profile:["enig_bot","past_top"],
Scott Sun's avatar
s  
Scott Sun committed
996 997
				laser : {
					tl_name: "drill($1)-($2)",
Scott Sun's avatar
s  
Scott Sun committed
998
					regs: ["(\\d+)-(\\d+)plated\\.ncd$","(\\d+)-(\\d+)\\.drl$"]
Scott Sun's avatar
s  
Scott Sun committed
999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026
				}
			}
		},
		"1352":{
			"step": "cad",
			"rules": [
				{ 
					"valid": function(props){
						var file = props.file;
						return /.+\.tgz$/ig.test(file.name)
					}, 
					"type": "ODB",		
					"format": "ODB"
				},
				{
					"valid": function(props){
						var file = props.file;
						return /.+\.ipc$/ig.test(file.name)
					},  
					"type": "IPC356",		
					"format": "IPC356_1"
				},
				{
					"valid": function(props){
						var file = props.file;
						return /.+\.art$/ig.test(file.name)
					},  
					"type": "Gerber274x",		
Scott Sun's avatar
s  
Scott Sun committed
1027
					"format": "Gerber274x_5"
Scott Sun's avatar
s  
Scott Sun committed
1028 1029 1030 1031 1032 1033 1034
				},
				{
					"valid": function(props){
						var file = props.file;
						return /.+\.drl$/ig.test(file.name)
					},  
					"type": "Excellon2",		
Scott Sun's avatar
s  
Scott Sun committed
1035
					"format": "Excellon2_8"
Scott Sun's avatar
s  
Scott Sun committed
1036 1037 1038
				}
			],
			"tl_name": [
Scott Sun's avatar
s  
Scott Sun committed
1039 1040 1041 1042
				{"orig_name" : ["pasttop\\.art","past_top"], "tl_name" : "past_top" },
				{"orig_name" : ["pastbotm\\.art","past_botm"], "tl_name" : "past_botm" },
				{"orig_name" : ["^silktop\\.art$","silk_top"], "tl_name" : "silk_top" },
				{"orig_name" : ["^silkbotm\\.art$","silk_bot"], "tl_name" : "silk_bot" },
Scott Sun's avatar
s  
Scott Sun committed
1043 1044 1045
				{"orig_name" : ["soldtop.art","sm_top"], "tl_name" : "sm_top" },
				{"orig_name" : ["soldbotm\\.art","sm_bot"], "tl_name" : "sm_botm" },
				{"orig_name" : ["^top$","^top.art$"], "tl_name" : "top" },
Scott Sun's avatar
s  
Scott Sun committed
1046
				{"orig_name" : ["^pgp(\\d+)\\.art$","^art(\\d+)\\.art$","^l_(\\d+)"], "tl_name" : "l_($1)"},
Scott Sun's avatar
s  
Scott Sun committed
1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059
				{"orig_name" : ["^bot\\.art$","^bottom$","^bottom.art$"], "tl_name" : "bottom" },
				{"orig_name" : ["\\.d(\\d+)$"], "tl_name" : "d_($1)-($1+1)"},
				{"orig_name" : ["^drill(\\d+)-(\\d+)$","^d_(\\d+)-(\\d+)$"], "tl_name" : "d_($1)-($2)"},
				{"orig_name" : ["^drill$"], "tl_name" : "drill" },
				{"orig_name" : ["\\.rou$","^rout$"], "tl_name" : "rout" },
				{"orig_name" : "fab.art", "tl_name" : "fab.art" },
				{"orig_name" : ["multipack.art","^array$"], "tl_name" : "array" },
				{"orig_name" : ["\\.bol$","PnlContourNonPlated\\.ger","^outline"], "tl_name" : "outline" },
				{"orig_name" : ["top-enig","enig_top"], "tl_name" : "enig_top" },
				{"orig_name" : ["bot-enig","enig_bot"], "tl_name" : "enig_bot" },
			],
			"mergerule" : {
				drill:["(\\d+)-(\\d+)\\.drl$"],
Scott Sun's avatar
s  
Scott Sun committed
1060
				profile:["sm_top"],
Scott Sun's avatar
s  
Scott Sun committed
1061 1062 1063 1064 1065
				laser : {
					tl_name: "drill($1)-($2)",
					regs: ["(\\d+)-(\\d+)\\.drl$"]
				}
			}
Scott Sun's avatar
s  
Scott Sun committed
1066 1067 1068
		}
	},
	"data_format": [
Scott Sun's avatar
s  
Scott Sun committed
1069
		{"tl_name":"enig_top" , "new_name":"enig_top" , "attr":{ "context":"board", "type":"document" }},
Scott Sun's avatar
s  
Scott Sun committed
1070
		{"tl_name":"past_top" , "new_name":"past_top" , "attr":{ "context":"board", "type":"solder_paste" }},
Scott Sun's avatar
s  
Scott Sun committed
1071
		{"tl_name":"silk_top" , "new_name":"silk_top" , "attr":{ "context":"board", "type":"silk_screen" }},
Scott Sun's avatar
s  
Scott Sun committed
1072 1073
		{"tl_name":"sm_top" , "new_name":"sm_top" , "attr":{ "context":"board", "type":"solder_mask" }},
		{"tl_name":"^top$" , "new_name":"top" , "attr":{ "context":"board", "type":"signal" }},
Scott Sun's avatar
s  
Scott Sun committed
1074
		{"tl_name":"l_(\\d+)","new_name":"l($1)" ,"attr":{"context":"board","type":"signal"}},
Scott Sun's avatar
s  
Scott Sun committed
1075 1076
		{"tl_name":"^bottom$","new_name":"bottom" ,"attr":{"context":"board","type":"signal"}},
		{"tl_name":"sm_botm" , "new_name":"sm_botm" , "attr":{ "context":"board", "type":"solder_mask" }},
Scott Sun's avatar
s  
Scott Sun committed
1077
		{"tl_name":"silk_bot" , "new_name":"silk_bot" , "attr":{ "context":"board", "type":"silk_screen" }},
Scott Sun's avatar
s  
Scott Sun committed
1078
		{"tl_name":"past_botm" , "new_name":"past_botm" , "attr":{ "context":"board", "type":"solder_paste" }},
Scott Sun's avatar
s  
Scott Sun committed
1079 1080 1081
		{"tl_name":"enig_bot" , "new_name":"enig_bot" , "attr":{ "context":"board", "type":"document" }},
		{"tl_name":"d_(\\d+)-(\\d+)","new_name":"ftdrill($1)-($2)l" ,"attr":{"context":"board","type":"drill"}},
		{"tl_name":"drill","new_name":"ftdrill" ,"attr":{"context":"board","type":"drill"}},
Scott Sun's avatar
s  
Scott Sun committed
1082
		{"tl_name":"rout","new_name":"rout" ,"attr":{"context":"board","type":"rout"}},
Scott Sun's avatar
s  
Scott Sun committed
1083
		{"tl_name":"outline","new_name":"outline" ,"attr":{"context":"board","type":"rout"}},
Scott Sun's avatar
s  
Scott Sun committed
1084
		{"tl_name":"array","new_name":"array" ,"attr":{"context":"misc"}},
Scott Sun's avatar
Scott Sun committed
1085 1086
		{"tl_name":"cavity_top","new_name":"cavity_top" ,"attr":{"context":"misc"}},
		{"tl_name":"cavity_bot","new_name":"cavity_bot" ,"attr":{"context":"misc"}},
Scott Sun's avatar
s  
Scott Sun committed
1087 1088
		{"tl_name":"fab.art","new_name":"fab.art" ,"attr":{"context":"misc"}}
	],
Scott Sun's avatar
s  
Scott Sun committed
1089
	"delSameJob": "yes"
Scott Sun's avatar
s  
Scott Sun committed
1090
}})()