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
21450b93
Commit
21450b93
authored
Apr 13, 2020
by
Scott Sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
s
parent
a234656f
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
108 additions
and
4 deletions
+108
-4
main.js
2020-1-16/tui/main.js
+0
-0
config.js
config.js
+94
-0
ATS_AIM_input_data.js
test/ATS_AIM_input_data.js
+3
-3
ATS_AIM_layer_rename_and_sort.js
test/ATS_AIM_layer_rename_and_sort.js
+3
-1
导入配置.json
导入配置.json
+8
-0
No files found.
2020-1-16/
TUI计算界面
/main.js
→
2020-1-16/
tui
/main.js
View file @
21450b93
File moved
config.js
0 → 100644
View file @
21450b93
var
config
=
{
"formats"
:
{
"ODB1"
:
{
"comments"
:
""
,
// 描述
"arrStep"
:
"stp"
,
"isMerge"
:
"yes"
,
"jobNameRule"
:
"(job)-a"
},
"Gerber274_1"
:
{
"nf1"
:
3
,
"nf2"
:
0
,
"units"
:
"mm"
,
"zeroes"
:
"leading"
,
"decimal"
:
"yes"
,
"nf_comp"
:
0
,
"break_sr"
:
"yes"
,
"data_type"
:
"ascii"
,
"separator"
:
"nl"
,
"threshold"
:
200
,
"drill_only"
:
"no"
,
"multiplier"
:
1
,
"resolution"
:
3
,
"tool_units"
:
"mm"
,
"coordinates"
:
"absolute"
,
"merge_by_rule"
:
"no"
,
"signed_coords"
:
"no"
,
"text_line_width"
:
0.0024
},
"Excellon1_1"
:
{
"nf1"
:
3
,
"nf2"
:
4
,
"units"
:
"mm"
,
"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
}
},
"cust"
:
{
"c1"
:
{
"path"
:
"C:/Users/Administrator/Desktop/Customer_1"
,
"db"
:
"genesis"
,
"rules"
:
[
{
"valid"
:
""
,
// 文件正则 func true/false
"type"
:
"ODB"
,
// 格式 odb gerber
"format"
:
"ODB1"
},
{
"valid"
:
""
,
// 文件正则 func
"type"
:
"Gerber274"
,
// 格式 odb gerber
"format"
:
"Gerber274_1"
},
{
"valid"
:
""
,
// 文件正则 func
"type"
:
"Excellon1"
,
// 格式 odb gerber
"format"
:
"Excellon1_1"
,
"rename"
:
{}
}
],
"tlname"
:
[
{
"orig_name"
:
"pasttop.art"
,
"tlname"
:
"past_top"
},
{
"orig_name"
:
"pleg.art"
,
"tlname"
:
"silk_top"
},
{
"orig_name"
:
"soldtop.art"
,
"tlname"
:
"sm_top"
},
{
"orig_name"
:
"art(
\\
d+)
\\
.art"
,
"tlname"
:
"layer_(1)"
},
{
"orig_name"
:
"soldbotm.art"
,
"tlname"
:
"sm_botm"
},
{
"orig_name"
:
"sleg.art"
,
"tlname"
:
"silk_bot"
},
{
"orig_name"
:
"pastbotm.art"
,
"tlname"
:
"past_botm"
},
{
"orig_name"
:
"multipack.art"
,
"tlname"
:
"array"
},
{
"orig_name"
:
"outline.art"
,
"tlname"
:
"outline"
},
{
"orig_name"
:
"fab.art"
,
"tlname"
:
"fab.art"
},
{
"orig_name"
:
"top-enig"
,
"tlname"
:
"top-enig"
},
{
"orig_name"
:
"bot-enig"
,
"tlname"
:
"bot-enig"
},
{
"orig_name"
:
"fab_page2"
,
"tlname"
:
"fab_page2"
}
]
}
},
"sort_rename"
:
[
{
"tlname"
:
""
,
"newname"
:
""
}
// newname 里支持特殊变量
]
}
\ No newline at end of file
test/ATS_AIM_input_data.js
View file @
21450b93
...
...
@@ -54,9 +54,9 @@ try {
// !!! tmp
par
=
{
customer
:
"
tmp
"
,
job_name
:
"
m3
"
,
path
:
"C:/Users/A
dministrator/Desktop/New data
"
customer
:
"
ats
"
,
job_name
:
"
1
"
,
path
:
"C:/Users/A
lan/Desktop/Customer_1
"
}
var
parParams
=
[
"customer"
,
"job_name"
,
"path"
];
// par应该有的属性
...
...
test/ATS_AIM_layer_rename_and_sort.js
View file @
21450b93
...
...
@@ -45,7 +45,9 @@ var Job = $.job;
try
{
var
mode
=
"use"
// develop
var
par
=
$
.
par
;
par
=
{
job_name
:
"2"
,
customer
:
"ats"
}
// !! tmp
par
=
{
job_name
:
"11"
,
customer
:
"tmp"
}
// !! tmp
var
cfg
=
JSON
.
parse
(
IKM
.
select_value
({
table
:
'pub_conf'
,
field
:
'json_data'
,
where
:{
path
:
'cam/input_data'
}}));
// 读取配置文件
var
useCfg
=
cfg
[
par
.
customer
.
toLowerCase
()].
formatData
;
if
(
!
useCfg
){
throw
"config error"
}
...
...
导入配置.json
View file @
21450b93
...
...
@@ -73,6 +73,10 @@
{
"orig_name"
:
"d_top_.+(
\\
d+)"
,
"new_name"
:
"d1-(1)"
},
{
"orig_name"
:
"d_.+(
\\
d+)_bottom"
,
"new_name"
:
"d(1)-(last)"
},
{
"orig_name"
:
"d_.+(
\\
d+)_.+(
\\
d+)"
,
"new_name"
:
"d(1)-(2)"
}
],
"rule2"
:
[
{
"orig_name"
:
"p2ml7040_d(
\\
d)(
\\
d)
\\
.drd"
,
"new_name"
:
"d(1)-(2)"
},
{
"orig_name"
:
"p2ml7040_l(
\\
d+)
\\
.phd"
,
"new_name"
:
"l(1)"
,
"tp"
:
true
}
]
},
"sort"
:
{
...
...
@@ -89,6 +93,10 @@
{
"name"
:
"d(
\\
d+)-
\\
d+"
,
"context"
:
"board"
,
"type"
:
"drill"
,
"polarity"
:
"positive"
},
{
"name"
:
"drill"
,
"context"
:
"board"
,
"type"
:
"drill"
,
"polarity"
:
"positive"
},
{
"name"
:
"rout"
,
"context"
:
"board"
,
"type"
:
"rout"
,
"polarity"
:
"positive"
}
],
"sort2"
:
[
{
"name"
:
"l(
\\
d+)"
,
"context"
:
"board"
,
"type"
:
"signal"
,
"polarity"
:
"positive"
},
{
"name"
:
"d(
\\
d+)-
\\
d+"
,
"context"
:
"board"
,
"type"
:
"drill"
,
"polarity"
:
"positive"
}
]
},
"setDrill"
:
{
...
...
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