![]() |
【转帖】怎样画椭圆弧????
怎样画椭圆弧????
怎样画椭圆弧???? 请教各位高手画椭圆弧的源代码!需要这样格式的: acdbellipse *pellipse1=new acdbellipse(); pellipse1->setcenter(acgepoint3d(0,0,0)); 往下就不会了!! 你可以直接调用这个构造函数 acdbellipse( const acgepoint3d& center, const acgevector3d& unitnormal, const acgevector3d& majoraxis, double radiusratio, double startangle = 0.0, double endangle = 6.28318530717958647692); center input center of the ellipse unitnormal input vector specifying normal. this determines the plane of the ellipse. majoraxis input vector which represents 1/2 the major axis of the ellipse radiusratio input ratio of the major radius to the minor radius startangle input start angle of the ellipse in radians endangle input end angle of the ellipse in radians 楼上的能不能写个例子啊 这个函数我也见过,但是不会用! ...这个和函数无关, 去查椭圆的数学名词和方法吧.. major/minor axis是椭圆的两个轴. 完整的椭圆, 起始角=0度, 结束角 = 360度(即2*pai radian, 约等于6.28), 2d椭圆的话, normal设成z轴(0,0,1), cad以中心点和所输入的轴长画图..而已.. virtue is like a rich stone, best plain set. -- francis bacon, <of beauty> 你说的那些我都知道,但是在代码实现中并不容易。如果我想画一个以(0,0,0)点为中心,长轴为10短轴为5的椭圆: pellipse1->setcenter(acgepoint3d(0,0,0));//这句没问题 pellipse1->normal(0,0,1); pellipse1->majoraxis(10); pellipse1->minoraxis(5); 后三句就都出问题了,我arx学的不好,请指教,拜托了! 或者能给我举个例子吗? acedcommand(rtstr,"ellipse",rtstr,"a",rtstr,"0,0",rtstr,"10,0",rtstr,"2.5",rtstr,"180",rtstr,"360",rtnone); 这种方法也能画出来,但是不知道怎样才能把它加到块中! 问题已经解决了!! >pellipse1->setcenter(acgepoint3d(0,0,0));//这句没问题 >pellipse1->normal(0,0,1); >pellipse1->majoraxis(10); >pellipse1->minoraxis(5); >后三句就都出问题了 狂汗! 你用的都不是设定值的函数(edit function)而是求值函数(query function)啊! arx里几乎所有的写入函数都是以setxxx形式出现的, 第一句的setcenter不就没问题么.. 仔细去看一下acgeellipsearc类的函数列表吧.. virtue is like a rich stone, best plain set. -- francis bacon, <of beauty> |
| 所有的时间均为北京时间。 现在的时间是 04:33 AM. |