编程语言
首页 > 编程语言> > CAD绘制椭圆填充(com接口c#语言)

CAD绘制椭圆填充(com接口c#语言)

作者:互联网

c#代码实现如下:

                MxDrawEllipse ellipse = new MxDrawEllipse();

                MxDrawPoint cen = new MxDrawPoint();

                cen.x = 100;

                cen.y = 200;

 

                ellipse.Center = cen;                

                MxDrawVector3d majAxis = new MxDrawVector3d();

                majAxis.x = 100;

                majAxis.y = 0;

 

                ellipse.MajorAxis = majAxis;

 

                ellipse.RadiusRatio = 0.5;

 

                MxDrawPoints pts =  ellipse.GetSamplePoints(0.1);                

                for (int i = 0; i < pts.Count; i++)

                {                    

                if (i == 0)

                        axMxDrawX1.PathMoveTo(pts.Item(i).x, pts.Item(i).y);                    

                        else

                        axMxDrawX1.PathLineTo(pts.Item(i).x, pts.Item(i).y);

                }

 

                axMxDrawX1.PathMakeClosed();

                axMxDrawX1.DrawPathToHatch(1);

                axMxDrawX1.ZoomAll();;

标签:Item,c#,com,axMxDrawX1,majAxis,cen,pts,ellipse,CAD
来源: https://blog.csdn.net/u013725001/article/details/94552709