Clever the Cal function in applying AutoCAD
- Time:
- Click:68
- source:TECHEN CNC Machining
9571. Namely the AutoCAD value with expression 41.
The 9571 radius scale that are a circle a circle. 2, Cal function is looking for a dot to be applied mediumly in using AutoCAD plot, often need to decide a few cannot give out directly the dot of coordinate. For example, random the midpoint between 2 o'clock, with the round the centre of a circle with aleatoric linear and tangent direction, and assume office point-blank dot of meaning divide into equal parts. The geometrical operation function of the Cal function of AutoCAD can make full use of here, the fast fixed position of these dots comes true in AutoCAD plot. The geometrical operation function that the Cal function that uses AutoCAD is below realizes the example of a when often encounter in AutoCAD plot fast fixed position. For example, should be apart from the 2/3 place between one steep end points to be drawn for start from a the centre of a circle all the time line. Unit process of cargo bandling is as follows: Command:lIneFrompoint:'Cal (starting geometry calculator) Expression:pLt(cen, end, 2/3)(inputs expression, here calculator regards the Cen of OSNAP and End mode as a little bit of coordinate temporarily location) SelectentityforCENsanp:(Consumed mark catchs the centre of a circle) SelectentityforENDsnap:(Does consumed mark catch steep end points) Topoint: ? Ling of Lu which collate crouchs Nt of Zuo of of Jiao J sword, Ins and Tan to wait to all can be calculated in geometry use in expression. 3, Cal function often applies AutoLISP to undertake 2 times developing to AutoCAD in the handles a few AutoCAD advanced user in AutoLISP, but the expressive method of the expressive method of the function operation form that AutoLISP place takes oneself and we current function operation mood is different, this brought certain trouble to development process. Everybody knows, autoCADR12 and above version all embedded the geometrical calculator Cal with a powerful function, it provided all sorts of commonly used function functions. But what very rare data alludes is: Geometrical calculator Cal can serve as a function to be called in AutoLISP directly, besides, it still can accept AutoLISP variable to have operation. Here with scale the function curve of a Y=2x-100sin(x) is exemple, give out the Cal function application in AutoLISP. Program of function curve scale is as follows: (DefunPsin(d); among them the condition that D is function is chief (Setqi0)(setqe360)(setqxi)(setqy(cal"2*x-100*sin(x)"))(setqp1(listxy))(while(<ie)(setqi(+id))(setqxi)(setqy(cal"2*x-100*sin(x)"))(setqp2(listxy))(command"_line"p1p2"")(setqp1p2))) can see from the example above, because used Cal function, the function expression in AutoLISP program becomes convenient forthright, can use this method to weave general function curve inputs scale program especially, do not have blemish of jussive of function curve scale in order to make up for AutoCAD. But the unit that the expressive method place that should notice these two kinds of function in use process uses agrees not completely, what in AutoLISP angle uses is radian, and the acquiescent unit in the angle unit that when using Cal function, uses and AutoCAD is consistent. 4, the Cal geometry calculator with the powerful function that brief summary handles AutoCAD to be taken oneself neatly, not only can execute standard maths function, and can calculate expression of dot, vector and real number and integral expression, still can insert AutoLISP variable arithmetical expression and return the value of expression, in order to give AutoLISP variable assignment. No matter be primary,the person that use still applies AutoLISP to have the advanced user of development 2 times, apply Cal function ably to be able to get the result of get twice the result with half the effort. CNC Milling CNC Machining