编辑模块
更新时间:2024-12-12 17:13
52411
0
文档错误过时,
我要反馈
52411
函数 |
gkl_json script_copy (const gkl_json ¶m, gkl_string &errorStr) 将选中元素本层复制 更多... |
gkl_json script_move (const gkl_json ¶m, gkl_string &errorStr) 将选中元素同层移动 更多... |
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) 将选中元素移动到指定层 更多... |
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元素实体化 更多... |
gkl_json script_remove_negtive (const gkl_json ¶m, gkl_string &errorStr) 层去负,所有影响层生效 更多... |
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) 矩阵变换,选中元素矩阵变换,未选中元素针对层内所有元素,所有影响层都生效 更多... |
gkl_json script_line_to_pad (const gkl_json ¶m, gkl_string &errorStr) 选中的元素或者影响层内,线段长度为0,光圈为round或者squre的线段,转成PAD 更多... |
gkl_json script_pad_to_line (const gkl_json ¶m, gkl_string &errorStr) 选中的元素或者影响层内,round和squre的PAD 转为线段 更多... |
gkl_json script_arc_to_line (const gkl_json ¶m, gkl_string &errorStr) 选中的元素或者影响层内,arc 打断为 线段 更多... |
gkl_json script_fill_pattern (const gkl_json ¶m, gkl_string &errorStr) FillPattern 根据选中多变形根据填充图形填充,只对工作层有效,不支持影响层 更多... |
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) 回退 更多... |
详细描述
函数说明
◆ script_arc_to_line()
gkl_json script_arc_to_line(const gkl_json & param,gkl_string & errorStr )
选中的元素或者影响层内,arc 打断为 线段
参见
参数
[in]<pre>{ "smoothstep" : 0.1 --弧打断线的细分步长 }
返回
true成功,false 失败
◆ script_change_symbol()
gkl_json script_change_symbol(const gkl_json & params,gkl_string & errorStr )
选中元素替换光圈
参见
参数
[in]string光圈名字
返回
◆ script_contourize()
gkl_json script_contourize(const gkl_json & param,gkl_string & errorStr )
合并多边形
参见
参数
[in]json {
"pinhole" : 0.2 ----去除小内洞,当合并后的多边形中有小于该尺寸的内洞,全部剔除
}
|
返回
true成功,false 失败
◆ script_copy()
gkl_json script_copy(const gkl_json & param,gkl_string & errorStr )
将选中元素本层复制
参见
参数
[in]json {
"detx":0.2, --- 拷贝坐标x偏移
"dety":-0.3 --- 拷贝坐标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()
参数
[in]json {
"affactted":false, --- 是否开启影响层模式拷贝
"change_polarity" : false, --- 是否修改极性,正转负,负则转正
"des_layer" : "tt", --- 层名
"des_step" : "edit", --- step名字
"resize" : 0.5 --- 放大数,整体放大尺寸
}
|
返回
true成功,false 失败
◆ script_explode()
gkl_json script_explode(const gkl_json & param,gkl_string & errorStr )
打散选中的feature
参见
参数
[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()
参数
[in]json{ "drill":"plated" }
返回
◆ script_feature_recoup()
gkl_json script_feature_recoup(const gkl_json & params,gkl_string & errorStr )
将选中元素本层涨缩feature_recoup
参见
参数
[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()
参数
[in]string删除属性的key名称
返回
◆ script_feature_replace_attribute()
gkl_json script_feature_replace_attribute(const gkl_json & params,gkl_string & errorStr )
将选中元素替换属性
参见
script_feature_replace_attribute()
参数
[in]jsonnull 或者 object null表示清空属性, object表示替换属性
返回
◆ script_fill_lines()
gkl_json script_fill_lines(const gkl_json & param,gkl_string & errorStr )
线填充
参见
参数
[in]json {
"outlw" : 5.0 ----填线线宽
}
|
返回
true成功,false 失败
◆ script_fill_pattern()
gkl_json script_fill_pattern(const gkl_json & param,gkl_string & errorStr )
FillPattern 根据选中多变形根据填充图形填充,只对工作层有效,不支持影响层
参见
参数
[in]json {
"fillpat" : "square" -----图形填充,填充pat名称
}
|
返回
true成功,false 失败
◆ script_line_to_pad()
gkl_json script_line_to_pad(const gkl_json & param,gkl_string & errorStr )
选中的元素或者影响层内,线段长度为0,光圈为round或者squre的线段,转成PAD
参见
参数
[in]<pre>
返回
true成功,false 失败
◆ script_move()
gkl_json script_move(const gkl_json & param,gkl_string & errorStr )
将选中元素同层移动
参见
参数
[in]json {
"detx":0.2, ---x向移动值
"dety":-0.3 ---y向移动值
}
|
返回
true成功,false 失败
◆ script_move_to_other_layer()
gkl_json script_move_to_other_layer(const gkl_json & param,gkl_string & errorStr )
将选中元素移动到指定层
参见
move_to_other_layer()
参数
[in]json {
"change_polarity" : false, --- 是否修改极性,正转负,负则转正
"des_layer" : "tt", --- 层名
"des_step" : "edit", --- step名字
"resize" : 0.5 --- 放大数,整体放大尺寸
}
|
返回
true成功,false 失败
◆ script_pad_to_line()
gkl_json script_pad_to_line(const gkl_json & param,gkl_string & errorStr )
选中的元素或者影响层内,round和squre的PAD 转为线段
参见
参数
[in]<pre>
返回
true成功,false 失败
◆ script_profile_fill()
gkl_json script_profile_fill(const gkl_json & params,gkl_string & errorStr )
替换相似元素为指定PAD
参见
参数
[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尺寸不能超过该值
"profilemarginy" : 0.0,
"profilemarginymax" : 2540.0,
"repeatmarginx" : 0.0, -----repeat内缩距离
"repeatmarginxmax" : 0.0, -----repeat内缩最大值
"repeatmarginy" : 0.0,
"repeatmarginymax" : 0.0,
"ignorerepeats" : true, -----是否忽略stepstops参数,true表示所有repeat都挖空,false表示stepstops内的step不挖空
"stepstops" : "" -----遇见输入的step名字,则不挖空,step之间用,号隔开
}
|
返回
true成功,false 失败
◆ script_remove_negtive()
gkl_json script_remove_negtive(const gkl_json & param,gkl_string & errorStr )
层去负,所有影响层生效
参见
返回
true成功,false 失败
◆ script_repeat_to_entitys()
gkl_json script_repeat_to_entitys(const gkl_json & param,gkl_string & errorStr )
repeat元素实体化
参见
参数
[in]json {
"append" : true, ----实体是否是追加方式,true 追加,false覆盖已有层
"del_repeat":false, ----是否删除repeat
"step":"set", ----实体化哪个step
"des_suffix" : "_ent", ----目标层名字后缀名
"ignore_steps" : [
"edit",
"orig"
] ----忽略repeat中引用的step名字,多个step,
"src_layer" : ["ko","tl","bl"] ----原始层,数组
}
|
返回
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()
参数
[in]string光圈名字
返回
true成功,false 失败
◆ script_transform()
gkl_json script_transform(const gkl_json & param,gkl_string & errorStr )
矩阵变换,选中元素矩阵变换,未选中元素针对层内所有元素,所有影响层都生效
参见
参数
[in]json {
"copy" : false, ----是否复制
|
"rotate" : false, ----是否旋转,true允许旋转,false不允许 "angle" : 0, ----顺时针旋转角度,角度制
"center" : { ----旋转和缩放的中心坐标,单位跟随系统设置
"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, ---- 左右翻转
"ymirror" : false ---- 上下翻转
}
返回
true成功,false 失败
◆ script_undo()
gkl_json script_undo(const gkl_json & params,gkl_string & errorStr )
回退
参见
参数
[in]string删除属性的key名称
返回
- PCB帮助文档
- SMT帮助文档
- 钢网帮助文档
- PCB讨论
- SMT讨论
- 钢网讨论





















