AutoCAD R12 two add the command application in process designing newly
- Time:
- Click:72
- source:JUSTYN CNC Machining
ADS file, the ASCII that this is a simple text piles up a file, if have one behavior ACADAPP,be in in this file, so ACADAPP of automatic when entering ACAD graph to load, in the Command: of AutoCAD? UTO LISP function of Man of Yong of busy of Yao Jing (ADS) , will get current already the information of the process of all ADS application of to load. Be like already to load ACADAPP, be in " Command: ? POLY of this Man of A Chinese-style unlined garment of besmear tip allow and BHATCH. In AUTO LISP language, cannot resemble calling average order to be used in that way (COMMAND " command " ) will call BPOLY and BHATCH, use however (C: BPOLY nods) , (C: BHATCH is nodded) will call, carry out (C: BHATCH is nodded) before should pass SETVAR to undertake installing to variable of a few systems, HPANG is design fill angle, HPNAME is design fill name, HPSCALE is design fill coefficient of proportionality. Be the LISP program: of a design of simple fill decorative pattern below? Detailed list of silk ribbon? : (Code name of decorative pattern of Setq Yf$ (getstring (strcat " : ") ) ) ; inputs decorative pattern code name (<1> of scale of Setq Bl (getreal "n:" ) ) ; inputs scale (If (= Bl Nil) (setq Bl 1.
0)) ; scale agrees the value is <0> of angle of 1(setq Ang (getreal "n:" ) ) ; inputs angle (If (= Ang Nil) (setq Ang 0.
Value of agreement of 0)) ; angle chooses the random inside area for 0(setq Pt (getpoint "n a bit:" ) ) the random inside; input area a bit coordinate (angle of fill of setting of Setvar "hpang" Ang) ; installs fill scale to install fill decorative pattern to be for Yf$(while Pt;PT for Bl(setvar "hpname" Yf$) ; for Ang(setvar "hpscale" Bl) ; true when the program inside executive loop body, exit otherwise (C:bThe random inside area of choice of Hatch Pt)(setq Pt (getpoint "n a bit:" ) ) the random inside; input area a bit coordinate continues fill) ;while Pt uses a program when 1 fill decorative pattern, cannot form all round dot of make choice of one is shut and when area, except any information also did not show outside fill, because this needs to increase a judgement, with the program 2 will come true. Program 2 detailed list: (Code name of decorative pattern of Setq Yf$ (getstring (strcat " : ") ) ) ; inputs decorative pattern code name (<1> of scale of Setq Bl (getreal "n:" ) ) ; inputs scale (If (= Bl Nil) (setq Bl 1.
0)) ; scale agrees the value is <0> of angle of 1(setq Ang (getreal "n:" ) ) ; inputs angle (If (= Ang Nil) (setq Ang 0.
Value of agreement of 0)) ; angle chooses the random inside area for 0(setq Pt (getpoint "n a bit:" ) ) the random inside; input area a bit coordinate (While Pt;PT is true when the program inside executive loop body, exit otherwise (Setq E (c:bPoly Pt)) ; gets PT orders the boundary line side the place, (If E; exists like attrib border line with respect to fill, otherwise not fill (decorative pattern of fill of Progn(command "hatch" Yf$ Bl Ang E "") ; (Command "erase" E "") ; deletes attrib border line (the stuff of ending ") ; of Princ "n fill that print ends) line of;progn(princ "n border is nonexistent, cannot the random inside area of choice of fill "));if(setq Pt (getpoint "n a bit:" ) ) the random inside; input area a bit coordinate continues fill) ;while Pt for more convenient and practical, can weave the icon menu of decorative pattern design, when clew inputs decorative pattern design, activation icon menu. We are in when be being applied actually, the computation in each bits of coordinate of the attrib border substance that returns from BPOLY gives a range, the text inside this limits is hypostatic at the same time pitch on, make these text keep away from shadow line design. The function that place of two small orders realizes above and BPOLY and BHATCH are identical, actually border meaning does not depend on this, want to pass above introduction however, can apply its solve more complex case to go up, for example we are in development of geological CAD software, used afore-mentioned methods to settle complex irregular region automatic fill the program of a variety of decorative pattern design, wrote the editor order to decorative pattern design, be opposite namely already scale undertakes editing modification to the decorative pattern in the graph (length place is restricted source program does not list) . Here only brief introduction uses a method, before running this program, the area that compiles figure has existed. LOAD to load is used below Command clew accord with this program, computer clew: I.
Choose target T.
Change A of decorative pattern code name.
Scale angle C.
Change color P.
Change attrib border X.
End <X>: ? ∠ Zuo : Make choice of wants design of editorial decorative pattern, need to take decorative pattern design to go up with rat punctuation only a bit can; option T: The code name of design of modification decorative pattern, input A of new option of; of decorative pattern code name: The scale angle of design of modification decorative pattern, input new scale and C of angle; option: The color of design of modification decorative pattern, the P of option of of color date; with new input: It is the borderline side design of modification decorative pattern, clew chooses the boundary line side be about to revise, the acme of many justice line that is a similar PEDIT next edits a command, can move apical position or delete, wait for the borderline side new to revise after finishing, the decorative pattern design on graph face presses new border to update instantly. Require an attention is when substance of decorative pattern design choosing before revising attrib border line, must make selected element is located in by the side of new in borderline, otherwise design is fill besides new attrib border line. Scale goes to the decorative pattern design in the graph previously, if hair is contemporary date, angle, scale, color, attrib border line dissatisfactory when, be about to delete its again new scale, and the decorative pattern pattern of unwarrantable still new scale is completely right, it is OK to use this program follow one's inclinations special undertake editing modification to decorative pattern conveniently, till satisfaction till. When profile of scale project geology, terrane produces what shape is in in section plane inflection point to inspect dip angle to will produce change, in inflection point two side should be used when fill decorative pattern inspect dip angle differently, and should connect in decorative pattern of inflection point part correct. We used above two commands wrote program of a LISP, better settlement this problem, the institute of plan of graphical as above of scale is shown. The geological profile with scale tectonic drape, also can use this program. CNC Milling CNC Machining