TA的每日心情 | 开心 昨天 06:36 |
---|
签到天数: 15 天 [LV.4]偶尔看看III
管理员
- 积分
- 1308
|
- static void GetNextPt(const AcDbPolyline* plMin,const bool& gotonext,const int& plIndex,AcGePoint2d& ptNextS,AcGePoint2d& ptNextE)
- {
- int nextIndex = 0;
- int count = plMin->numVerts();
- if(!gotonext)
- {
- if(plIndex > 0)
- {
- nextIndex = plIndex - 1;
- }
- else
- {
- nextIndex = count - 1;
- }
- }
- else
- {
- if(plIndex < count - 1)
- {
- nextIndex = plIndex + 1;
- }
- else
- {
- nextIndex = 0;
- }
- }
- AcDbPolyline::SegType nextType = plMin->segType(nextIndex);
- if(nextType == AcDbPolyline::SegType::kArc)
- {
- AcGeCircArc2d arc2d;
- plMin->getArcSegAt(nextIndex,arc2d);
- ptNextS = arc2d.startPoint();
- ptNextE = arc2d.endPoint();
- }
- else
- {
- AcGeLineSeg2d line2d;
- plMin->getLineSegAt(nextIndex,line2d);
- ptNextS = line2d.startPoint();
- ptNextE = line2d.endPoint();
- }
- }
复制代码 |
|