From 7c2f9a5652c61c50c7731403c1dd841959dec04d Mon Sep 17 00:00:00 2001
From: "scott.sun" <scott.sun@topibd.com>
Date: Tue, 7 Jul 2020 08:59:02 +0800
Subject: [PATCH] s

---
 ats/scott_test/analysis_test.js | 10 +++++-----
 config_ats.js                   | 17 ++++++++++-------
 2 files changed, 15 insertions(+), 12 deletions(-)

diff --git a/ats/scott_test/analysis_test.js b/ats/scott_test/analysis_test.js
index df751a5..d97fb7d 100644
--- a/ats/scott_test/analysis_test.js
+++ b/ats/scott_test/analysis_test.js
@@ -760,7 +760,6 @@ try {
     mkPath(jobpath,["user","opcam","steps"])
     stepList.forEach(function(step){
         GEN.openStep({ job: job, name: step })
-        GEN.units({type:'mm'})
         // 曝光
         analysis_obj.matrixInfo.mOuters.forEach(function(item){
             if(ALL.gold_fingers.length>0){
@@ -770,7 +769,7 @@ try {
                 })
                 var layer_gold_type = /top/ig.test(item.signalL) ? "top" : "bot"
                 if(tmp_gold_info[layer_gold_type]){
-                    var tmp_info = GEN.copperArea({layer1:tmp_gold_info[layer_gold_type],resolution_value:25.4})
+                    var tmp_info = GEN.copperArea({layer1:tmp_gold_info[layer_gold_type],resolution_value:1})
                     // var tmp_info = GEN.exposedArea({layer1:item.signalL,mask1:tmp_gold_info[layer_gold_type]})
                     var tmp_data = {}
                     if(layer_gold_type == "top") {
@@ -796,7 +795,7 @@ try {
                 }
             }
             if(item.solderL){
-                var tmp_info = GEN.copperArea({layer1:item.solderL,resolution_value:25.4})
+                var tmp_info = GEN.copperArea({layer1:item.solderL,resolution_value:1})
                 // var tmp_info = GEN.exposedArea({layer1:item.signalL,mask1:item.solderL})
                 // {"area":"0.73817","percent":"8.986"}
                 var tmp_area =  tmp_info.area
@@ -818,7 +817,6 @@ try {
         })
         GEN.clearLayers()
         GEN.affectedLayer({ affected: 'no', mode: 'all' })
-        GEN.units({type:'inch'})
         
         console.log("==================================> Drill analysis")
         // 钻孔
@@ -1499,6 +1497,7 @@ function analysis(props){
                 GEN.deleteLayer({job:that.job,layer:[tmp]})
             }
         })
+        res = res/1000
         return res.toFixed(3)
     }
     T_m_p.prototype.analysis_milling_length_array = function(){        // todo 
@@ -1519,7 +1518,8 @@ function analysis(props){
             return a 
         }, 0)
         GEN.closeStep()
-        return milling
+        milling = milling/1000
+        return milling.toFixed(3)
     }
     T_m_p.prototype.analysis_board_has_attr = function(props){        //  board层中检查存在01005属性物件时
         GEN.openStep({job:this.job,name:this.pcs_step})
diff --git a/config_ats.js b/config_ats.js
index 155a8d5..2005516 100644
--- a/config_ats.js
+++ b/config_ats.js
@@ -565,14 +565,14 @@
 				}
 			],
 			"tl_name": [
-				{"orig_name" : ["assytop\\.art","past_top"], "tl_name" : "past_top" },
-				{"orig_name" : ["assybot\\.art","past_botm"], "tl_name" : "past_botm" },
+				{"orig_name" : ["assytop\\.art","past_top","paste_top"], "tl_name" : "past_top" },
+				{"orig_name" : ["assybot\\.art","past_bot","paste_bot"], "tl_name" : "past_botm" },
 				{"orig_name" : ["pleg\\.art","^ss_top","silk_top"], "tl_name" : "silk_top" },
 				{"orig_name" : ["sleg\\.art","^ss_bot","silk_bot"], "tl_name" : "silk_bot" },
-				{"orig_name" : ["psm\\.art","sm_top"], "tl_name" : "sm_top" },
-				{"orig_name" : ["ssm\\.art","sm_bot"], "tl_name" : "sm_botm" },
+				{"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" },
 				{"orig_name" : ["^top$","^top.art$"], "tl_name" : "top" },
-				{"orig_name" : ["^0(\\d+).*ccp_ms","^s(\\d+)\\.art","lay(\\d+)\\.art","layer_(\\d+)"], "tl_name" : "l_($1)"},
+				{"orig_name" : ["l(\\d)\\.art$","^0(\\d+).*ccp_ms","^s(\\d+)\\.art","lay(\\d+)\\.art","layer_(\\d+)"], "tl_name" : "l_($1)"},
 				{"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)"},
 				{"orig_name" : ["\\.rou$","^rout$"], "tl_name" : "rout" },
@@ -581,7 +581,10 @@
 				{"orig_name" : ["^outline"], "tl_name" : "outline" },
 				{"orig_name" : ["^pst\\.art$","top-enig","enig_top"], "tl_name" : "enig_top" },
 				{"orig_name" : ["^sst\\.art$","bot-enig","enig_bot"], "tl_name" : "enig_bot" },
-			]
+			],
+			"mergerule" : {
+				profile:["past_top"]
+			}
 		},
 		"New_data": {
 			"step": "cad",
@@ -924,7 +927,7 @@
 				{"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" },
-				{"orig_name" : ["^drill(\\d+)-(\\d+)$","(\\d+)-(\\d+)\\.drl$","^d(\\d+)-(\\d+)$"], "tl_name" : "d_($1)-($2)"},
+				{"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" },
-- 
2.21.0