Author Topic: Shape with shadows only on SOME lines  (Read 19094 times)

0 Members and 1 Guest are viewing this topic.

David.P

  • Full Member
  • ***
  • Posts: 169
Re: Shape with shadows only on SOME lines
« Reply #15 on: November 28, 2014, 01:20:52 PM »
Open the circle shapesheet for any of your original shapes.

Whoa! Is this possible at all when I am NOT working with a group, or with glued shapes? I mean, if my shape is, umm... a shape?

Like the attached one. Can I block this shape's circle from having a shadow?


THIS:

...would actually be the labeling shape of my DREAMS.

Could this also be done somehow (I mean, in one piece, as a shape) ...........?

Maybe it could be done as a custom line pattern, with two custom line ends? OK, maybe not, because a line end can not have editable text inside it, can it?
« Last Edit: November 28, 2014, 02:13:48 PM by David.P »
Visio 2003 for production
Visio 2019

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3833
  • Ideas Visio-lized into solutions
Re: Shape with shadows only on SOME lines
« Reply #16 on: November 28, 2014, 03:24:03 PM »
Yes.  Your shape is still a grouped shape.  Sheet.10 is the circle. 

Doing your dream shadow is a little more work.

You can do the outline of the line with a custom pattern that groups two line shapes.  One is the desired line pattern, the 2nd is the "shadow", which would be, say, 50% wider. Center both shapes to each other, group.  Then use the pattern.  End points will still be a problem, but, your 90% there.

Wapperdude
Visio 2019 Pro

David.P

  • Full Member
  • ***
  • Posts: 169
Re: Shape with shadows only on SOME lines
« Reply #17 on: November 28, 2014, 04:01:49 PM »
Thank you Wapperdude, this all sounds really great.

I will try both approaches, and report back!
Visio 2003 for production
Visio 2019

David.P

  • Full Member
  • ***
  • Posts: 169
Re: Shape with shadows only on SOME lines
« Reply #18 on: November 28, 2014, 05:26:17 PM »
Thought of a 3rd solution that might be even more appealing.  Open the circle shapesheet for any of your original shapes.  Scroll down to the Fill section.  In the shadow pattern cell, enter the formula Guard(0).  This will prevent the circle from having a shadow, but allow all other formatting to be normal.  I think this may be the best solution for you.

Can I block this shape's circle from having a shadow?

Yes.  Your shape is still a grouped shape.  Sheet.10 is the circle.

Great!

OK for part 1 -- it worked!
Visio 2003 for production
Visio 2019

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3833
  • Ideas Visio-lized into solutions
Re: Shape with shadows only on SOME lines
« Reply #19 on: November 28, 2014, 05:51:39 PM »
Unfortunately, I'm bored, so, have time to waste.  If you're willing to go with a more complex shape, then the following solution gets around some of the shadow deficiencies.  I'd say, this is a 95% solution/workaround.  It includes a "shadow" around the circle, too.

First, for the line, basically add a 2nd line, and slave its lineweight to the 1st line, something like, =guard(sheet.1stline!lineweight*2). 
Then, slave the line color to the shadow color of the group shape.

Second, for the circle, if you want a shadow, and if you want it to be uniformly oversized with the line "shadow", then you need to add another circle to the group, center it, send it to the back.
Again, over size the lineweight, and slave the color to the group shadow color.

For all of the shapes, set the shadow pattern to guard(0).  This approach doesn't use actual shadowing, just uses its color via user interface menu.

The reason this is only 95%, is that it works fine for no line ends and circular line ends.  Arrow heads give poor result, because the tip of the arrow is at the line end.  Try it, you'll see what I mean. 

Anyway, it's another approach to look at.  Perhaps give you some additional ideas.

Wapperdude

Visio 2019 Pro

David.P

  • Full Member
  • ***
  • Posts: 169
Re: Shape with shadows only on SOME lines
« Reply #20 on: November 28, 2014, 06:39:17 PM »
Whoaa, Wapperdude, this is amazing!

Your shape even resizes line width, and end size, and shadow size correctly in all cases!

I built someting as well in the meantime!



Mine is not coded in the shape sheet (because I am useless there) but instead built with custom lines and line ends.

I will make one with arrow end as well.

Only drawback is, the line end can't be sized separately from the line thickness, because this will break the line & end congruence where the line hits the end bullet. Looks like this then:



I can't seem to figure out if it is possible to create a line/end combination that does not have this problem. It seems that the line end is always placed on top of the line by Visio, otherwise I probably could fix this.

[edit: must go to bed now]
« Last Edit: November 28, 2014, 06:46:45 PM by David.P »
Visio 2003 for production
Visio 2019

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3833
  • Ideas Visio-lized into solutions
Re: Shape with shadows only on SOME lines
« Reply #21 on: November 28, 2014, 07:18:55 PM »
The problems you're experiencing are what drove me to the alternative approach.  It does seem that Visio does place the line end on top of the line.  Shadows, typically, are offset in most applications.  Since they mimic shadows, they do not scale nicely as outlines.

The arrowheads are particularly troublesome because they reference the point tip.  That means, there must be some offset applied when an arrowhead is used, and, this must be proportional to the size of the arrowhead.  There doesn't seem to be enough information to solve the problem, but, I haven't looked that closely.

The shapesheet formulas are not that involved.  Basically, you need to determine which is the "parent" and which is the "child", figuratively speaking, and then establish the relationship by formula.  It takes a little planning, deciding which feature you want to use / not use...but usually, as you try something and look at the effect, you see what works and doesn't, learning from this.

Wapperdude
Visio 2019 Pro

vojo

  • Hero Member
  • *****
  • Posts: 1528
Re: Shape with shadows only on SOME lines
« Reply #22 on: November 30, 2014, 08:58:53 PM »
NP

put one line on top of the other in a group

Top line
   - Line end you want
   - narrower than bottom line

Bot line
   - Set to use same line end as top (use guard function so that it always picks up the top line end)
   - set thickness relative to top  (something like bot lin wieght = top line wieght + 1pt)

You can use this approach to make a 1960's rainbow around a shape....i.e.  top, middle 1, middle 2, bot

vojo

  • Hero Member
  • *****
  • Posts: 1528
Re: Shape with shadows only on SOME lines
« Reply #23 on: November 30, 2014, 09:01:24 PM »
BTW...this is how June does it....so credit to him

If lines same length but different thickness, I think the top line end will line up in the center of the bottom
(even for arrows...although arrow line ends are not iso).

David.P

  • Full Member
  • ***
  • Posts: 169
Re: Shape with shadows only on SOME lines
« Reply #24 on: December 01, 2014, 03:55:17 AM »
@Wapperdude: thank you for your additional explanations regarding how your solution is done via shape sheet relationships.

@vojo: the problem with this approach is that it does not work for arrow heads:


However, this probably could be solved by creating a custom arrow line end where the reference point=line end is not at the arrow tip but somewhere in the arrow's center area.

@Wapperdude: do you think that your approach could be modified using such a custom arrow line end for the bottom line (the shadow line)? If yes, I think that then, your shape model would be the perfect solution, in every respect. Actually I feel that this custom arrow line end probably would have to be used for both lines, i.e. also for the top line.
« Last Edit: December 01, 2014, 03:57:07 AM by David.P »
Visio 2003 for production
Visio 2019

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3833
  • Ideas Visio-lized into solutions
Re: Shape with shadows only on SOME lines
« Reply #25 on: December 01, 2014, 12:01:03 PM »
Turns out, a custom line end does work.  Couple of tricks:
  1. Draw your shape.  Don't set the line width to "no Line", set it to the minimum line width.  Otherwise, when Visio applies the custom end shape, there's a tiny gap.
  2. I protected the Aspect ratio, not sure that's necessary.
  3. Here's the key:  open the shape sheet and change the LocPinX setting.  You'll need to play around with this, depending on the design of your line end.  Start with something like width*0.3, assuming that your shape was drawn with the arrow tip on the right.

See attached...picture worth a 1000 words.

HTH.

Experiment, have fun!
Wapperdude
Visio 2019 Pro

vojo

  • Hero Member
  • *****
  • Posts: 1528
Re: Shape with shadows only on SOME lines
« Reply #26 on: December 01, 2014, 12:31:39 PM »
RE:  Arrow heads

Make the bottom line proportionally shorter than top lin

I.e.    Top = endx,endy
         Bot = endx - 1mm * scale, endy-1mm*scale 
         scale = top line width / bottom line width
         (may need some intelligence...i.e.  if endx >beginx, then "-", else "+"....same with endy)

Use guard() liberally

David.P

  • Full Member
  • ***
  • Posts: 169
Re: Shape with shadows only on SOME lines
« Reply #27 on: December 01, 2014, 01:40:15 PM »
Whoa Wapperdude, this is great.

Thank you -- I will need to play around with this to see what is the optimum solution for the line ends.

Cheers
David.P
Visio 2003 for production
Visio 2019

David.P

  • Full Member
  • ***
  • Posts: 169
Re: Shape with shadows only on SOME lines
« Reply #28 on: December 03, 2014, 09:26:30 AM »
Hello Wapperdude,

I am playing around with your beautiful shape and trying to get it as close as possible to my "ideal" labeling shape.

One thing that I can't work out at the moment, is the size of the custom arrow line end called WAP :)

No matter how I resize the line end's triangle in the line end's drawing window, it always comes out really small such that I have to use "giant" or "enormous" for the line end size in order to get the line ends reasonably large. I'd however rather use "medium" for the line end size that I normally use.

Is there a way to make a custom line end larger? I also used a different drawing scale, but to no avail.
Visio 2003 for production
Visio 2019

David.P

  • Full Member
  • ***
  • Posts: 169
Re: Shape with shadows only on SOME lines
« Reply #29 on: December 03, 2014, 09:38:30 AM »
Ahh...

From here, I gather that I need to make the Arrowhead's alignment box more narrow:
Quote
Scaled versus unscaled line patterns

If you design an unscaled line pattern (that is, the Scaled option is cleared in the master pattern's Pattern Properties dialog box), when a user applies the line pattern, the Visio engine resizes its alignment box until its height equals the line weight. Scaled line patterns keep their dimensions regardless of the drawing scale or the line weight.
However, I don't succeed with that. The grouping trick does not seem to work (I can not enter "group editing mode" from the edit menu because it is not there).

 ???
Visio 2003 for production
Visio 2019