Visual LISP develops program of three-dimensional and columnar corkscrewed yarn

  • Time:
  • Click:152
1, foreword is in numerous AutoCAD development tool, autoLISP is to use the simplest, application the tool of a kind of development with the most extensive, most person that use. But, autoLISP is a kind of explanation language only, and cannot add close. To solve this problem, autodesk company rolled out the test version of Visual LISP in AutoCAD R14, rolled out the official version of Visual LISP in AutoCAD 2000 subsequently. Visual LISP is completely compatible the AutoLISP previously, used the another development tool of AutoCAD at the same time-----ObjectARX object-oriented technology and ActiveX technology, the applied process function that makes Visual LISP is developed is more powerful, traversal speed is faster, become a development platform that can develop commercial software truly thereby. Article author used the Visual LISP in AutoCAD 2000 to undertake program of three-dimensional and columnar corkscrewed yarn is developed, as alternant as AutoCAD 2000 plot is united in wedlock, quick draw is three-dimensional whorl and bedspring. 2, of the problem put forward the author to be in when with AutoCAD 2000 scale three-dimensional project pursues, often encounter scale whorl, bedspring the problem of this kind of three-dimensional and columnar corkscrewed yarn. In AutoCAD, the command of three-dimensional line has scale a lot of, wait for a command like Line, 3Dpoly, Spline, and the line that the line that can regard three-dimensional drawing as method has 3Dpoly to command draw goes out only can be competent, and cannot use among them plan to close. Accordingly, to make sure the size of three-dimensional and columnar corkscrewed yarn of scale is exact, must input a large number of accurate data, picture of ability bit by bit gives needs corkscrewed yarn, do special trouble so. Use circular arc to make corkscrewed yarn approximately about data introduction [1] , but the whorl that such pictures give cannot be checked through assembling interference. As a result of corkscrewed yarn of no-go in AutoCAD scale, to solve this problem, the author uses a staff program of a LISP will come true. This program can realize columnar corkscrewed yarn automatic plot, can use at the whorl line of scale bedspring corkscrewed yarn and whorl not only. Still can undertake parameter transforms plot. 3, the scale   of columnar corkscrewed yarn 3.

The formation of columnar corkscrewed yarn of * of   of model of maths of 1 columnar corkscrewed yarn is columnar corkscrewed yarn is the dimensional curve with the widest application on the technology, if the graph is shown 1 times,its are formed. The bus AB that nods M edge cylinder easily is made etc fast sharp movement, and the axes that this generatrix circles cylinder again makes isogon fast when rotating, the athletic contrail that nods M is columnar corkscrewed yarn namely. When the Z gross ril load that   of * maths model fastens when the axes of columnar corkscrewed yarn and coordinate closes, bit of M is moved on columnar corkscrewed yarn (X, y, z) parameter equation is as follows: α of T1* of ± of Z= of   of   of Y=rsin α of   of   of   of   of   of   of   of   of   of   of   of   of   of   of   of   of   of X=rcos α   / (2 π )   of   of   of   of   of   of   of   of   of       is in parameter equation: R is the radius of columnar face, α promotes role for corkscrewed yarn, t1 is lead (namely bus AB rotates when a week, the rise distance on direction of axes of edge of the M that move a point) , dextrorotation takes positive sign, zun Xuan takes negative sign. 3.

2 programs block diagram begins   of   of   of assignment of   parameter R, T1, K to give out X of computation of base point coordinate, y, z nods coordinate scale corkscrewed yarn to end   each 3.

3 programs code opens AutoCAD2000 to enter Visual LISP to develop an environment, build a file, undertake in window of editor of Visual LISP text program code weaves. The AutoLISP program code of scale cylinder corkscrewed yarn is as follows:   of   of; This Program Is Using For Drawing A Helix (  of Setq   B1 (Getpoint   " inputs base point please: ") )   of   of       (  of Setq   R (R= of radius of Getreal   " : ") )     (  of Setq   T1 (T1= of pitch of Getreal   " : ") )     (  of Setq   K (Getint   " paragraph several K= : ") )     (  of Setq   N (circle of Getint   " counts N= : ") )       (  of Setq   Ta (/   (2   of *   3.

  of   of 14159)   K)) (  of Setq   J1 (/   of   of K)) of   T1   (  of   of 0) of   of Setq   A (  of   of 0) of   of Setq   Jj (  of   of 0) of   of Setq   Ii (    of B1) of   of "o" of   of Command   "ucs" (. When draw bedspring, n is the total pen number of bedspring; When draw whorl, if the length of whorl is L, criterion N=L / T1. Save this LISP program for " Helix.

Lsp" . When writing LISP program, should notice an input must correct, bracket and blank space are indispensable, can affect the contrail of corkscrewed yarn otherwise. 3.

4 programs run result to load and run "helix.

Lsp" program, command an occurrence clew in AutoCAD2000 plot window above all, after by clew input parameter R, T1, K, N is worth, corkscrewed yarn has been drawn namely. 4, bedspring of scale of * of applied     changes coordinate in AutoCAD2000 plot window is, with " the picture is round " command scale bedspring is sectional, regard bedspring drawing method as drawing corkscrewed yarn again, undertake proper analyse cuts scale bearing paragraph if the graph shows spring 5 times,had drawn namely. The bedspring parameter of our scale is as follows: External diameter D=14mm, d=1mm, pitch T=4mm, significant group counts N1=10, bearing encircles several N2=2.

5, dextral. If * scale whorl is used " the picture is polygonal " command scale triangle or rectangle are sectional, regard whorl drawing method as drawing corkscrewed yarn again. Undertake proper nap next, we can get 6 show thread is like a graph. 5, conclusion   (1) environmental to load is developed in Visual LISP and run program of AutoLISP of columnar corkscrewed yarn, after command of AutoCAD2000 plot window goes, input different parameter by clew, can the three-dimensional and columnar corkscrewed yarn that scale place needs. Reason this, can parameter changes quick draw all sorts of three-dimensional whorl and bedspring. (2) AutoLISP application process should look for text editor additionally to write source code before, the to load in returning AutoCAD next moves, do not facilitate of the program debug. With environment of Visual LISP compositive development, we can be in an alone environment executive text editor, program is debugged, wait for an operation interactively with what AutoCAD etc uses a program, went to the lavatory greatly 2 development of AutoCAD, satisfy the 2 development need of technical personnel AutoCAD. CNC Milling