Custom Line Pattern

Started by saratogacoach, January 13, 2021, 08:17:32 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

saratogacoach

Newbie learning custom line patterns. Interesting challenge for a line used in a genogram to symbolize a "cut-off" relationship.



I can draw the custom line pattern from other lines, set the behavior and connector points, group, save to stencil.

But, I am stuck getting the correct line behavior. When connected to shapes at both ends, and the shapes are moved, while the line dynamically resizes, the 2 perpendicular center elements do not similarly adapt. Instead they remain facing each other without taking on the angle of the moved lines as they need to. Any way to join the perpendicular elements so they angle the same as their joined lines? They seem to behave separately even though I grouped them. (Apologies for the description/ explanation, but take a look at the attached VSDX, move the shapes and hopefully you will see the issue. They should angle toward each other at the same angle as their attached vertical lines.)

Maybe there is a way to achieve this?

saratogacoach

vojo

that will take some geometry

Basically, you need something like this (should work the geometry translations et al out on paper first)
Need to find the angle of new horizontal line off X axis
add 90 degrees so that it represents angle off veritical
Use that angle in the vertical line as a way to either calculate end point offsets or may use it in the angle cell of the vertical line.

When horizontal line rotates, the bottom of vertical line should move to the left some / top of vertical line should move to right some.


- tak ATAN2 of the horizontal to get the angle off the horizontal
- add 90 degrees...call it VA
-vertical length = VL
- the vertical line geometry would be something like
    top = width*0 + cos (VA)*VL          //I assume vertical line is a 1D shape
    bot = width*1 - cos(VA)*VL
-(could try putting VA in the angle cell of the vertical line...leave the vertical geometry sections unchanged)

saratogacoach

#2
Thank you, again, vojo.

I may have found another solution: drawing a line, rotating it 90 degrees, fastening it perpendicular to the first line, duplicating and flipping it, to get the correct line image. Then added a new line pattern, edited it using Developer>Shape Design>Operations>Join, grouped, added connector points at ends and seem to have what I was looking for. Need to test it more, but so far works as needed.

Progress, learning how to customize line patterns, work with the UI. Need time and patience. A lot to learn.

Visio has a wonderful number of customization tools!

Thank you, again for your kind assistance and help with my learning.
saratogacoach