MoI discussion forum
MoI discussion forum

Full Version: Nodebundle for playing with nodes

Show messages:  1-6  …  1187-1206  1207-1226  1227-1246  1247-1266  1267-1286  1287-1306  1307-1326  …  1847-1859

Thread Split: Some posts in this thread have been moved here

From: Michael Gibson
9 Oct 2018   [#1247] In reply to [#1244]
Hi James, yeah like Karsten and Brian write above selectAll() will only get the objects if they are in the geometry database and not if they are "loose" objects.

- Michael
From: James (JFH)
13 Oct 2018   [#1248] In reply to [#1242]
Hi All,

Well, I have not manage to get "extractPt" node to work.
http://moi3d.com/forum/index.php?webtag=MOI&msg=7777.1248

After repeated failed attempts, I was feeling a little disheartened; and really needed a win, so I returned to a node I was confident I could solve.

So please find attached new arraysExt.js inclusive of new "reRange" node (shown in red) which performs an identical function to my "reMAPrange" macro (see output arrays X & Y in image).

There are a lot of applications for remapping the differential domain of an array, so it is deserving of a dedicated node rather than a macro.

A great weekend to all,
James



UPDATED:

ArrayExt.js has been moved to here:
http://moi3d.com/forum/index.php?webtag=MOI&msg=7777.1251


I have also included a couple of simple utility nodes: "arrayRev" which reverses the order of an num array & "arraySort" which sorts an array into ascending order. see below

Image Attachments:
reRange.gif  sort&Reverse.gif 


From: Unknown user
14 Oct 2018   [#1249]
Hi all.
It was. Just another version of an unusual door.
Vladimir.
From: James (JFH)
14 Oct 2018   [#1250] In reply to [#1249]
Hi Vladimir,

Great stuff! Very elegantly done.

You'll find playing in NodeEditor is fun & quite addictive.
I look forward to seeing more from you in the future :)

James
From: James (JFH)
15 Oct 2018   [#1251]
Hi All,

I have also included in ArrayExt.js a full* set of logic gates(based on Max's "Compare" node) :
AND(a,b)
OR(a,b)
NAND(a,b)
NOR(a,b)
XOR(a,b)
XNOR(a,b)

They perform boolean logic and hence are made to operate on 1 (true) & 0 (false) inputs,
however any number greater than 0 will be interpreted as a 1 and any number not will be interpreted as 0.

*There is no distinct NOT gate, however either NAND or NOR gates will perform this function by wiring input (whether 1 or 0) into both inputs.

These node options would allow the simulation of electronic circuitry, if one was so inclined.
Other than that they may be utilised for testing certain conditions to trigger events.

James



UPDATED: New ArrayExt.js attached with bug fix
From: speedy (AL2000)
15 Oct 2018   [#1252]
Hello friends
I want to share this exercise with you
referring to the Brainstorming Confluence Park Pavillon
from the site _ Parametric House.com _
I recreated everything with EI and I added the Flooring ...
The compositions are two enough to properly switch
files and images at this link:
http://www.mediafire.com/file/7e6gshqle7qdrsv/Confluence_Park.zip/file
Have a nice evenig to all
al

Ps- James , nice work with the new Array Ext ,
congratulations.....
From: Unknown user
15 Oct 2018   [#1253] In reply to [#1250]
Hello James.

Thank you for your feedback and your contribution to the common cause.
It's really fun to do.

Vladimir.
From: James (JFH)
18 Oct 2018   [#1254]
Hi All,

Continued experimentation with interwoven patterns on surfaces. (nod file attached)

James

PS. Michael thanks for the V4 update. Everything is working great!

Image Attachments:
woven0.jpg 


From: wayne hill (WAYNEHILL5202)
18 Oct 2018   [#1255]
Knurl on diameter


From: speedy (AL2000)
19 Oct 2018   [#1256]
Hi Friends
a simple umbrella .....
that you can close and open
Those interested find this link:
http://www.mediafire.com/file/rlo8fk7jcy6z69g/Umbrella.zip/file
images and files
Have a great weekend everyone
al
From: James (JFH)
21 Oct 2018   [#1257]
Hi All,

I have included a new "Shell" node in the attached construct2.js

ATM shell offset is parametric but only in normal direction. Flipping the direction is easily achieved by pairing with "Flip" node (also included)

At a later date, I will see if I can add "centreline" mode, but for now it suits my purposes.

By way of demonstration, I applied shelling to nod file previously posted (with coarser pattern and no subd smoothing) . Please also find attached.

A great weekend to all,
James



UPDATED: another simple example of shell node attached

Image Attachments:
wovenShell.jpg 


From: James (JFH)
21 Oct 2018   [#1258] In reply to [#1257]
Hi All,

I have updated construct2.js to include additional new "Extend" node which performs analogous to "Constuct/Extend" tool: extending a curve to meet a boundary curve or surface.

Have a great weekend
James


Image Attachments:
extend.gif 


From: speedy (AL2000)
22 Oct 2018   [#1259]
Good morning James
excellent work with the New Extension Construct2
I have a problem, as you will see from the screnshot , opening your files
shell, I get an error message .......
Does it depend on some awkward setting in my program?
I simply replaced it in the UI / Nodeeditor folder
your new script to replace the existing one
image at this link:
http://www.mediafire.com/file/49654g68o20zgcf/Shell-problem.jpg/file
James
Thanks in advance
al
From: James (JFH)
22 Oct 2018   [#1260] In reply to [#1259]
Hi All,

Al (Speedy 2000) has drawn my attention to the fact that shell node only works in V4.
I will endeavour to fix this issue, but it may be a while.

All the best to everyone,
James
From: Karsten (KMRQUS)
24 Oct 2018   [#1261] In reply to [#1242]
Hello James,
please try this code. It seems there is sometimes a timing problem with the copy/paste stuff. Very untested.
code:
// extractPts
 function extractPts()
 {
 this.addInput("In","objectlist");
 this.addOutput("Out","objectlist");
this.addOutput("ptarray", "pointarray");
 }

 extractPts.title = "extractPts";
 extractPts.desc = "extractPts";

 extractPts.prototype.onExecute = function()
 {
 var inObj = this.getInputData(0, moi.geometryDatabase.createObjectList());
 var output = moi.geometryDatabase.createObjectList();
 var selPts = moi.geometryDatabase.createObjectList();
    var originXYZ = moi.VectorMath.createPoint(0, 0, 0);
var temp = moi.geometryDatabase.createObjectList();
	         var pts = new pointArray(false);
//////
	 moi.geometryDatabase.selectAll();
	var existings=moi.geometryDatabase.getSelectedObjects(); //Locking the database objects
	 moi.geometryDatabase.deselectAll();
////////
	 if (inObj.length > 0 )
 {  var tempname=getUID(6);
for(var i=0;i<inObj.length;i++){temp.addObject(inObj.item(i));temp.item(i).name=tempname;};
moi.geometryDatabase.addObjects(temp);
temp.setProperty('showPoints', 1);
moi.geometryDatabase.selectAll();
temp.setProperty('selected', 0);
existings.setProperty('selected', 0);
 moi.geometryDatabase.copyToClipboardCommand(temp); 
moi.geometryDatabase.pasteFromClipboard();
//setTimeout( doNothing, 500);
 selPts=moi.geometryDatabase.getSelectedObjects();
for(var i=0;i<selPts.length;i++)pts.pushPoint(selPts.item(i).pt);
if(selPts.length>0)output = factory('copy',selPts,originXYZ,originXYZ,true);
 moi.geometryDatabase.selectNamed(tempname);
        temp=moi.geometryDatabase.getSelectedObjects();
	moi.geometryDatabase.deselectAll();
        var delfac = moi.command.createFactory( 'delete' );
	delfac.setInput( 0, temp );
	delfac.commit();
	delfac.cancel();
	existings=moi.geometryDatabase.createObjectList();
 } 
 this.setOutputData(0, output);
this.setOutputData(1, pts);
 }
 LiteGraph.registerNodeType("Objects2/extractPts", extractPts);


Have a nice day
Karsten

p.s.: For V4 Michael will give us some new features in the API that will make a lot of things easier.

Message 7777.1262 was deleted


From: James (JFH)
24 Oct 2018   [#1263] In reply to [#1261]
Thanks Karsten,

Work perfectly....I wish I had your skills. You're a champion!

Thanks again
James
From: speedy (AL2000)
25 Oct 2018   [#1264]
Hi Karsten
this morning I saw a bit of light at the bottom
to the tunnel ..... I managed to insert your script
extrPts in Object2 -Alleluja
it works great, even with the V3 ,
you are a GREAT , and believe me ,
your "forced" absence has been very heavy
have a nice day
al
Ps:
Courage;
We say ... dead a pope it does another one
From: James (JFH)
29 Oct 2018   [#1265]
Hi All,

I have rewritten "Shell" node for multiprocessing and reattached "construct2.js" to earlier post:
http://moi3d.com/forum/index.php?webtag=MOI&msg=7777.1258

Here is an experiment where shelling is varied across an array of hexagon extrudes
in response to proximity of 3 attractors. Although similar could be achieved by offsetting or scaling curves prior to extrude, shelling makes the process much simpler.

James

Also requires "reRange node" in arraysExt.js to be found here:
http://moi3d.com/forum/index.php?webtag=MOI&msg=7777.1251

Image Attachments:
3shellAttractors.gif 


From: Frenchy Pilou (PILOU)
29 Oct 2018   [#1266]
Nice result!

Show messages:  1-6  …  1187-1206  1207-1226  1227-1246  1247-1266  1267-1286  1287-1306  1307-1326  …  1847-1859