Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
Scott
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Scott Sun
Scott
Commits
67fabe19
Commit
67fabe19
authored
Oct 19, 2020
by
Scott Sun
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.topibd.net/scott.sun/scott
parents
5c754241
1218d449
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
395 additions
and
169 deletions
+395
-169
20200929_wistarn.md
ats/topcam/20200929_wistarn.md
+7
-0
ATS_AIM_customer_data_analysis.js
ats/topcam/ATS_AIM_customer_data_analysis.js
+62
-21
ATS_AIM_data_format.js
ats/topcam/ATS_AIM_data_format.js
+36
-16
ATS_AIM_input_data.js
ats/topcam/ATS_AIM_input_data.js
+37
-10
config_ats.js
ats/topcam/config_ats.js
+27
-19
create_work.js
ats/topcam/create_work.js
+1
-4
emai.js
ats/topcam/emai.js
+14
-7
SEC_DRC_analysis.js
public_script/SEC_DRC_analysis.js
+0
-7
scotttest.js
public_script/scotttest.js
+202
-76
silkScreenOptimize.js
public_script/silkScreenOptimize.js
+9
-9
No files found.
ats/topcam/20200929_wistarn.md
View file @
67fabe19
## wistarn
## wistarn
*
100 rule更改 ok
*
101 102 103(profile错误) 7z压缩包
*
104 多套gerber文件
*
106 107 113 147 无文件
*
114 profile 直接创建失败
*
136 139 144 多套数据
*
141 tgz+gerber多套
\ No newline at end of file
ats/topcam/ATS_AIM_customer_data_analysis.js
View file @
67fabe19
...
@@ -137,7 +137,6 @@ var resultData = [];
...
@@ -137,7 +137,6 @@ var resultData = [];
var
ALL
=
{}
var
ALL
=
{}
var
Omatrix
=
{};
var
Omatrix
=
{};
try
{
try
{
console
.
log
(
"=============================================>anaysis_start"
);
console
.
log
(
"=============================================>anaysis_start"
);
var
par
=
PAR
;
var
par
=
PAR
;
var
vc_src_01005_pad_result
=
par
.
vc_src_01005_pad_result
var
vc_src_01005_pad_result
=
par
.
vc_src_01005_pad_result
...
@@ -152,7 +151,7 @@ try {
...
@@ -152,7 +151,7 @@ try {
// 检查料号是否能够check out
// 检查料号是否能够check out
if
(
GEN
.
checkInout
({
job
:
job
,
mode
:
"test"
})
!=
0
&&
mode
==
"aimdfm"
){
throw
"the job check"
}
if
(
GEN
.
checkInout
({
job
:
job
,
mode
:
"test"
})
!=
0
&&
mode
==
"aimdfm"
){
throw
"the job check"
}
GEN
.
checkInout
({
job
:
job
,
mode
:
"out"
});
GEN
.
checkInout
({
job
:
job
,
mode
:
"out"
});
script_info
({
result_severity
:
"analysis start"
})
script_info
({
msg
:
"analysis start"
})
script_info
({
progress
:
65
})
script_info
({
progress
:
65
})
var
pcs_step
=
par
.
pcs_step
==
""
?
"cad"
:
par
.
pcs_step
;
var
pcs_step
=
par
.
pcs_step
==
""
?
"cad"
:
par
.
pcs_step
;
var
array_step
=
par
.
array_step
==
""
?
"stp"
:
par
.
array_step
;
var
array_step
=
par
.
array_step
==
""
?
"stp"
:
par
.
array_step
;
...
@@ -163,7 +162,9 @@ try {
...
@@ -163,7 +162,9 @@ try {
if
(
step_list
.
indexOf
(
pcs_step
)
<
0
){
if
(
step_list
.
indexOf
(
pcs_step
)
<
0
){
pcs_step
=
step_list
[
0
]
pcs_step
=
step_list
[
0
]
}
}
script_info
({
result_severity
:
"analysis update_matrix_info"
})
script_info
({
msg
:
"analysis update_matrix_info"
})
script_info
({
progress
:
65
})
script_info
({
progress
:
65
})
var
matrix
=
UPLOAD_LAYER_MATRIX
({
job
:
job
})
// 分析matrix 获得分析后的matrix信息
var
matrix
=
UPLOAD_LAYER_MATRIX
({
job
:
job
})
// 分析matrix 获得分析后的matrix信息
GEN
.
openStep
({
job
:
job
,
name
:
pcs_step
})
GEN
.
openStep
({
job
:
job
,
name
:
pcs_step
})
...
@@ -219,7 +220,7 @@ try {
...
@@ -219,7 +220,7 @@ try {
})
})
GEN
.
clearLayers
()
GEN
.
clearLayers
()
script_info
({
result_severity
:
"analysis drill_stack"
})
script_info
({
msg
:
"analysis drill_stack"
})
script_info
({
progress
:
70
})
script_info
({
progress
:
70
})
// * new 钻孔叠构
// * new 钻孔叠构
var
cam_drill_structure
=
[]
var
cam_drill_structure
=
[]
...
@@ -361,7 +362,7 @@ try {
...
@@ -361,7 +362,7 @@ try {
rmOutProfile
({
job
:
job
,
step
:
pcs_step
})
rmOutProfile
({
job
:
job
,
step
:
pcs_step
})
}
}
GEN
.
closeStep
()
GEN
.
closeStep
()
script_info
({
result_severity
:
"analysis panel_info"
})
script_info
({
msg
:
"analysis panel_info"
})
script_info
({
progress
:
70
})
script_info
({
progress
:
70
})
// * profile 和 拼版
// * profile 和 拼版
var
pandle_step
=
step_list
.
map
(
function
(
v
){
var
pandle_step
=
step_list
.
map
(
function
(
v
){
...
@@ -435,7 +436,7 @@ try {
...
@@ -435,7 +436,7 @@ try {
}
}
ALL
.
gold_fingers
=
gold_fingers
ALL
.
gold_fingers
=
gold_fingers
GEN
.
closeStep
()
GEN
.
closeStep
()
script_info
({
result_severity
:
"analysis some_job_info"
})
script_info
({
msg
:
"analysis some_job_info"
})
var
config
=
{
var
config
=
{
jobInfo
:
{
jobInfo
:
{
layer_count
:
[
"signal"
,
"power_ground"
],
// Board属性的signal或者power_ground层
layer_count
:
[
"signal"
,
"power_ground"
],
// Board属性的signal或者power_ground层
...
@@ -515,7 +516,7 @@ try {
...
@@ -515,7 +516,7 @@ try {
console
.
log
(
"===================================> 5 save drill info"
)
console
.
log
(
"===================================> 5 save drill info"
)
script_info
({
result_severity
:
"analysis drill_info"
})
script_info
({
msg
:
"analysis drill_info"
})
script_info
({
progress
:
75
})
script_info
({
progress
:
75
})
// * 获取pcs_step 和 array_step的钻孔信息
// * 获取pcs_step 和 array_step的钻孔信息
var
drill_tool_info
=
{};
var
drill_tool_info
=
{};
...
@@ -530,6 +531,7 @@ try {
...
@@ -530,6 +531,7 @@ try {
name
:
par
.
array_step
name
:
par
.
array_step
}
}
]
]
steps_drillinfo
.
forEach
(
function
(
item
){
steps_drillinfo
.
forEach
(
function
(
item
){
var
type
=
item
.
type
;
var
type
=
item
.
type
;
var
step
=
item
.
name
;
var
step
=
item
.
name
;
...
@@ -537,7 +539,7 @@ try {
...
@@ -537,7 +539,7 @@ try {
drillLayers
.
forEach
(
function
(
layer
){
drillLayers
.
forEach
(
function
(
layer
){
var
layer
=
layer
.
name
;
var
layer
=
layer
.
name
;
if
(
!
GEN
.
isLayerEmpty
({
job
:
job
,
step
:
step
,
layer
:
layer
})){
if
(
!
GEN
.
isLayerEmpty
({
job
:
job
,
step
:
step
,
layer
:
layer
})){
GEN
.
COM
(
"tools_set,layer="
+
layer
+
",slots=by_length"
)
//
GEN.COM("tools_set,layer="+layer+",slots=by_length")
var
tool
=
GEN
.
getTool
({
job
:
job
,
step
:
step
,
layer
:
layer
,
units
:
"mm"
});
// {"1":{"count":"01156","num":"1","type":"plated","min_tol":"0","max_tol":"0","finish_size":"100.31","drill_size":"100.31","slot_len":"0","type2":"standard","shape":"hole","bit":0}}
var
tool
=
GEN
.
getTool
({
job
:
job
,
step
:
step
,
layer
:
layer
,
units
:
"mm"
});
// {"1":{"count":"01156","num":"1","type":"plated","min_tol":"0","max_tol":"0","finish_size":"100.31","drill_size":"100.31","slot_len":"0","type2":"standard","shape":"hole","bit":0}}
if
(
!
drill_tool_info
[
layer
]){
if
(
!
drill_tool_info
[
layer
]){
drill_tool_info
[
layer
]
=
tool
;
drill_tool_info
[
layer
]
=
tool
;
...
@@ -639,7 +641,7 @@ try {
...
@@ -639,7 +641,7 @@ try {
})
})
console
.
log
(
"=============================> 6 set smd bga"
)
console
.
log
(
"=============================> 6 set smd bga"
)
script_info
({
result_severity
:
"analysis smd&bga"
})
script_info
({
msg
:
"analysis smd&bga"
})
script_info
({
progress
:
80
})
script_info
({
progress
:
80
})
var
allStep
=
GEN
.
getStepList
({
job
:
job
})
var
allStep
=
GEN
.
getStepList
({
job
:
job
})
allStep
.
forEach
(
function
(
step
){
allStep
.
forEach
(
function
(
step
){
...
@@ -783,6 +785,7 @@ try {
...
@@ -783,6 +785,7 @@ try {
jobid
:
JobId
,
jobid
:
JobId
,
jobinfohash
:
{
ATS_surface_area_base_on
:
"Card"
}
jobinfohash
:
{
ATS_surface_area_base_on
:
"Card"
}
})
})
var
jobpath
=
GEN
.
getJobPath
({
job
:
job
})
var
jobpath
=
GEN
.
getJobPath
({
job
:
job
})
// if(GEN.GEN_TYPE == "genesis"){
// if(GEN.GEN_TYPE == "genesis"){
// jobpath = GEN.getJobPath({job:job})
// jobpath = GEN.getJobPath({job:job})
...
@@ -790,7 +793,7 @@ try {
...
@@ -790,7 +793,7 @@ try {
// jobpath = "/home/local_db/server_db/jobs/"+job
// jobpath = "/home/local_db/server_db/jobs/"+job
// }
// }
mkPath
(
jobpath
,[
"user"
,
"opcam"
,
"steps"
])
mkPath
(
jobpath
,[
"user"
,
"opcam"
,
"steps"
])
script_info
({
result_severity
:
"analysis signal"
})
script_info
({
msg
:
"analysis signal"
})
script_info
({
progress
:
85
})
script_info
({
progress
:
85
})
stepList
.
forEach
(
function
(
step
){
stepList
.
forEach
(
function
(
step
){
GEN
.
openStep
({
job
:
job
,
name
:
step
})
GEN
.
openStep
({
job
:
job
,
name
:
step
})
...
@@ -943,7 +946,7 @@ try {
...
@@ -943,7 +946,7 @@ try {
if
(
par
.
erf
){
if
(
par
.
erf
){
tmpitem
.
erf
=
par
.
erf
tmpitem
.
erf
=
par
.
erf
}
}
script_info
({
result_severity
:
"analysis run_signal_chk"
})
script_info
({
msg
:
"analysis run_signal_chk"
})
createChklistAndRun
({
// 创建checklist并运行
createChklistAndRun
({
// 创建checklist并运行
layers
:
signalLayers
,
layers
:
signalLayers
,
items
:
[
tmpitem
]
items
:
[
tmpitem
]
...
@@ -982,11 +985,30 @@ try {
...
@@ -982,11 +985,30 @@ try {
GEN
.
checkInout
({
job
:
job
,
mode
:
"in"
})
GEN
.
checkInout
({
job
:
job
,
mode
:
"in"
})
}
}
var
job_attrs
=
db
.
query
(
""
,
function
(
q
){
return
q
.
selectValue
({
table
:
'pdm_job'
,
field_format
:{
job_attrs
:
'json'
},
field
:
'job_attrs'
,
where
:{
id
:
JobId
}
})
});
if
(
!
job_attrs
)
{
job_attrs
=
{}}
job_attrs
.
readin_result
=
"已读入"
db
.
query
(
""
,
function
(
q
){
return
q
.
updateRow
({
table
:
'pdm_job'
,
data
:{
job_attrs
:
job_attrs
},
update_policy
:{
attr_data
:
'json_merge'
},
where
:{
id
:
JobId
}
})
});
IKM
.
msg
(
"export"
)
IKM
.
msg
(
"export"
)
script_info
({
result_severity
:
"analysis export"
})
script_info
({
msg
:
"analysis export"
})
script_info
({
progress
:
95
})
script_info
({
progress
:
95
})
// 导出
// 导出
if
(
par
.
export_path
!=
""
&&
par
.
export_mode
!=
""
&&
par
.
export_submode
!=
""
){
if
(
par
.
export_path
!=
""
&&
par
.
export_mode
!=
""
&&
par
.
export_submode
!=
""
){
...
@@ -1012,11 +1034,11 @@ try {
...
@@ -1012,11 +1034,11 @@ try {
})
})
});
});
var
err
=
mail
.
sendMail
({
var
err
=
mail
.
sendMail
({
host
:
'smtp.exmail.qq.com'
,
host
:
"10.90.79.37"
,
auth_method
:
mail
.
AuthMethod
.
LOGIN
,
port
:
"25"
,
connection_type
:
mail
.
ConnectionType
.
TCP
,
connection_type
:
mail
.
ConnectionType
.
TCP
,
from
:
'scott.sun@topibd.com
'
,
// user:'ferre.zhang@cn.ats.net
',
password
:
'159482673Sun'
,
//
password:'159482673Sun',
to
:
'scott.sun@topibd.com'
,
to
:
'scott.sun@topibd.com'
,
subject
:
db_customer
+
' / '
+
job
+
' reading is ready!'
,
subject
:
db_customer
+
' / '
+
job
+
' reading is ready!'
,
content
:
db_customer
+
' / '
+
job
+
' reading is ready!'
content
:
db_customer
+
' / '
+
job
+
' reading is ready!'
...
@@ -1025,8 +1047,6 @@ try {
...
@@ -1025,8 +1047,6 @@ try {
print
(
err
.
text
());
print
(
err
.
text
());
}
}
if
(
mode
===
"aimdfm"
)
{
if
(
mode
===
"aimdfm"
)
{
$
.
QDfm
.
updateRow
({
$
.
QDfm
.
updateRow
({
table
:
"pdm_aimdfm_task"
,
table
:
"pdm_aimdfm_task"
,
...
@@ -1114,7 +1134,27 @@ function ANALYSIS_STACKUP(props){
...
@@ -1114,7 +1134,27 @@ function ANALYSIS_STACKUP(props){
if
(
!
props
.
hasOwnProperty
(
"jobcategory"
)){
props
.
jobcategory
=
'work'
}
if
(
!
props
.
hasOwnProperty
(
"jobcategory"
)){
props
.
jobcategory
=
'work'
}
var
matrix
=
GEN
.
getMatrix
({
job
:
job
})
var
matrix
=
GEN
.
getMatrix
({
job
:
job
})
var
layer_count
=
GEN
.
getLayerCount
({
job
:
job
})
// !
var
layer_count
=
GEN
.
getLayerCount
({
job
:
job
})
// !
save_job_info
({
jobid
:
JobId
,
jobcategory
:
props
.
jobcategory
,
jobinfohash
:{
TL_layer_count
:
layer_count
}});
save_job_info
({
jobid
:
JobId
,
jobcategory
:
props
.
jobcategory
,
jobinfohash
:{
TL_layer_count
:
layer_count
}});
var
job_attrs
=
db
.
query
(
""
,
function
(
q
){
return
q
.
selectValue
({
table
:
'pdm_job'
,
field_format
:{
job_attrs
:
'json'
},
field
:
'job_attrs'
,
where
:{
id
:
JobId
}
})
});
if
(
!
job_attrs
)
{
job_attrs
=
{}}
job_attrs
.
layer_count
=
layer_count
db
.
query
(
""
,
function
(
q
){
return
q
.
updateRow
({
table
:
'pdm_job'
,
data
:{
job_attrs
:
job_attrs
},
update_policy
:{
attr_data
:
'json_merge'
},
where
:{
id
:
JobId
}
})
});
_
.
values
(
matrix
).
sort
(
function
(
a
,
b
){
return
a
.
row
-
b
.
row
}).
forEach
(
function
(
layer
){
_
.
values
(
matrix
).
sort
(
function
(
a
,
b
){
return
a
.
row
-
b
.
row
}).
forEach
(
function
(
layer
){
layer
.
odb_name
=
layer
.
name
;
layer
.
odb_name
=
layer
.
name
;
layer
.
name
=
layer
.
tl_name
;
layer
.
name
=
layer
.
tl_name
;
...
@@ -1248,6 +1288,7 @@ function selCopyLayer(props){ // 拷贝选择的到辅助层
...
@@ -1248,6 +1288,7 @@ function selCopyLayer(props){ // 拷贝选择的到辅助层
function
save_job_info
(
props
){
// 保存料号信息
function
save_job_info
(
props
){
// 保存料号信息
var
jobid
=
props
.
jobid
;
var
jobid
=
props
.
jobid
;
var
jobinfohash
=
props
.
jobinfohash
;
var
jobinfohash
=
props
.
jobinfohash
;
Object
.
keys
(
jobinfohash
).
forEach
(
function
(
key
){
Object
.
keys
(
jobinfohash
).
forEach
(
function
(
key
){
var
val
=
jobinfohash
[
key
];
var
val
=
jobinfohash
[
key
];
var
value
=
db
.
query
(
""
,
function
(
q
){
var
value
=
db
.
query
(
""
,
function
(
q
){
...
@@ -1257,7 +1298,6 @@ function save_job_info(props){ // 保存料号信息
...
@@ -1257,7 +1298,6 @@ function save_job_info(props){ // 保存料号信息
where
:{
job_id
:
jobid
,
attr_name
:
key
}
where
:{
job_id
:
jobid
,
attr_name
:
key
}
})
})
});
});
console
.
log
(
"jobid:"
+
jobid
+
"==========dbjobvalue:"
+
val
)
if
(
/done/ig
.
test
(
value
)
||
!
value
){
if
(
/done/ig
.
test
(
value
)
||
!
value
){
db
.
query
(
""
,
function
(
q
){
db
.
query
(
""
,
function
(
q
){
return
q
.
insertRow
({
return
q
.
insertRow
({
...
@@ -2017,6 +2057,7 @@ function analysisDrill(par, step){
...
@@ -2017,6 +2057,7 @@ function analysisDrill(par, step){
GEN
.
workLayer
({
name
:
item
,
display_number
:
1
,
clear_before
:
"yes"
})
GEN
.
workLayer
({
name
:
item
,
display_number
:
1
,
clear_before
:
"yes"
})
GEN
.
COM
(
"filter_set,filter_name=popup,update_popup=no,feat_types=pad"
);
GEN
.
COM
(
"filter_set,filter_name=popup,update_popup=no,feat_types=pad"
);
GEN
.
COM
(
"sel_ref_feat"
,{
layers
:
tmplayer
,
use
:
"filter"
,
mode
:
"touch"
,
pads_as
:
"shape"
,
f_types
:
"pad"
,
polarity
:
"positive
\
;negative"
,
include_syms
:
drill
.
symbol
})
GEN
.
COM
(
"sel_ref_feat"
,{
layers
:
tmplayer
,
use
:
"filter"
,
mode
:
"touch"
,
pads_as
:
"shape"
,
f_types
:
"pad"
,
polarity
:
"positive
\
;negative"
,
include_syms
:
drill
.
symbol
})
// GEN.selRefFeat({layers:tmplayer, use:"filter",mode:"touch"})
GEN
.
COM
(
"filter_reset,filter_name=popup"
)
GEN
.
COM
(
"filter_reset,filter_name=popup"
)
if
(
GEN
.
getSelectCount
()
>
0
){
if
(
GEN
.
getSelectCount
()
>
0
){
var
res
=
""
var
res
=
""
...
@@ -2026,7 +2067,7 @@ function analysisDrill(par, step){
...
@@ -2026,7 +2067,7 @@ function analysisDrill(par, step){
return
/^r
\d
+/
.
test
(
item
.
symbol
)
return
/^r
\d
+/
.
test
(
item
.
symbol
)
})
})
pads
=
pads
.
sort
(
function
(
a
,
b
){
pads
=
pads
.
sort
(
function
(
a
,
b
){
return
parseInt
(
a
.
symbol
)
-
parseInt
(
b
.
symbol
)
return
parseInt
(
a
.
symbol
.
slice
(
1
))
-
parseInt
(
b
.
symbol
.
slice
(
1
)
)
})
})
res
=
pads
[
0
].
symbol
.
slice
(
1
)
res
=
pads
[
0
].
symbol
.
slice
(
1
)
}
}
...
...
ats/topcam/ATS_AIM_data_format.js
View file @
67fabe19
...
@@ -68,7 +68,7 @@ if (mode === "aimdfm") {
...
@@ -68,7 +68,7 @@ if (mode === "aimdfm") {
var
Status
=
'ok'
;
var
Status
=
'ok'
;
var
resultData
=
[];
var
resultData
=
[];
try
{
try
{
script_info
({
result_severity
:
"format start"
})
script_info
({
msg
:
"format start"
})
script_info
({
progress
:
35
})
script_info
({
progress
:
35
})
var
par
=
PAR
;
var
par
=
PAR
;
if
(
!
par
.
hasOwnProperty
(
"config_path"
)
||
par
.
config_path
==
""
){
if
(
!
par
.
hasOwnProperty
(
"config_path"
)
||
par
.
config_path
==
""
){
...
@@ -128,7 +128,8 @@ try {
...
@@ -128,7 +128,8 @@ try {
}
}
}
}
if
(
/string/ig
.
test
(
typeof
(
mergeRule
.
drill
[
0
]))){
// drill层 计算
if
(
/string/ig
.
test
(
typeof
(
mergeRule
.
drill
[
0
]))){
// drill层 计算
var
drill_layers
=
[]
var
drill_layers
=
[];
var
tmp_layers
=
[];
var
matrix
=
GEN
.
getMatrix
({
job
:
job
})
var
matrix
=
GEN
.
getMatrix
({
job
:
job
})
// 计算最大值
// 计算最大值
var
layers
=
Object
.
keys
(
matrix
)
var
layers
=
Object
.
keys
(
matrix
)
...
@@ -144,6 +145,7 @@ try {
...
@@ -144,6 +145,7 @@ try {
var
tmp
=
reg
.
exec
(
v
)
var
tmp
=
reg
.
exec
(
v
)
var
num1
=
Number
(
tmp
[
1
])
var
num1
=
Number
(
tmp
[
1
])
var
num2
=
Number
(
tmp
[
2
])
var
num2
=
Number
(
tmp
[
2
])
tmp_layers
.
push
({
num1
:
num1
,
num2
:
num2
,
layer
:
v
})
if
(
num1
==
1
){
if
(
num1
==
1
){
drill_layers
.
push
({
num1
:
num1
,
num2
:
num2
,
layer
:
v
})
drill_layers
.
push
({
num1
:
num1
,
num2
:
num2
,
layer
:
v
})
}
}
...
@@ -152,6 +154,10 @@ try {
...
@@ -152,6 +154,10 @@ try {
}
}
})
})
var
max
=
maxnum
.
sort
(
function
(
a
,
b
){
return
b
-
a
})[
0
]
var
max
=
maxnum
.
sort
(
function
(
a
,
b
){
return
b
-
a
})[
0
]
if
(
drill_layers
.
length
>
0
&&
String
(
drill_layers
[
0
].
num2
)
==
"NaN"
)
{
var
maxLayer
=
tmp_layers
.
filter
(
function
(
v
)
{
return
v
.
num1
==
max
})
GEN
.
COM
(
"matrix_rename_layer"
,{
job
:
job
,
matrix
:
"matrix"
,
layer
:
maxLayer
[
0
].
layer
,
new_name
:
"drill"
})
}
var
drill_layer
=
drill_layers
.
filter
(
function
(
v
){
return
v
.
num2
==
max
})
var
drill_layer
=
drill_layers
.
filter
(
function
(
v
){
return
v
.
num2
==
max
})
if
(
drill_layer
.
length
){
if
(
drill_layer
.
length
){
drill_layer
=
drill_layer
[
0
].
layer
drill_layer
=
drill_layer
[
0
].
layer
...
@@ -204,7 +210,6 @@ try {
...
@@ -204,7 +210,6 @@ try {
profileRule
=
mergeRule
.
profile
profileRule
=
mergeRule
.
profile
}
}
}
}
// start martix_tl_name
// start martix_tl_name
console
.
log
(
"get matrix ====== ======== job:"
+
job
);
console
.
log
(
"get matrix ====== ======== job:"
+
job
);
var
matrix
=
GEN
.
getMatrix
({
job
:
job
});
var
matrix
=
GEN
.
getMatrix
({
job
:
job
});
...
@@ -224,7 +229,7 @@ try {
...
@@ -224,7 +229,7 @@ try {
// 改名
// 改名
script_info
({
result_severity
:
"format rename"
})
script_info
({
msg
:
"format rename"
})
script_info
({
progress
:
50
})
script_info
({
progress
:
50
})
err
=
reName
({
job
:
job
,
matrix
:
after_sort_matrix
,
cfg
:
format_cfg
})
err
=
reName
({
job
:
job
,
matrix
:
after_sort_matrix
,
cfg
:
format_cfg
})
if
(
err
){
throw
err
}
if
(
err
){
throw
err
}
...
@@ -285,7 +290,7 @@ try {
...
@@ -285,7 +290,7 @@ try {
err
=
setDrill
({
job
:
job
})
err
=
setDrill
({
job
:
job
})
if
(
err
){
throw
err
}
if
(
err
){
throw
err
}
script_info
({
result_severity
:
"format create profile"
})
script_info
({
msg
:
"format create profile"
})
script_info
({
progress
:
55
})
script_info
({
progress
:
55
})
var
all_layer
=
Object
.
keys
(
tmp_matrix
)
var
all_layer
=
Object
.
keys
(
tmp_matrix
)
// 没有outline层
// 没有outline层
...
@@ -296,7 +301,7 @@ try {
...
@@ -296,7 +301,7 @@ try {
GEN
.
openStep
({
job
:
job
,
name
:
tmp_step
})
GEN
.
openStep
({
job
:
job
,
name
:
tmp_step
})
var
now_profile
=
GEN
.
getProfile
({
job
:
job
,
step
:
tmp_step
})
var
now_profile
=
GEN
.
getProfile
({
job
:
job
,
step
:
tmp_step
})
if
(
now_profile
.
match
(
/
\n
/ig
).
length
==
1
){
// 如果没有profile
if
(
now_profile
.
match
(
/
\n
/ig
).
length
==
1
){
// 如果没有profile
if
(
profileRule
[
0
]
==
"outline"
)
{
if
(
profileRule
[
0
]
==
"outline"
&&
/1352/ig
.
test
(
PAR
.
customer
)
)
{
GEN
.
workLayer
({
name
:
'outline'
,
display_number
:
2
,
clear_before
:
'yes'
})
GEN
.
workLayer
({
name
:
'outline'
,
display_number
:
2
,
clear_before
:
'yes'
})
GEN
.
selAllFeat
()
GEN
.
selAllFeat
()
if
(
GEN
.
getSelectCount
()
>
0
)
{
if
(
GEN
.
getSelectCount
()
>
0
)
{
...
@@ -312,7 +317,7 @@ try {
...
@@ -312,7 +317,7 @@ try {
}
}
var
hasProfile
=
GEN
.
getProfile
({
job
:
job
,
step
:
tmp_step
})
var
hasProfile
=
GEN
.
getProfile
({
job
:
job
,
step
:
tmp_step
})
if
(
hasProfile
.
match
(
/
\n
/ig
).
length
==
1
){
if
(
hasProfile
.
match
(
/
\n
/ig
).
length
==
1
){
script_info
({
result_severity
:
"创建profile失败"
})
script_info
({
msg
:
"创建profile失败"
})
throw
"创建profile失败"
throw
"创建profile失败"
}
}
}
}
...
@@ -331,7 +336,6 @@ try {
...
@@ -331,7 +336,6 @@ try {
$
.
QDfm
.
updateRow
({
$
.
QDfm
.
updateRow
({
table
:
"pdm_aimdfm_task"
,
table
:
"pdm_aimdfm_task"
,
data
:
{
data
:
{
result_severity
:
"format ok"
,
progress
:
60
progress
:
60
},
},
where
:
{
id
:
$
.
task_id
}
where
:
{
id
:
$
.
task_id
}
...
@@ -600,6 +604,7 @@ function reName(props) { // 改名 par{job:要改名的料号, rule: {要改名
...
@@ -600,6 +604,7 @@ function reName(props) { // 改名 par{job:要改名的料号, rule: {要改名
}
}
function mergeLaser(props){ // 合并钻孔
function mergeLaser(props){ // 合并钻孔
var tmp = []
if(!props.mergeRule){return}
if(!props.mergeRule){return}
var mergeRuleRegs = props.mergeRule.regs
var mergeRuleRegs = props.mergeRule.regs
var mergeTlname = props.mergeRule.tl_name
var mergeTlname = props.mergeRule.tl_name
...
@@ -644,12 +649,18 @@ function mergeLaser(props){ // 合并钻孔
...
@@ -644,12 +649,18 @@ function mergeLaser(props){ // 合并钻孔
newdrills.push(layerName.toLowerCase())
newdrills.push(layerName.toLowerCase())
}
}
GEN.workLayer({name:layerName.toLowerCase(),display_number:1,clear_before:'yes'});
GEN.workLayer({name:layerName.toLowerCase(),display_number:1,clear_before:'yes'});
GEN.copyLayer({source_job:job ,mode:'append',source_step:step,source_layer:val.name,dest_layer:layerName.toLowerCase()});
GEN.copyLayer({source_job:job ,mode:'append',source_step:step,source_layer:val.name,dest_layer:layerName.toLowerCase()});
if(/drl|drill/ig.test(val.name) && tmp.indexOf(val.name) < 0) {
tmp.push(val.name)
}
})
})
}
}
}
}
GEN.affectedLayer({affected:"
no
",mode:"
all
"});
GEN.affectedLayer({affected:"
no
",mode:"
all
"});
GEN.clearLayers();
GEN.clearLayers();
tmp.forEach(function(layer) {
GEN.COM("
matrix_rename_layer
,
job
=
"+job+"
,
matrix
=
matrix
,
layer
=
"+layer+"
,
new_name
=
"+layer.replace(/drl|drill/, "
merage
"))
})
GEN.closeStep();
GEN.closeStep();
return newdrills
return newdrills
}
}
...
@@ -657,7 +668,6 @@ function mergeLaser(props){ // 合并钻孔
...
@@ -657,7 +668,6 @@ function mergeLaser(props){ // 合并钻孔
function createOutline(props){
function createOutline(props){
var profileRule = props.profileRule
var profileRule = props.profileRule
console.log("
----
profileRule
------->
:
" + _.toString(profileRule));
console.log("
----
profileRule
------->
:
" + _.toString(profileRule));
var job = props.job
var job = props.job
var step = props.step
var step = props.step
var matrix = GEN.getMatrix({job:job})
var matrix = GEN.getMatrix({job:job})
...
@@ -671,15 +681,25 @@ function createOutline(props){
...
@@ -671,15 +681,25 @@ function createOutline(props){
})
})
return flag
return flag
})
})
console.log("
----
outlines
------->
:
" + _.toString(outlines));
var drill_layer = Object.keys(matrix).filter(function(v){return matrix[v].layer_type=="
drill
" && matrix[v].context == "
board
"})
var drill_layer = Object.keys(matrix).filter(function(v){return matrix[v].layer_type=="
drill
" && matrix[v].context == "
board
"})
var tmp = "
drill_all
";
var tmp = "
drill_all
";
if(GEN.isLayerExists({job:job, layer:tmp})) { GEN.deleteLayer({job:job, layer:
tmp
})}
if(GEN.isLayerExists({job:job, layer:tmp})) { GEN.deleteLayer({job:job, layer:
[tmp]
})}
GEN.openStep({job:job, name:step})
drill_layer.forEach(function(d_layer) {
GEN.
affectedLayer({affected:'yes',layer:drill_layer
})
GEN.
workLayer({name:d_layer,display_number:2,clear_before:'yes'
})
GEN.selCopyOther({dest:'layer_name',target_layer:tmp,invert:'no',dx:0,dy:0,size:0})
GEN.selCopyOther({dest:'layer_name',target_layer:tmp,invert:'no',dx:0,dy:0,size:0})
})
GEN.closeStep()
GEN.closeStep()
if (outlines.indexOf("
outline
") >= 0) {
outlines = outlines.reduce(function(a,b){
if(b != "
outline
") {
a.push(b)
}
return a
}, ["
outline
"])
}
var tmp_outline
var tmp_outline
if(outlines.length){
if(outlines.length){
if( outlines.length){
if( outlines.length){
...
@@ -696,7 +716,7 @@ function createOutline(props){
...
@@ -696,7 +716,7 @@ function createOutline(props){
}
}
}else{return false}
}else{return false}
function cl(l){
function cl(l){
GEN.openStep({job:job, name:step})
GEN.openStep({job:job, name:step})
GEN.affectedLayer({affected:'no',mode:'all'})
GEN.affectedLayer({affected:'no',mode:'all'})
GEN.workLayer({name:l,display_number:2,clear_before:"
yes
"})
GEN.workLayer({name:l,display_number:2,clear_before:"
yes
"})
var bk = l + "
_bk
"
var bk = l + "
_bk
"
...
@@ -795,4 +815,4 @@ function script_info(props){ // result_severity progress
...
@@ -795,4 +815,4 @@ function script_info(props){ // result_severity progress
where: { id: $.task_id }
where: { id: $.task_id }
});
});
}
}
}
}
\ No newline at end of file
ats/topcam/ATS_AIM_
data_input
.js
→
ats/topcam/ATS_AIM_
input_data
.js
View file @
67fabe19
...
@@ -86,9 +86,10 @@ if (mode === "aimdfm") {
...
@@ -86,9 +86,10 @@ if (mode === "aimdfm") {
}
}
var
Status
=
'ok'
;
var
Status
=
'ok'
;
var
resultData
=
[];
var
resultData
=
[];
var
import_info
=
[]
var
import_info
=
[];
var
inputState
=
[];
try
{
try
{
script_info
({
result_severity
:
"import start"
})
script_info
({
msg
:
"import start"
})
var
par
=
PAR
;
var
par
=
PAR
;
// var db_path = db.query("",function(q){
// var db_path = db.query("",function(q){
// return q.selectValue({
// return q.selectValue({
...
@@ -163,18 +164,41 @@ try {
...
@@ -163,18 +164,41 @@ try {
}
else
{
}
else
{
jobFiles
=
fs
.
listDir
(
jobFile
[
0
].
path
)
jobFiles
=
fs
.
listDir
(
jobFile
[
0
].
path
)
}
}
GEN
.
COM
(
"config_edit,name=iol_gbr_polygon_break,value=1,mode=user"
)
//
GEN.COM("config_edit,name=iol_gbr_polygon_break,value=1,mode=user")
GEN
.
COM
(
"config_edit,name=iol_fix_ill_polygon,value=yes,mode=user"
)
//
GEN.COM("config_edit,name=iol_fix_ill_polygon,value=yes,mode=user")
// 将jobFile下的zip解压
// 将jobFile下的zip解压
decompression
(
jobFile
[
0
].
path
,
[])
decompression
(
jobFile
[
0
].
path
,
[])
var
job_attrs
=
db
.
query
(
""
,
function
(
q
){
return
q
.
selectValue
({
table
:
'pdm_job'
,
field_format
:{
job_attrs
:
'json'
},
field
:
'job_attrs'
,
where
:{
id
:
JobId
}
})
});
if
(
!
job_attrs
)
{
job_attrs
=
{}}
if
(
inputState
.
indexOf
(
"rar"
)
>=
0
||
inputState
.
indexOf
(
"7z"
)
>=
0
)
{
job_attrs
.
readin_result
=
"解压失败-格式无法识别"
}
else
{
job_attrs
.
readin_result
=
"已读入"
}
db
.
query
(
""
,
function
(
q
){
return
q
.
updateRow
({
table
:
'pdm_job'
,
data
:{
job_attrs
:
job_attrs
},
update_policy
:{
attr_data
:
'json_merge'
},
where
:{
id
:
JobId
}
})
});
jobFiles
=
fs
.
listDir
(
jobFile
[
0
].
path
)
jobFiles
=
fs
.
listDir
(
jobFile
[
0
].
path
)
// 分析料号文件 得到料号导入信息 导入类型
// 分析料号文件 得到料号导入信息 导入类型
var
jobInfo
=
analyJobFiles
({
jobFiles
:
jobFiles
.
filter
(
function
(
v
){
return
v
.
isFile
}),
custCfg
:
custCfg
,
config
:
config
,
job
:
job
})
var
jobInfo
=
analyJobFiles
({
jobFiles
:
jobFiles
.
filter
(
function
(
v
){
return
v
.
isFile
}),
custCfg
:
custCfg
,
config
:
config
,
job
:
job
})
if
(
jobInfo
.
data
.
length
==
0
){
if
(
jobInfo
.
data
.
length
==
0
){
script_info
({
result_severity
:
"file error"
})
script_info
({
msg
:
"file error"
})
throw
"file error"
}
throw
"file error"
}
var
importOk
=
false
;
// 是否成功导入
var
importOk
=
false
;
// 是否成功导入
...
@@ -277,7 +301,7 @@ try {
...
@@ -277,7 +301,7 @@ try {
GEN
.
COM
(
"input_manual"
)
GEN
.
COM
(
"input_manual"
)
importOk
=
true
importOk
=
true
}
}
if
(
!
importOk
){
script_info
({
result_severity
:
"import error"
});
throw
"import error"
}
if
(
!
importOk
){
script_info
({
msg
:
"import error"
});
throw
"import error"
}
script_info
({
progress
:
20
})
script_info
({
progress
:
20
})
reNameStep
(
job
)
reNameStep
(
job
)
if
(
/2171/
.
test
(
par
.
customer
)){
if
(
/2171/
.
test
(
par
.
customer
)){
...
@@ -314,7 +338,7 @@ try {
...
@@ -314,7 +338,7 @@ try {
}
}
})
})
}
}
GEN
.
closeStep
()
GEN
.
checkInout
({
job
:
job
,
mode
:
"out"
})
// 结束保存料号 关闭料号
GEN
.
checkInout
({
job
:
job
,
mode
:
"out"
})
// 结束保存料号 关闭料号
GEN
.
saveJob
({
job
:
job
});
GEN
.
saveJob
({
job
:
job
});
GEN
.
checkInout
({
job
:
job
,
mode
:
"in"
})
GEN
.
checkInout
({
job
:
job
,
mode
:
"in"
})
...
@@ -332,7 +356,7 @@ try {
...
@@ -332,7 +356,7 @@ try {
import_html
+=
"</table>"
import_html
+=
"</table>"
// name type date user
// name type date user
resultData
.
push
({
type
:
"info"
,
title
:
"导入资料列表"
,
detail
:
[{
desc
:
import_html
}]
})
resultData
.
push
({
type
:
"info"
,
title
:
"导入资料列表"
,
detail
:
[{
desc
:
import_html
}]
})
script_info
({
result_severity
:
"import ok"
})
script_info
({
msg
:
"import ok"
})
if
(
mode
===
"aimdfm"
)
{
if
(
mode
===
"aimdfm"
)
{
$
.
QDfm
.
updateRow
({
$
.
QDfm
.
updateRow
({
table
:
"pdm_aimdfm_task"
,
table
:
"pdm_aimdfm_task"
,
...
@@ -371,7 +395,6 @@ function delSameJob(props){
...
@@ -371,7 +395,6 @@ function delSameJob(props){
var
job
=
props
.
job
var
job
=
props
.
job
var
delSame
=
props
.
delSame
var
delSame
=
props
.
delSame
console
.
log
(
"======================>delsame:"
+
delSame
);
console
.
log
(
"======================>delsame:"
+
delSame
);
if
(
GEN
.
isJobExists
({
job
:
job
})){
if
(
GEN
.
isJobExists
({
job
:
job
})){
if
(
/^yes$/ig
.
test
(
delSame
)){
if
(
/^yes$/ig
.
test
(
delSame
)){
if
(
GEN
.
isJobOpen
({
job
:
job
})){
GEN
.
closeJob
({
job
:
job
})
}
if
(
GEN
.
isJobOpen
({
job
:
job
})){
GEN
.
closeJob
({
job
:
job
})
}
...
@@ -511,10 +534,14 @@ function script_info(props){ // result_severity progress
...
@@ -511,10 +534,14 @@ function script_info(props){ // result_severity progress
}
}
}
}
function
decompression
(
path
,
zips
)
{
function
decompression
(
path
,
zips
)
{
var
files
=
fs
.
listDir
(
path
)
var
files
=
fs
.
listDir
(
path
)
var
count
=
0
;
var
count
=
0
;
var
zipfiles
=
files
.
filter
(
function
(
item
){
var
zipfiles
=
files
.
filter
(
function
(
item
){
if
(
item
.
suffix
==
"zip"
||
item
.
suffix
==
"rar"
||
item
.
suffix
==
"7z"
)
{
inputState
.
push
(
item
.
suffix
)
}
if
(
item
.
suffix
===
"zip"
&&
zips
.
indexOf
(
item
.
path
)
<
0
){
if
(
item
.
suffix
===
"zip"
&&
zips
.
indexOf
(
item
.
path
)
<
0
){
if
(
item
.
name
.
length
>=
20
)
{
if
(
item
.
name
.
length
>=
20
)
{
var
mvname
=
"zip_custom"
+
count
+
".zip"
;
var
mvname
=
"zip_custom"
+
count
+
".zip"
;
...
...
ats/topcam/config_ats.js
View file @
67fabe19
...
@@ -190,8 +190,8 @@
...
@@ -190,8 +190,8 @@
"Excellon2_4"
:
{
"Excellon2_4"
:
{
"nf1"
:
2
,
"nf1"
:
2
,
"nf2"
:
3
,
"nf2"
:
3
,
"units"
:
"
mm
"
,
"units"
:
"
inch
"
,
"zeroes"
:
"
lead
ing"
,
"zeroes"
:
"
trail
ing"
,
"decimal"
:
"no"
,
"decimal"
:
"no"
,
"nf_comp"
:
0
,
"nf_comp"
:
0
,
"break_sr"
:
"yes"
,
"break_sr"
:
"yes"
,
...
@@ -201,7 +201,7 @@
...
@@ -201,7 +201,7 @@
"drill_only"
:
"no"
,
"drill_only"
:
"no"
,
"multiplier"
:
1
,
"multiplier"
:
1
,
"resolution"
:
3
,
"resolution"
:
3
,
"tool_units"
:
"
mm
"
,
"tool_units"
:
"
inch
"
,
"coordinates"
:
"absolute"
,
"coordinates"
:
"absolute"
,
"merge_by_rule"
:
"no"
,
"merge_by_rule"
:
"no"
,
"signed_coords"
:
"no"
,
"signed_coords"
:
"no"
,
...
@@ -679,6 +679,7 @@
...
@@ -679,6 +679,7 @@
GEN
.
COM
(
"tools_set,layer="
+
layer
+
",thickness=0,user_params=,slots=by_length"
)
GEN
.
COM
(
"tools_set,layer="
+
layer
+
",thickness=0,user_params=,slots=by_length"
)
}
}
})
})
GEN
.
saveJob
({
job
:
job
});
}
}
}
}
]
]
...
@@ -828,7 +829,7 @@
...
@@ -828,7 +829,7 @@
{
{
"valid"
:
function
(
props
){
"valid"
:
function
(
props
){
var
file
=
props
.
file
;
var
file
=
props
.
file
;
return
/.+
\.
ger$/ig
.
test
(
file
.
name
)
||
/
\.
gdo$|
\.
bol$|
\.
gdo$|
\.
pma$|
\.
sma$|
\.
smb$|
\.
ssa$|
\.
ssb$/ig
.
test
(
file
.
name
)
||
return
/.+
\.
ger$/ig
.
test
(
file
.
name
)
||
/
\.
pho$|
\.
bol$|
\.
gdo$|
\.
pma$|
\.
pmb$|
\.
spa$|
\.
spb$
\.
sma$|
\.
smb$|
\.
ssa$|
\.
ssb$/ig
.
test
(
file
.
name
)
||
/.+
\.
l
\d
+$/ig
.
test
(
file
.
name
)
/.+
\.
l
\d
+$/ig
.
test
(
file
.
name
)
},
},
"type"
:
"Gerber274x"
,
"type"
:
"Gerber274x"
,
...
@@ -943,25 +944,32 @@
...
@@ -943,25 +944,32 @@
}
}
],
],
"tl_name"
:
[
"tl_name"
:
[
{
"orig_name"
:
[
"^pmt
\\
.art$"
,
"
\\
.pma$
"
,
"SoldPasteTop
\\
.ger
"
,
"past_top"
],
"tl_name"
:
"past_top"
},
{
"orig_name"
:
[
"^pmt
\\
.art$"
,
"
\\
.pma$
|
\\
.spa$"
,
"paste.top|soldPasteTop|pastemask.?top
"
,
"past_top"
],
"tl_name"
:
"past_top"
},
{
"orig_name"
:
[
"^pmb
\\
.art$"
,
"
\\
.pmb$
"
,
"SoldPasteBot
\\
.ger
"
,
"past_botm"
],
"tl_name"
:
"past_botm"
},
{
"orig_name"
:
[
"^pmb
\\
.art$"
,
"
\\
.pmb$
|
\\
.spb$"
,
"paste.bot|soldPasteBot|pastemask.?bot
"
,
"past_botm"
],
"tl_name"
:
"past_botm"
},
{
"orig_name"
:
[
"tsilk"
,
"^sst
\\
.art$"
,
"
\\
.ssa$"
,
"
SilkScrnTop
\\
.ger"
,
"silk_
top"
],
"tl_name"
:
"silk_top"
},
{
"orig_name"
:
[
"tsilk"
,
"^sst
\\
.art$"
,
"
\\
.ssa$"
,
"
silkscrntop|silkscreentop"
,
"silk.top|silk-
top"
],
"tl_name"
:
"silk_top"
},
{
"orig_name"
:
[
"bsilk"
,
"^ssb
\\
.art$"
,
"
\\
.ssb$"
,
"
SilkScrnBot
\\
.ger"
,
"silk_
bot"
],
"tl_name"
:
"silk_bot"
},
{
"orig_name"
:
[
"bsilk"
,
"^ssb
\\
.art$"
,
"
\\
.ssb$"
,
"
silkscrnbot|silkscreenbot"
,
"silk.bot|silk-
bot"
],
"tl_name"
:
"silk_bot"
},
{
"orig_name"
:
[
"tmask"
,
"^smt
\\
.art$"
,
"
\\
.sma$"
,
"
SoldMask1Top
\\
.ger"
,
"sm_
top"
],
"tl_name"
:
"sm_top"
},
{
"orig_name"
:
[
"tmask"
,
"^smt
\\
.art$"
,
"
\\
.sma$"
,
"
soldmask1top|soldermask.?top"
,
"sm.top|solder.
top"
],
"tl_name"
:
"sm_top"
},
{
"orig_name"
:
[
"bmask"
,
"^smb
\\
.art$"
,
"
\\
.smb$"
,
"
SoldMask1Bot
\\
.ger"
,
"sm_
bot"
],
"tl_name"
:
"sm_botm"
},
{
"orig_name"
:
[
"bmask"
,
"^smb
\\
.art$"
,
"
\\
.smb$"
,
"
soldmask1bot|soldermask.?bot"
,
"sm.bot|solder.
bot"
],
"tl_name"
:
"sm_botm"
},
{
"orig_name"
:
[
"^
top$"
,
"^top
.art$"
],
"tl_name"
:
"top"
},
{
"orig_name"
:
[
"^
(?:(?!assy|enig|pm|past|paste|silk|mask).)+top
\\
.(pho|art)$"
,
"^top$"
,
"^top
\\
.art$"
],
"tl_name"
:
"top"
},
{
"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)"
},
{
"orig_name"
:
[
"^
(?:(?!ref).)+l(
\\
d)
\\
.art$"
,
"-(
\\
d+)l
\\
.pho$"
,
"^
l(
\\
d+).*
\\
.art$"
,
"^v(
\\
d+)
\\
.art$"
,
"^g(
\\
d+)
\\
.art$"
,
"^s(
\\
d+)
\\
.art$"
,
"
\\
.l(
\\
d+)$"
,
"Copper(
\\
d+)
\\
.ger$"
,
"^layer_(
\\
d+)"
],
"tl_name"
:
"l_($1)"
},
{
"orig_name"
:
[
"^bot
\\
.art$"
,
"^bottom$"
,
"^bottom.art$"
],
"tl_name"
:
"bottom"
},
{
"orig_name"
:
[
"^
(?:(?!assy|enig|pm|past|paste|silk|mask).)+bot
\\
.(pho|art)$"
,
"^
bot
\\
.art$"
,
"^bottom$"
,
"^bottom.art$"
],
"tl_name"
:
"bottom"
},
{
"orig_name"
:
[
"
\\
.d(
\\
d+)$"
],
"tl_name"
:
"d_($1)-($1+1)"
},
{
"orig_name"
:
[
"
\\
.d(
\\
d+)$"
],
"tl_name"
:
"d_($1)-($1+1)"
},
{
"orig_name"
:
[
"thruHolePlated_(
\\
d+)_(
\\
d+)
\\
.ncd"
,
"(
\\
d+)-(
\\
d+)
\\
.drl$"
,
"^drill(
\\
d+)-(
\\
d+)$"
,
"^d_(
\\
d+)-(
\\
d+)$"
],
"tl_name"
:
"d_($1)-($2)"
},
{
"orig_name"
:
[
"thruHolePlated_(
\\
d+)_(
\\
d+)
\\
.ncd"
,
"(
\\
d+)-(
\\
d+)
\\
.drl$"
,
"^drill(
\\
d+)-(
\\
d+)$"
,
"^d_(
\\
d+)-(
\\
d+)$"
],
"tl_name"
:
"d_($1)-($2)"
},
{
"orig_name"
:
[
"ThruHoleNonPlated
\\
.ncd$"
,
"^drill$"
],
"tl_name"
:
"drill"
},
{
"orig_name"
:
[
"
(
\\
d+)-(
\\
d+)-np
\\
.drl$"
,
"
ThruHoleNonPlated
\\
.ncd$"
,
"^drill$"
],
"tl_name"
:
"drill"
},
{
"orig_name"
:
[
"
\\
.rou$"
,
"^rout$"
],
"tl_name"
:
"rout"
},
{
"orig_name"
:
[
"
\\
.rou$"
,
"^rout$"
],
"tl_name"
:
"rout"
},
{
"orig_name"
:
"fab.art"
,
"tl_name"
:
"fab.art"
},
{
"orig_name"
:
"fab.art"
,
"tl_name"
:
"fab.art"
},
{
"orig_name"
:
[
"multipack.art"
,
"^array$"
],
"tl_name"
:
"array"
},
{
"orig_name"
:
[
"multipack
\\
.art"
,
"^array$"
],
"tl_name"
:
"array"
},
{
"orig_name"
:
[
"outline
\\
.art$"
,
"
\\
.bol$"
,
"PnlContourNonPlated
\\
.ger"
,
"^outline"
],
"tl_name"
:
"outline"
},
{
"orig_name"
:
[
"p_outline
\\
.art"
,
"panel
\\
.art$"
,
"paneloutline
\\
.pho"
,
"outline
\\
.art$"
,
"
\\
.bol$"
,
"PnlContourNonPlated
\\
.ger"
,
"^outline"
],
"tl_name"
:
"outline"
},
{
"orig_name"
:
[
"top-enig"
,
"enig_top"
],
"tl_name"
:
"enig_top"
},
{
"orig_name"
:
[
"topside-golden"
,
"top-enig"
,
"enig_top"
],
"tl_name"
:
"enig_top"
},
{
"orig_name"
:
[
"bot-enig"
,
"enig_bot"
],
"tl_name"
:
"enig_bot"
},
{
"orig_name"
:
[
"botside-golden"
,
"bot-enig"
,
"enig_bot"
],
"tl_name"
:
"enig_bot"
},
]
],
"mergerule"
:
{
profile
:[
"silk_top"
],
laser
:
{
tl_name
:
"drill($1)-($2)"
,
regs
:
[
"(
\\
d+)-(
\\
d+)
\\
.drl$"
]
}
}
},
},
"Vivo"
:{
"Vivo"
:{
"step"
:
"cad"
,
"step"
:
"cad"
,
...
...
ats/topcam/create_work.js
View file @
67fabe19
"use strict"
;
var
fs
=
require
(
"fs"
);
var
fs
=
require
(
"fs"
);
var
db
=
require
(
'topsin.database'
);
var
db
=
require
(
'topsin.database'
);
var
error
=
require
(
'topsin.error'
);
var
error
=
require
(
'topsin.error'
);
...
@@ -20,10 +19,8 @@ try {
...
@@ -20,10 +19,8 @@ try {
if
(
query_1
.
lastError
().
isValid
()){
if
(
query_1
.
lastError
().
isValid
()){
throw
query_1
.
lastError
().
text
()};
throw
query_1
.
lastError
().
text
()};
// 获取远程文件夹
// 获取远程文件夹
console
.
log
(
1
);
var
samba
=
fs
.
listDir
(
"
\\\\
10.90.2.100
\\
samba"
,
1
);
var
samba
=
fs
.
listDir
(
"
\\\\
10.90.2.100
\\
samba"
,
1
);
console
.
log
(
2
);
throw
"tmp"
var
sambaDirs_1
=
[];
var
sambaDirs_1
=
[];
var
sambaFiles_1
=
[];
var
sambaFiles_1
=
[];
samba
.
forEach
(
function
(
v
)
{
samba
.
forEach
(
function
(
v
)
{
...
...
ats/topcam/emai.js
View file @
67fabe19
let
mail
=
require
(
'topsin.mail'
);
var
mail
=
require
(
'topsin.mail'
);
let
error
=
require
(
'topsin.error'
);
var
error
=
require
(
'topsin.error'
);
var
err
=
mail
.
sendMail
({
var
err
=
mail
.
sendMail
({
host
:
'smtp.exmail.qq.com'
,
// host:'smtp.exmail.qq.com',
auth_method
:
mail
.
AuthMethod
.
LOGIN
,
// host:'cshas.ats.net',
host
:
"10.90.79.37"
,
port
:
"25"
,
// auth_method:mail.AuthMethod.LOGIN,
connection_type
:
mail
.
ConnectionType
.
TCP
,
connection_type
:
mail
.
ConnectionType
.
TCP
,
from
:
'scott.sun@topibd.com'
,
// user: "ferre.zhang@cn.ats.net",
password
:
'159482673Sun'
,
// user:'scott.sun@topibd.com',
// password:'159482673Sun',
to
:
'scott.sun@topibd.com'
,
to
:
'scott.sun@topibd.com'
,
subject
:
'customer_code / job_name reading is ready!'
,
subject
:
'customer_code / job_name reading is ready!'
,
content
:
'customer_code / job_name reading is ready!'
content
:
'customer_code / job_name reading is ready!'
...
@@ -13,4 +17,7 @@ var err = mail.sendMail({
...
@@ -13,4 +17,7 @@ var err = mail.sendMail({
if
(
err
.
isValid
())
{
if
(
err
.
isValid
())
{
print
(
err
.
text
());
print
(
err
.
text
());
}
}
\ No newline at end of file
public_script/SEC_DRC_analysis.js
View file @
67fabe19
...
@@ -487,13 +487,6 @@ try {
...
@@ -487,13 +487,6 @@ try {
GEN
.
closeStep
()
GEN
.
closeStep
()
})
})
...
...
public_script/scotttest.js
View file @
67fabe19
This diff is collapsed.
Click to expand it.
public_script/silkScreenOptimize.js
View file @
67fabe19
...
@@ -178,17 +178,17 @@ try {
...
@@ -178,17 +178,17 @@ try {
var
workstep
=
getWorkStep
()
var
workstep
=
getWorkStep
()
if
(
!
Array
.
isArray
(
workstep
)){
throw
"工作step错误"
}
if
(
!
Array
.
isArray
(
workstep
)){
throw
"工作step错误"
}
//
var err = createCoverLayer({workstep:workstep}) // 创建套层
var
err
=
createCoverLayer
({
workstep
:
workstep
})
// 创建套层
//
if (err) {throw err}
if
(
err
)
{
throw
err
}
//
GEN.PAUSE("createCoverLayer end; please check")
GEN
.
PAUSE
(
"createCoverLayer end; please check"
)
//
var err = ssFrameSeparate({workstep:workstep}) // 分离文字和文字框
var
err
=
ssFrameSeparate
({
workstep
:
workstep
})
// 分离文字和文字框
//
if (err) {throw err}
if
(
err
)
{
throw
err
}
//
GEN.PAUSE("ssFrameSeparate end; please check")
GEN
.
PAUSE
(
"ssFrameSeparate end; please check"
)
//
var err = slBoxOptimize({workstep:workstep}) // 文字框优化
var
err
=
slBoxOptimize
({
workstep
:
workstep
})
// 文字框优化
//
if (err) {throw err}
if
(
err
)
{
throw
err
}
//
GEN.PAUSE("slBoxOptimize end; please check")
GEN
.
PAUSE
(
"slBoxOptimize end; please check"
)
var
err
=
slOptimize
({
workstep
:
workstep
})
// 文字优化
var
err
=
slOptimize
({
workstep
:
workstep
})
// 文字优化
if
(
err
)
{
throw
err
}
if
(
err
)
{
throw
err
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment