|
文件能不能分享出来 |
sh_layout 发表于 2022-11-17 17:05 传文件也会扣贡献,红色这里改下就好了 fprintf(sf_Form "REALFILLIN 10 10\n") fprintf(sf_Form "REALMIN 0.01\n") fprintf(sf_Form "REALMAX 10000.00\n") |
hyper311 发表于 2022-11-17 16:30 可以发文件出来? |
hyper311 发表于 2022-11-17 16:30 这个简单,改好了,自己试下 axlCmdRegister( "shape_fillet" 'shape_fillet_main ?cmdType "interactive" ?doneCmd 'sf_done ?cancelCmd 'sf_cancel ) procedure((shape_fillet_main) (s_f_version) (sf_radius_value = 0.5) (notdone = t) (sfpopup = axlUIPopupDefine(nil list(list("Done" 'sf_done ) list("Cancel" 'sf_cancel ) ) )) axlUIPopupSet(sfpopup) (sfMark = axlDBTransactionStart()) (sf_Form_Create) axlControlRaise('options) (sf_form = axlMiniStatusLoad(gensym() sf_From_File 'get_radius_value t )) axlFormDisplay(sf_form) axlFormSetField(sf_form "RADIUS_VALUE" sf_radius_value) axlFormColorize(sf_form "sf_author" 'text 'red ) axlFormColorize(sf_form "sf_date" 'text 'blue ) axlFormColorize(sf_form "sf_website" 'text 'blue ) while(notdone (shape_fillet) ) ) procedure((shape_fillet) let((i s_f_buff temp temp_path select_Coord beg_Coord end_Coord pre_Coord next_Coord beg_lineType end_lineType pre_lineType pre_path next_lineType beg_line end_line first_line second_line xx yy sf_clockwise sf_layer sf_net ) axlClearSelSet() (axlSetFindFilter ?enabled list("noall" "shapes") ?onButtons list("noall" "shapes") ) (selbox = (axlEnterBox)) if(selbox then (axlSingleSelectBox selbox) (s_f_buff = axlGetSelSet()) else (s_f_buff = nil) ) when((s_f_buff != nil) (selbox = (ComputeBox selbox)) foreach(temp s_f_buff (shape_seg_no = (temp->nSegs)) (sf_layer = (temp->layer)) (sf_fill = (temp->fill)) (temp_seg_no = 0) (sf_net = ((temp->net)->name)) (beg_Coord = nil) (end_Coord = nil) (pre_Coord = nil) (next_Coord = nil) (beg_lineType = nil) (end_lineType = nil) (pre_lineType = nil) (next_lineType = nil) (sf_clockwise = nil) (select_Coord = nil) (beg_line = car((temp->segments))) (end_line = nth((shape_seg_no - 1) (temp->segments) )) when((((beg_line->objType) == "line") && ((end_line->objType) == "line") && ((beg_line->lineType) != 'odd) && ((end_line->lineType) != 'odd) && ((beg_line->lineType) != (end_line->lineType))) (temp_coord = (find_coord_in_box car((beg_line->startEnd)) selbox )) when((temp_coord != nil) ((beg_line->lineType) != (end_line->lineType)) (select_Coord = temp_coord) (select_point_dir end_line beg_line) ) ) foreach(temp_path (temp->segments) if(((temp_path->objType) == "line") then if((pre_Coord == nil) then (temp_coord = (find_coord_in_box cadr((temp_path->startEnd)) selbox )) when(((temp_coord != nil) && ((temp_path->lineType) != 'odd)) (pre_Coord = temp_coord) (pre_path = temp_path) (pre_lineType = (temp_path->lineType)) ) else (temp_coord = (find_coord_in_box car((temp_path->startEnd)) selbox )) when(((temp_coord != nil) && ((temp_path->lineType) != 'odd)) if((pre_Coord == temp_coord) then if((pre_lineType != (temp_path->lineType)) then (select_Coord = pre_Coord) (select_point_dir pre_path temp_path) else (pre_Coord = cadr((temp_path->startEnd))) (pre_path = temp_path) (pre_lineType = (temp_path->lineType)) ) else (pre_Coord = nil) (pre_lineType = nil) ) ) ) else ) ) (sf_radius_value = axlFormGetField(sf_form "RADIUS_VALUE")) when((type(sf_radius_value) == 'string) (sf_radius_value = atof(sf_radius_value)) ) when((select_Coord != nil) axlUIWPrint(nil "The Coordinate (%P) is Selected!" select_Coord) (sf_dir = nil) (sf_dir = axlGeoPointInShape(((car(select_Coord) + xx) cadr(select_Coord) + yy)) temp t))if(sf_dir then (linepath = (axlPathStart list(select_Coord) 0 )) (linepath = (axlPathLine linepath nil ((car(select_Coord) + (sf_radius_value * xx)):cadr(select_Coord)) )) (linepath = (axlPathLine linepath nil (car(select_Coord) cadr(select_Coord) + (sf_radius_value * yy))))) (linepath = (axlPathLine linepath nil select_Coord)) (andnotShape = car((axlDBCreateShape linepath sf_fill sf_layer sf_net nil ) )) (poly1 = (axlPolyFromDB andnotShape)) axlDeleteObject(andnotShape) (poly2 = (axlPolyFromDB temp)) (poly2 = car(axlPolyOperation(poly2 poly1 'ANDNOT ) )) axlDeleteObject(temp) (arcCenter = ((car(select_Coord) + (sf_radius_value * xx)) cadr(select_Coord) + (sf_radius_value * yy))))(arcpath = (axlPathStart list(arcCenter) 0 )) (arcpath = (axlPathLine arcpath nil ((car(arcCenter) - (sf_radius_value * xx)):cadr(arcCenter)) )) if((xx != yy) then (sf_clockwise = t) else (sf_clockwise = nil) ) (arcpath = (axlPathArcRadius arcpath nil (car(arcCenter):(cadr(arcCenter) - (sf_radius_value * yy))) sf_clockwise nil sf_radius_value )) (arcpath = (axlPathLine arcpath nil arcCenter)) (poly1 = car((axlDBCreateShape arcpath sf_fill sf_layer sf_net nil ) )) (poly3 = (axlPolyFromDB poly1)) (poly4 = car(axlPolyOperation(poly2 poly3 'OR ) )) (axlDBCreateShape poly4 sf_fill sf_layer sf_net nil ) axlDeleteObject(poly1) else (arcCenter = select_Coord) (arcpath = (axlPathStart list(arcCenter) 0 )) (arcpath = (axlPathLine arcpath nil ((car(arcCenter) + (sf_radius_value * xx)):cadr(arcCenter)) )) if((xx != yy) then (sf_clockwise = nil) else (sf_clockwise = t) ) (arcpath = (axlPathArcRadius arcpath nil (car(arcCenter):(cadr(arcCenter) + (sf_radius_value * yy))) sf_clockwise nil sf_radius_value )) (arcpath = (axlPathLine arcpath nil arcCenter)) (poly1 = car((axlDBCreateShape arcpath sf_fill sf_layer sf_net nil ) )) (poly2 = (axlPolyFromDB poly1)) axlDeleteObject(poly1) (poly3 = (axlPolyFromDB temp)) (poly4 = car(axlPolyOperation(poly2 poly3 'OR ) )) (axlDBCreateShape poly4 sf_fill sf_layer sf_net nil ) axlDeleteObject(temp) ) ) ) ) ) ) procedure((get_radius_value sf_form) axlUIWPrint(nil "GET RADIUS VALUE") case((sf_form->cuRField) ("RADIUS_VALUE" (sf_radius_value = (sf_form->curValue)) ) ) ) procedure((s_f_version) axlUIWPrint(nil "------ Shape Fillet V1.1 ---- Written By Vivien Luo ------") axlUIWPrint(nil "------ E-mail : vivienluo@allegro-skill.com ------ Mar 14, 2013 ------") ) procedure((ComputeBox InBox) (fx = caar(InBox)) (fy = cadar(InBox)) (sx = caadr(InBox)) (sy = cadadr(InBox)) if((fx < sx) then (llx = fx) (urx = sx) else (llx = sx) (urx = fx) ) if((fy < sy) then (lly = fy) (ury = sy) else (lly = sy) (ury = fy) ) list((llx:lly) (urx:ury) ) ) procedure((find_coord_in_box TempInCoord inBox) (inBoxCoord = nil) when(((car(TempInCoord) > caar(inBox)) && (car(TempInCoord) < caadr(inBox)) && (cadr(TempInCoord) > cadar(inBox)) && (cadr(TempInCoord) < cadadr(inBox))) (inBoxCoord = TempInCoord) ) inBoxCoord ) procedure((select_point_dir fst_line sec_line) case((fst_line->lineType) ('horizontal if((caar((fst_line->startEnd)) < caadr((fst_line->startEnd))) then (xx = -1) else (xx = 1) ) ) ('vertical if((cadar((fst_line->startEnd)) < cadadr((fst_line->startEnd))) then (yy = -1) else (yy = 1) ) ) ) case((sec_line->lineType) ('horizontal if((caar((sec_line->startEnd)) < caadr((sec_line->startEnd))) then (xx = 1) else (xx = -1) ) ) ('vertical if((cadar((sec_line->startEnd)) < cadadr((sec_line->startEnd))) then (yy = 1) else (yy = -1) ) ) ) ) procedure((sf_Form_Create) (sf_From_File = "./Shape_Fillet_Form.form") (sf_Form = outfile(sf_From_File "w")) fprintf(sf_Form "FILE_TYPE=FORM_DEFN VERSION=2\n") fprintf(sf_Form "FORM \n") fprintf(sf_Form "FIXED\n") fprintf(sf_Form " ORT 35 3\n")fprintf(sf_Form "HEADER \"Shape Fillet\"\n") fprintf(sf_Form "\n") fprintf(sf_Form "TILE\n") fprintf(sf_Form "TEXT \"Radius\" sf_r\n") fprintf(sf_Form "TLOC 5 2\n") fprintf(sf_Form "ENDTEXT\n") fprintf(sf_Form "\n") fprintf(sf_Form "FIELD RADIUS_VALUE\n") fprintf(sf_Form "FLOC 11 2\n") fprintf(sf_Form "REALFILLIN 10 10\n") fprintf(sf_Form "REALMIN 0.01\n") fprintf(sf_Form "REALMAX 10000.00\n") fprintf(sf_Form "DECIMAL 2\n") fprintf(sf_Form "ENDFIELD\n") fprintf(sf_Form "\n") fprintf(sf_Form "TEXT \"Written By Vivien Luo \" sf_author\n") fprintf(sf_Form "TLOC 5 6\n") fprintf(sf_Form "ENDTEXT\n") fprintf(sf_Form "\n") fprintf(sf_Form "TEXT \"www.allegro-skill.com\" sf_website\n") fprintf(sf_Form "TLOC 5 8\n") fprintf(sf_Form "ENDTEXT\n") fprintf(sf_Form "\n") fprintf(sf_Form "TEXT \"Mar 14 , 2013\" sf_date\n") fprintf(sf_Form "TLOC 5 10\n") fprintf(sf_Form "ENDTEXT\n") fprintf(sf_Form "\n") fprintf(sf_Form "ENDTILE\n") fprintf(sf_Form "ENDFORM\n") close(sf_Form) ) procedure((sf_done) axlUIWPrint(nil "- Done -") (notdone = nil) axlFormClose(sf_form) axlDBTransactionCommit(sfMark) (axlCancelEnterFun) ) procedure((sf_cancel) axlUIWPrint(nil "- Cancel -") (notdone = nil) axlFormClose(sf_form) axlDBTransactionRollback(sfMark) (axlCancelEnterFun) ) |
这难道是外挂类的文件!![]() |
/1
关于我们|手机版|EDA365电子论坛网 ( 粤ICP备18020198号-1 )
GMT+8, 2025-11-22 06:22 , Processed in 0.187500 second(s), 30 queries , Gzip On.
地址:深圳市南山区科技生态园2栋A座805 电话:19926409050