編輯模塊
2022-09-13 17:40
3855
0
函數(shù) |
gkl_json script_copy (const gkl_json ¶m, gkl_string &errorStr) 將選中元素本層復(fù)制 更多... |
gkl_json script_move (const gkl_json ¶m, gkl_string &errorStr) 將選中元素同層移動(dòng) 更多... |
gkl_json script_copy_to_other_layer (const gkl_json ¶m, gkl_string &errorStr) 將選中元素拷貝到指定層 更多... |
gkl_json script_move_to_other_layer (const gkl_json ¶m, gkl_string &errorStr) 將選中元素移動(dòng)到指定層 更多... |
gkl_json script_change_symbol (const gkl_json ¶ms, gkl_string &errorStr) 選中元素替換光圈 更多... |
gkl_json script_same_feature_replaced_by_symbol (const gkl_json ¶ms, gkl_string &errorStr) 替換相似元素為指定PAD 更多... |
gkl_json script_profile_fill (const gkl_json ¶ms, gkl_string &errorStr) 替換相似元素為指定PAD 更多... |
gkl_json script_repeat_to_entitys (const gkl_json ¶m, gkl_string &errorStr) repeat元素實(shí)體化 更多... |
gkl_json script_remove_negtive (const gkl_json ¶m, gkl_string &errorStr) 層去負(fù),所有影響層生效 更多... |
gkl_json script_fill_lines (const gkl_json ¶m, gkl_string &errorStr) 線填充 更多... |
gkl_json script_contourize (const gkl_json ¶m, gkl_string &errorStr) 合并多邊形 更多... |
gkl_json script_explode (const gkl_json ¶m, gkl_string &errorStr) 打散選中的feature 更多... |
gkl_json script_transform (const gkl_json ¶m, gkl_string &errorStr) 矩陣變換,選中元素矩陣變換,未選中元素針對(duì)層內(nèi)所有元素,所有影響層都生效 更多... |
gkl_json script_line_to_pad (const gkl_json ¶m, gkl_string &errorStr) 選中的元素或者影響層內(nèi),線段長(zhǎng)度為0,光圈為round或者squre的線段,轉(zhuǎn)成PAD 更多... |
gkl_json script_pad_to_line (const gkl_json ¶m, gkl_string &errorStr) 選中的元素或者影響層內(nèi),round和squre的PAD 轉(zhuǎn)為線段 更多... |
gkl_json script_arc_to_line (const gkl_json ¶m, gkl_string &errorStr) 選中的元素或者影響層內(nèi),arc 打斷為 線段 更多... |
gkl_json script_fill_pattern (const gkl_json ¶m, gkl_string &errorStr) FillPattern 根據(jù)選中多變形根據(jù)填充圖形填充,只對(duì)工作層有效,不支持影響層 更多... |
gkl_json script_feature_recoup (const gkl_json ¶ms, gkl_string &errorStr) 將選中元素本層漲縮feature_recoup 更多... |
gkl_json script_feature_append_attribute (const gkl_json ¶ms, gkl_string &errorStr) 將選中元素追加屬性 更多... |
gkl_json script_feature_replace_attribute (const gkl_json ¶ms, gkl_string &errorStr) 將選中元素替換屬性 更多... |
gkl_json script_feature_remove_attribute (const gkl_json ¶ms, gkl_string &errorStr) 將選中元素替換屬性 更多... |
gkl_json script_undo (const gkl_json ¶ms, gkl_string &errorStr) 回退 更多... |
詳細(xì)描述
函數(shù)說(shuō)明
◆ script_arc_to_line()
gkl_json script_arc_to_line(const gkl_json & param,gkl_string & errorStr )
選中的元素或者影響層內(nèi),arc 打斷為 線段
參見
參數(shù)
[in]<pre>{ "smoothstep" : 0.1 --弧打斷線的細(xì)分步長(zhǎng) }
返回
true成功,false 失敗
◆ script_change_symbol()
gkl_json script_change_symbol(const gkl_json & params,gkl_string & errorStr )
選中元素替換光圈
參見
參數(shù)
[in]string光圈名字
返回
◆ script_contourize()
gkl_json script_contourize(const gkl_json & param,gkl_string & errorStr )
合并多邊形
參見
參數(shù)
[in]json { "pinhole" : 0.2 ----去除小內(nèi)洞,當(dāng)合并后的多邊形中有小于該尺寸的內(nèi)洞,全部剔除 } |
返回
true成功,false 失敗
◆ script_copy()
gkl_json script_copy(const gkl_json & param,gkl_string & errorStr )
將選中元素本層復(fù)制
參見
參數(shù)
[in]json { "detx":0.2, --- 拷貝坐標(biāo)x偏移 "dety":-0.3 --- 拷貝坐標(biāo)y偏移 } |
返回
true成功,false 失敗
◆ script_copy_to_other_layer()
gkl_json script_copy_to_other_layer(const gkl_json & param,gkl_string & errorStr )
將選中元素拷貝到指定層
參見
copy_to_other_layer()
參數(shù)
[in]json { "affactted":false, --- 是否開啟影響層模式拷貝 "change_polarity" : false, --- 是否修改極性,正轉(zhuǎn)負(fù),負(fù)則轉(zhuǎn)正 "des_layer" : "tt", --- 層名 "des_step" : "edit", --- step名字 "resize" : 0.5 --- 放大數(shù),整體放大尺寸 } |
返回
true成功,false 失敗
◆ script_explode()
gkl_json script_explode(const gkl_json & param,gkl_string & errorStr )
打散選中的feature
參見
參數(shù)
[in]<br>
返回
true成功,false 失敗
◆ script_feature_append_attribute()
gkl_json script_feature_append_attribute(const gkl_json & params,gkl_string & errorStr )
將選中元素追加屬性
參見
script_feature_append_attribute()
參數(shù)
[in]json{ "drill":"plated" }
返回
◆ script_feature_recoup()
gkl_json script_feature_recoup(const gkl_json & params,gkl_string & errorStr )
將選中元素本層漲縮feature_recoup
參見
參數(shù)
[in]json { "size":0.2, ---指定縮放的大小 } |
返回
◆ script_feature_remove_attribute()
gkl_json script_feature_remove_attribute(const gkl_json & params,gkl_string & errorStr )
將選中元素替換屬性
參見
script_feature_remove_attribute()
參數(shù)
[in]string刪除屬性的key名稱
返回
◆ script_feature_replace_attribute()
gkl_json script_feature_replace_attribute(const gkl_json & params,gkl_string & errorStr )
將選中元素替換屬性
參見
script_feature_replace_attribute()
參數(shù)
[in]jsonnull 或者 object null表示清空屬性, object表示替換屬性
返回
◆ script_fill_lines()
gkl_json script_fill_lines(const gkl_json & param,gkl_string & errorStr )
線填充
參見
參數(shù)
[in]json { "outlw" : 5.0 ----填線線寬 } |
返回
true成功,false 失敗
◆ script_fill_pattern()
gkl_json script_fill_pattern(const gkl_json & param,gkl_string & errorStr )
FillPattern 根據(jù)選中多變形根據(jù)填充圖形填充,只對(duì)工作層有效,不支持影響層
參見
參數(shù)
[in]json { "fillpat" : "square" -----圖形填充,填充pat名稱 } |
返回
true成功,false 失敗
◆ script_line_to_pad()
gkl_json script_line_to_pad(const gkl_json & param,gkl_string & errorStr )
選中的元素或者影響層內(nèi),線段長(zhǎng)度為0,光圈為round或者squre的線段,轉(zhuǎn)成PAD
參見
參數(shù)
[in]<pre>
返回
true成功,false 失敗
◆ script_move()
gkl_json script_move(const gkl_json & param,gkl_string & errorStr )
將選中元素同層移動(dòng)
參見
參數(shù)
[in]json { "detx":0.2, ---x向移動(dòng)值 "dety":-0.3 ---y向移動(dòng)值 } |
返回
true成功,false 失敗
◆ script_move_to_other_layer()
gkl_json script_move_to_other_layer(const gkl_json & param,gkl_string & errorStr )
將選中元素移動(dòng)到指定層
參見
move_to_other_layer()
參數(shù)
[in]json { "change_polarity" : false, --- 是否修改極性,正轉(zhuǎn)負(fù),負(fù)則轉(zhuǎn)正 "des_layer" : "tt", --- 層名 "des_step" : "edit", --- step名字 "resize" : 0.5 --- 放大數(shù),整體放大尺寸 } |
返回
true成功,false 失敗
◆ script_pad_to_line()
gkl_json script_pad_to_line(const gkl_json & param,gkl_string & errorStr )
選中的元素或者影響層內(nèi),round和squre的PAD 轉(zhuǎn)為線段
參見
參數(shù)
[in]<pre>
返回
true成功,false 失敗
◆ script_profile_fill()
gkl_json script_profile_fill(const gkl_json & params,gkl_string & errorStr )
替換相似元素為指定PAD
參見
參數(shù)
[in]json { "consider_drill" : false, -----是否避讓鉆孔 "consider_drill_dist" : 0.50800000000000001, -----避讓鉆孔間距 "consider_feature" : false, -----是否避讓元素 "consider_feature_dist" : 0.254, -----避讓元素間距 "consider_rout" : false, -----是否避讓鑼帶 "consider_rout_dist" : 0.50800000000000001, -----避讓鑼帶間距 "fillpat" : "square", -----圖形填充,填充pat名稱 "fillsolid" : true, -----多邊形填充, true為多邊形填充,false為pat填充填阻流PAD "polarity" : true, -----填充元素的極性 "profilemarginx" : 0.0, -----profile邊界超出距離 "profilemarginxmax" : 2540.0, -----prfile尺寸不能超過(guò)該值 "profilemarginy" : 0.0, "profilemarginymax" : 2540.0, "repeatmarginx" : 0.0, -----repeat內(nèi)縮距離 "repeatmarginxmax" : 0.0, -----repeat內(nèi)縮最大值 "repeatmarginy" : 0.0, "repeatmarginymax" : 0.0, "ignorerepeats" : true, -----是否忽略stepstops參數(shù),true表示所有repeat都挖空,false表示stepstops內(nèi)的step不挖空 "stepstops" : "" -----遇見輸入的step名字,則不挖空,step之間用,號(hào)隔開 } |
返回
true成功,false 失敗
◆ script_remove_negtive()
gkl_json script_remove_negtive(const gkl_json & param,gkl_string & errorStr )
層去負(fù),所有影響層生效
參見
返回
true成功,false 失敗
◆ script_repeat_to_entitys()
gkl_json script_repeat_to_entitys(const gkl_json & param,gkl_string & errorStr )
repeat元素實(shí)體化
參見
參數(shù)
[in]json { "append" : true, ----實(shí)體是否是追加方式,true 追加,false覆蓋已有層 "del_repeat":false, ----是否刪除repeat "step":"set", ----實(shí)體化哪個(gè)step "des_suffix" : "_ent", ----目標(biāo)層名字后綴名 "ignore_steps" : [ "edit", "orig" ] ----忽略repeat中引用的step名字,多個(gè)step, "src_layer" : ["ko","tl","bl"] ----原始層,數(shù)組 } |
返回
true成功,false 失敗
◆ script_same_feature_replaced_by_symbol()
gkl_json script_same_feature_replaced_by_symbol(const gkl_json & params,gkl_string & errorStr )
替換相似元素為指定PAD
參見
script_same_feature_replaced_by_symbol()
參數(shù)
[in]string光圈名字
返回
true成功,false 失敗
◆ script_transform()
gkl_json script_transform(const gkl_json & param,gkl_string & errorStr )
矩陣變換,選中元素矩陣變換,未選中元素針對(duì)層內(nèi)所有元素,所有影響層都生效
參見
參數(shù)
[in]json { "copy" : false, ----是否復(fù)制 |
"rotate" : false, ----是否旋轉(zhuǎn),true允許旋轉(zhuǎn),false不允許 "angle" : 0, ----順時(shí)針旋轉(zhuǎn)角度,角度制
"center" : { ----旋轉(zhuǎn)和縮放的中心坐標(biāo),單位跟隨系統(tǒng)設(shè)置 "x" : 0.0, "y" : 0.0 }, "offsetx" : 0.0, ----偏移值 "offsety" : 0.0, "scale" : false, ----是否縮放,true允許縮放,false不允許縮放 "scalex" : 1.0, ---- x方向和y方向縮放值 "scaley" : 1.0, "xmirror" : true, ---- 左右翻轉(zhuǎn) "ymirror" : false ---- 上下翻轉(zhuǎn) }
返回
true成功,false 失敗
◆ script_undo()
gkl_json script_undo(const gkl_json & params,gkl_string & errorStr )
回退
參見
參數(shù)
[in]string刪除屬性的key名稱
返回