Node Wish List
 1-11  …  312-331  332-351  352-371  372-391  392-411  412-425

Previous
Next
 From:  MO (MO_TE)
9581.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

EDITED: 13 Dec 2023 by MO_TE


  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
9581.353 
Very cool effort!
---
Pilou
Is beautiful that please without concept!
My Moi French Site My Gallery My MagicaVoxel Gallery
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  James (JFH)
9581.354 In reply to 9581.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/

EDITED: 16 Dec 2023 by JFH

Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Barry-H
9581.355 
Hi,
can anybody make a switch node that as one input and two outputs basically the existing switch in reverse.
Cheers
Barry
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
9581.356 In reply to 9581.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

EDITED: 11 Jan by BEMFARMER

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
9581.357 In reply to 9581.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)

EDITED: 12 Jan by BEMFARMER

Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Barry-H
9581.358 In reply to 9581.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);

EDITED: 12 Jan by BARRY-H

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  WN
9581.359 
Based on Max's node.

EDITED: 12 Jan by WN


  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
9581.360 In reply to 9581.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.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Barry-H
9581.361 In reply to 9581.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:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  WN
9581.362 In reply to 9581.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.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Barry-H
9581.363 In reply to 9581.362 
Hi WN,
thank you for the node works fine.
Yes split node does the same (not used it before).
Many thanks
Barry
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
9581.364 In reply to 9581.362 
Hi WN,
It was a pleasure to review your RevSwitch file, to see the numerous corrections to the SwSPDT.js file that I did in an attempt to modify Max's Switch node.
Number of inputs and outputs, for each of the 3 datatypes was done.
(Code from Logic > Split node, I see.)
I broke the bezier color somehow.
I see that you modified the bezier, somehow, using the "same" code.
You introduced the dataNull.

Even though the RevSwitch function is already covered in the Logic > Split node, the Bezier indicator curve is nice to see.

- Brian
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Barry-H
9581.365 
Hi,
not sure if there is a answer for this
Shown is a photo showing a square that as one corner already filleted.
When object is selected and crvfilllet node used to fillet the remaining corners
it produces the result on the right or fails.
Any ideas ?
Cheers
Barry




Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
9581.366 In reply to 9581.365 
It looks like the node is trying to fillet points 4 and 5.

Is there a way to exclude the end points of the pre-existing fillet, from the new fillet?

- Brian

Can the initial object be posted?
Would a join help?

Is there some way to identify all of the characteristics of the points?

EDITED: 21 Jan by BEMFARMER

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Barry-H
9581.367 In reply to 9581.366 
Hi Brian,
the node needs away of knowing if the point is G0.
If the curve is rebuilt it works fine but you end up with a lot more control points.
Barry
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
9581.368 In reply to 9581.367 
Moi4 introduced a bunch of methods, tangents and derivatives...etc
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  pressure (PEER)
9581.369 In reply to 9581.368 
Hi Brian,

Here's a function for checking if a pair of curves is G1.

- Peer

code:
// returns true if curve1 is tangent to curve2
function getCurvePairIsG1(curve1, curve2) {

    var curve1startPt = curve1.getStartPt();
    var curve1endPt = curve1.getEndPt();
    var curve1startTan = curve1.evaluateTangent(curve1.domainMin);
    var curve1endTan = curve1.evaluateTangent(curve1.domainMax);

    var curve2startPt = curve2.getStartPt();
    var curve2endPt = curve2.getEndPt();
    var curve2startTan = curve2.evaluateTangent(curve2.domainMin);
    var curve2endTan = curve2.evaluateTangent(curve2.domainMax);

    // flip one of the tangent vectors in the pair being compared for end-end and start-start cases
    var curve1startTanNeg = moi.vectorMath.createPoint(curve1startTan.x, curve1startTan.y, curve1startTan.z);
    curve1startTanNeg.scale(-1.0);

    var curve1endTanNeg = moi.vectorMath.createPoint(curve1endTan.x, curve1endTan.y, curve1endTan.z);
    curve1endTanNeg.scale(-1.0);

    var tol = moi.geometryDatabase.tolerance;

    // curve1 start curve2 end
    if (
        moi.vectorMath.distance(curve1startPt, curve2endPt) < tol &&
        moi.vectorMath.distance(curve1startTan, curve2endTan) < tol
    ) {
        return true;
    }

    // curve1 end curve2 start
    else if (
        moi.vectorMath.distance(curve1endPt, curve2startPt) < tol &&
        moi.vectorMath.distance(curve1endTan, curve2startTan) < tol
    ) {
        return true;
    }

    // curve1 start curve2 start
    else if (
        moi.vectorMath.distance(curve1startPt, curve2startPt) < tol &&
        moi.vectorMath.distance(curve1startTanNeg, curve2startTan) < tol
    ) {
        return true;
    }

    // curve2 end curve2 end
    else if (
        moi.vectorMath.distance(curve1endPt, curve2endPt) < tol &&
        moi.vectorMath.distance(curve1endTanNeg, curve2endTan) < tol
    ) {
        return true;
    }

    else {
        return false;
    }
}
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  pressure (PEER)
9581.370 In reply to 9581.368 
Hi Brian,

Or for a planar joined curve you can use a G1 checker that's built into fillet factories. Search "GetCorners" in the API for an example of how to do that.

- Peer
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  MO (MO_TE)
9581.371 
I tried to fillet a selected curve with code below.
It makes a list of "true" values for all corner points of the curve to fillet all of them.
Let's say I have a polyline consists of two segments and one corner point.
Logically, the corners List should be like this : {true}
This approach works on closed curves like a rectangle, but, fails on open curves. I need to add an extra "true" value to the list for open curves to work.
Also it fails on open and closed curves with an existing fillet or non "G0" continuity.
Like the one Barry showed in (9581.365)

Am I missing something?
code:
script:
var inputs = moi.geometryDatabase.getSelectedObjects().getStandaloneCurves();
var filletFacc = moi.command.createFactory('fillet');
var filletFacToGetCorners = moi.command.createFactory('fillet');
filletFacToGetCorners.setInput(0, inputs);
filletFacToGetCorners.generateVertices();
var corners = filletFacToGetCorners.getCreatedObjects();
filletFacToGetCorners.cancel();
var cornersList = moi.createList();
if(inputs.item(0).isClosed)
{
for ( var i = 0; i < corners.length; ++i ) {cornersList.add( true );};
}else
{
for ( var i = -1; i < corners.length; ++i ) {cornersList.add( true );};
}
filletFacc.setInput(0, inputs);
filletFacc.setInput(1, false);
filletFacc.setInput(2, cornersList);
filletFacc.setInput(3, 1);
filletFacc.setInput(4, 'Circular');
filletFacc.setInput(5, 1);
filletFacc.commit();
moi.log("inputs: "+inputs.length+"\n");
moi.log("Corners: "+corners.length+"\n");
moi.log("cornersList: \n");
for ( var i = 0; i < cornersList.length; ++i ) {moi.log(cornersList.item(i)+"\t")};
moi.log("\n");
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All

 

 
Show messages:  1-11  …  292-311  312-331  332-351  352-371  372-391  392-411  412-425