Commit b15c9eb9 authored by Scott Sun's avatar Scott Sun

s

parent 6007b550
......@@ -113,8 +113,53 @@ try {
a.push(b)
}
return a
},[])
var stepList = GEN.getStepList({job:job})
},[]);
let anquanqupartition = {
"kitchen" : {
"fridge": ["蛋鸟鱼各类猎物","各类蔬菜,蘑菇,浆果"],
"box1": ["各种罐头"],
"box2": ["面粉","大米","面条","面包","方便面"],
"box3": ["麦片","通心粉","爆米花", "微波食品", ],
"box4": ["咖啡","茶包" ],
"box5": ["锅碗","杯子餐具","烤盘" ],
"box6": ["糖盐醋酵母黄油等调料" ],
"box": ["青蛙"],
},
"farming": {
"feiliao":[ "堆肥箱" , "肥料蚯蚓箱", "腐烂食品存放箱" ],
"box1": [ "种子" ],
"box2": [ "农业用具" ],
},
"tools": {
"material": {
},
"items": {
}
},
"oil":{},
"water": {},
"search": {},
"hunter": {},
"wood": {}
}
let che = {
smallBox: [
"foods","water","medical","tea&coffee"
],
seat: [
"cup","caoguo","piaobaiping","knife","发电机","丙烷喷灯&焊工面罩","螺丝刀","扳手","拉板钳,千斤顶、轮胎泵、汽车电池充电器"
],
trunk: [
"油箱",""
]
}
//
var stepList = GEN.getStepList({job:job});
stepList.forEach(function(step){
GEN.openStep({job:job,name:step})
dirll_layer.forEach(function(layer){
......@@ -136,21 +181,20 @@ try {
via_symbol = via_symbol.filter(function(item){
if(item.pad == 0){return false}
return item.pad >= Number(par.min_via_num)
})
console.log("via_symbols================================:"+_.toString(via_symbol))
});
console.log("via_symbols================================:" + _.toString(via_symbol))
if(via_symbol.length){
// 如果via_symbol存在
GEN.selClearFeature()
GEN.selectByFilter({
feat_types:"pad",
include_syms: via_symbol.map(function(v){return v.symbol}).join(",")
})
});
// 将选中的复制到辅助层
var layer_tmp = layer + "_tmp"
var layer_tmp = layer + "_tmp";
if(GEN.isLayerExists({job:job,layer:layer_tmp})){GEN.deleteLayer({job:job,step:step,layer:layer_tmp})}
GEN.selCopyOther({dest:"layer_name",target_layer:layer_tmp,invert:'no'})
GEN.selCopyOther({dest:"layer_name",target_layer:layer_tmp,invert:'no'});
GEN.selClearFeature();
GEN.workLayer({name:layer_tmp,display_number:2,clear_before:'yes'})
GEN.workLayer({name:layer_tmp,display_number:2,clear_before:'yes'});
var ck = "tmp_chk"
if(GEN.isChklistExists({job:job,step:step,chklist:ck})){
......@@ -179,37 +223,33 @@ try {
pp_check_missing_pads_for_drills:"Yes"
}
}]
})
GEN.chklistShow({ chklist: ck })
GEN.affectedLayer({ affected: "yes", layer: layer, clear_before: "yes" })
});
GEN.chklistShow({ chklist: ck });
GEN.affectedLayer({ affected: "yes", layer: layer, clear_before: "yes" });
GEN.chklistRun({
chklist: ck,
nact: 1,
area: "profile"
})
var tmp_layer1 = "mk_1_"+layer_tmp+"_pitch"
var tmp_layer2 = "ms_1_"+layer_tmp+"_pitch"
var tmp_layer1 = "mk_1_"+layer_tmp+"_pitch";
var tmp_layer2 = "ms_1_"+layer_tmp+"_pitch";
if(GEN.isLayerExists({job:job,layer:tmp_layer1})){
GEN.deleteLayer({job:job,layer:tmp_layer1})
GEN.deleteLayer({job:job,layer:tmp_layer1});
}
if(GEN.isLayerExists({job:job,layer:tmp_layer2})){
GEN.deleteLayer({job:job,layer:tmp_layer2})
GEN.deleteLayer({job:job,layer:tmp_layer2});
}
GEN.COM("chklist_create_lyrs,chklist="+ck+",severity=3,suffix=pitch");
GEN.workLayer({name:tmp_layer2,display_number:1,clear_before:'yes'});
GEN.selectByFilter({attribute:[{attribute:".string",text:"via_pitch"}]})
var tmp_layer2_tmp = tmp_layer2 + "_tmp"
GEN.selectByFilter({attribute:[{attribute:".string",text:"via_pitch"}]});
var tmp_layer2_tmp = tmp_layer2 + "_tmp";
if(GEN.isLayerExists({job:job,layer:tmp_layer2})){
GEN.deleteLayer({job:job,layer:tmp_layer2_tmp})
GEN.deleteLayer({job:job,layer:tmp_layer2_tmp});
}
GEN.selCopyOther({dest:"layer_name",target_layer:tmp_layer2_tmp,invert:'no'})
GEN.selCopyOther({dest:"layer_name",target_layer:tmp_layer2_tmp,invert:'no'});
GEN.selClearFeature();
GEN.workLayer({name:tmp_layer2_tmp,display_number:1,clear_before:'yes'});
var symbols_tmp = GEN.getLayerSymsHist({job:job,layer:tmp_layer2_tmp,step:step})
var symbols_tmp = GEN.getLayerSymsHist({job:job,layer:tmp_layer2_tmp,step:step});
// 找出间距 equidistant_tolerance 的
var equidistant_tolerance_symbol = _.values(symbols_tmp).filter(function(item){
return Math.abs(Number(item.size) - equidistant_tolerance) < 0.000001
......@@ -219,10 +259,10 @@ try {
GEN.selectByFilter({
exclude_syms:equidistant_tolerance_symbol.map(function(v){return v.symbol}).join(",")
})
GEN.selDelete()
GEN.workLayer({name:layer_tmp,display_number:2,clear_before:'yes'})
GEN.selRefFeat({layers:tmp_layer2_tmp,use:'filter',mode:'touch'})
GEN.selDelete()
GEN.selDelete();
GEN.workLayer({name:layer_tmp,display_number:2,clear_before:'yes'});
GEN.selRefFeat({layers:tmp_layer2_tmp,use:'filter',mode:'touch'});
GEN.selDelete();
}
// 根据layer_tmp层的钻孔参考选择出 层里面的镭射层
GEN.selClearFeature()
......@@ -235,14 +275,15 @@ try {
GEN.selClearFeature()
}
// 删除辅助层
var deleLayers = [tmp_layer1, tmp_layer2, tmp_layer2_tmp, layer_tmp]
var deleLayers = [tmp_layer1, tmp_layer2, tmp_layer2_tmp, layer_tmp];
deleLayers.forEach(function(v){
GEN.deleteLayer({job:job,layer:v})
})
GEN.deleteLayer({job:job,layer:v});
});
}
})
GEN.closeStep()
})
});
GEN.closeStep();
});
//
// 保存
if(/yes/ig.test(par.auto_save)){
......@@ -254,7 +295,6 @@ try {
GEN.checkInout({job:job,mode:"in"})
}
QDfm.updateRow({
table: "pdm_aimdfm_task",
data: {
......
......@@ -12,7 +12,7 @@
http://doc.topibd.net/
incam_db/server_db
{
"debug_mode": "0",
"http_url": "http://10.90.2.58:9008/api/TOPSTQ_ATS_V6/ikm6",
......@@ -51,6 +51,10 @@ daUmvD3s
alevpn.ats.net
Samba 公共盘访问登陆需要密码管理。 用户名 FEE 密码:Atsfee2408
10.92.20.5 ccqw303\pecam_admin CQ$2015login
10.92.20.43 ATS-PROD\SU_ACAM_CSH T15E9dPg
IP:10.90.2.58
user:root
本地erf: GBM_0.5OZ
......@@ -108,3 +112,8 @@ dfm模块配置 {
pg_dump -h 139.196.104.13 -p 5433 -U toplinker -c -t pdm_workflow -t pdm_workflow_lnk_workprocess -t pdm_workprocess -t pdm_workprocess_script -t pdm_workprocess_script_log -t pdm_workprocess_sop TOPDFM_ZDA_V6 > d:/zda.sql
#导入数据数据
psql -h 192.168.120.5 -p 5432 -U toplinker -d TOPDFM_ZDA_V6 < d:/zda.sql
ZDA admin Qwer1234*/*
\ No newline at end of file
......@@ -24,7 +24,7 @@ PARAMETER:
]
VERSION_HISTORY:
V1.00 2021-03-08 Scott Sun
V1.00
1.新版本
HELP:
......@@ -51,8 +51,6 @@ var GEN = $.gen;
var Job = $.job || $.job_name;
var JobId = $.job_id;
var db = $.db || IKM.db;
var gui_piug = require('topsin.gengui');
var GUI = gui_piug.newGui(gui_piug.__dirname);
var PAR = {};
if ($.par) { PAR = $.par } else if ($.hasOwnProperty('script_parameter')) { PAR = JSON.parse($.script_parameter); }
if (mode === "aimdfm") {
......@@ -96,13 +94,21 @@ try {
stepList = stepList.filter(function(step){
var reg = new RegExp(par.step,"ig");
return reg.test(step);
})
});
stepList.forEach(function (step) {
GEN.openStep({job:job, name: step})
})
// 保存料号
if (/yes/ig.test(par.auto_save)) {
GEN.checkInout({ job: job, mode: "out" });
......@@ -136,38 +142,3 @@ try {
resultData.push({ type: "error", title: "脚本执行出错!", detail: [{ desc: _.toString(e) }] });
return (mode === "aimdfm") ? { status: Status, result_data: resultData } : "Error";
}
// 获取层别
// func (Object) ([]string)
function getLayer(props){ // 获取层
if (!props) {
return
}
if (!props.context) {
props.context = "board"
}
var matrix = GEN.getMatrix({job:job})
return Object.keys(matrix).reduce(function(a,b){
var info = matrix[b];
var ret = true;
for (var key in props) {
if (info[key]) {
if(/string/ig.test(typeof props[key])){
var reg = new RegExp(props[key],"ig")
if(!reg.test(info[key])){
ret = false
}
}
if(/function/ig.test(typeof props[key])){
if(!props[key](info[key])){
ret = false
}
}
}
}
if (ret) {
a.push(props.res == "info" ? info : b)
}
return a
},[])
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment