查詢模塊
2022-09-13 17:38
2664
0
函數(shù) |
gkl_json script_get_steps (const gkl_json ¶m, gkl_string &errorStr) 獲取job的所有step 名字數(shù)組 更多... |
gkl_json script_get_layers (const gkl_json ¶m, gkl_string &errorStr) 獲取層數(shù)組 更多... |
gkl_json script_profile_boundbox (const gkl_json ¶m, gkl_string &errorStr) 獲取profile size 更多... |
gkl_json script_repeats_boundbox (const gkl_json ¶m, gkl_string &errorStr) 獲取所有repeat 的邊界矩形 更多... |
gkl_json script_step_boundbox (const gkl_json ¶m, gkl_string &errorStr) 獲取step boundbox,boundbox 不包含profile的尺寸, boundbox 只含有 feature和repeat 更多... |
gkl_json script_layer_boundbox (const gkl_json ¶ms, gkl_string &errorString) 層邊界范圍 更多... |
gkl_json script_selection_boundbox (const gkl_json ¶m, gkl_string &errorStr) 獲取所有選中圖形的邊界矩形 更多... |
gkl_json script_get_selection (const gkl_json ¶m, gkl_string &errorStr) 獲取所有選中的feature handle 更多... |
gkl_json script_get_selection_count (const gkl_json ¶m, gkl_string &errorStr) 獲取所有選中的feature的數(shù)目 更多... |
gkl_json script_layer_features (const gkl_json ¶ms, gkl_string &errorString) 獲取層所有feature id集合 更多... |
gkl_json script_layer_symbols (const gkl_json ¶ms, gkl_string &errorString) 獲取層中symbol表 更多... |
gkl_json script_layer_tools (const gkl_json ¶ms, gkl_string &errorString) 獲取層的刀具表,道具表獲取的單位只返回mm單位,不支持英制單位返回 更多... |
gkl_json script_layer_update_tools (const gkl_json ¶ms, gkl_string &errorString) 更新刀具表 更多... |
gkl_json script_layer_features_count (const gkl_json ¶ms, gkl_string &errorString) 獲取層所有feature id集合 更多... |
gkl_json script_feature_descript (const gkl_json ¶m, gkl_string &errorString) 獲取層所有feature id集合 更多... |
gkl_json script_layer_area (const gkl_json ¶m, gkl_string &errorString) 獲取銅面積 更多... |
gkl_json script_layer_expose_area (const gkl_json ¶m, gkl_string &errorString) 獲取expose面積 更多... |
詳細描述
函數(shù)說明
◆ script_feature_descript()
gkl_json script_feature_descript(const gkl_json & param,gkl_string & errorString )
獲取層所有feature id集合
參見
參數(shù)
[in]jsonid信息 { "class":12, "insid":1203 } |
返回
string "tl,id:289,#4,pad,x=5.05146,y=0.47244,angle=0,x_mirr=false,y_mirr=false,dcode:11,r41.339,POS"
◆ script_get_layers()
gkl_json script_get_layers(const gkl_json & param,gkl_string & errorStr )
獲取層數(shù)組
參見
參數(shù)
[in]無參
返回
數(shù)組對象
[ { "context" : "board", --板屬性 board-板 misc-雜層 "layername" : "tp", --層名 "polarity" : true, --層極性 true正性 false 負性 "start" : "", --機械層 起始層名 "end" : "", --機械層 終止層名 "order":2, --層排序序號 "layertype" : "solder_paste" --層類型 signal-線路 power_ground-電源(線路) mixed-混合層 solder_mask-阻焊 silk_screen-絲印 solder_paste-貼片 drill-鉆孔 rout-鑼帶 document-文檔 component-元器件 mask-掩膜層 cond_paste-鋼網層 coverlay- 覆蓋膜層 covercoat-覆膜層 drawing-標注層 }, { "context" : "board", "end" : "", "layername" : "to", "polarity" : true, "start" : "", "order":1, --層排序序號 "layertype" : "silk_screen" } ]
◆ script_get_selection()
gkl_json script_get_selection(const gkl_json & param,gkl_string & errorStr )
獲取所有選中的feature handle
參見
參數(shù)
[in]string"E:\\test_unit\\info.txt" --— 將數(shù)據(jù)寫入的目標文件,文件路徑為空或者文件路徑不合法,則直接用網絡方式返回
返回
array --— 文件路徑為空返回 數(shù)據(jù)信息,有效路徑則返回空
[ { "class":12, "insid":1203, "tl,id:289,#4,pad,x=5.05146,y=0.47244,angle=0,x_mirr=false,y_mirr=false,dcode:11,r41.339,POS" }, { "class":15, "insid":3256, "tl,id:289,#4,pad,x=5.05146,y=0.47244,angle=0,x_mirr=false,y_mirr=false,dcode:11,r41.339,POS" } ]
◆ script_get_selection_count()
gkl_json script_get_selection_count(const gkl_json & param,gkl_string & errorStr )
獲取所有選中的feature的數(shù)目
參見
返回
int –返回選中元素數(shù)目
◆ script_get_steps()
gkl_json script_get_steps(const gkl_json & param,gkl_string & errorStr )
獲取job的所有step 名字數(shù)組
參見
參數(shù)
[in]無參
返回
["org","edit","set"] json字符串數(shù)組
◆ script_layer_area()
gkl_json script_layer_area(const gkl_json & param,gkl_string & errorString )
獲取銅面積
參見
參數(shù)
[in]jsonid信息 { "step":"edit", ---step名字 "layer":"tl", ---層名字 "affectNC":true, ---NC 鉆孔層是否影響 "affectName":"drl", ---機械層 "thinkness":0.0 ---板厚 } |
返回
{ "area": 501.32 ---單位為inch時,返回平方inch,單位為mm時,返回平方mm "factor":0.21 ---返回比率 }
◆ script_layer_boundbox()
gkl_json script_layer_boundbox(const gkl_json & params,gkl_string & errorString )
層邊界范圍
參見
參數(shù)
[in]json對象 { "stepname":"edit", //step名字 "layername":"tl" //層名字 } |
返回
返回 step下 層名為tl的邊界矩形
{ "left":0.2, //單位隨當前系統(tǒng)的單位設置 "right":1.23, "bottom":0.3, "top":2.0 }
◆ script_layer_expose_area()
gkl_json script_layer_expose_area(const gkl_json & param,gkl_string & errorString )
獲取expose面積
參見
參數(shù)
[in]jsonid信息 { "step":"edit", ---step名字 "layer":"tl", ---層名字 "mask":"ts", ---掩碼層 "affectNC":true, ---NC 鉆孔層是否影響 "affectName":"drl", ---機械層 "thinkness":0.0 ---板厚 } |
返回
{ "area": 501.32 ---單位為inch時,返回平方inch,單位為mm時,返回平方mm "factor":0.21 ---返回比率 }
◆ script_layer_features()
gkl_json script_layer_features(const gkl_json & params,gkl_string & errorString )
獲取層所有feature id集合
參見
參數(shù)
[in]json對象 { "stepname":"edit", //step名字 "layername":"tl", //層名字 "filepath":"E:\\test_unit\\info.txt" ----- 將數(shù)據(jù)寫入的目標文件,文件路徑為空或者文件路徑不合法,則直接用網絡方式返回 } |
返回
array --— 文件路徑為空返回 數(shù)據(jù)信息,有效路徑則返回空
[ { "class":12, "insid":1203, "feature":"tl,id:289,#4,pad,x=5.05146,y=0.47244,angle=0,x_mirr=false,y_mirr=false,dcode:11,r41.339,POS" }, { "class":15, "insid":3256, "feature":"tl,id:289,#4,pad,x=5.05146,y=0.47244,angle=0,x_mirr=false,y_mirr=false,dcode:11,r41.339,POS" } ]
◆ script_layer_features_count()
gkl_json script_layer_features_count(const gkl_json & params,gkl_string & errorString )
獲取層所有feature id集合
參見
參數(shù)
[in]json對象 { "stepname":"edit", //step名字 "layername":"tl", //層名字 } |
返回
int --— 返回feature數(shù)目
◆ script_layer_symbols()
gkl_json script_layer_symbols(const gkl_json & params,gkl_string & errorString )
獲取層中symbol表
參見
參數(shù)
[in]json對象 { "stepname":"edit", //step名字 "layername":"tl", //層名字 "filepath":"E:\\test_unit\\info.txt" ----- 將數(shù)據(jù)寫入的目標文件,文件路徑為空或者文件路徑不合法,則直接用網絡方式返回 } |
返回
array --— 文件路徑為空返回 數(shù)據(jù)信息,有效路徑則返回空
[ { "class":12, "insid":1203, "descript":"r100" }, { "class":15, "insid":3256, "descript":"rect1300x500" } ]
◆ script_layer_tools()
gkl_json script_layer_tools(const gkl_json & params,gkl_string & errorString )
獲取層的刀具表,道具表獲取的單位只返回mm單位,不支持英制單位返回
參見
參數(shù)
[in]json對象 { "stepname":"edit", //step名字 "layername":"drl", //層名字 "filepath":"E:\\test_unit\\info.txt" ----- 將數(shù)據(jù)寫入的目標文件,文件路徑為空或者文件路徑不合法,則直接用網絡方式返回 } |
返回
array --— 文件路徑為空返回 數(shù)據(jù)信息,有效路徑則返回空
[ { "id" : 15, ----刀數(shù)據(jù)庫id 不可修改 "toolnumber_src" : 2, ----刀號,獲取的原始刀號 不可修改 "toolnumber" : 2, ----修改后的刀號 可修改 "toolname" : "T02", ----刀名 "drilltype" : "plated", ----刀類型 plated 通孔 nonplated非通孔 via孔 laser激光孔 "holetype" : "孔", ----刀成型類型 孔,槽,鑼 "finishsize" : "0.7112", ----完成孔徑 單位都是mm "drillsize" : 0.84999999999999998, ----鉆孔孔徑 單位都是mm "ptol" : 0.0, ----正公差 單位都是mm "ntol" : 0.0, ----負公差 單位都是mm "slot" : "", ----槽長或者鑼長 單位都是mm "count" : 48, ----鉆孔數(shù)量 "remark" : "" ----刀表標識,用戶自定義標識,備注 } ]
◆ script_layer_update_tools()
gkl_json script_layer_update_tools(const gkl_json & params,gkl_string & errorString )
更新刀具表
參見
參數(shù)
[in]json對象 { "stepname":"edit", //step名字 "layername":"drl", //層名字 "tools": [ { "id" : 15, ----刀數(shù)據(jù)庫id 不可修改 "toolnumber_src" : 2, ----刀號,獲取的原始刀號 不可修改 "toolnumber" : 2, ----修改后的刀號 可修改 "toolname" : "T02", ----刀名 "drilltype" : "plated", ----刀類型 plated 通孔 nonplated非通孔 via孔 laser激光孔 "holetype" : "孔", ----刀成型類型 孔,槽,鑼 "finishsize" : "0.7112", ----完成孔徑 單位都是mm "drillsize" : 0.84999999999999998, ----鉆孔孔徑 單位都是mm "ptol" : 0.0, ----正公差 單位都是mm "ntol" : 0.0, ----負公差 單位都是mm "slot" : "", ----槽長或者鑼長 單位都是mm,字符串為浮點數(shù)字 "count" : 48, ----鉆孔數(shù)量 "remark" : "" ----刀表標識,用戶自定義標識,備注 } ] |
◆ script_profile_boundbox()
gkl_json script_profile_boundbox(const gkl_json & param,gkl_string & errorStr )
獲取profile size
參見
參數(shù)
[in]string"edit" step名字
返回
gkl_json //返回profile的邊界矩形信息
{ "left":0.0, "right";1.12, "bottom":0, "top":0.52 }
◆ script_repeats_boundbox()
gkl_json script_repeats_boundbox(const gkl_json & param,gkl_string & errorStr )
獲取所有repeat 的邊界矩形
參見
參數(shù)
[in]string"edit" step名字
返回
gkl_json //返回profile的邊界矩形信息
{ "left":0, "right";1.12, "bottom":0, "top":0.52 }
◆ script_selection_boundbox()
gkl_json script_selection_boundbox(const gkl_json & param,gkl_string & errorStr )
獲取所有選中圖形的邊界矩形
參見
返回
json
{ "left":0.2, //單位隨當前系統(tǒng)的單位設置 "right":1.23, "bottom":0.3, "top":2.0 }
◆ script_step_boundbox()
gkl_json script_step_boundbox(const gkl_json & param,gkl_string & errorStr )
獲取step boundbox,boundbox 不包含profile的尺寸, boundbox 只含有 feature和repeat
參見
參數(shù)
[in]string"edit" step名字
返回
gkl_json //返回profile的邊界矩形信息
{ "left":0, "right";1.12, "bottom":0, "top":0.52 }