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
5b06afc5
Commit
5b06afc5
authored
4 years ago
by
Scott Sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scott
parent
7f4c0dd4
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
62 additions
and
8 deletions
+62
-8
ATS_AIM_customer_data_analysis.js
ats/topcam/ATS_AIM_customer_data_analysis.js
+2
-2
ATS_AIM_data_format.js
ats/topcam/ATS_AIM_data_format.js
+0
-0
ATS_AIM_data_input.js
ats/topcam/ATS_AIM_data_input.js
+11
-3
config_ats.js
config_ats.js
+48
-3
mytest.js
test/mytest.js
+1
-0
No files found.
ats/topcam/ATS_AIM_customer_data_analysis.js
View file @
5b06afc5
...
...
@@ -1529,7 +1529,7 @@ function analysis(props){
}
})
res
=
res
/
1000
return
res
.
toFixed
(
3
)
return
res
.
toFixed
(
4
)
}
T_m_p
.
prototype
.
analysis_milling_length_array
=
function
(){
// todo
if
(
!
this
.
array_step
){
return
"_error"
}
...
...
@@ -1550,7 +1550,7 @@ function analysis(props){
},
0
)
GEN
.
closeStep
()
milling
=
milling
/
1000
return
milling
.
toFixed
(
3
)
return
milling
.
toFixed
(
4
)
}
T_m_p
.
prototype
.
analysis_board_has_attr
=
function
(
props
){
// board层中检查存在01005属性物件时
GEN
.
openStep
({
job
:
this
.
job
,
name
:
this
.
pcs_step
})
...
...
This diff is collapsed.
Click to expand it.
ats/topcam/ATS_AIM_
layer_rename_and_sor
t.js
→
ats/topcam/ATS_AIM_
data_forma
t.js
View file @
5b06afc5
File moved
This diff is collapsed.
Click to expand it.
ats/topcam/ATS_AIM_
input_data
.js
→
ats/topcam/ATS_AIM_
data_input
.js
View file @
5b06afc5
...
...
@@ -168,6 +168,7 @@ try {
var
importOk
=
false
;
// 是否成功导入
if
(
/odb/ig
.
test
(
jobInfo
.
type
)){
// odb导入
if
(
jobInfo
.
data
.
length
==
1
){
// 只分析到一个tgz文件 直接导入
...
...
@@ -285,12 +286,19 @@ try {
GEN
.
saveJob
({
job
:
job
});
GEN
.
checkInout
({
job
:
job
,
mode
:
"in"
})
GEN
.
closeJob
({
job
:
job
})
var
steplist
=
GEN
.
getStepList
({
job
:
job
})
GEN
.
openStep
({
job
:
job
,
name
:
steplist
[
0
]})
// 额外操作
if
(
custCfg
.
extra
)
{
custCfg
.
extra
.
forEach
(
function
(
item
){
let
props
=
{};
item
.
fn
(
props
);
var
props
=
{
type
:
jobInfo
.
type
,
fileInfo
:
jobInfo
.
data
.
filter
(
function
(
item2
){
return
/Excellon/ig
.
test
(
item2
.
type
)
}),
step
:
steplist
[
0
]
};
if
(
item
.
verification
(
props
)){
item
.
fn
(
props
);
}
})
}
...
...
This diff is collapsed.
Click to expand it.
config_ats.js
View file @
5b06afc5
...
...
@@ -580,16 +580,61 @@
{
"orig_name"
:
[
"multipack.art"
,
"^array$"
],
"tl_name"
:
"array"
},
{
"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"
}
,
{
"orig_name"
:
[
"^sst
\\
.art$"
,
"bot-enig"
,
"enig_bot"
],
"tl_name"
:
"enig_bot"
}
],
"mergerule"
:
{
profile
:[
"past_top"
]
},
"extra"
:
[
{
"term"
:
function
(){},
"verification"
:
function
(
info
){
if
(
!
info
.
type
){
return
false
}
return
/gerber/ig
.
test
(
info
.
type
)
},
"fn"
:
function
(
props
){
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}]}
}
})
}
}
]
...
...
This diff is collapsed.
Click to expand it.
test/mytest.js
View file @
5b06afc5
...
...
@@ -11,6 +11,7 @@ var JobId = $.job_id;
try
{
GEN
.
getTool
({
units
:
"mm"
})
GEN
.
renameStep
({
job
:
'demo'
,
name
:
'pcb_1'
,
new_name
:
'pcb_a'
})
return
"Done"
...
...
This diff is collapsed.
Click to expand it.
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