Connectors normal (perpendicular) to curves

Started by PeeDee, January 16, 2011, 02:42:01 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

PeeDee

Re: Visio 2007/2003
Is there a way of making connectors connect normally to the edge of the shapes (or lines) at the ends of the connector?
For example if i connect a curved connector (with the glue-to-geometry on) from an ellipse to a poly-line I want each end to come out of the start object and/or go into the end object at right angles.
I'm assuming I need to find the gradient of the parent curves at at the connection points (i.e dy/dx) and then ensure that the relevant vectors of the curved connector are perpendicular to the parent curve (i.e., -dx/dy)
I thought that the DIR X/A ang Y/B shape sheet cells might have been useful but they don't seem to add anything.
I have attached an image to this post showing the situation.
Many regards

Visio Guy

Hi PeeDee,

Looks like you're right about the DirX/Y cells having no effect on the incoming slope of the connector.

The only thing I can think of is to have code that adjusts the scary NURBS formula to move the tangent handles that you see on the curved connectors. If you were using code, you wouldn't even have to set the directions on the connection points, because you would be able to get the slope of the target shape's curve programmatically.

How to massage the NURBS formula? I don't really know off hand,but I'm pretty sure I've messed with them before and got them to do my bidding. Just can't remember any details.
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

kirkland

I know it's been over a decade, but did you ever find a solution to this problem? I posed the same question recently and there still doesn't seem to be a clear solution to achieve a feature that is so intuitive

vojo

there are shapesheet functions for this kind of thing.
google "pathalong" and visio.

wapperdude

The shapesheet has functionality to find the point on the shape and even the angle at that point.  The functions related to this are PointalongPath, Anglealongpath, and nearestpointtopath.

The problem is the shapesheet has limited parsing capability.  Thus, determining the shape to which the connector is attached is problematical.  That identity is needed because it's the reference for the formulas.

On top of that, the issues VisioGuy pointed out are still true.  How do you plug the point and angle info in the connector's nurbs equation?

Thus, I don't believe this problem is solvable within the shapesheet.  In fact, I'd venture to say that the standard connector shape isn't conducive to this behavior because of the nurbs function.  On top of all of that, Visio has a lot of built-in, behind the scenes coding associated with the connectors which means it's constantly changing the connector shapesheet.  Yikes!
Visio 2019 Pro