Author Topic: Full-Automatic Tracing  (Read 8984 times)

0 Members and 1 Guest are viewing this topic.

JuneTheSecond

  • Hero Member
  • *****
  • Posts: 1027
    • Visio Shapes, Stencils and Sample Drawings
Full-Automatic Tracing
« on: May 30, 2009, 07:19:04 AM »
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?
« Last Edit: May 30, 2009, 10:47:47 PM by JuneTheSecond »
Best Regards,

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

aledlund

  • Hero Member
  • *****
  • Posts: 1412
Re: Full-Automatic Tracing
« Reply #1 on: May 30, 2009, 10:24:39 AM »
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

vojo

  • Hero Member
  • *****
  • Posts: 1258
Re: Full-Automatic Tracing
« Reply #2 on: May 30, 2009, 09:58:18 PM »
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.

vojo

  • Hero Member
  • *****
  • Posts: 1258
Re: Full-Automatic Tracing
« Reply #3 on: May 30, 2009, 10:05:49 PM »
Is there an english translation of www.visio.jp  ?

JuneTheSecond

  • Hero Member
  • *****
  • Posts: 1027
    • Visio Shapes, Stencils and Sample Drawings
Re: Full-Automatic Tracing
« Reply #4 on: May 31, 2009, 01:31:17 AM »
Hi,

You can use Google translation.
Enter url, and automatic translation begins.
Best Regards,

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

JuneTheSecond

  • Hero Member
  • *****
  • Posts: 1027
    • Visio Shapes, Stencils and Sample Drawings
Re: Full-Automatic Tracing
« Reply #5 on: June 01, 2009, 05: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
« Last Edit: June 01, 2009, 06:42:10 AM by JuneTheSecond »
Best Regards,

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

Visio Guy

  • Administrator
  • Hero Member
  • *****
  • Posts: 1662
  • Smart Graphics for Visual People...n' Stuff
    • Visio Guy
Re: Full-Automatic Tracing
« Reply #6 on: June 01, 2009, 09:05:15 AM »
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:

For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

JuneTheSecond

  • Hero Member
  • *****
  • Posts: 1027
    • Visio Shapes, Stencils and Sample Drawings
Re: Full-Automatic Tracing
« Reply #7 on: June 04, 2009, 03:13:16 AM »
Thank you Chris!
I've enhaced Visio-WordArt.
It might be better for me to add new topic about Visio-WordArt.
Best Regards,

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