Full Version: Nodebundle for playing with nodes

From: BurrMan [#23]
 7 Mar 2016
To: ALL

Yes thats one of the examples he was working on.

No, its not part of node editor. It is a shell which can be interfaced with moi. Then you can program moi with python of whatever you want.

But the way dave set it up, it was basically a parametric node system for working in moi. And he was using python to run moi.

Reply


From: djordje [#24]
 8 Mar 2016
To: ALL

Thank you.

It would be nice if at some point in future, somebody would write a custom MoI Nodebundle component which will enable writing python nodes. I am not a programmer and could not do that.

Reply


From: Michael Gibson [#25]
 8 Mar 2016
To: ALL

Hi djordje, it would probably be require a major effort involving a considerable amount of work to do that, it's hard to even estimate what would be involved... maybe many months of focused work, maybe longer even. So it's fairly unlikely to happen anytime soon.

MoI is focused on using JavaScript as its scripting language so if you want to experiment with these things you will probably need to do it in JavaScript and not in Python, sorry.

- Michael

Reply


From: djordje [#26]
 8 Mar 2016
To: ALL

Thank you for the informative reply Michael. It helped.

Reply


From: Barry-H [#27]
 11 Mar 2016
To: ALL

Can Michael's CenterAtOrigin script be converted to a node ?

var objects = moi.geometryDatabase.getSelectedObjects();

var bbox = objects.getHighAccuracyBoundingBox();

var factory = moi.command.createFactory( 'move' );
factory.setInput( 0, objects );
factory.setInput( 1, bbox.center );
factory.setInput( 2, moi.view.getCPlane().origin );

factory.commit();

Barry

Reply


From: James (JFH) [#28]
 12 Mar 2016
To: ALL

Form Finding through Pure Node Play.

What excites me most about the project is the generation of desirable unintended results (happy accidents).

I have attached the .nod file but it will only work after altering "factories.js": changing Loft node Line 13 to "factory.setInput( 4, true );"

Karsten etal
If you have a moment, could you please see if you can introduce a "Closed" input into Loft node?
I made many attempts without success.

Thanks
-James


Attachments:
fenestra.nod

Image Attachments:
fenestra.jpg 

Reply


From: Karsten (KMRQUS) [#29]
 14 Mar 2016
To: ALL

Hello James,

I had a look at your Problem and as a possible solution, we can make a true/false inputfield in the Infopanel. I did something like that in e.g. subD/simpleBridge. The Loftnode is one of the original nodes written by Max - and these are holy for me - so I won't touch them. Nevertheless I can make a new one based on this in the next days.

Have a nice day
Karsten

Reply


From: Karsten (KMRQUS) [#30]
 14 Mar 2016
To: ALL

Hello Barry,

I have tested your arrayfile with the boundingbox-stuff!

Cool Idea!

Have a nice day
Karsten

Reply


From: Barry-H [#31]
 14 Mar 2016
To: ALL

Hi Karsten
Just to let you know I modified the BoundingBox
Node to "getHighAccuracyBoundingBox" and it works a treat.
I also added an auto position centred within the max X and Y.
This works Ok but if you revolve the object it can move of
Centre. So that's why I posted about Michael's CenterAtOrigin script.
I have tried to modify it but failed so if you can have a look that would
Be great.
(I'm trying to learning JavaScript but more mistake's than success)
Cheers
Barry

Reply


From: Karsten (KMRQUS) [#32]
 16 Mar 2016
To: ALL

Hello James,

I made a new loft-node, where you can switch between closed and open by entering true/false in the info panel. A checkbox would be better, so we have to ask Max if it is possible to implement such a feature someday in the core development.

Kind regards
Karsten

Attachments:
factories2.js
fenestra2.nod

Image Attachments:
loftnode.png 

Reply


From: Barry-H [#33]
 16 Mar 2016
To: ALL

I have modified Michael's CenterAtOrigin script to make a node.
If I use it as an output it works but it applies as well thus if positional sliders & rotations are altered
it produces another set of objects. I'm not sure what to do to overcome this.
Any pointers would be great.

Barry (JavaScript beginner)

// ############ Centre ############
function Centre()
{
this.addInput("In","objectlist");
this.addOutput("Out","objectlist");
this.properties = { capend:true };
}
Centre.title = "Centre";
Centre.desc = "Centre";

Centre.prototype.onExecute = function()
{
//var objects = moi.geometryDatabase.getSelectedObject();
var objects = this.getInputData(0, moi.geometryDatabase.createObjectList());
var bbox = objects.getHighAccuracyBoundingBox();

var factory = moi.command.createFactory( 'move' );
factory.setInput( 0, objects );
factory.setInput( 1, bbox.center );
factory.setInput( 2, moi.view.getCPlane().origin );
factory.commit();
}


LiteGraph.registerNodeType("Transformations/Centre", Centre);
// ############ End Centre ############

Reply


From: Karsten (KMRQUS) [#34]
 16 Mar 2016
To: ALL

Hello Barry,
the factory.commit() pushes the created object to Moi s geometry database - finished and allready. That is not what you want. So you should store the geometry in a variable and place it in an output. I donĀ“t have access to a sample at the moment (only my Cellphone), but you can find examples in every node that has a geometry output:-)

If you can't find a solution, please tell me.
Happy programming
Karsten

Reply


From: Karsten (KMRQUS) [#35]
 16 Mar 2016
To: ALL

Hello Barry,
I had a quick look in the above posted factories2.js -
something like that should work for you:
replace the commit-stuff with

var output = factory.calculate();
this.setOutputData(0, output);
factory.cancel();

Have a nice day
Karsten

Reply


From: Barry-H [#36]
 16 Mar 2016
To: ALL

Hi Karsten,
could do with an example when you have time.
Cheers
Barry

Reply


From: Barry-H [#37]
 16 Mar 2016
To: ALL

Hi Karsten,
works a treat many thanks. Can you explain what a frame is.
Cheers
Barry

Reply


From: Karsten (KMRQUS) [#38]
 16 Mar 2016
To: ALL

Hello Barry,
I will try it. A frame is something like a local coordinate system. So it defines the basepoint and the orientation in space for some factories which creates geometry who need an alignment (basepoint,u-direction, v-direction)e.g. for circles. Sorry about my english - I'm not a native speaker.

Have a nice day
Karsten

Reply


From: James (JFH) [#39]
 16 Mar 2016
To: ALL

Thanks Karsten

RE: Loft2

That does the trick. Brilliant

RE: "A checkbox would be better"

or even better a pulldown menus for each of the options built into the node.

In the meantime, I think Inputs for each of the settings (Closed, Cap Ends & Styles) would be useful, or at least more explicit.
This could be paired with a new "String" node for entering strings such as "Normal" "Loose" or "Straight"; while the other options
could be dynamically set by logic/math nodes. That way where required settings are visible in the wiring diagram.

But this new loft node suits my purposes very well.
Thanks again

- James

Reply


From: Barry-H [#40]
 18 Mar 2016
To: ALL

Hi Karsten,
just to show you the results of your help.

Thanks
Barry


Image Attachments:
Animation.gif 

Reply


From: Karsten (KMRQUS) [#41]
 18 Mar 2016
To: ALL

Hello James,

I'm glad to hear that it works for you in a first step. But I don't know which way is the right one regarding to the Features a node have. "Keep it simple" has the Advantage, that everyone understand the function without explanation. A full featured node can do everything for you, but you have to wire a lot of stuff - sometimes for things you never had thought about in the past. It is difficult to decide that concerning a consistent node Format. But, yes that's was my intention - to discuss about that and collect the ideas.


Have a nice day
Karsten

p.s.: With computers we are solving problems, which we would not have without him.

Reply


From: Karsten (KMRQUS) [#42]
 18 Mar 2016
To: ALL

Wow,

very useful to reduce wasting material or to optimize packaging. Some days ago someone asked in a thread about optimiziation the nesting for 3D-Printing - maybe someday it is possible:-)

Have a nice day
Karsten

Reply


Show messages:  1-2  3-22  23-42  43-62  63-82  83-102  …  863-873

Reply to All

Back to thread list | Login

© 2017 Project Beehive Forum