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
a81035d3
Commit
a81035d3
authored
Apr 10, 2020
by
Scott Sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
topcam
parent
9e829f7d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
64 additions
and
24 deletions
+64
-24
ATS_AIM_customer_data_analysis.js
test/ATS_AIM_customer_data_analysis.js
+5
-13
ATS_AIM_input_data.js
test/ATS_AIM_input_data.js
+16
-6
导入配置.json
导入配置.json
+43
-5
No files found.
test/ATS_AIM_customer_data_analysis.js
View file @
a81035d3
...
...
@@ -86,10 +86,8 @@ try {
cavity
:
"cavity"
}
// 料号验证
err
=
beforeStart
({
job
:
job
})
if
(
err
){
throw
err
}
job
=
"1"
err
=
beforeStart
({
job
:
job
});
if
(
err
){
throw
err
};
// matrix分析
var
matrixInfo
=
getMatrixInfo
({
job
:
job
})
var
matrix_analysis
=
UPLOAD_LAYER_MATRIX
({
job
:
job
,
matrixInfo
:
matrixInfo
})
// 分析matrix
...
...
@@ -111,13 +109,6 @@ try {
...
...
@@ -276,6 +267,7 @@ function UPLOAD_LAYER_MATRIX(props){
matrix
:
matrix
,
layers
:
Object
.
keys
(
matrix
).
sort
(
function
(
a
,
b
){
return
matrix
[
a
][
"row"
]
-
matrix
[
b
][
"row"
]}),
jobcategory
:
props
.
jobcategory
},
1
);
IKM
.
msg
(
ret
)
if
(
ret
.
errText
)
{
return
{
jobcategory
:
props
.
jobcategory
,
...
...
@@ -314,8 +306,8 @@ function ANALYSIS_STACKUP(props){
layer
.
drl_to_num
=
layer_count
;
layer
.
type
=
'main_drill'
;
}
else
if
(
/^
txt
(\d
+
)\-(\d
+
)
$/
.
test
(
layer
.
odb_name
)){
var
tmp
=
/^
txt
(\d
+
)\-(\d
+
)
$/
.
exec
(
layer
.
odb_name
)
else
if
(
/^
d
(\d
+
)\-(\d
+
)
$/
.
test
(
layer
.
odb_name
)){
var
tmp
=
/^
d
(\d
+
)\-(\d
+
)
$/
.
exec
(
layer
.
odb_name
)
var
drl_star
=
tmp
[
1
];
var
drl_end
=
tmp
[
2
];
layer
.
name
=
'drill'
+
drl_star
+
'-'
+
drl_end
;
...
...
test/ATS_AIM_input_data.js
View file @
a81035d3
...
...
@@ -51,6 +51,15 @@ var Job = $.job;
try
{
// 获取脚本参数
var
par
=
$
.
par
;
// !!! tmp
par
=
{
customer
:
"ats"
,
job_name
:
"1"
,
path
:
"C:/Users/Administrator/Desktop/Customer_1"
}
var
parParams
=
[
"customer"
,
"job_name"
,
"path"
];
// par应该有的属性
var
isParExist
=
parParams
.
reduce
(
function
(
a
,
b
)
{
if
(
!
par
.
hasOwnProperty
(
b
))
{
...
...
@@ -71,7 +80,7 @@ try {
var
useCfg
=
cfg
[
par
.
customer
.
toLowerCase
()];
addDefaultCfg
(
cfg
.
def
,
useCfg
)
// 添加默认配置
var
job
=
par
.
job_name
,
path
=
par
.
path
,
step
=
useCfg
.
step
,
err
var
job
=
par
.
job_name
,
path
=
par
.
path
||
useCfg
.
path
,
step
=
useCfg
.
step
,
err
err
=
delSameJob
({
job
:
job
,
delSame
:
useCfg
.
delSameJob
});
if
(
err
){
throw
err
}
// 判断导入方式 处理path
var
jobPath
=
path
+
"/"
+
job
...
...
@@ -151,6 +160,7 @@ try {
return
'Done'
;
}
catch
(
error
)
{
IKM
.
msg
(
error
)
return
'Error'
;
}
...
...
@@ -204,11 +214,11 @@ function getPathInfo(props){
},[])
if
(
cfg
.
Gerber
){
res
.
type
=
cfg
.
Gerber
.
files
.
reduce
(
function
(
a
,
b
){
if
(
res
.
fileSuffix
.
indexOf
(
b
)
<
0
){
a
=
fals
e
if
(
res
.
fileSuffix
.
indexOf
(
b
)
>=
0
){
a
=
tru
e
}
return
a
},
tru
e
)?
"Gerber"
:
undefined
},
fals
e
)?
"Gerber"
:
undefined
}
if
(
cfg
.
ODB
){
res
.
type
=
cfg
.
ODB
.
files
.
reduce
(
function
(
a
,
b
){
...
...
导入配置.json
View file @
a81035d3
...
...
@@ -97,11 +97,49 @@
"files"
:
[
"drl"
,
"art"
],
"format"
:
{
"art"
:
"Gerber274x"
,
"drd"
:
"Excellon1"
,
"drl"
:
"Excellon2"
,
"ipc"
:
"IPC356"
,
"phd"
:
"Gerber274x"
,
"phl"
:
"Ascii"
"drl"
:
"Excellon2"
},
"gerberConfig"
:
{
"drl"
:
{
"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
},
"art"
:
{
"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
}
}
}
}
...
...
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