I need to assess a polyline to understand what to do with it.
I have the number and location of vertices but need some more information.
Dim obj As DBObject = trans.GetObject(per.ObjectId, OpenMode.ForRead) Dim lwp As Polyline = TryCast(obj, Polyline) If lwp IsNot Nothing Then Dim vn As Integer = lwp.NumberOfVertices For i As Integer = 0 To vn - 1 Dim pt As Point2d = lwp.GetPoint2dAt(i) ed.WriteMessage(vbLf & pt.ToString()) Next End If
At the moment I think I only need the number of arcs and their radii.
The goal is to display polylines with a thickness but without the grippoints of the outline.
I know this can be done by setting giving the polyline a global width and setting FILLMODE to 0 but I don't like the way it draws arcs and I can't snap to the outline.
If someone can suggest something to achieve what I'm after I'd really appreciate it.
I've just found this thread which explains how to determine which segments are arcs.
http://forums.autodesk.com/t5/net/get-polyline-segment-lengths/td-p/3142838
This may be a longshot but if someone happens to have a snippet of code showing how to outline a polyline it would be helpful.
Perhaps Norman's blog can be of service.
http://drive-cad-with-code.blogspot.com/2014/09/moving-mouse-cursor-to-trace-polyline.html
I would scroll down to the bottom first and view the video. At approximately the 20s mark you can see how the polylines are outlined. I would then study his code to see how he did it.