yzy0224

CAD返回曲线组成的闭合区域面积(com接口c#语言)

IMxDrawCurve::GetArea

返回曲线组成的闭合区域面积,具体详细如下:

 

参数 说明

[out] DOUBLE* pArea

返回闭合区域面积

 

C#代码计算闭合区域面积:

 

        MxDrawPolyline pl = new MxDrawPolyline();
 
        MxDrawPoint pt1 = new MxDrawPoint();
        pt1.x = 10;
        pt1.y = 10;
        MxDrawPoint pt2 = new MxDrawPoint();
 
        pt2.x = 20;
        pt2.y = 20;
        MxDrawPoint pt3 = new MxDrawPoint();
 
        pt3.x = 30.5;
        pt3.y = 10;
        pl.AddVertexAt(pt1);
        pl.AddVertexAt(pt2);
        pl.AddVertexAt(pt3);
        pl.IsClosedStatus = true;        
        double dArea = 0.0;
        pl.GetArea(out dArea);

分类:

技术点:

相关文章:

  • 2022-01-26
  • 2022-02-15
  • 2021-12-22
  • 2021-12-26
  • 2022-02-03
  • 2021-12-23
  • 2021-11-27
  • 2021-11-17
猜你喜欢
  • 2021-12-13
  • 2022-01-12
  • 2021-12-12
  • 2022-01-25
  • 2021-12-12
  • 2022-02-11
  • 2022-02-06
相关资源
相似解决方案