【问题标题】:!Clipper library Line polygon use offset How it Union!Clipper 库 线多边形使用偏移量 如何联合
【发布时间】:2017-04-06 22:50:24
【问题描述】:

我想画线多边形并使用偏移,但它是 Union

【问题讨论】:

    标签: polygon offset clipperlib


    【解决方案1】:

    Suppadech,我建议您将两条闭合路径传递给 ClipperOffset 对象,其中第二条路径的方向与第一条路径相反。

      int main()
      {
        Paths subj(2);
        Paths solution;
        subj[0] << IntPoint(10,10) << IntPoint(100,10) << IntPoint(100,100) <<  IntPoint(10,100);
        subj[1] << IntPoint(10,10) << IntPoint(10,100) << IntPoint(100,100) <<  IntPoint(100,10);
        ClipperOffset co;
        co.AddPaths(subj, jtSquare, etClosedPolygon);
        co.Execute(solution, 5.0);
      }
    

    【讨论】:

      猜你喜欢
      • 2016-09-13
      • 2016-02-25
      • 2013-06-10
      • 1970-01-01
      • 2019-05-30
      • 2017-06-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多