import { type } from "os";

declare class TopCamGenCom {
    constructor(p?:{cam_type?:'genesis'|'incam'='genesis', error_handle?:0|1=1});
    /**
     * 获取当前料号
     * @returns 返回当前料号名
     */
    currentJob():string;

    /**
     * 获取当前工作层
     * @returns 返回当前工作层名
     */
    getWorkLayer():string;

    /**
     * 获取当前影响层
     * @returns 返回当前影响层
     */
    getAffectLayer(): string[];

    /**
     * 获取当前显示的层
     * @returns 返回当前显示的层
     */
    getDispLayers():string[];

    /**
     * 获取所有`genesis`料号列表
     * @returns 返回料号列表
     */
    getJobList():string[];

    /**
     * 获取当前`genesis`登录用户名
     * @returns 返回当前登录用户名
     */
    getUserName():string;

    /**
     * 获取指定料号所在路径
     * @returns 返回料号所在路径
     * @example 
     * var getJobPath = $.gen.getJobPath({job:jobname});
     */
    getJobPath(object:object):string;

    /**
     * 获取指定料号所属DB,暂不支持incam
     * @returns 返回料号所属DB
     * @example 
     * var getJobDbName = $.gen.getJobDbName({job:jobname});
     */
    getJobDbName(object:object):string;

    /**
     * 判断料号是不是存在
     * @returns 返回真 或者 假
     * @example 
     * var isJobExists = $.gen.isJobExists({job:jobname});
     */
    isJobExists(object:object):boolean;

    /**
     * 判断料号是不是被打开 
     * @returns 返回真 或者 假
     * @example 
     * var isJobOpen = $.gen.isJobOpen({job:jobname});
     */
    isJobOpen(object:object):boolean;

    /**
     * 创建一个新料号 
     * @returns 返回exists(料号存在） or 1（创建成功）
     * @example 
     * var createJob = $.gen.createJob({name:'aa',db:'genesis'});
     */
    createJob(p:{name:string,db:string}):string;

    /**
     * 打开一个存在的料号 
     * @returns 无
     * @example 
     * $.gen.openJob({job:jobname});
     */
    openJob(p:{job:string,update_clipboard?: 'view_job'|''}):void;

    /**
     * 关闭一个打开的料号 
     * @returns 真 或者 假
     * @example 
     * var closeJob = $.gen.closeJob({job:jobname});
     */
    closeJob(p:{job:string}):boolean;

    /**
     * 删除一个存在的料号，如果料号是打开的， 将自动关闭 
     * @returns 真 或者 假
     * @example 
     * var deleteJob = $.gen.deleteJob({job:jobname});
     */
    deleteJob(p:{job:string}):boolean;

    /**
     * 删除一个存在的step，如果不存在将返回0 
     * @returns 真 或者 假
     * @example 
     * var deleteStep = $.gen.deleteStep({job:jobname,step:stepname});
     */
    deleteStep(p:{job:string,step:string}):boolean;

    /**
     * 导入一个`odb++`料号 
     * @returns 真 或者 假
     * @example 
     * var importJob = $.gen.importJob({db:'genesis',path:'/tmp/aaa.tgz',name:jobname,analyze_surfaces:'yes'});
     */
    importJob(p:{db:string,path:string,name:string,analyze_surfaces:string}):boolean;

    /**
     * 列举所有genesis中打开的料号 
     * @returns 料号列表和打开的用户(数组或数组引用)
     * @example 
     * var listOpenJobs = $.gen.listOpenJobs();
     */
    listOpenJobs():T[];

    /**
     * 创建一个step 
     * @returns 真 或者 假
     * @example 
     * var createStep = $.gen.createStep({job:jobname,name:stepname});
     */
    createStep(p:{job:string,name:string}):boolean;

    /**
     * 检查step是不是存在 
     * @returns 真 或者 假
     * @example 
     * var isStepExists = $.gen.isStepExists({job:jobname,step:stepname});
     */
    isStepExists(p:{job:string,step:string}):boolean;

    /**
     * 取得指定料号所有step名字 
     * @returns step列表
     * @example 
     * var getStepList = $.gen.getStepList({job:jobname});
     */
    getStepList(p:{job:string}):T[];

    /**
     * 打开一个step 
     * @returns 真 或者 假
     * @example 
     * var openStep = $.gen.openStep({job:jobname,name:stepname});
     */
    openStep(p:{job:string,name:string,iconic?:'no'|'yes'}):boolean;

    /**
     * 设置当前工作group 
     * @returns 无
     * @example 
     * $.gen.setGroup({group:group});
     */
    setGroup(p:{group:number}):void;

    /**
     * 取得指定料号的matrix信息 
     * @returns matrix信息
     * @example 
     * var getMatrix = $.gen.getMatrix({job:jobname});
     */
    getMatrix(p:{job:string,type?:'hash'|'array'='hash',layer?:string}):object;

    /**
     * 在matrix中增加一个层 
     * @param after将优先于before
     * @returns 无
     * @example 
     * $.gen.matrixAddLayer({job:jobname,layer:name,type:'signal',context:'board',polarity:'positive',before:'l1'});
     */
    matrixAddLayer(p:{job:string,layer:string,type:string,context:string,polarity:string,row:number,after:string,before:string}):void;

    /**
     * 在matrix中移动指定的行(或者层)到相应的位置(ins_row,after,before) 
     * @param row将优先于layer
     * @param ins_row将优先于after，after将优先于before
     * @returns 无
     * @example 
     * $.gen.matrixMoveRow({job:jobname,layer:name,before:'l1'});
     */
    matrixMoveRow(p:{job:string,layer:string,row:number,ins_row:number,after:string,before:string}):void;

    /**
     * 在matrix中增加一个Step  
     * @param after将优先于before
     * @returns 无
     * @example 
     * $.gen.matrixAddStep({job:jobname,step:step,before:'pcb'});
     */
    matrixAddStep(p:{job:string,layer:string,after:string,before:string}):void;

    /**
     * 在matrix中删除一个Step  
     * @returns 无
     * @example 
     * $.gen.matrixDeleteStep({job:jobname,step:step});
     */
    matrixDeleteStep(p:{job:string,step:string}):void;

    /**
     * 在matrix中Copy一个Step  
     * @param after将优先于before
     * @returns 无
     * @example 
     * $.gen.matrixCopyStep({job:jobname,step:step,new_name:'net'});
     */
    matrixCopyStep(p:{job:string,step:string,new_name:string,after:string,before:string}):void;

    /**
     * 在matrix中Copy一个Layer  
     * @param after将优先于before
     * @returns 无
     * @example 
     * $.gen.matrixCopyLayer({job:jobname,layer:layer,new_name:'new_layer'});
     */
    matrixCopyLayer(p:{job:string,layer:string,new_name:string,after?:string,before?:string,type?:'signal'|'solder_mask',context?:'board'|'misc',polarity?:'positive'|'negative'}):void;

    /**
     * 打开指定料号的matrix编辑窗口
     * @returns 无
     * @example 
     * $.gen.openMatrix({job:jobname});
     */
    openMatrix(p:{job:string}):void;

    /**
     * 刷新指定料号的matrix信息
     * @returns 无
     * @example 
     * $.gen.matrixRefresh({job:jobname});
     */
    matrixRefresh(p:{job:string}):void;

    /**
     * 设定指定层的matrix信息
     * @returns 无
     * @example 
     * $.gen.matrixLayerAttr({job:jobname,layer:layername,type:'drill'});
     */
    matrixLayerAttr(p:{job:string,layer?:string|T,type?:string,context?:string,polarity?:string}):void;

    /**
     * 设定钻孔层的开始与结束
     * @returns 无
     * @example 
     * $.gen.matrixLayerDrill({job:jobname,layer:layername,start:startlayer,end:endlayer});
     */
    matrixLayerDrill(p:{job:string,layer:string,start:string,end:string}):void;

    /**
     * 根据matrix，计算出板子的层数
     * @returns 层数
     * @example 
     * var getLayerCount = $.gen.getLayerCount({job:jobname});
     */
    getLayerCount(p:{job:string}):number;

    /**
     * 取得drill tool manage 中的所有钻孔信息
     * @returns drill信息(array or hash)
     * @example 
     * var getTool = $.gen.getTool({job:jobname,step:step,layer:layer});
     */
    getTool(p:{job:string,step:string,layer:string,type?:'hash'|"array",hashkey?:'num'|"count",units?:'inch'|"mm"}):any;

    /**
     * 设置drill tool manage 中参数（只有当genesis ver > 9.1才有效）
     * @returns 无
     * @example 
     * $.gen.toolSet({job:jobname,step:step,layer:layer,slots:'by_length'});
     */
    toolSet(p:{job:string,step:string,layer:string,thickness?:string,user_params?:string,slots?:'by_length'}):void;

    /**
     * 输出PostScript格式
     * @returns 无
     * @example 
     * $.gen.outputPostScript({job:'demo',step:'pcb',layer:'drawing',dir_path:'d:/test/',layer_params:{angle:90,mirror:'yes',x_scale:1,yscale:1,..},outpu_params:{break_symbols:'yes',break_arc:'no',surface_mode:'fill',...}});
     */
    outputPostScript(p:{job:string,step:string,layer:string,dir_path:string,layer_params:object,output_params:object}):void;

    /**
     * 输出RS274X格式
     * @returns 无
     * @example 
     * $.gen.outputRs274x({job:'demo',step:'pcb',layer:'drawing',dir_path:'d:/test/',layer_params:{angle:90,mirror:'yes',x_scale:1,yscale:1,..},outpu_params:{break_symbols:'yes',break_arc:'no',surface_mode:'fill',...}});
     */
    outputRs274x(p:{job:string,step:string,layer:string,dir_path:string,layer_params:object,output_params:object}):void;

    /**
     * 输出DXF格式
     * @returns 无
     * @example 
     * $.gen.outputDxf({job:'demo',step:'pcb',layer:'drawing',dir_path:'d:/test/',layer_params:{angle:90,mirror:'yes',x_scale:1,yscale:1,..},outpu_params:{break_symbols:'yes',break_arc:'no',surface_mode:'fill',...}});
     */
    outputDxf(p:{job:string,step:string,layer:string,dir_path:string,layer_params:object,output_params:object}):void;

    /**
     * 检查层是否存在 
     * @returns 存在返回1，不存在返回0
     * @example 
     * var isLayerExists = $.gen.isLayerExists({job:jobname,layer:layer});
     */
    isLayerExists(p:{job:string,layer:string}):boolean;    

    /**
     * 创建一个新层 
     * @returns 无
     * @example 
     * $.gen.createLayer({job:'demo',layer:'drawing',conext:'board',type:'document'});
     */
    createLayer(p:{job:string,layer:string,conext?:'misc'|'board',type?:'signal'|'document',before?:string,after?:string,delete_exists ?:'no'|'yes'}):void;  

    /**
     * 在step上删除一层 
     * @returns 无
     * @example 
     * $.gen.deleteLayer({job:'Job',layer:'tmp',step:'step'});
     * $.gen.deleteLayer({job:'Job',layer:['tmp','tmp2']});
     * $.gen.deleteLayer({job:'Job',layer:['~^tmp']});
     */
    deleteLayer(p:{job:string,layer:string}):void;  

    /**
     * 获取层图形范围 
     * @returns ｛xmin:?, ymin:?,xmax:?,ymax:?,xsize:?,ysize:?｝
     * @example 
     * var getLayerLimits = $.gen.getLayerLimits({job:'demo',step:'pcb',layer:'drawing',units:'mm'});
     */
    getLayerLimits(p:{job:string,step:string,layer:string,units?:'inch'|'mm'}):object;    

    /**
     * 获取Symbol范围 
     * @returns ｛xmin:?, ymin:?,xmax:?,ymax:?,xsize:?,ysize:?｝
     * @example 
     * var getSymbolLimits = $.gen.getSymbolLimits({job:'demo',symbol:'symbol1',units:'mm'});
     */
    getSymbolLimits(p:{job:string,symbol:string,units?:'inch'|'mm'}):object;    

    /**
     * 获取profile范围 
     * @returns ｛xmin:?, ymin:?,xmax:?,ymax:?,xsize:?,ysize:?｝
     * @example 
     * var getProfileLimits = $.gen.getProfileLimits({job:'demo',step:'pcb',units:'mm'});
     */
    getProfileLimits(p:{job:string,step:string,units?:'inch'|'mm'}):object;    

    /**
     * 设置影响层
     * @returns 无
     * @example 
     * $.gen.affectedLayer({affected:'no',mode:'all'});
     * $.gen.affectedLayer({affected:'yes',mode:'single',layer:['l1','l2','l3','l4'],clear_before:'yes'});
     */
    affectedLayer(p:{affected:'no'|'yes',mode:'all'|'single',layer:string,clear_before?:'yes'|'no'}):void;    

    /**
     * 获取选择的Feature总数 
     * @returns 返回选择上的Feature总数
     * @example 
     * var getSelectCount = $.gen.getSelectCount();
     */
    getSelectCount():number; 

    /**
     * 将选择的Feature复制到另一层
     * @returns 无
     * @example 
     * $.gen.selCopyOther({dest:'layer_name',target_layer:'temp',invert:'no',dx:0,dy:0,size:0});
     */
    selCopyOther(p:{dest:'affected_layers'|'layer_name',target_layer:string,invert:string,dx:number,dy:number,size:number}):void;    


    /**
     * 将选择的Feature移到另一层
     * @returns 无
     * @example 
     * $.gen.selMoveOther({target_layer:'temp',invert:'no',dx:0,dy:0,size:0});
     */
    selMoveOther(p:{target_layer:string,invert:string,dx:number,dy:number,size:number}):void;
    
    /**
     * 清除层显示
     * @returns 无
     * @example 
     * $.gen.clearLayers();
     */
    clearLayers():void;
    
    /**
     * 设置当前工作层
     * @returns 无
     * @example 
     * $.gen.workLayer({name:'l1',display_number:2,clear_before:'yes'});
     */
    workLayer(p:{name:string,display_number:number,clear_before:'yes'|'no'}):void;

    /**
     * 放大缩小显示
     * @returns 无
     * @example 
     * $.gen.zoomArea({x1:1,x2:1,y1:2,y2:3});
     */
    zoomArea(p:{x1:number,x2:number,y1:number,y2:number}):void;

    /**
     * 设置当前单位
     * @returns 无
     * @example 
     * $.gen.units({type:'mm'});
     */
    units(p:{type:'inch'|'mm'}):void;

    /**
     * 通过选择过滤器进行选择Feature
     * @returns 无
     * @example 
     * $.gen.selectByFilter({feat_types:'pad\;text',polarity:'positive',include_syms:'r100;r200',exclude_syms:'s200,s100',attribute:[{attribute:'.drill',option:'plated'}],profile:'all'});
     */
    selectByFilter(p:{feat_types:'text'|'pad\;text',polarity:'positive'|'positive\;negative',include_syms:string,exclude_syms:string,attribute: '.smd'|[{attribute:'.drill',option:'plated'}],profile:'all'|'in'|'out',area_rect?:{x1:?,y1:?,x2:?,y2:?},filter_name?:string,operation?:string,area_type?:string}):void;

    /**
     * 通过选择过滤器进行高亮Feature
     * @returns 无
     * @example 
     * $.gen.highlightByFilter({feat_types:'pad\;text',polarity:'positive',include_syms:'r100;r200',exclude_syms:'s200,s100',attribute:[{attribute:'.drill',option:'plated'}],profile:'all'});
     */
    highlightByFilter(p:{feat_types:'text'|'pad\;text',polarity:'positive'|'positive\;negative',include_syms:string,exclude_syms:string,attribute: '.smd'|[{attribute:'.drill',option:'plated'}],profile:'all'|'in'|'out',filter_name?:string}):void;

    /**
     * 参考选择
     * @returns 无
     * @example 
     * $.gen.selRefFeat({layers:'l2',use:'filter',mode:'touch',f_types:'line\;arc',polarity:'positive',filter:{feat_types:'pad\;text'polarity:'positive',include_syms:'r100;r200',exclude_syms:'s200,s100',attribute:[{attribute:'.drill',option:'plated'}],}});
     */
    selRefFeat(p:{layers:string,use:'filter'|'select',mode:'touch'|'disjoint'|'cover'|'include',f_types:'pad'|'line\;arc',polarity:'positive'|'positive;\negative',filter:object}):void;

    /**
     * 设置选择过滤器
     * @returns 无
     * @example 
     * $.gen.filterSet({feat_types:'pad\;text',polarity:'positive',include_syms:'r100;r200',exclude_syms:'s200,s100',attribute:[{attribute:'.drill',option:'plated'}],profile:'all'});
     */
    filterSet(p:{feat_types:'text'|'pad\;text',polarity:'positive'|'positive\;negative',dcode:?,include_syms:string,exclude_syms:string,attribute: '.smd'|[{attribute:'.drill',option:'plated'}],profile:'all'|'in'|'out',filter_name?:string}):void;

    /**
     * check in ,check out 料号
     * @returns 如果mode:'test',返回checkout的用户
     * @example 
     * var checkInout = $.gen.checkInout({job:'demo',mode:'test'});
     */
    checkInout(p:{job:string,mode:'in'|'out'|'test',type?:'job'}):string;    

    /**
     * 保存料号
     * @returns 无
     * @example 
     * $.gen.saveJob({job:'demo'});
     */
    saveJob(p:{job:string,override?:'no'|'yes'}):void;    

    /**
     * 复制料号
     * @returns 无
     * @example 
     * $.gen.copyJob({source_job:'demo',dest_job:'demo1',dest_database:'genesis'});
     */
    copyJob(p:{source_job:string,dest_job:string,dest_database:string}):void;   

    /**
     * 复制层
     * @returns 无
     * @example 
     * $.gen.copyLayer({source_job:'org_job',source_step:'org',source_layer:'l1',dest_layer:'org_l1'});
     */
    copyLayer(p:{source_job:string,source_step:string,source_layer:string,dest_layer:string,mode?:'replace'|'append',invert?:'no'|'yes'}):void;   

    /**
     * 获取料号的checklist
     * @returns 返回checklist名称列表；['check1','check2']
     * @example 
     * var getChecklist = $.gen.getChecklist({job:'demo1',step:'pcb'});
     */
    getChecklist(p:{job:string,step:string}):t[];    

    /**
     * 从Lib中复制checklist
     * @returns 无
     * @example 
     * $.gen.chklistFromLib({chklist:'pcb_check'});
     */
    chklistFromLib(p:{chklist:string}):void;   

    /**
     * 创建checklist
     * @returns object
     * @example 
     * var createChklist = $.gen.createChklist({chklist:'drill_check_tmp',items:[drill_check : {name:'drill_check',nact:1,action:'valor_analysis_drill',erf:'SRC',params:{pp_layer:?}},]});
     */
    createChklist(p:{chklist:string,items:Array[]}):object;    

    /**
     * 检查checklist是否存在
     * @returns 存在返回1，不存在返回0
     * @example 
     * var isChklistExists = $.gen.isChklistExists({job:'demo1',step:'pcb',chklist:'pcb_check'});
     */
    isChklistExists(p:{job:string,step:string,chklist:string}):boolean;    

    /**
     * 显示checklist
     * @returns 存在返回1，不存在返回0
     * @example 
     * var chklistShow = $.gen.chklistShow({chklist:'pcb_check'});
     */
    chklistShow(p:{chklist:string}):boolean;  

    /**
     * 运行checklist
     * @returns 存在返回1，不存在返回0
     * @example 
     * var chklistRun = $.gen.chklistRun({chklist:'pcb_check'});
     */
    chklistRun(p:{chklist:string,nact?:'a'|'1...n',area?:'profile'|'local'|'global'}):boolean;  

    /**
     * 获取checklist运行结果
     * @returns 返回结果列表，如(  )
     * @example 
     * var getCheckMeas = $.gen.getCheckMeas({job:'demo',step:'pcb',chklist:'pcb_check',nact:2});
     */
    getCheckMeas(p:{job:string,step:string,chklist:string,nact:number,units?:'inch'|'mm',category?:?,severity?:?,layer?:?}):object;  

    /**
     * 运行单个dfm功能
     * @returns 无
     * @example 
     * $.gen.runSingleDfm({chklist:'valor_dfm_nfpr',params:{pp_layer : map_layer,pp_delete : 'Duplicate',},area : 'global',show : 'no',show_res:'no'});
     */
    runSingleDfm(p:{chklist:string,show?:'no'|'yes',area?:'profile'|'global'|'local',erf?:'Mil',params?:object,show_res?:'no'|'yes'}):void;   

    /**
     * 计算铜面积
     * @returns 返回hash{area:?,percent:?}
     * @example 
     * var copperArea = $.gen.copperArea({layer1:layer});
     */
    copperArea(p:{layer1:string,layer2?:'',drills?:'no',drills_source?:'matrix',thickness?:0,resolution_value?:1,x_boxes?:3,y_boxes?:3,area?:'no',x1?:0,x2?:0,y1?:0,y2?:0,dist_map?:'yes',f_type?:'all',out_file?:'',out_layer?:'first'}):object;  

    /**
     * 计算曝光面积
     * @returns 返回hash{area:?,percent:?}
     * @example 
     * var exposedArea = $.gen.exposedArea({layer1:layer,mask1:mask});
     */
    exposedArea(p:{layer1:string,mask1:string,consider_route:'yes'|'no',layer2?:'',mask1?:'',drills?:'no',drills_source?:'matrix',thickness?:0,resolution_value?:1,x_boxes?:3,y_boxes?:3,area?:'no',dist_map?:'yes',f_type?:'all'}):object;  


    /**
     * 把选择到的元素转成surface
     * @returns 无
     * @example 
     * $.gen.selContourize();
     */
    selContourize(p:{accuracy?:0,break_to_islands?:'yes',clean_hole_size?:0,clean_hole_mode?:'x_and_y'}):void;   

    /**
     * 窗口显示回到原始位置
     * @returns 无
     * @example 
     * $.gen.zoomHome();
     */
    zoomHome():void;   

    /**
     * 设置step尺寸
     * @returns 无
     * @example 
     * $.gen.panelSize({width:18,height:24});
     */
    panelSize(p:{width:number,height:number}):void;   

    /**
     * 拼版填铜
     * @returns 无
     * @example 
     * $.gen.srFill({layer:layer});
     */
    srFill(p:{layer:string,dest:'layer_name'|'affected_layers',polarity?:'positive'|'negative',type?:'solid'|'pattern',origin_type?:'datum'|'limits'}):void;   

    /**
     * 加一个pad到指定位置
     * @returns 无
     * @example 
     * $.gen.addPad({x:0,y:0,symbol:'r100'});
     */
    addPad(p:{x:number,y:number,symbol:string,polarity?:?,angle?:?,mirror?:?,nx?:?,ny?:?,dx?:?,dy?:?,xscale?:?,yscale?:?,attributes?:?}):void;   

    /**
     * 加一根线到指定位置
     * @returns 无
     * @example 
     * $.gen.addLine({xs:0,ys:0,xe:1,ye:1,symbol:'r100'});
     */
    addLine(p:{xs:number,ys:number,xe:number,ye:number,symbo:string,polarity?:?,attributes?:?}):void;   

    /**
     * 加弧到指定位置
     * @returns 无
     * @example 
     * $.gen.addArc({xc:0.7,yc:0.7,xs:0,ys:0,xe:1,ye:1,symbo:'r100'});
     */
    addArc(p:{xc:number,yc:number,xs:number,ys:number,xe:number,ye:number,symbo:string,polarity?:?,attributes?:?}):void;   

    /**
     * 元素坐标转换（不调用genesis命令）（mirror,shift,rotation)
     * @returns 返回{x:?,y:?}
     * @example 
     * var transCoordinate = $.gen.transCoordinate({x:0,y:0,cx:1,cy:1,mirror:'yes'});
     */
    transCoordinate(p:{x:number,y:number,cx:number,cy:number,angle:0|90|180|270,mirror?:'no'|'yes',shiftx?:0,shifty?:0}):object;  

    /**
     * 加text到指定位置
     * @returns 无
     * @example 
     * $.gen.addText({xc:0.7,yc:0.7,xs:0,ys:0,xe:1,ye:1,symbo:'r100'});
     */
    addText(p:{x:number,y:number,text:string,x_size:number,y_size:number,anchor:'center'|'s'|'w'|'n'|'e'|'se'|'ne'|'sw'|'nw',w_factor?:?,line_width?:'unit: mil'}):void;   

    /**
     * 添加一个长方形的块
     * @returns 无
     * @example 
     * $.gen.addRectangle({x1:0,y1:0,x2:1,y2:1});
     */
    addRectangle(p:{x1:number,y1:number,x2:number,y2:number,type?:'surface'|'line',symbol?:'line',polarity?:'positive'|'negative',attributes?:'no'|'yes'}):void;   

    /**
     * 添加Surface
     * @returns 无
     * @example 
     * $.gen.addPolygon({items:[{x:,y:},{xc:,yc:,xe:,ye:,cw:'yes'|'no'}],polarity:'positive',attributes:[]});
     */
    addPolygon(p:{items:[{x:number,y:number},{xc:number,yc:number,xe:number,ye:number,cw:'yes'|'no'}],type?:'surface'|'line',symbol?:'line',polarity?:'positive'|'negative',attributes?:'no'|'yes'}):void;   

    /**
     * 对选择的物件进行填充
     * @returns 无
     * @example 
     * $.gen.selFill();
     */
    selFill():void;  

    /**
     * 做反选动作
     * @returns 无
     * @example 
     * $.gen.selReverse();
     */
    selReverse():void;  

    /**
     * 删除选中的物件，如果一个都没有选择将删除所有的
     * @returns 无
     * @example 
     * $.gen.selDelete();
     */
    selDelete():void;  

    /**
     * panel拼版
     * @returns 无
     * @example 
     * $.gen.panelSR({line:1,step:'pcb',x:1,y:1,nx:2,ny:2,dx:3.6,dy:1.8});
     */
    panelSR(p:{line:number,step:string,x:number,y:number,nx:number,ny:number,dx:number,dy:number,angle:?,mirror:?}):void;  

    /**
     * flatten all information to defined layer如果传了job和step参数，如果没有拼版，则自动调用copy_layer功能
     * @returns 无
     * @example 
     * $.gen.flattenLayer({source_layer:'comp',target_layer:'test'});
     * $.gen.flattenLayer({job:'test',step:'pcb',source_layer:'comp',target_layer:'test'});
     */
    flattenLayer(p:{source_layer:'comp',target_layer:'test',job?:string,step?:string}):void;  

    /**
     * 取得指定symbol上的所有元素信息
     * @returns [{type:'line',xs:0,ys:0,xe:0,ye:0,symbol:'r5',polarity:'positive'},
     *            {type:'pad',x:0,y:0,symbol:'r5',polarity:'positive',mirror:'yes',angle:0}]
     * @example 
     * var getSymbolFeatures = $.gen.getSymbolFeatures({job:job,symbol:symbol});
     */
    getSymbolFeatures(p:{job:string,symbol:string,units:'inch'|'mm'}):t[];  

    /**
     * 取得指定层上的元素信息
     * @returns [{type:'line',xs:0,ys:0,xe:0,ye:0,symbol:'r5',polarity:'positive'},
     *            {type:'pad',x:0,y:0,symbol:'r5',polarity:'positive',mirror:'yes',angle:0}]
     * @example 
     * var getFeatures = $.gen.getFeatures({job:job,step:step,layer:layer});
     */
    getFeatures(p:{job:string,step:string,layer:string,options:''|'select'|'break_sr',units:'inch'|'mm',surface:0|1}):t[];  

    /**
     * 拷贝step到指定的job
     * @returns 无
     * @example 
     * $.gen.copyStep({source_job:job,source_name:step,dest_job:job1,dest_name:name1});
     */
    copyStep(p:{source_job:string,source_name:string,dest_job:string,dest_name:string}):void;   

    /**
     * 更改选择到的symbol
     * @returns 无
     * @example 
     * $.gen.selChangeSym({symbol:'r22.5'});
     */
    selChangeSym(p:{symbol:string,reset_angle?:'no'|'yes'}):void;   

    /**
     * 选择属于同一网络的元素（board)
     * @returns 无
     * @example 
     * $.gen.selBoardNetFeat({x:1,y:1});
     */
    selBoardNetFeat(p:{x:number,y:number,operation?:'select'|'unselect',tol?:'8.947inch'}):void;  

    /**
     * 显示层
     * @returns 无
     * @example 
     * $.gen.displayLayer({name:'l2',number:2});
     */
    displayLayer(p:{name:'l2',number?:1,display?:'yes'|'no'}):void;  

    /**
     * 获取NcSet列表
     * @returns 返回NcSet名称列表
     * @example 
     * var getNcsetsList = $.gen.getNcsetsList({job:'demo',step:'panel',layer:'drill'});
     */
    getNcsetsList(p:{job:string,step:string,layer:string}):t[];  

    /**
     * 获取NcReg参数
     * @returns 返回NcReg参数
     * @example 
     * var getNcsetReg = $.gen.getNcsetReg({job:'demo',step:'panel',layer:'drill',name:'set1'});
     */
    getNcsetReg(p:{job:string,step:string,layer:string,name:string}):object;  

    /**
     * 将选择的对像创建为一个step
     * @returns 无
     * @example 
     * $.gen.selCreateStep({step:'pcb1',delete:'yes'});
     */
    selCreateStep(p:{step:string,x_datum?:0,y_datum?:0,delete?:'no'|'yes'}):void;  

    /**
     * 将选择对象以Step and Repeat方式移动
     * @returns 无
     * @example 
     * $.gen.selMoveRepeat({dest_step:'panel',delete_orig:'yes'});
     */
    selMoveRepeat(p:{dest_step:string,x_repeats?:0,y_repeats?:0,delete_orig?:'yes'|'no'}):void;  

    /**
     * 创建一个新symbol
     * @returns 无
     * @example 
     * $.gen.createSymbol({job:'demo',name:'symbol1'});
     */
    createSymbol(p:{job:string,name:string}):void;  

    /**
     * 检查symbol是否存在
     * @returns 存在返回1，不存在返回0
     * @example 
     * var isSymbolExists = $.gen.isSymbolExists({job:'demo',symbol:'symbol1'});
     */
    isSymbolExists(p:{job:string,symbol:string}):boolean;  

    /**
     * 打开symbol编辑窗口
     * @returns 无
     * @example 
     * $.gen.openSymbol({job:'demo',name:'symbol1'});
     */
    openSymbol(p:{job:string,name:string,iconic?:'no'|'yes'}):void;   

    /**
     * 关闭symbol编辑窗口
     * @returns 无
     * @example 
     * $.gen.closeSymbol({);
     */
    closeSymbol():void;   

    /**
     * 获取checklist属性
     * @returns 返回属性值；如果attr为一个字符串，则返回一个单值；如果attr为数组，则返回以属性名为key的hash
     * @example 
     * var getCheckAttr = $.gen.getCheckAttr({job:'demo',step:'pcb',checklist:'chklist1',attr:'min_via',nact:1,units:'mm'});
     * //--> getCheckAttr = 0.12
     * var getCheckAttr = $.gen.getCheckAttr({job:'demo',step:'pcb',checklist:'chklist1',attr:['min_via','min_spacing'],nact:1,units:'mm'});
     * //--> getCheckAttr = {min_via:0.12,min_spacing:0.3}
     */
    getCheckAttr(p:{job:string,step:string,checklist:string,attr:string|Array[],nact:number,units?:'inch'|'mm'}):number|object;  

    /**
     * 获取profile的描述字符
     * @returns 返回profile描述字符
     * @example 
     * var getProfile = $.gen.getProfile({job:'demo',step:'pcb',units:'mm'});
     */
    getProfile(p:{job:string,step:string,units?:'inch'|'mm'}):string;  

    /**
     * 清除高亮显示
     * @returns 无
     * @example 
     * $.gen.clearHighlight();
     */
    clearHighlight():void;   

    /**
     * 选择打散
     * @returns 无
     * @example 
     * $.gen.selBreak();
     */
    selBreak():void;   

    /**
     * 获取当前使用的单位    
     * @returns 返回'inch'或'mm'
     * @example 
     * var getUnits = $.gen.getUnits();
     */
    getUnits():string;  

    /**
     * 获取层symbol列表
     * @returns 返回层symbol列表
     * @example 
     * var getLayerSymsHist = $.gen.getLayerSymsHist({job:'demo',step:'panel',layer:'l2',options:'break_sr',units:'mm'});
     */
    getLayerSymsHist(p:{job:string,step:string,layer:string,options?:'undef'|'break_sr',units?:'inch'|'mm'}):object;  

    /**
     * 获取Symbol symbol列表
     * @returns 返回层Symbol symbol列表
     * @example 
     * var getSymbolSymsHist = $.gen.getSymbolSymsHist({job:'demo',symbol:'struct1',units:'mm'});
     */
    getSymbolSymsHist(p:{job:string,symbol:string,units?:'inch'|'mm'}):object;  

    /**
     * 打开netlist窗口
     * @returns 无
     * @example 
     * $.gen.netlistPageOpen();
     */
    netlistPageOpen(p:{set?:'no'|'yes'}):void;   


    /**
     * 重新计算netlist数据
     * @returns 无
     * @example 
     * $.gen.netlistRecalc({job:'demo',step:'pcb',type:'cur_cad',display:'top'});
     */
    netlistRecalc(p:{job:string,step:string,type:'cad'|'ref'|'cur'|'cur_cad',display:'top'|'bottom'}):void;   

    /**
     * 比较netlist
     * @returns 返回{full_report:'',shorted:1,broken:9,extra:3, missing:0,[possible_shorted:0],[possible_broken:0]}
     * @example 
     * var netlistCompare = $.gen.netlistCompare({job1:'demo',step1:'net',type1:'ref',job2:'demo',step2:'pcb',type2:'cur'});
     */
    netlistCompare(p:{job1:string,step1:string,type1:'cad'|'ref'|'cur'|'cur_cad',job2:string,step2:string,type2:'cad'|'ref'|'cur'|'cur_cad',display?:'yes'|'no'}):object; 

    /**
     * 关闭netlist窗口
     * @returns 无
     * @example 
     * $.gen.netlistPageClose();
     */
    netlistPageClose():void;   

    /**
     * 清除选择的数据
     * @returns 无
     * @example 
     * $.gen.selClearFeature();
     */
    selClearFeature():void;   

    /**
     * 获取Step and Repeat范围
     * @returns 返回{xmin:,ymin:,xmax:,ymax:,xsize:,ysize:}
     * @example 
     * var getSRLimits = $.gen.getSRLimits({job:'demo',step:'panel'});
     * var getSRLimits = $.gen.getSRLimits({job:'demo',step:'panel',include_step:'^(pcb|array)'});
     */
    getSRLimits(p:{job:string,step:string,include_step?:string,units?:'inch'|'mm'}):object; 

    /**
     * 获取Active范围
     * @returns 返回{xmin:,ymin:,xmax:,ymax:,xsize:,ysize:}
     * @example 
     * var getActiveArea = $.gen.getActiveArea({job:'demo',step:'panel'});
     */
    getActiveArea(p:{job:string,step:string,units?:'inch'|'mm'}):object; 

    /**
     * 设定checklist参数
     * @returns 无
     * @example 
     * $.gen.chklistCupd({chklist:'chk1',nact:2,params:{pp_layer:'l1;l2'}});
     */
    chklistCupd(p:{chklist:string,nact?:number,params:object,mode?:'regular'}):void;   

    /**
     * 获取checklist ERF 范围
     * @returns 返回{
                        p2p : [1,5,7],
                        p2l : [2,5,6],
                    }
     * @example 
     * var getChklistRange = $.gen.getChklistRange({job:'demo',step:'pcb',chklist:'pcb_check',nact:2});
     */
    getChklistRange(p:{job:string,step:string,chklist:string,nact:number,units?:'inch'|'mm'}):object; 

    /**
     * 设置checklist ERF 范围
     * @returns 无
     * @example 
     * $.gen.chklistErfRange({job:'demo',step:'pcb',chklist:'pcb_check',nact:2,range:{p2p:[1,2,5],p2l:[4,5,6]},default_range:[0,0,0]});
     */
    chklistErfRange(p:{job:string,step:string,chklist:string,nact:number,range:object,default_range:[]}):void;   

    /**
     * 设置checklist ERF
     * @returns 无
     * @example 
     * $.gen.chklistErf({chklist:'pcb_check',nact:2,erf:'STD mm'});
     */
    chklistErf(p:{chklist:string,nact:number,erf:string}):void; 

    /**
     * 重读checklist ERF
     * @returns 无
     * @example 
     * $.gen.chklistRereadErf({chklist:'pcb_check',nact:2});
     */
    chklistRereadErf(p:{chklist:string,nact:number}):void; 

    /**
     * 选择checklist条目
     * @returns 无
     * @example 
     * $.gen.chklistSelectAct({job:Job,step:Step,chklist:'pcb_check',nact:2,select:'yes',clear_before:'yes'});
     */
    chklistSelectAct(p:{job:string,step:string,chklist:string,nact:number,select:'yes'|'no',clear_before:'yes'|'no',nact_count:number}):void; 
  
    /**
     * 选择所有checklist条目
     * @returns 无
     * @example 
     * $.gen.chklistSelectAll({job:Job,step:Step,chklist:'pcb_check',select:'yes'});
     */
    chklistSelectAll(p:{job:string,step:string,chklist:string,select:'yes'|'no',nact_count:number}):void; 

    /**
     * 获取checklist条目总数
     * @returns checklist条目总数
     * @example 
     * var getChklistActCount = $.gen.getChklistActCount({job:Job,step:Step,chklist:'pcb_check'});
     */
    getChklistActCount(p:{job:string,step:string,chklist:string}):number; 

    /**
     * chklist生成层
     * @returns 无
     * @example 
     * $.gen.chklistCreateLyrs({chklist:'pcb_check',severity:0,suffix:'_tmp'});
     */
    chklistCreateLyrs(p:{chklist:string,severity:0|1|2|3,suffix:string}):void; 

    /**
     * 获取step范围
     * @returns 返回{xmin:,ymin:,xmax:,ymax:,xsize:,ysize:}
     * @example 
     * var getStepLimits = $.gen.getStepLimits({job:'demo',step:'panel'});
     */
    getStepLimits(p:{job:string,step:string,units?:'inch'|'mm'}):object; 

    /**
     * 移动选择数据
     * @returns 无
     * @example 
     * $.gen.selMove({dx:2,dy:2});
     */
    selMove(p:{dx:number,dy:number}):void;   

    /**
     * 替换
     * @returns 无
     * @example 
     * $.gen.selSubstitute({mode:'substitute',symbol:'r100',tol:2.5});
     */
    selSubstitute(p:{mode?:'select'|'substitute',symbol:string,tol:number,x_datum:number,y_datum:number,dcode:number}):void;   

    /**
     * 变形
     * @returns 无
     * @example 
     * $.gen.selTransform({});
     */
    selTransform(p:{mode?:'anchor'|'axis',oper:string,x_anchor:0,y_anchor:0,duplicate?:'no'|'yes',angle?:0,x_scale?:1,y_scale?:1,x_offset?:0,y_offset?:0}):void;   

    /**
     * 获取排版数据
     * @returns 返回[{step:,xa:,ya:,dx:,dy:,nx:,ny:,angle:,mirror:,xmin:,ymin:,xmax:,ymax:,xsize:,ysize:}]
     * @example 
     * var getSR1 = $.gen.getSR1({job:'demo',step:'panel'});
     */
    getSR1(p:{job:string,step:string,units?:'inch'|'mm'}):t[]; 

    /**
     * 获取打散后的排版数据
     * @returns 返回[{step:,xa:,ya:,angle:,mirror:,xmin:,ymin:,xmax:,ymax:,xsize:,ysize:}]
     * @example 
     * var getRepeat = $.gen.getRepeat({job:'demo',step:'panel'});
     */
    getRepeat(p:{job:string,step:string,units?:'inch'|'mm'}):t[]; 

    /**
     * 获取某个step内所有用到的step名称列表
     * @returns 返回['step1','step2',...]
     * @example 
     * var getSubSteps = $.gen.getSubSteps({job:'demo',step:'panel'});
     */
    getSubSteps(p:{job:string,step:string}):t[]; 

    /**
     * 获取Datum点
     * @returns 返回{x:?,y:?}
     * @example 
     * var getDatum = $.gen.getDatum({job:'demo',step:'panel'});
     */
    getDatum(p:{job:string,step:string,units?:'inch'|'mm'}):object; 

    /**
     * 获取Step属性
     * @returns 返回属性值；如果attr为一个字符串，则返回一个单值；如果attr为数组，则返回以属性名为key的hash,如果attr没有定义，则返回所有属性
     * @example 
     * var getStepAttr = $.gen.getStepAttr({job:'demo',step:'pcb',attr:'attr1'});
     * //--> getStepAttr = 0.12
     * var getStepAttr = $.gen.getStepAttr({job:'demo',step:'pcb',attr:['attr1','attr2']});
     * //--> getStepAttr = {attr1:0.12,attr2:0.3}
     */
    getStepAttr(p:{job:string,step:string,attr:'name'|['name1','name2']|'undef '}):number|object;  

    /**
     * 获取料号属性
     * @returns 返回属性值；如果attr为一个字符串，则返回一个单值；如果attr为数组，则返回以属性名为key的hash,如果attr没有定义，则返回所有属性
     * @example 
     * var getJobAttr = $.gen.getJobAttr({job:'demo',attr:'attr1'});
     * //--> getJobAttr = 0.12
     * var getJobAttr = $.gen.getJobAttr({job:'demo',attr:['attr1','attr2']});
     * //--> getJobAttr = {attr1:0.12,attr2:0.3}
     */
    getJobAttr(p:{job:string,attr:'name'|['name1','name2']|'undef '}):number|object;  

    /**
     * 设置料号属性
     * @returns 无
     * @example 
     * $.gen.setJobAttr({job:'demo',attr:{name:2}});
     */
    setJobAttr(p:{job:string,attr:{},units?:'inch'|'mm'}):void;   

    /**
     * 获取绘底光绘参数
     * @returns 返回{polarity:?,
                    stretch_x:?,
                    stretch_y:?,
                    shift_x:?,
                    shift_y:?,
                    mirror_x:?,
                    mirror_y:?,
                    resolution:?,
                    swap:?}
     * @example 
     * var getLPD = $.gen.getLPD({job:'demo',step:'panel',layer:'l2'});
     */
    getLPD(p:{job:string,step:string,layer:string}):object;  

    /**
     * 获取绘底片光绘所有参数
     * @returns 返回{ lp7008 :{polarity:?,
                                stretch_x:?,
                                stretch_y:?,
                                shift_x:?,
                                shift_y:?,
                                mirror_x:?,
                                mirror_y:?,
                                resolution:?,
                                swap:?},
        }
     * @example 
     * var getLPM = $.gen.getLPM({job:'demo',step:'panel',layer:'l2'});
     */
    getLPM(p:{job:string,step:string,layer:string,device?:string}):object;  

    /**
     * 设置当前属性
     * @returns 无
     * @example 
     * $.gen.setCurrentAttribute({attribute:'.smd'});
     * $.gen.setCurrentAttribute({attribute:['.smd','.bga']);
     * $.gen.setCurrentAttribute({attribute:'.drill',option:'plated'});
     * $.gen.setCurrentAttribute({attribute:['.smd',{attribute:'.drill',option:'plated'});
     */
    setCurrentAttribute(p:{attribute:[]|{}|''}):void;   

    /**
     * 重置当前属性
     * @returns 无
     * @example 
     * $.gen.attributeReset();
     */
    attributeReset():void;   

    /**
     * 为选择的数据添加属性
     * @returns 无
     * @example 
     * $.gen.selAddAttr({attribute:'.smd'});
     * $.gen.selAddAttr({attribute:['.smd','.bga']);
     * $.gen.selAddAttr({attribute:'.drill',option:'plated'});
     * $.gen.selAddAttr({attribute:['.smd',{attribute:'.drill',option:'plated'});
     */
    selAddAttr(p:{attribute:[]|{}|''}):void;   

    /**
     * 设置Datum点
     * @returns 无
     * @example 
     * $.gen.setDatum({x:0,y:0});
     */
    setDatum(p:{x:number,y:number}):void;  

    /**
     * 以layer net方式选择
     * @returns 无
     * @example 
     * $.gen.selNetFeat({x:1,y:1});
     */
    selNetFeat(p:{x:number,y:number,operation?:'select'|'unselect',tol:'float'}):void;  

    /**
     * 获取原点座标
     * @returns 返回 {x:?,y:?}
     * @example 
     * var getOrigin = $.gen.getOrigin();
     */
    getOrigin():object;  

    /**
     * 设置原点
     * @returns 无
     * @example 
     * $.gen.origin({x:0,y:0});
     */
    origin(p:{x:number,y:number,push_in_stack?:0|1}):void;  

    /**
     * 显示check显示结果
     * @returns 无
     * @example 
     * $.gen.chklistResShow({chklist:'chk1',nact:2});
     */
    chklistResShow(p:{chklist:string,nact?:number,x:0,y:0,w:0,h:0}):void;  

    /**
     * 关闭check list
     * @returns 无
     * @example 
     * $.gen.chklistClose({chklist:'chk1'});
     */
    chklistClose(p:{chklist:string,mode?:'hide'}):void;  

    /**
     * 获取genesis database 列表
     * @returns 返回 {'db1':'/gen_db/db2','db2':'/gen_db/db1',..}
     * @example 
     * var getDbList = $.gen.getDbList();
     */
    getDbList():object;  

    /**
     * 获取层属性
     * @returns 返回属性值；如果attr为一个字符串，则返回一个单值；如果attr为数组，则返回以属性名为key的hash,如果attr没有定义，则返回所有属性
     * @example 
     * var getLayerAttr = $.gen.getLayerAttr({job:'demo',step:'pcb',layer:'l2',attr:'attr1'});
     * //--> getLayerAttr = 0.12
     * var getLayerAttr = $.gen.getLayerAttr({job:'demo',step:'pcb',layer:'l2',attr:['attr1','attr2']});
     * //--> getLayerAttr = {attr1:0.12,attr2:0.3}
     */
    getLayerAttr(p:{job:string,step:string,layer:string,attr:'name'|['name1','name2']|'undef '}):number|object;  

    /**
     * 料号是否修改
     * @returns 更改返回1，没有更改返回0
     * @example 
     * var isJobChanged = $.gen.isJobChanged({job:'demo'});
     */
    isJobChanged(p:{job:string}):boolean;  

    /**
     * Step是否修改
     * @returns 更改返回1，没有更改返回0
     * @example 
     * var isStepChanged = $.gen.isStepChanged({job:'demo',step:'pcb'});
     */
    isStepChanged(p:{job:string,step:string}):boolean;  

    /**
     * 层是否修改
     * @returns 更改返回1，没有更改返回0
     * @example 
     * var isLayerChanged = $.gen.isLayerChanged({job:'demo',step:'pcb',layer:'map'});
     */
    isLayerChanged(p:{job:string,step:string,layer:string}):boolean;  

    /**
     * 矩形选择
     * @returns 无
     * @example 
     * $.gen.selectRectangle({x1:1,y1:1,x2:2,y2:3});
     */
    selectRectangle(p:{x1:number,y1:number,x2:number,y2:number}):void;  

    /**
     * 更改层名
     * @returns 无
     * @example 
     * $.gen.renameLayer({job:'demo',layer:'top.art',new_name:'l1'});
     */
    renameLayer(p:{job:string,layer:string,new_name:string}):void;  

    /**
     * 更改step名
     * @returns 无
     * @example 
     * $.gen.renameStep({job:'demo',name:'pcb_1',new_name:'pcb_a'});
     */
    renameStep(p:{job:string,name:string,new_name:string}):void;  

    /**
     * 设置层属性
     * @returns 无
     * @example 
     * $.gen.setLayerAttr({job:'demo',step:'pcb',layer:'l2',attr:{name:2}});
     */
    setLayerAttr(p:{job:string,step:string,layer:string,attr:{name:number},units?:'inch'|'mm'}):void;  

    /**
     * 设置step属性
     * @returns 无
     * @example 
     * $.gen.setStepAttr({job:'demo',step:'pcb',attr:{name:2}});
     */
    setStepAttr(p:{job:string,step:string,attr:{name:number},units?:'inch'|'mm'}):void;  

    /**
     * 设置钻孔Tool的User参数名称
     * @returns 返回Tool User名称
     * @example 
     * var getToolUser = $.gen.getToolUser({job:'demo',step:'pcb',layer:'drill'});
     */
    getToolUser(p:{job:string,step:string,layer:string}):string;  

    /**
     * 设置钻孔Tool的Thick参数名称
     * @returns 返回Tool Thick
     * @example 
     * var getToolThick = $.gen.getToolThick({job:'demo',step:'pcb',layer:'drill'});
     */
    getToolThick(p:{job:string,step:string,layer:string}):string;  

    /**
     * 设置钻孔Tool的slot参数名称
     * @returns 返回Tool slots
     * @example 
     * var getToolSlots = $.gen.getToolSlots({job:'demo',step:'pcb',layer:'drill'});
     */
    getToolSlots(p:{job:string,step:string,layer:string}):string;  

    /**
     * 获取是否存在cad netlist
     * @returns 代表存在返回1，不存在返回0
     * @example 
     * var cadNetlistExists = $.gen.cadNetlistExists({job:'demo',step:'pcb'});
     */
    cadNetlistExists(p:{job:string,step:string}):boolean;  

    /**
     * 获取是否存在 netlist是否存在
     * @returns 代表存在返回1，不存在返回0
     * @example 
     * var netlistExists = $.gen.netlistExists({job:'demo',step:'net',type:'cadnet'});
     */
    netlistExists(p:{job:string,step:string,type:'cadnet'|'refnet'|'curnet'}):boolean;  

    /**
     * 层是否为空
     * @returns 代表存在返回1，不存在返回0
     * @example 
     * var isLayerEmpty = $.gen.isLayerEmpty({job:'demo',step:'pcb',layer:'map'});
     */
    isLayerEmpty(p:{job:string,step:string,layer:string}):boolean;  

    /**
     * 返回genesis版本
     * @returns type为`number`时返加 82|90,...
                //type为`string`时返回 V8.2c (14Mar04)
     * @example 
     * var getGenVersion = $.gen.getGenVersion();
     */
    getGenVersion(p:{type?:'number'|'string'}):number|string;  

    /**
     * 获取层FeatHist
     * @returns 返回{
                        line:1,
                        pad:10,
                        surf:22,
                        arc:4,
                        text:1,
                        total:38,
                }
     * @example 
     * var getLayerFeatHist = $.gen.getLayerFeatHist({job:Job,step:Step,layer:'l2'});
     */
    getLayerFeatHist(p:{job:string,step:string,layer:string,options?:'undef'|'break_sr'|'select'}):object;  

    /**
     * 取得指定料号所有Symbol名字
     * @returns 返回step列表
     * @example 
     * var getSymbolList = $.gen.getSymbolList({job:jobname});
     */
    getSymbolList(p:{job:string}):t[]; 

    /**
     * Copy Symbol
     * @returns 无
     * @example 
     * $.gen.copySymbol({source_job:job1,source_name:'symbol1',dest_job:job1,source_name:'symbol2'});
     */
    copySymbol(p:{source_job:string,source_name:string,dest_job:string,source_name:string}):void;   

    /**
     * Clip Area
     * @returns 无
     * @example 
     * $.gen.clipArea({area_rect:{x1:,y1:,x2:,y2:},inout:'in',contour_cut:'no'});
     */
    clipArea(p:{layers_mode:'layer_name'|'affected_layers',layer:string,margin:?,inout:'in'|'out',contour_cut:'no'|'yes',area_rect:{x1:number,y1:number,x2:number,y2:number},area_polygon:'mannual',ref_layer:'reference',area:'profile'|'reference'|'mannual'}):void;   

    /**
     * Compare Layers
     * @returns 返回 0|1, 0:表示相同,1:表示不同
     * @example 
     * var compareLayers = $.gen.compareLayers();
     */
    compareLayers(p:{layer1?:string,job2?:string,step2?:string,layer2?:string,layer2_ext?:string,tol?:string,area?:'global'|'profile',ignore_attr?:string,map_layer?:string,map_layer_res?:string}):boolean;    

    /**
     * 暂停提示
     * @returns 继续则返回：'OK'，退出则返回：'underfined'
     * @example 
     * $.gen.PAUSE('暂停提示的内容');
     */
    PAUSE(p:string):string;   

    /**
     * 选择当前层所有Feature
     * @returns 无
     * @example 
     * $.gen.selAllFeat();
     */
    selAllFeat():void;

    /**
     * 依照所选feature创建profile
     * @returns 无
     * @example 
     * $.gen.selCreateProfile();
     */
    selCreateProfile():void;

    /**
     * 将选择的Feature加大
     * @returns 无
     * @example 
     * $.gen.selResize({size: 3});
     */
    selResize(p:{size:number,corner_ctl:'no'}):void;

}

export = TopCamGenCom;

