"Aesthetic" dashed lines

Started by YossiD, November 10, 2022, 09:31:23 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

YossiD

I am reproducing in Visio a diagram that has shapes with dashed lines. In the attached file, the original diagram is at the top, and my reproduction is below it.

In the original, the dashed lines are solid at the ends and vertices of the shapes, which definitely makes for more attractive diagrams. In the Visio diagram, the spacing of the dashes appears to be random. Is there any way to achieve the "aesthetic" dashed lines in Visio? I suppose I could draw the shapes with solid lines and then overlay the white spaces, but that would be a crude and inelegant workaround, to say the least.

vojo

this drawing is wacked up on many levels.    Did you create or use a template for it?
Really cant view it, pan it, etc.

in general, dash lines are based on the entire path of the line....so if there are corners et al, the dash is from absolute start to finish (why if you grow the shape, the dash lines adjust).

you can make your own dash lines using the those commands to do that....may even be able to affect behavior.

I really cant see the drawings to comment more on your question

wapperdude

#2
What you're seeing is normal Visio behavior which has no convenient workaround as far as I know.  Visio uses a very simple implementation. 

From my experience, Visio doesn't honor both endpoints wrt dashes.  It starts the dashed sequence at 1st point, runs the specified dashed spacing pattern until it reaches the end.  That means, the end point may or may not have a solid line segment coincident with its location.  To honor both end points becomes more involved as both dash and space lengths must be flexible to some degree to guarantee a dash segment at end points and, at corners, in the case of 2-D shapes. Such behavior is much more sophisticated than the Visio approach.  Hence, you will not see the  nice visual as shown in your captured image.

One could argue that the dash-space is the quantized, base value.  That is probably more technically correct, but not as obviously correct when considering design of an arrow.
Visio 2019 Pro

Yacine

Hello Yossid,

this shouldn't be a big deal.

You're using single and double headed arrows, but we need to make sure that the path lengths don't change. So you need to build the arrow as group of two sub shapes, so that when you change an arrow side to a plain one the other does not change.

Instead of using a built-in line pattern, make your own where you would carefully adjust the lengths of the black parts and the gaps.

You're almost done, either make predefined masters of these arrows, or setup a smartshape, where you could for instance modify the starting point of each sub-shape so as to make it symetric.

HTH,
Y.
Yacine

wapperdude

Quote from: Yacine on November 10, 2022, 07:52:49 PM
this shouldn't be a big deal.

I'm going out on a limb and say I disagree.  At least for an arbitrary arrow design.  The constraints make this a challenge.  There are 3 straight line sections:  the arrowhead diagonal, the bump out from the body, and the length of the body (or side), pls 4 anchor points: arrowhead tip, two bends, and the end corner. None of the anchor points may have a gap.  (Actually, A bit worse as I did not include the 1/2 width of the tail end.)

For a non-arbitrary design, I think the approach might proceed as follows...
1). The bump out is the shortest distance and must have at least 1 gap,  plus, ideally, 1/2 of a "dash" at each corner..  Thus, the bump out is the critical, quantized, dimension.
2)  It sets the dash-space composite length, the arrowhead diagonal length, the body length, and the body width.  All of these need to be integer multiples of the bump out length.
3)  The custom line pattern must be scaled accurately.
4). As long as the arrow design is constrained to be based upon the bump out value, then, A smart shape ought to be feasible.

Yep.  Piece of cake.   ;);D

Visio 2019 Pro

Yacine

#5
Would you like some whipped cream with your piece of cake?  ;) ;D


The recipe:
- no custom pattern needed
- one main group shape
  - set as 1D shape
  - with 2 controls as starting and ending points for the underlying geometry sections - that's where you actually move the position of the patterns (2, one for each side)
  - 2 controls for the length of the arrow head and the width of the body
  - a prop field "Arrow type" for choosing between single and double arrow
- 3 geometry sections
  - #1 an arrow half, always shown
  - #2 the second arrow half shown when double arrow needed
  - #3 the line end without arrow head.
- Works also with filling


The taste is not perfect yet, since you need to play with the controls to make it neat, but hey good enough for a beginning.
Alternatively one may play with symmetrical halves (arrow split lengthwise).


This said, I did not consider the "bumps" but you can play with the line weight and the overall curve length via the height, the arrow head length and the width of the body.
Yacine

wapperdude

That's really clever.  Fun to play with too.

It looks like it ought to be adjustable to achieve reasonably close to the optimum pattern.  There is a lot of interaction, so soime patience is involved.

If you're providing whipped cream, I'm switching over to pumpkin pie.  Tis the holiday season after all.

Have a great week-end!
Visio 2019 Pro

Yacine

#7
Thanks for the flowers. A peaceful time to you all too.


PS to my previous post:
Since it is cumbersome to find the right adjustment I suggest that once found, you convert the shape back to 2D and lock its width and height.
Yacine

wapperdude

#8
Good point!

BTW, invoking 1D to tackle this issue was brilliant.  Pretty sure that approach would never occurred to me.
Visio 2019 Pro

YossiD

Thanks guys, this is really quite excellent. With my rudimentary knowledge of shape design I doubt I'd ever have managed to come up with anything this elegant, and certainly not so quickly,

I will use these arrows as is for the time being, and if/when time allows I'll delve into the shape sheets to try to understand exactly how they work, and to apply the same techniques to other shapes (straight lines/arrows, rectangles, triangles, etc.).

Many many thanks.

p.s. Please add my vote for pumpkin pie, with shoofly pie as a very close second.