MoI discussion forum
MoI discussion forum

Full Version: Node Wish List

Show messages:  1-2  …  283-302  303-322  323-342  343-362  363-382  383-402  403-422  423-425

From: James (JFH)
3 Jul 2023   [#343] In reply to [#342]
Thanks MO,

I applaud your development to Basic/Extract node....you have made it into a very useful and powerful tool, and in doing so reduced the bloat of the node library. We can now retire several nodes: Length, arraySort, FlipNumArray, stlArea, & perhaps also stlVolume.

There is an additional output from "stlVolume" node that may be incorporated in a future extended "Centroid" node (originally contributed by Brian/bemfarmer). Presently this node operates only on closed polygons. Ideally, it may be replaced with a universal "FindCenter" node that accepts both pt and obj data types: finding the centre of point arrays, curves (open & closed), surfaces, polysurfaces, groups of objects, and solids.

Returning to "Extract" node: there are 2 further functions that logically may fall within its scope ie "Shuffle", "Reverse" for point arrays (similarly to numArray options). If this is possible, we may retire 2 further existing nodes. See image

It heartens me that you've taken up the mantle and continue to refine nodeEditor.
James
https://www.instagram.com/nodeology/

Image Attachments:
extractNode.jpg  extractNode.jpg 


From: MO (MO_TE)
5 Jul 2023   [#344] In reply to [#343]
Thank you James
Your comments encourage me to keep making stuff. :)
I searched a bit on finding the center of gravity, Its math is way beyond my knowledge.
Although, I've made a macro months ago to get the average of points.
I'll attach it here, so if it was helpful It can be a starting point to write a node.js file.

About adding "Shuffle" and "Reverse" options to the "extract" node's point mode,
I had some success, (added "Shuffle" and "Reverse" to points and objects mode)
But, I have to study more on adding extra outputs to the node.
Specially adding output for a specific option rather than all options.

Attachments:
Extract.js
Moi_Macro_Average_Points.nod

Image Attachments:
Extract_Extra_Output.png 


From: James (JFH)
5 Jul 2023   [#345] In reply to [#344]
Gallant Effort MO,

I recognise that liteGraph framework make it difficult (or impossible?) to alter the output datatype with mode options.

Perhaps the scope of this node is too broad. Maybe the solution is to have another node: "Basic/Sort" for reversing and shuffling arrays of all datatypes. NumArray options: SortAscending & SortDescending would also logically fall within the scope of this node as well.

What do you think?
James
https://www.instagram.com/nodeology/

Image Attachments:
sortNode.jpg 


From: MO (MO_TE)
5 Jul 2023   [#346] In reply to [#345]
I didn't have the chance to work on it, but it is something that I'll check that out again.
I guess you are right about "sort" options. They can be in a separate node.
I'll let you know after checking out options.
Thanks
From: MO (MO_TE)
7 Jul 2023   [#347]
Hi
This is what I found out:
Actually you can change inputs and outputs for a specific property by calling "onPropertyChange" function.
You can use these methods to change the node:
"addInput", "addInputs", "addoutput", "addOutputs", "removeInput", "removeOutput", "changeIntputType" "changeOutputType"
I've made a node to show some examples.

This is one node with different properties.

Address: " Basic/IO_Changer "

Attachments:
IO_Changer.js

Image Attachments:
IO_Changer.png 


From: MO (MO_TE)
24 Nov 2023   [#348]
Hi
This small change can stop the "fillet" node from crashing moi.
Find this line inside "fillet" node .js file:
code:
filletOut = filletFac.calculate();

And replace it with this:
code:
filletFac.update();
filletOut = filletFac.getCreatedObjects();

I recommend to do the same on "shell" node as well.
From: MO (MO_TE)
29 Nov 2023   [#349]
"SelectContained" node based on Michael's "SelectContained" script:





address : "Objects/SelectContained"

Attachments:
SelectContained.js

Image Attachments:
SelectContained_01.png  SelectContained_02.png 


From: Frenchy Pilou (PILOU)
29 Nov 2023   [#350]
Cool selection tool!
From: wayne hill (WAYNEHILL5202)
29 Nov 2023   [#351]
// DashCurveMP is based on this Michael Gibson script:
// https://moi3d.com/forum/index.php?webtag=MOI&msg=11239.6

Attachments:
dashcurveMP.js
DashCurveMP.nod

Image Attachments:
DashCurveMP.PNG 


From: MO (MO_TE)
12 Dec 2023   [#352]
"Note" node
Note node to display notes, numbers and point data on canvas.



Use pointers to move between pages.
Hold down the Shift key and click on the arrows to move through the pages 10 times faster.



Right click options:
Switch between exact and round presentation of numbers. (Default: round numbers up to 3 float numbers)
Choose points order presentation. (point groups) (Default: x length)
Page navigation

Thanks for great suggestions James.
Multiline Text Justification Credit:
https://stackoverflow.com/questions/6517999/how-to-justify-align-text-in-html5-canvas

Address: Infos/Note

Attachments:
Note.js

Image Attachments:
Note_Node_01.png  Note_Node_02.png  Note_Node_03.png 


From: Frenchy Pilou (PILOU)
12 Dec 2023   [#353]
Very cool effort!
From: James (JFH)
16 Dec 2023   [#354] In reply to [#352]
MO,

Thank you for Note node. The ability to annotate node circuits will greatly aid in clarifying complex wirings, particularly when returning to them after extended absence.

Also, not only does this node replaces r2d3/display node, but similarly displays point data. One feature that may not be immediately apparent, but will nevertheless be exceedingly useful is the display of ordered pts by x-length, y-length, or z-length.



Thank you, your efforts are to be applauded
James
https://www.instagram.com/nodeology/

Image Attachments:
orderedPts.jpg 


From: Barry-H
11 Jan   [#355]
Hi,
can anybody make a switch node that as one input and two outputs basically the existing switch in reverse.
Cheers
Barry
From: bemfarmer
11 Jan   [#356] In reply to [#355]
I will have a look, to see if the inputs and outputs can be coded "in reverse".

Using an electrical analogy is complicated by the fact that the Nodes have Inputs and Outputs, which introduces a "direction" to the data flow.
Electricity could flow in either direction.

The new requested switch is properly called a SPDT, (Single Pole, Double Throw) switch, with one input Pole, and two output terminals.

The existing switch is a "Backward flow" version of this, with two poles and double throw, but the term DPST is not appropriate.
>>>And the code for this node is in the Interfaces.js file.<<<

The SwDPDT switch node which I did is actually a "Backward flow" switch.(?)
So there could be two versions of the SwDPDT switch node.
And two versions of the SwRotary switch node.

https://www.quora.com/What-type-of-electric-switch-do-I-have-to-use-for-two-inputs-and-one-output

https://www.turito.com/blog/physics/types-of-switches

https://www.amplifiedparts.com/tech-articles/switch-poles-and-throws

https://www.edrawsoft.com/basic-electrical-symbols.html

- Brian
From: bemfarmer
12 Jan   [#357] In reply to [#355]
Hi Barry,

Attached is a draft node, SwSPDT_DRAFT.js.
It has one input, and two outputs.
It may be copied to the nodeeditor Extensions folder, and when MoI & Nodeeditor are re-opened, the node will appear in the Widgets menu.

The Bezier curved connection indicator was modified by trial and error, based upon some Bezier information.
Control point 1 and cp2 "x" values were swapped, and some Y and 10 values were interchanged.
Due to limited Bezier understanding, the changes seem a bit "mysterious".
There is a link in the SwDPDT.js file to some Bezier/canvas information.
...Got some help from Wayne a few years ago...
The non-switch selected Terminal is "floating"?

The main problem is that the Output switched away from should perhaps be reset with some default value?
What should the default value be? It must be numeric?
Display has a "NoInput" default value, but does not reset to NoInput.
Is there some numeric "null" value?

The SwSPDT_Draft node may have a Const node input.
Each Output can be wired to an Infos > Display node.

Testing was rudimentary...
Someone who knows what they are doing should check it out...

- Brian

Anyway, had some fun.
Cloned 256mb PCIe 4.0 NVMe M.2 SSD with Samsung software, to new Samsung 990PRO, 2TB, which replaced the old boot SSD on Dell computer. It was easy using a portable NVMe case to USB adapter, (temporary for the cloning). (Windows 11)

This SwSPDT_Draft node contains several errors.
The errors are corrected in WN's switchRevers.js file (RevSwitch)

Attachments:
swSPDT_DRAFT.js


From: Barry-H
12 Jan   [#358] In reply to [#357]
Thanks Brian
will give it a go and let you know how I get on.
Cheers
Barry
Ps
getting this error when changing switch to objects

TypeError: undefined is not an object (evaluating 'this.inputs[slot].type = type')

moi://appdata/nodeeditor/core/main.js line 1871

1867: */
1868: LGraphNode.prototype.changeInputType = function(slot, type, name)
1869: {
1870: this.disconnectInput(slot);
1871: >> this.inputs[slot].type = type;
1872: this.inputs[slot].name = name || this.inputs[slot].name;
1873: this.size = this.computeSize();
1874: if (!this.graph) return;
1875: this.graph.refreshNodeInfo(this.id);
From: WN
12 Jan   [#359]
Based on Max's node.

Attachments:
RevSwitch.nod
switchRevers.js


From: bemfarmer
12 Jan   [#360] In reply to [#358]
I "dis-remembered" that there are 3 types :-(, :-).
Recall seeing type code for 3 types.

- Brian

If the switch were for electronics, there might be a "pull up" resister on each output terminal?

The code that I did was all modifications of Max's code.
Will look at switchReverse later today.
From: Barry-H
12 Jan   [#361] In reply to [#359]
Hi WN,
thanks for the node but having issues when directing input from one circuit to another.
Attached a nod file showing the issue.
One circuit adds a fillets to the input square & the second does not.
Using the numbers option seems Ok.
Cheers
Barry

Attachments:
RevSwitch.nod


From: WN
12 Jan   [#362] In reply to [#361]
Hi Barry.
In fact, there is no need for this node, since there are the necessary nodes for this.
I assume that you are aware of this. The node that I uploaded here is a small fix for
the 'Switch' node with a small addition from the 'Split' node that is in the 'logic' file.
I fixed the error and updated the file in the same message.

WN.

Show messages:  1-2  …  283-302  303-322  323-342  343-362  363-382  383-402  403-422  423-425