Jump to content

Wired wires


vugie

Recommended Posts

And with the first graphical UI you had pixels droping like snowflakes. I had it on an Commodore Amiga Computer but as a gag not as a virus.

Nowadays with LabView Scripting SubVIs can drop to the bottom of the window, melt like icescream in the sun while the wires hang around like spilled spaghetti. And the best is the VI is still working...

Or the VI on the BD become Helium filled while the wires hang around like garlands.

Or some added inertia which let them follow a window movement with some delay...

Link to comment

I like this inertia thing... SubVIs could hang by their wires, giving them a larger bend if the subVIs have more mass (VI Metrics).

Also elasticity of the wires may be dependent on their thickness. Or amount of data they carry :)

I just realized that word "wired" is not the same as "weird", which I really meant...

Link to comment
  • 4 months later...

OK, I picked up some gloves thrown in this topic and here is Weird Wires RCF Edition:

post-7450-126087844858_thumb.png

And little video.

Rounding corners was quite challenging... This is for you, Jim :)

License for this code is DWYL (do whatever you like).

:thumbup1: Excellent yet another peice of code to taunt the text based programmers at the office with!

Jason

Link to comment
  • 2 years later...

I have installed the RCF plugin and it is quite amazing.

However, I have discovered this little bug.

In this situation:

RCF Weird Wires Bug case, Image 1

Choosing "Round Corners" will result in this:

RCF Weird Wires Bug case, Image 2

No other "Weird Wire" choice results in an error, so I suppose that there is some weird calculation somewhere, although I could not spot one after a cursory glance at the code.

Link to comment

Oh, no... You forced me to dig in old, rusty and not commented (!!!) code, which was made only for fun.

My first shot is that I don't handle the case of an endpoint which is also a junction. Select wire segment which is selected on your first picture, tap right arrow once an it should work again.

Feel free to correct this bug as scripting exercise :)

  • Like 1
Link to comment

Oh, no... You forced me to dig in old, rusty and not commented (!!!) code, which was made only for fun.

My first shot is that I don't handle the case of an endpoint which is also a junction. Select wire segment which is selected on your first picture, tap right arrow once an it should work again.

It does indeed work. Nice workaround.

Feel free to correct this bug as scripting exercise :)

Well that would require me to get into scripting first! But if I ever did and worked on it, I think there is one thing I'd tried to improve on this otherwise amazing toolbox: I'd make sure that wires don't originate necessarily from the "center" of the object, but rather from a natural starting point, such as one of the object's borders, for instance.

Kudos anyway!

PS: actually there is one more thing, which I think would be a nice addition: when modifying a "weirded" wire, it would be nice to reset the former "weirding" in order to avoid having crooked connections. "Cleaning up" the wire is not a very reliable solution, as NI's "cleaning" algorithm has some uncontrollable tendencies to whip wires around.

PPS: and this: allow selecting multiple wires and apply the "weirdiness" to all selected branches.

Edited by X___
Link to comment

..I'd make sure that wires don't originate necessarily from the "center" of the object, but rather from a natural starting point, such as one of the object's borders, for instance.

"Natural starting point" is not as obvious as it seems to be. We have to distinguish visual starting point and real starting point. Real one is always in the center of terminal (rectangle visible on connector pane). Visual is in the place where it goes out from below the icon. The little piece between these points is not visible, but it is always present and it influences behavior of the wire when you move icon around. If you want to determine nice "natural starting point" (in visual terms), you have to consider also shape of the icon - as it may be smaller then 32x32 square. Shape of the icon is determined be "outermost" spot of white pixels (it becomes transparent). So determination of object's borders is not so trivial...

PS: actually there is one more thing, which I think would be a nice addition: when modifying a "weirded" wire, it would be nice to reset the former "weirding" in order to avoid having crooked connections...

Doable. We have to store original shape somewhere (tags are natural place for such a data) and to introduce "Revert shape" command.

PPS: and this: allow selecting multiple wires and apply the "weirdiness" to all selected branches.

Doable and simplest of features you proposed. Another nice point for scripting practice :)

  • Like 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.