[Feature Request]Do nodes or lines know if they are above/below each other?

if so, I wonder if the lines could switch to being "narrower"?

image

This topic has always interested me... last I worked inside the editor D3 code, I was trying to make "pluggable" functions to generate those bezier curves. The logic is pretty simple: given the start and end points in (x, y) coordinates, draw a "pleasing" curve to connect them. So yes, in a sense, the SVG drawing algorithm does know the relative positions between two ports -- the nodes do not, as they have no control over how the lines are generated.

My idea was to have a settings menu for selecting which wire "style" to use (personally, I'd like to see lines that only follow angles that are multiples of 45° -- so it simulates PCB circuits). So to implement your example above would just require a couple functions to calculate the line paths, and a menu choice for "Simon's Narrow wires". If there is some interest, I'll see if I can find that old (v 0.19!) code, and compare the current editor logic to what it was back then. It seems like those path generators have not changed much since the early days, but only Nick would know...

The trickiest part as I see it is all the other wire features that have been added in the last 3 years (joining, cutting, routing, etc). Hopefully the existing logic would continue to work with different shaped paths, but again, I'm not a node-red developer -- I just play one on the weekends!

2 Likes

I came across a trending project on github called "DrawFlow". I would rather see this type of wire behaviour (i understand that it would not work if nodes are put underneath eachother).

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.