Commit da117e27 authored by Scott Sun's avatar Scott Sun

scott

parent 50df9754
...@@ -174,9 +174,29 @@ try { ...@@ -174,9 +174,29 @@ try {
// IKM.msg(feas[0].feats) // IKM.msg(feas[0].feats)
// var ret = genMath.profile2Polygon(feas[0].feats) // var ret = genMath.profile2Polygon(feas[0].feats)
// COM tools_tab_reset
// COM tools_tab_add,num=1,shape=hole,type=via,min_tol=0,max_tol=1,bit=,drill_size=300
// COM tools_tab_add,num=2,shape=hole,type=via,min_tol=0,max_tol=0,bit=,drill_size=500
// COM tools_tab_add,num=3,shape=hole,type=plate,min_tol=0,max_tol=0,bit=,drill_size=700
// COM tools_tab_add,num=4,shape=hole,type=plate,min_tol=0,max_tol=0,bit=,drill_size=800
// COM tools_tab_add,num=5,shape=hole,type=plate,min_tol=0,max_tol=0,bit=,drill_size=900
// COM tools_tab_add,num=6,shape=hole,type=plate,min_tol=0,max_tol=0,bit=,drill_size=1000
// COM tools_tab_add,num=7,shape=hole,type=nplate,min_tol=0,max_tol=0,bit=,drill_size=1600
// COM tools_tab_add,num=8,shape=hole,type=plate,min_tol=0,max_tol=0,bit=,drill_size=3000
// COM tools_tab_add,num=9,shape=hole,type=nplate,min_tol=0,max_tol=0,bit=,drill_size=3300
// COM tools_set,layer=drl,thickness=3235.96,user_params=,slots=no
setTool({
job:job,
step:step,
layer:"drl_tmp",
callback: function (toolinfo) {
IKM.msg(toolinfo)
}
})
// 保存 // 保存
if(/yes/ig.test(par.auto_save)){ if(/yes/ig.test(par.auto_save)){
...@@ -246,4 +266,37 @@ function getRodate(props){ ...@@ -246,4 +266,37 @@ function getRodate(props){
var x = xe - xs; var x = xe - xs;
var r = Math.atan(y / x) var r = Math.atan(y / x)
return r*180/Math.PI return r*180/Math.PI
}
function setTool(props) {
var job = props.job;
var step = props.step;
var layer = props.layer;
var tool_info = GEN.getTool({job:job, step: step , layer:layer, units:"mm"})
// 操作tool_info
props.callback(tool_info)
GEN.COM("tools_show,layer="+layer)
GEN.COM("tools_tab_reset")
var typehash = {
non_plated:"nplate",
plated:"plate",
via:"via",
laser:"via"
}
Object.keys(tool_info).forEach(function(key){
var item = tool_info[key]
if (item.shape == "hole") {
GEN.COM("tools_tab_add,num="+key
+",shape="+item.shape+",type="+typehash[item.type]+",min_tol="+item.min_tol+
",max_tol="+item.max_tol+",bit=,finish_size="+item.finish_size+
",drill_size="+item.drill_size+",combined=yes,orig_size=0")
} else if (item.shape == "slot") {
GEN.COM("tools_tab_add,num="+key+",shape=slot,type="+typehash[item.type]+",min_tol="+item.min_tol+",max_tol="+item.max_tol+",finish_size="+item.finish_size+
",bit=,drill_size="+item.drill_size+",slot_len="+item.slot_len)
}
})
GEN.COM("tools_set,layer="+layer+",slots=by_length")
} }
\ 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