选择模块
更新时间:2024-12-12 17:09
13896
0
文档错误过时,
我要反馈
13896
函数gkl_json script_filter_select (const gkl_json ¶m, gkl_string &errorStr) 过滤选择 更多... gkl_json script_set_filter_param (const gkl_json ¶m, gkl_string &errorStr) 设置过滤选择参数 更多... gkl_json script_reset_filter_param (const gkl_json ¶m, gkl_string &errorStr) 重置过滤选择参数,参数复位 更多... gkl_json script_reference_select (const gkl_json ¶m, gkl_string &errorStr) 参考选择 更多... gkl_json script_clear_selection (const gkl_json ¶m, gkl_string &errorStr) 清空选中元素 更多... gkl_json script_select_features (const gkl_json ¶m, gkl_string &errorStr) 选中指定的feature 更多... gkl_json script_rect_select (const gkl_json ¶m, gkl_string &errorStr) 框选feature 更多... gkl_json script_line_select (const gkl_json ¶m, gkl_string &errorStr) 线选feature 更多... gkl_json script_polygon_select (const gkl_json ¶m, gkl_string &errorStr) 多边形选 更多... gkl_json script_reverse_select (const gkl_json ¶m, gkl_string &errorStr) 反选 更多... |
详细描述
函数说明
◆ script_clear_selection()
gkl_json script_clear_selection(const gkl_json & param,gkl_string & errorStr )
清空选中元素
参见
返回
◆ script_filter_select()
gkl_json script_filter_select(const gkl_json & param,gkl_string & errorStr )
过滤选择
参见
参数
[in]json {
"aperture_passed" : "r5,r10", ----通过光圈,光圈之间用逗号,分开
"aperture_unpassed" : "r4,r1", ----不通过光圈
"append" : false, ----是否追加选择
"enable_attibute":true, ----true开启属性过滤,false关闭属性过滤
"attribute":{".drill":"plated"}, ----属性匹配项,参数非必填项
"board" : 0, ----过滤范围:0为全部元素 1为板内元素 2为板外元素
"in_selected" : false, ----当前选择是否针对现有选择集,true针对所有元素,false只针对选中的元素过滤
"filter_neg" : true, ----负性元素
"filter_pos" : true, ----正性元素
"filter_arc" : true, ----弧线类型,true为通过,false不通过
"filter_dim" : true, ----标注类型
"filter_pad" : true, ----PAD类型
"filter_segment" : true, ----线段类型
"filter_surface" : true, ----surface类型
"filter_rout":true, ----锣带类型
"filter_txt" : true ----文本类型
}
|
返回
◆ script_line_select()
gkl_json script_line_select(const gkl_json & param,gkl_string & errorStr )
线选feature
参见
参数
[in]json {
"start":
{
"x":0.0,
"y":0.0
},
"end":
{
"x":20.0,
"y":-12.5
},
"select_status":0 ------0 选中当前,其他取消选择,1、追加选择 2、取消选中元素
}
|
返回
◆ script_polygon_select()
gkl_json script_polygon_select(const gkl_json & param,gkl_string & errorStr )
多边形选
参见
参数
[in]json {
"polygon":
[
{"x":0.0,"y":0.0},
{"x":0.0,"y":1.0},
{"x":2.0,"y":0.0},
]
,
"select_status":0 ------0 选中当前,其他取消选择,1、追加选择 2、取消选中元素
}
|
返回
◆ script_rect_select()
gkl_json script_rect_select(const gkl_json & param,gkl_string & errorStr )
框选feature
参见
参数
[in]json {
"left":0.2, ------矩形选择范围
"right":0.3,
"bottom":0.6,
"top":1.2,
"repeat":fasle, ------true 只选择repeat,false只选择层中 feature
"cross":false, ------true 交叠选 false包含选
"select_status":0 ------0 选中当前,其他取消选择,1、追加选择 2、取消选中元素
}
|
返回
◆ script_reference_select()
gkl_json script_reference_select(const gkl_json & param,gkl_string & errorStr )
参考选择
参见
参数
[in]json参考被选中的元素,用户需要设置过滤选项实现 {
"mode" : 1, ---- 1为 覆盖,2为接触 3为未接触 4为 被包含
"refstep" : "edit" -----参考层所在step名字
"reflayer" : ["ts","bs"], -----参考层数组
"include_aperture" : "", ---- 包含 symbol 中间用逗号分开
"exclude_aperture" : "",
"filter_pos" : true, ---- 正性元素是否参与参考 true参与,false不参与
"filter_neg" : true, ---- 负性元素是否参与参考 true参与,false不参与
|
"filter_arc" : true, ----弧线类型,true为通过,false不通过 "filter_dim" : true, ----标注类型 "filter_pad" : true, ----PAD类型 "filter_segment" : true, ----线段类型 "filter_surface" : true, ----surface类型 "filter_rout":true, ----锣带类型 "filter_txt" : true ----文本类型
"enable_attibute":true, ----true开启属性过滤,false关闭属性过滤
"attribute":{".drill":"plated"}, ----属性匹配项,参数非必填项
}
返回
◆ script_reset_filter_param()
gkl_json script_reset_filter_param(const gkl_json & param,gkl_string & errorStr )
重置过滤选择参数,参数复位
参见
参数
[in]json
◆ script_reverse_select()
gkl_json script_reverse_select(const gkl_json & param,gkl_string & errorStr )
反选
参见
返回
◆ script_select_features()
gkl_json script_select_features(const gkl_json & param,gkl_string & errorStr )
选中指定的feature
参见
参数
[in]array [
{"class":21,"id":1420},
{"class":17,"id":56324}
]
|
返回
◆ script_set_filter_param()
gkl_json script_set_filter_param(const gkl_json & param,gkl_string & errorStr )
设置过滤选择参数
参见
参数
[in]json





















