.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Evaluate Polyline / Give a Polyline an outline

2 REPLIES 2
Reply
Message 1 of 3
SRSDS
400 Views, 2 Replies

Evaluate Polyline / Give a Polyline an outline

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.

 

 

2 REPLIES 2
Message 2 of 3
SRSDS
in reply to: SRSDS

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.

 

 

Message 3 of 3
Keith.Brown
in reply to: SRSDS

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.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost