Clever the Cal function in applying AutoCAD

  • Time:
  • Click:141
  • source:TECHEN CNC Machining
The article is aimed at the powerful function of the Cal geometry calculator that AutoCAD brings oneself, union operates example, gave out the use development of Cal geometry calculator in AutoCAD differs mediumly apply. AutoCAD is in as software of a professional plot mechanical, electron, building and domain of boat cool one's heels received wide application, but the use person of most AutoCAD knows AutoCAD has powerful plot function only, very few however somebody notices one of AutoCAD very useful command: Geometrical calculator Cal. With common calculator, cal geometry calculator can be finished add, decrease, by, the operation that divides operation and trigonometric function. This makes the user is in process of use AutoCAD plot, jussive circumstance can be broken to fall to undertake arithmetic manipulation with the computer in bos, autoCAD regards jussive parameter as to use the result of operation directly. But important is, differ with general calculator, autoCAD geometry calculator can make geometrical operation. It can make coordinate between dot and coordinate dot add reduce operation, the OSNAP pattern that can use AutoCAD catchs the coordinate dot on screen to participate in operation, return coordinate of geometry of OK and automatic computation to nod. If calculate two to intersect linear node, dot of divide into equal parts of computational straight on-line. In addition, autoCAD geometry calculator still has the function of computational vector and normal. One, the computational function of Cal function is applied in AutoCAD, cal command is similar to a common calculator, can use computation and add, decrease, by, except wait for concerned criterion numeral to learn expression, and the order of standard maths operation of expression of comply with operation. And, cal commands to returning is transparent name makes, can use offer to nod or a number. When us transparent when executing this order, its computation is explained for AutoCAD jussive an input is worth as a result. It is transparent below an example of executive calculator function. With (200, 200) it is for radius of scale of the centre of a circle [(the circle of 425-260)*(1/3)+sin(45)] . (1) inputs all right in the command: C, press ENTER key; (2) commands a clew: "Appoint round the centre of a circle or [at 3 o'clock (3P) / at 2 o'clock (2P) / tangent, tangent, radius (T) ] : ? ? is inputted (100, 100) bolt by ENTER; (3) commands a clew: "Appoint round radius or diameter: " , input right now: "Cal " , press ENTER key, input expression next: (425-260)*(1/3)+sin(45) presses ENTER key; (4) command shows all right: 41.

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