MoI discussion forum
MoI discussion forum

Full Version: Nodebundle for playing with nodes

Show messages:  1-12  …  1613-1632  1633-1652  1653-1672  1673-1692  1693-1712  1713-1732  1733-1752  …  1853-1859

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

From: bemfarmer
29 Mar 2020   [#1673] In reply to [#1672]
Hi Michael,

The unlockSelection();
script appears to have no effect.

There is a difference in selectability between MoI3 and MoI4beta.
After running the vectorExample nod file, the arrow cones are NOT mouse click selectable in MoI3, but are mouse box drag selectable. In
MoI4beta, the arrow cones ARE mouse click selectable, and mouse drag box selectable also.

In MoI4beta, there is another strange effect.
Running the shortcut key script on a selected arrow cone:

script:/*!Select edges v1.2 */ var gd = moi.geometryDatabase; function sl(o) { for ( var i = 0; i < o.length; ++i ) { o.Item(i).selected = 0; var e=o.Item(i).getEdges(); for ( var j = 0; j < e.length; ++j ) e.Item(j).selected = !e.Item(j).selected;}} gd.selectLoop(); var so = gd.getSelectedObjects(); var e = so.getEdges(); sl(so.getFaces()); sl(so.getSolids()); so.getBReps().setProperty('selected',0); e.setProperty('selected',1);

does NOT show the two arrow cone edges, UNLESS the mouse is hovering over the arrow cone, and then the mouse pointer is moved. (In MoI3, just moving the hovering mouse does NOT get the edges to show, but a mouse drag does get the edges to show.)
Creating a new cone with the MoI cone command and running the Select edges shortcut key results in the two cone edges immediately showing up on the screen.
If the mouse pointer is not on the selected arrow cone, and Select edges shortcut key is run, the two edges do not show up until left or right drag is done elsewhere on the screen, or if the mousewheel zoom is done.

Another strange effect is that if the arrow cone, and the new cone are BOTH selected, and the Select edges shortcut key is pressed, both cones immediately show the edges.
(A polygon with planar can also be used instead of the new regular MoI cone.)

- Brian

Hopefully someone else can reproduce this effect?

I thought that this problem might be helpful?

I imagine that vector.js is doing something wrong, or incompletely, and it is not a MoI3 or MoI4 bug?

ps Line 23 of vector.js has the code: dV.item(i).hidden = true;

Maybe the handling or cleanup of bVec() is incorrect?
From: Michael Gibson
30 Mar 2020   [#1674] In reply to [#1673]
Hi Brian, I tested your vector example .nod over here and all the stuff disappears for me when the node editor window is closed.

Can you please zip up your nodeeditor directory and post it here so I can make sure I'm using the same one as you to try and replicate the problem?

Thanks, - Michael
From: bemfarmer
30 Mar 2020   [#1675] In reply to [#1674]
Hi Michael,

Attached is 7zip of my nodeeditor file in appdata, for MoI4beta (Jan22, 2020).

I did just reinstall nodeeditor from Jame's link to MoI3, under program files x86, with no change in MoI3 results.

- Brian

It seems to be a weird problem. No Idea what I am doing wrong...
No one else having the problem...

I was trying out the nodeeditor vector nodes, as prelude to a canal surface node or script.
Simple case of a modWedge tangent to plane x=0, for modifying Reuleaux tetrahedron for uniform symmetric tetrahedron.

If it is just something defective in my files, maybe not worth too much investigation time?
The problem is not limiting my script play. It just is nice to know what causes such a problem :-)
Maybe the problem will correct itself with new version updates?
I'm using MS OneDrive a lot. It is very convenient. Hope it does not crash some day and make my data vanish.
From: Michael Gibson
30 Mar 2020   [#1676] In reply to [#1675]
Hi Brian, thanks for posting your nodeeditor folder.

So here's the steps that I am doing. First I launched your node editor dialog, then I use Load and load in your VectorExamples.nod file from above (on post http://moi3d.com/forum/index.php?webtag=MOI&msg=7777.1668), then I push the Run button and those arrow objects appear. Then I close the node editor and they all disappear.

Are you doing any different steps than that?

- Michael
From: Karsten (KMRQUS)
30 Mar 2020   [#1677] In reply to [#1675]
Hello Brian,

If I remeber right, the effect happens when an objectlist is still pointing to such objects. It is a while ago that I look to the code. The vector things are created in a very short time with my limited skills in js - so it is possible that there are side effect by using a particular sequence. As I remember - I didn't planned to keep the vector objects - they should have only the purpose to visualize.

I hope that I find some time to have a look.

Have a nice day
Karsten
From: bemfarmer
30 Mar 2020   [#1678] In reply to [#1676]
Hi Michael,
Thank you for taking a look.

After pushing the Run Button, I push the Apply button, which makes the arrows stay on the MoI screen after nodeeditor is closed.

- Brian
From: bemfarmer
30 Mar 2020   [#1679] In reply to [#1677]
Hi Karsten,

Thank you for all of your past, present, and future work and help, and taking a look at the code.

- Brian

So maybe an objectlist needs to be closed upon exit?
From: Michael Gibson
30 Mar 2020   [#1680] In reply to [#1678]
Hi Brian, thanks I can reproduce it now. It looks like the problem is the same objects are getting added to the geometry database multiple times, when Run is pushed there are 9 objects added to the geometry database, then when Apply is pushed the same 9 objects are added again but they are in the geometry database already.

I can update MoI so that it can tolerate this situation better, but it can also be fixed in vector.js in the applyVec() function, try this updated applyVec function:

code:
function applyVec(that){var i;for(i=0;i<that.tempvec.length;i++) { var obj = that.tempvec.item(i);
if ( obj.databaseState != 2 /*2 = ObjectDatabaseState_InDatabase*/ ) moi.geometryDatabase.addObject(obj);} }


This version will check if it is already in the geometry database and not add it again if so. The obj.databaseState property returns a numeric value which means:

0: ObjectDatabaseState_Unknown
1: ObjectDatabaseState_Unattached
2: ObjectDatabaseState_InDatabase
3: ObjectDatabaseState_Deleted

For the next beta I'll update geometryDatabase::addObject() so if an object that is already in the database is attempted to be added again it will ignore it instead of getting things corrupted.

- Michael
From: bemfarmer
31 Mar 2020   [#1681] In reply to [#1680]
Hi Michael,
Thank you very much for your corrections. I'll try it out later today.

As far as your updating modifying addObject(), that is your area of expertise.
I lack a lot of understanding, but have vague concerns about some adverse side effects.
For example, if I were "stick framing" a tetrahedron with duplicate edges for the 4 triangular sides, would
it no longer be possible to have two lines on top of each other?

- Brian
From: bemfarmer
31 Mar 2020   [#1682] In reply to [#1680]
OK, I plugged Michael's correction to [function applyVec.......] ~ line 50 of vector.js, and replaced vector.js in
nodeeditor extensions (saving old vector.js as vector.BAK).

Now, running a Vector node, Adds the vector(s) to the screen.

Now, (apparently), pressing the APPLY button no longer adds the vector(s) to MoI's geometry database.
(APPLY does not cause the vectors to remain, after nodeeditor is closed.)
When nodeeditor is closed, the vectors go away. This is apparently Karsten's intention, that the vectors be temporary.

(This behavior is not the same as say creating a circle, where pressing the APPLY button causes the circle to remain, after nodeeditor is closed.)


If the user wants to keep the Vector(s), simply do a MoI copy of them before closing nodeeditor. The manual copies remain,
and behave normally in MoI.

- Brian :-)

Attachments:
vectorMOD.zip


From: Michael Gibson
31 Mar 2020   [#1683] In reply to [#1681]
Hi Brian,

> For example, if I were "stick framing" a tetrahedron with duplicate edges for the 4 triangular sides, would
> it no longer be possible to have two lines on top of each other?

That will still work fine. The situation that it would guard against is having the same one single object listed multiple times in the geometry database (not copies of the object, the same object reference listed multiple times) which would always be an error.

Previously it put up an assert dialog to warn about this happening but then still let it happen. A couple of betas ago release mode asserts were turned off though so it then became more difficult to know what was going wrong.

- Michael
From: bemfarmer
31 Mar 2020   [#1684] In reply to [#1682]
After Loading a node, such as a Vector node program, and JUST pushing APPLY, without having pushed run,
causes the vectors to appear.
Selecting the vectors, and doing a Nudge, causes the vectors to remain after nodeeditor is closed.

- Brian
From: Michael Gibson
31 Mar 2020   [#1685] In reply to [#1684]
Hi Brian,

re:
> Selecting the vectors, and doing a Nudge, causes the vectors to remain after nodeeditor is closed.

Yes, when you do the Nudge the nudged objects are new objects that the nodeeditor does not know about and so they won't be affected when the nodeeditor is closed.

- Michael
From: bemfarmer
31 Mar 2020   [#1686] In reply to [#1685]
Thanks for the explanation Michael.

The Nudge effect, (and likely some other actions), is a little nuance that I had not noticed before.

Something for Pilou to document :-)

- Brian
From: Frenchy Pilou (PILOU)
31 Mar 2020   [#1687] In reply to [#1686]
Alas not yet for the moment but remind me that when I will restart a new race! ;)
From: bemfarmer
1 Apr 2020   [#1688]
Perhaps someone could modify vector.js node menu to use Michael's arrows:

https://moi3d.com/forum/index.php?webtag=MOI&msg=7777.1620

I may try in a week or a month or so...too busy now.

- Brian
From: James (JFH)
4 Apr 2020   [#1689]
Recent NE experiment: Voronoi Pattern with points dynamically attracted to curve.

Stay safe,
James
https://www.instagram.com/nodeology/


From: Mik (MIKULAS)
10 Apr 2020   [#1690] In reply to [#1689]
Really cool. Superb!
From: Frenchy Pilou (PILOU)
8 May 2020   [#1691]
Little return after a big break - confinemented so some many rusted!

You can of course play with it and improve it!
https://moiscript.weebly.com/uploads/3/9/3/8/3938813/flow_elephant.nod





From: Konni
16 May 2020   [#1692] In reply to [#1689]
Hi James,
Your art works are super cool :) Like a lot
Wanted to create some parametric designs and learn Grasshopper3D, but thanks God at right time found YOURS art here ^_^
I'm Moi3D user just love this software. So would be super cool to make/create such random parametric forms in Moi.
Could you ... please...um.... would be super uber cool if you could release some gumroad video on how to use node editor and make such cool forms. Or some step by step screen shots. Would buy these. Mine node editor screen does not work. Im V4 Beta Oct-10-2019 Win10
I know only how to use Voronoi. And its cool :)
Thank you :)

Show messages:  1-12  …  1613-1632  1633-1652  1653-1672  1673-1692  1693-1712  1713-1732  1733-1752  …  1853-1859