找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
热搜: 活动 交友 discuz
查看: 126|回复: 0

[每日一码] AcDbPolyline::getSplitCurves() 在某些时候仅仅增加顶点而不是拆分曲线

[复制链接]

1

主题

0

回帖

33

积分

管理员

积分
33
发表于 2024-3-14 20:41:04 | 显示全部楼层 |阅读模式
  1. AcGePoint3d projpt;
  2. if ((es = pBoundary->getClosestPointTo(sp, projpt)) != Acad::eOk)
  3.   return es;
  4. AcGePoint3d projpt2;
  5. if ((es = pBoundary->getClosestPointTo(pt2, projpt2)) != Acad::eOk)
  6.         return es;
  7. double dist1;
  8. double dist2;
  9. es = pBoundary->getDistAtPoint(projpt, dist1);
  10. es = pBoundary->getDistAtPoint(projpt2, dist2);
  11. if (dist1 < dist2)
  12. {
  13.   // first point is closer to the start point
  14.   pts.append(projpt);
  15.   pts.append(projpt2);
  16. }
  17. else{
  18.   //second point is closer to the start point
  19.   pts.append(projpt2);
  20.   pts.append(projpt);
  21. }
  22. if ((es = pBoundary->getSplitCurves(pts, ents)) != Acad::eOk)
  23.   return es;
  24. ...
复制代码
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|膜结构网

GMT+8, 2024-12-29 20:58 , Processed in 0.141946 second(s), 23 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表