Message 1 of 3
Can we get the segment type from Polyline2d and Polyline3d using C# ?

Not applicable
01-22-2015
01:53 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
In Polyline, we have the GetSegmentType:
public static void GetPolylineSegment(Polyline pline){
Point3d p3d;
SegmentType stype; int vn = pline.NumberOfVertices; for (int i = 0; i < vn; i++){ p3d = pline.GetPoint3dAt(i);
segmentType = pline.GetSegmentType((int)pline.GetParameterAtPoint(p3d));
if (segmentType == SegmentType.Arc) {
// find an arc segment
}
else if (segmentType == SegmentType.Line) {
// find a line segment
}
// ... } }
Polyline2d and Polyline3d doesn't have the same method, so is there a workaround to deal with ?