You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How to force libavoid edges to not overlap with the node body and to have some offset from rectangle nodes?
I have a small graph with several nodes and constraints, and I want to route the edges so they would not cross each other and overlap with the rectangles themselves.
Code from outputInstanceToSVG is under details, generated SVG image is:
When setting orthogonal routing for edge references and the router itself, I expected something closer to the image below (red lines show preferrable edge positions), but it looks like I'm missing some of the options but cannot figure out which ones exactly.
Specifically, I would really appreciate it if someone could point to
Why setRoutingType(Avoid::ConnType::ConnType_Orthogonal) in the Avoid::ConnRef class does not force all edges to consist only of vertical/horizontal lines?
How to force the edges to be attached to the border of the rectangles rather than to the center?
If the edge is attached to the edge of the rectangle, it how to make it have some offset distance from the rectangle so it would not run perfectly parallel? Using ATTACH_POS_BOTTOM for the lower edge moves it around, but it is not clear how to make it have a [-shape.
In shape connection pin intsantiation you have new ShapeConnectionPin(shapeRef14, 2, 0.5, 0.5, true, 0, (ConnDirFlags)0);
third and fourth values are X and Y position of your pin. And fifth means relative or absolute. 0.5, 0.5, true, means relative position 0.5 of shape width from left, 0.5 of shape height from the top.
One possible solution would be to create a pin on each side of shape with positions (0.5, 0, true), (1, 0.5, true), (0.5, 1, true), (0, 0.5, true). Or if shape sides, where pins should be, are known in advance, keep only those pins.
Feel free to ask further questions in my actively maintained fork of adaptagrams: https://github.com/Aksem/adaptagrams/issues even if you use original adaptagrams version.
How to force libavoid edges to not overlap with the node body and to have some offset from rectangle nodes?
I have a small graph with several nodes and constraints, and I want to route the edges so they would not cross each other and overlap with the rectangles themselves.
Code from
outputInstanceToSVG
is under details, generated SVG image is:When setting orthogonal routing for edge references and the router itself, I expected something closer to the image below (red lines show preferrable edge positions), but it looks like I'm missing some of the options but cannot figure out which ones exactly.
Specifically, I would really appreciate it if someone could point to
setRoutingType(Avoid::ConnType::ConnType_Orthogonal)
in theAvoid::ConnRef
class does not force all edges to consist only of vertical/horizontal lines?ATTACH_POS_BOTTOM
for the lower edge moves it around, but it is not clear how to make it have a[
-shape.The text was updated successfully, but these errors were encountered: