08.09,11

本文介绍了AutoCAD编程的基础概念,包括关键类如AcRx用于注册和识别、AcDb用于存储图形数据等;解释了如何声明带有默认参数的函数,并介绍了AcDbPolyline::addVertexAt方法中bulge参数的作用及polyline的创建方式。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1.six ARX class unions

AcRx: for register and recognition/identification.(key function:cast());

AcEd: in support reactor(Undo,ESC).

AcDb: to store user's data of graphics including the info of layer,linetype,textstyle es.

AcGi: support service procedures

AcGe: general class primary in geometry.It contains vector,point,and matrix and so on.

ADSRX:derived from ADS,using C programme language.

2.extern function

ex:

extern "C" AcRx::AppRetCode

acrxEntryPoint()

{

}

extern "C" gives AutoCAD system a notice,informing that acrxEntryPoint is a extern function.

acrxEntryPoint is the function's name, and its return type is AcRx::AppRetCode.

3.the statement of a function with a parameter with default value.

ex:

.h

static double RToG(double a=0);

.cpp

::RToG(double a)

{

}

Notes:

The parameter with a default value should be declared in the .h document.

Don't do this in the .cpp document .It's not allowed.

4.AcDbPolyline::addVertexAt(,,double bulge=0,,);

bulge:a parameter is used when you are going to create a polyline (line or arc ) with two or more points.

it equals tan((double)angle between the two points/4 ).If is bigger than 1,the arc is called superior arc,if not ,it is a inferior arc .

5.append ()

add a point into a array.

6. graphics closed                        open                             editing

  Handle                                    ID                                   Pointer

7.the deference between close() and setClose();

p->close() .close a object

p->setClose().It sets the polyline to be closed.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值