converting arcs to polylines

Started by alk, October 20, 2014, 05:04:11 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


I do a lot of tracing work, when tracing freeform object I battle to do so with Visio, how can I convert the cusps/arc points on a polyline (which are very rigid and can only be moved up and down) into freeform points (i.e. like the green points which are movable in all directions on the freeform tool) which are movable in all directions. The freeform tool is too inaccurate, so is fit curve tool, round corner tool also does not do the job properly.


If you "join" the shape, you'll get the desired free form points.


I have tried that action: shape>operations>join, the polyline cusps/arcs still remain rigid, I need to be able to move the cusps around in all directions to that I can trace odd line forms. :(
I wan to be able to trace with the line tool, then move the cusps around.


I don't really understand your problem. Having changed the curve to a polyline, you can then add vertices with the pen tool, then edit them.


How would you like using Shape.Paths property?
For example,

Here is short video how the macro runs.
Best Regards,

Junichi Yoda


For tracing, it should be adequate to use the line, curve and pencil tools.  Basically, you outline the shape, making "chord" lines across the curves.  The pencil tool can be used to draw the lines then uses to grab the inflection point to "bend" the line as needed.  Sometimes, the curve tool is a little more powerful, because you can select the inflection point with the pencil tool, which will cause the curve handles to appear and gives you the ability really customize and manipulate the curve.  But, generally, it's sufficient to draw line segments and then bend them.

This topic gives you an idea of what might be accomplished:

The attached Visio file shows an incomplete tracing.  Note, with the pencil tool, you can always control click on a line and insert an node.

Visio 2019 Pro


Thanks, perhaps I did not explain myself correctly, I draw fairly complicated vector images for patent illustrations, many times I need to draw odd shapes such as people or machinery at awkward angles, see attached. The line tool and the pencil tool and the arc tool, in conjunction with the levers are too crude, so is converting a polyline to a curve function.
I would ideally like to use something like the bezier tool that CorelDraw has, or a more refined freehand tool which has nodes which I can manipulate with ease.
See attached example (man with book in hand) as to the types of images I need to trace. How can I do an 'exact' trace of the red squiggle in the attached?


Not impossible with Visio, see attached.  Could be better by adding a few more nodes.  Yes, Visio tools are somewhat "crude", so it takes more time and patience.

So, why not use a drawing tool?  You mention CorelDraw.  Too pricey?  There are some open source drawing tools available that ought to provide the type of capability that you need.  There's also DrawPlus which is relatively inexpensive and has plenty of drawing power.

Visio 2019 Pro


Nice, you used the line and pencil tool and handles on the cusps to angle the curvature of the cusps. Your result is pretty accurate. I have tried that technique in the past but found it to be too cumbersome, also the handles are hard to work with. I was kind of hoping I could convert a polyline into a spline [like the fit-curve tool] without the curve 'jumping out of line' pun intended, then I would just drag the line midpoint nodes to wherever I like. Another package is not a good option- To use another package would slow me down too much. I would rather bit my lip and work with Visio for an occational difficult sketch here and there.


would pathalong and points help this effort?

Set pathalong tolerance pretty tight so that you lots of little line segments
The points would define the begin/end of each segment in the array

Sort of how sketchup does arcs (lots and lots of little straight lines)


Vojo, that sounds interesting, just tell me how to do it, I have been tracing woth Visio for 4 years, so I am familiar with the package but not with the terms you are using "Set pathalong tolerance pretty tight", please spell it out for me what you are referring to, is it: select polyline>shape>operations>fit curve, or some other exciting function I have overlooked!?


its a VBA would have to write VBA to do this.

Basically, you give it a selection and define will return an array of points along the line subject to tolerance
(wide tolerance = beginning and end points of line.....narrow tolerance = array of say 20 points).   From the array you could
construct a polyline from the array (or set of geometries from the points array)


Some thing like
   Line1 = begin to N
   Line 2 = N to N+1
   Line M = N+M, end


details in the developer reference
Look at points function for details

This is the example in development reference

Public Sub Points_Example()

    Dim vsoShape As Visio.Shape
    Dim adblXYPoints() As Double
    Dim strPointsList As String
    Dim intOuterLoopCounter As Integer
    Dim intInnerLoopCounter As Integer

    Set vsoShape = ActivePage.DrawOval(1, 1, 4, 4)

    For intOuterLoopCounter = 1 To vsoShape.Paths.Count

        vsoShape.Paths(intOuterLoopCounter).Points 0.1, adblXYPoints
        For intInnerLoopCounter = LBound(adblXYPoints) To UBound(adblXYPoints)
            strPointsList = strPointsList & adblXYPoints(intInnerLoopCounter) & Chr(10)
        Next intInnerLoopCounter

    Next intOuterLoopCounter

    Debug.Print strPointsList

End Sub 


great, I will give it a try, if I can figure out how, I have zero programming skills.


WapperDude- I have re-read your advice and given it a try, and it seems to work well, I draw a polyline with the arc tool and then come back and adjust the arcs. Thanks.