Visio Guy

Visio Guy Website & General Stuff => User-submitted Stuff => Topic started by: JuneTheSecond on May 30, 2009, 12:19:04 PM

Title: Full-Automatic Tracing
Post by: JuneTheSecond on May 30, 2009, 12:19:04 PM
Hi,

This is a VBA program to trace curves in the tracing area.
The tracing area is not limited to rectangle. It may be any shape.
The drawing has 8 pages for testing with various shapes.
It is a great joy for me to make this kind of macro.
But I cannot image for "What for".
Have you any idea for the usage?
Title: Re: Full-Automatic Tracing
Post by: aledlund on May 30, 2009, 03:24:39 PM
as a possibility the application might be a first step in creating the necessary path geometries to convert the drawing to xaml.
http://msdn.microsoft.com/en-us/library/bb979645(VS.95).aspx
al
Title: Re: Full-Automatic Tracing
Post by: vojo on May 31, 2009, 02:58:18 AM
here is are a couple applications of this.

Visio animation:

In the animation template I posted, I included std straight line and arcs....but did not have time
to include ability to trace the path of any arbitratry "line".   I have not read this, but assuming it
is either iterative (measurement N = measurement N-1 + some delta) or an array of points, one
could take such a function and apply as increments (find instance m...or....array element m) and
move some shape to that.

Offset of lines:

Assume somebody wants to make an array of lines (think of a PCIe 8X bus shape).  June, you could take your iso connectors and extend so that user makes any arbitrary line (set angles and such in custom properties) and use this to make create an array of lines.  I am not sure, but I think this is different than say copying the lines and offset them since spacing is not visually uniform.

Poor mans CAD:

Assume somebody wanted to see if two lines crossed, one could use this to follow the paths and see if there is an intersect.   Again, I have not looked at this in detail, but assume the measurements are in absolute mm or inches....so some simple math used on the two paths could determine if they cross.
I would think this is more for a reports kind of thing...not so much for drawing since an intersect would spawn a "bump" for visually saying not connected...but that is done be routing today already.

Finally, you could make a 2D to 3D translater.

Since defines the path of a line and thus could be extended to a closed shape, you could do things like copy the shape, offset it, place behind.   Then walk both paths and where there is a change direction
(1st or 2nd derivative if I remember my grade school math), you could connect up the points and make a closed shape for the region tying the two paths together.  If you make this region a separate subshape in the group, you could then apply color and gradients to show more realistic view of the 3D shape
Since this covers an arbitray path, then any arbitray shape could be morphed (maybe want a suite of standard shapes already converted...visio has some of this already but these std shapres are really odd version of 3D...it seems they were done because they were easy...not because they are realistic).
I did this for some std shapes....though I worked the math for the shape...I did not make the subshapes track the original...I am sure if I could ever understand what loctoloc and loctopar really do, I probably could have save countless hours makeing this work.
Title: Re: Full-Automatic Tracing
Post by: vojo on May 31, 2009, 03:05:49 AM
Is there an english translation of www.visio.jp  ?
Title: Re: Full-Automatic Tracing
Post by: JuneTheSecond on May 31, 2009, 06:31:17 AM
Hi,

You can use Google translation.
Enter url, and automatic translation begins.
Title: Re: Full-Automatic Tracing
Post by: JuneTheSecond on June 01, 2009, 10:57:28 AM
Hi,

I've added a macro to convert text into shape using WordArt.
Right click on the shape at page-1, and select menu "Visio WordArt".
Then the text in the shape is converted into WordArt and makes new shape.
If you change the text in the shape, you can make another Visio-WordArt.
If You change the font, you can make another Visio-WordArt of different font.

If you auto-trace the new shape, you can make shapes of polygonal lines.
Then if you use my stencil "Make Italic", the shape will be obliqued like italic font text.
It is shown in page-2. Make Italic is available at, http://visguy.com/vgforum/index.php?topic=554.msg2332#msg2332

But a problem is the shapes thus made are incredibly heavy.
My PC stopped two times due to over heating during auto-tracing. ;) ;) ;D ;D
Title: Re: Full-Automatic Tracing
Post by: Visio Guy on June 01, 2009, 02:05:15 PM
This is really cool, Junichi!

I have tried to convert text from Word Art in the past, and the result (in Visio) was very poor and jaggy. Either Word Art/Visio has gotten better or your code does something right!

This is a great tool for making shapes out of text, which is important if you are need fill and line effects on text, or for shapes where the text doesn't change and you don't want to use smart formulas to make the text resize (think of a STOP sign - the text is really a graphic that usually doesn't need to be translated)

Now, effects like this are possible:

Title: Re: Full-Automatic Tracing
Post by: JuneTheSecond on June 04, 2009, 08:13:16 AM
Thank you Chris!
I've enhaced Visio-WordArt.
It might be better for me to add new topic about Visio-WordArt.