This website requires JavaScript.

图元模块
2022-09-13 17:40 2224 0

函数

gkl_json script_begin_add_feature (const gkl_json &param, gkl_string &errorStr) 加PAD 更多...

 gkl_json script_end_add_feature (const gkl_json &param, gkl_string &errorStr) gkl_json script_add_pad (const gkl_json &param, gkl_string &errorStr) 加PAD 更多...

 gkl_json script_add_segment (const gkl_json &param, gkl_string &errorStr) 加线 更多...

 gkl_json script_add_arc (const gkl_json &param, gkl_string &errorStr) 加弧 更多...

 gkl_json script_add_polygon (const gkl_json &param, gkl_string &errorStr) 加多边形 更多...

 gkl_json script_add_txt (const gkl_json &param, gkl_string &errorStr) 加文字 更多...

 gkl_json script_erase_features (const gkl_json &param, gkl_string &errorStr) 删除所有选中的feature 更多...

 gkl_json script_feature_to_surface (const gkl_json &param, gkl_string &errorStr) 将所有选中的feature转成多边形 更多...

 gkl_json script_feature_to_outline (const gkl_json &param, gkl_string &errorStr) 将所有选中的feature提取轮廓线 更多...

 gkl_json script_polyline_to_surface (const gkl_json &param, gkl_string &errorStr) 轮廓线转多边形 更多...

 gkl_json script_array_features (const gkl_json &param, gkl_string &errorStr) 矩形阵列复制所有选中的feature 更多...

 gkl_json script_rotate_array_features (const gkl_json &param, gkl_string &errorStr) 圆形阵列复制所有选中的feature 更多...

 gkl_json script_polyline_offset (const gkl_json &param, gkl_string &errorStr) 连续线偏移所有选中的feature 更多...

 详细描述

函数说明

◆ script_add_arc()

gkl_json script_add_arc(const gkl_json & param,gkl_string & errorStr )

加弧

参见

script_add_arc()

参数

[in]json    {
    "symbol":"r500",            ----symbol的名字, 英制 尺寸表示mil,公制 尺寸表示um
    "polarity":true,        ----正性 true,负性 false
    "start":                ----起点
        {
            "x":0.0,
            "y":0.125
        },
    "end":                  ----终点
        {
            "x":1.2,
            "y":-0.3
        },
    "center":               ----圆心
        {
            "x":0.5,
            "y":0.5
        },
    "ccw":true,             ----逆时针 true,顺时针 false
    "attribute":
        {
            ".drill":"plated"
        }
    }

返回

true成功,false 失败

◆ script_add_pad()

gkl_json script_add_pad(const gkl_json & param,gkl_string & errorStr )

加PAD

参见

script_add_pad()

参数

[in]json    {
        "symbol":"r500,r400",           ----symbol的名字, 英制 尺寸表示mil,公制 尺寸表示um
        "polarity":true,        ----正性 true,负性 false
        "angle":0,              ----PAD旋转角度,整数 [0-360),逆时针旋转角度, 整型
        "mirrx":false,          ----PAD是否x镜像
        "mirry":false,          ----PAD是否y镜像
        "position":             ----PAD的中心坐标
                {
                    "x":50,             ----x坐标
                    "y":60              ----y坐标
                }
        "detx":0,           ----两个PAD之间x向距离
        "dety":0,           ----两个PAD之间y向距离
        "nx":1,             ----x向数目  整型
        "ny":1              ----y向数目  整型

"attribute": { ".drill":"plated" ----属性 } }

返回

  true成功,false 失败

◆ script_add_polygon()

gkl_json script_add_polygon(const gkl_json & param,gkl_string & errorStr )

加多边形

参见

script_add_polygon()

参数

[in]json    {
        "polarity":true,        ----正性 true,负性 false

"attribute":{} "coords": [ {"x":0,"y":0}, {"x":0.5,"y":0}, {"x":0.5,"y":0.5}, {"x":0,"y":0.5} ] }

返回

  true成功,false 失败

◆ script_add_segment()

gkl_json script_add_segment(const gkl_json & param,gkl_string & errorStr )

加线

参见

script_add_segment()

参数

[in]json    {
        "symbol":r500,          ----symbol的名字, 英制 尺寸表示mil,公制 尺寸表示um
        "polarity":true,        ----正性 true,负性 false
        "start":                ----起点
            {
                "x":0,
                "y":0.125
            },
        "end":                  ----终点
            {
                "x":1.2,
                "y":-0.3
            },
        "attribute":
            {
            ".drill":"plated"
            }
    }

返回

true成功,false 失败

◆ script_add_txt()

gkl_json script_add_txt(const gkl_json & param,gkl_string & errorStr )

加文字

参见

script_add_txt()

参数

[in]json    {
        "barcode":71,               ----二维码形式,71 与 genesis2000二维码统一, 58 表示常见的QRCODE
                                        -1表示为正常字符,其余请参考编码文件, 二维码方式,font字段,mirror字段 linewidth字段无意义,width无意义
        "pos.x":23.6,               ----文本坐标
        "pos.y":5.2,    
        "font":"standard",          ----字体
        "polarity":true,            ----正性 true,负性 false
        "angle":45,                 ----文本角度
        "mirror":false,             ----镜像
        "linewidth":0.005,          ----线宽
        "height":0.023,             ----文字高
        "width":0.023,              ----单个文字宽
        "text":"$$job_$$LAYER"      --- 文本内容
    }

返回

true成功,false 失败

◆ script_array_features()

gkl_json script_array_features(const gkl_json & param,gkl_string & errorStr )

矩形阵列复制所有选中的feature

参见

script_array_features()

参数

[in]json    {
    "xnum":3,       --x方向复制的个数
    "ynum":3,       --y方向复制的个数
    "xoffset":0.3,      --x方向复制体的间隔距离
    "yoffset":0.3       --y方向复制体的间隔距离

}

返回

  true成功,false 失败

◆ script_begin_add_feature()

gkl_json script_begin_add_feature(const gkl_json & param,gkl_string & errorStr )

加PAD

参见

script_begin_add_feature() script_end_add_feature() 大批量追加元素时,可以使用这个两个函数将追加元素的接口包起来,可加速调用

参数

[in]json

返回

true成功,false 失败

◆ script_erase_features()

gkl_json script_erase_features(const gkl_json & param,gkl_string & errorStr )

删除所有选中的feature

参见

script_erase_features()

返回

true成功,false 失败

◆ script_feature_to_outline()

gkl_json script_feature_to_outline(const gkl_json & param,gkl_string & errorStr )

将所有选中的feature提取轮廓线

参见

script_feature_to_outline()

返回

true成功,false 失败

◆ script_feature_to_surface()

gkl_json script_feature_to_surface(const gkl_json & param,gkl_string & errorStr )

将所有选中的feature转成多边形

参见

script_feature_to_surface()

返回

true成功,false 失败

◆ script_polyline_offset()

gkl_json script_polyline_offset(const gkl_json & param,gkl_string & errorStr )

连续线偏移所有选中的feature

参见

script_polyline_offset()

参数

[in]json{
"start_x":3.0,      --偏移向量起点x坐标
"start_y":3.0,      --偏移向量起点y坐标
"end_x":3.0,        --偏移向量终点x坐标
"end_y":3.0,        --偏移向量终点y坐标
"src_delete":true       --是否删除源
}

返回

true成功,false 失败

◆ script_polyline_to_surface()

gkl_json script_polyline_to_surface(const gkl_json & param,gkl_string & errorStr )

轮廓线转多边形

参见

script_polyline_to_surface()

返回

true成功,false 失败

◆ script_rotate_array_features()

gkl_json script_rotate_array_features(const gkl_json & param,gkl_string & errorStr )

圆形阵列复制所有选中的feature

参见

script_rotate_array_features()

参数

[in]json    {
    "center_x":3.0,     --圆心x坐标
    "center_y":3.0,     --圆心y坐标
    "start_x":3.0,      --起始点x坐标
    "start_y":3.0,      --起始点y坐标
    "end_x":3.0,        --终点x坐标
    "end_y":3.0,        --终点y坐标
    "anglestep":3,          --圆形阵列角度步长
    "ccw":true                  --圆形阵列顺逆时针
    }

返回

true成功,false 失败


互动评论 0

注意:此留言仅作为嘉立创与客户日常交流之用,回复不是很及时,急切问题请联系我司工作人员处理!
登录注册 后才可以留言哦!