Author Topic: converting arcs to polylines  (Read 11052 times)

0 Members and 1 Guest are viewing this topic.

alk

  • Jr. Member
  • **
  • Posts: 61
converting arcs to polylines
« on: October 20, 2014, 12:04:11 PM »
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.

Yacine

  • Hero Member
  • *****
  • Posts: 3236
Re: converting arcs to polylines
« Reply #1 on: October 20, 2014, 01:34:29 PM »
If you "join" the shape, you'll get the desired free form points.
Yacine

alk

  • Jr. Member
  • **
  • Posts: 61
Re: converting arcs to polylines
« Reply #2 on: October 20, 2014, 02:07:33 PM »
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.

Yacine

  • Hero Member
  • *****
  • Posts: 3236
Re: converting arcs to polylines
« Reply #3 on: October 20, 2014, 03:25:02 PM »
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.
Yacine

JuneTheSecond

  • Hero Member
  • *****
  • Posts: 1027
    • Visio Shapes, Stencils and Sample Drawings
Re: converting arcs to polylines
« Reply #4 on: October 20, 2014, 05:57:11 PM »
How would you like using Shape.Paths property?
For example,
http://visguy.com/vgforum/index.php?topic=5639.0

Here is short video how the macro runs.
http://youtu.be/sqLKx8Izq5E
Best Regards,

Junichi Yoda
http://june.minibird.jp/

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4882
  • Ideas Visio-lized into solutions
Re: converting arcs to polylines
« Reply #5 on: October 20, 2014, 11:49:34 PM »
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:  http://visguy.com/vgforum/index.php?topic=586.msg2496

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.

HTH
Wapperdude
Visio 2019 Pro

alk

  • Jr. Member
  • **
  • Posts: 61
Re: converting arcs to polylines
« Reply #6 on: October 21, 2014, 01:01:06 AM »
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?

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4882
  • Ideas Visio-lized into solutions
Re: converting arcs to polylines
« Reply #7 on: October 21, 2014, 01:32:48 AM »
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.

Wapperdude
Visio 2019 Pro

alk

  • Jr. Member
  • **
  • Posts: 61
Re: converting arcs to polylines
« Reply #8 on: October 21, 2014, 05:36:37 AM »
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.

vojo

  • Hero Member
  • *****
  • Posts: 1711
Re: converting arcs to polylines
« Reply #9 on: October 21, 2014, 09:18:36 AM »
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)

alk

  • Jr. Member
  • **
  • Posts: 61
Re: converting arcs to polylines
« Reply #10 on: October 21, 2014, 09:34:13 AM »
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!?

vojo

  • Hero Member
  • *****
  • Posts: 1711
Re: converting arcs to polylines
« Reply #11 on: October 21, 2014, 11:11:31 AM »
its a VBA function....you would have to write VBA to do this.

Basically, you give it a selection and define tolerances....it 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)

polyline[begin,N,N,N+1,N+1,N+2,...,N+M,end]

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

vojo

  • Hero Member
  • *****
  • Posts: 1711
Re: converting arcs to polylines
« Reply #12 on: October 21, 2014, 11:25:39 AM »
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 



alk

  • Jr. Member
  • **
  • Posts: 61
Re: converting arcs to polylines
« Reply #13 on: October 21, 2014, 11:54:01 AM »
great, I will give it a try, if I can figure out how, I have zero programming skills.

alk

  • Jr. Member
  • **
  • Posts: 61
Re: converting arcs to polylines
« Reply #14 on: October 27, 2014, 07:47:04 AM »
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.