更新时间:07-06 (艾薇儿)提供原创文章
摘要:本文介绍了一种利用ObjectARX对AutoCAD中的spline进行弦线逼近处理的数学方法,取得较好的逼近效果。这种方法已较好地应用于数控加工前处理。同时也简要介绍了直线逼近和圆弧逼近2中NURBS曲线逼近算法。
鉴于目前一般的数控机床只具备直线插补和圆弧插补功能。当加工由抛物线、椭圆等复杂曲线组成的轮廓时,只能用若干直线段或圆弧段去逼近其轮廓。这种方法的数学处理比较简单,但由于各节点连接处存在尖角,导致零件表面出现刀痕,从而降低表面加工质量。同时,为减轻编程工作量,采用AutoCAD二次开发予以实现。
因此,本设计主要目的在于让我们学习并掌握ObjectARX平台的基本概念与开发体系,了解各种样条曲线和直线的逼近算法,在此基础上利用弦线逼近算法完成算法设计。最后在ObjectARX开发平台基础上,采用面向对象的方法,设计适用于数控加工编程的曲线逼近功能模块,并通过该平台将SPLINE样条曲线的图形利用弦线逼近算法予以编程实现。本毕业设计的贡献在于用ObjectARX二次开发在AutoCAD环境下予以编程实现,促进了该算法的工程应用。
关键字:ObjectARX,SPLINE 曲线,插补算法
Abstract:In this paper ,a chord approach method of spline in AutoCAD ,using ObjectARX, is introduced. The mathematic processing results are satisfied ,and this approach method works well in pre-processing of numerical control machining. Introduced two kinds of arithmetic of approaching to the NURBS curve i.e.
The current general given of the CNC machine tools have only linear interpolation and circular interpolation function. When processing the parabola ,elliptic curves, and other complex components of the outline, only with some of the straight line or arc to close its contours.This method of treatment is relatively simple mathematics ,but because of the existence of the cusp connecting nodes,leading to the surface appear Daohen parts, which will reduce the surface our work for object.
Therefore, the design for us is to learn and grasp the basic concept of ObjectARX platform and development system, knowledge of the kind of curves and straight-line approximation algorithm, on the basis of this ues of straight-line approximation algorithm completed algorithm design. Finally the ObjectARX development platform is based on the using of object-oriented approach ,design applied to the NC programming approximation of function modules , and the adoption of the platform will be free of the SPLINE graphics straight-line approximation algorithm to programming. The contribution of graduation project is to programming and promote the method of application by using ObjectARX second development in AutoCAD environment.
Keywords: ObjectARX,spline curve, approximation algorithm