Parametric design in MoI?
 1-3  …  244-263  264-283  284-303  304-323  324-343  …  904-912

Previous
Next
 From:  mkdm
7713.284 In reply to 7713.255 
Hi Max!

A short question about PontArray...

How would it be possible to collect a specified set of Point objects, into a PointArray ?

That is, starting from a given number of selected points present in scene, how to create a PointArray from them ?

And, what you say about my question at http://moi3d.com/forum/index.php?webtag=MOI&msg=7713.274 ?

Thanks for everything and have a nice day.

Marco.
  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:  Karsten (KMRQUS)
7713.285 In reply to 7713.284 
Hello Marco,

my name isn't Max, but I can you give a node for that. It's a quick and untested hack of Max geniue concat node for Objects. I have changed only the input and output parameters. Please test it. Maybe Max can integrate something like that in his next release, maybe there is something like that already existing? Only Max know all the features:-)

Have a nice day
Karsten
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:  Sharif (SR13765)
7713.286 In reply to 7713.282 
Hi Karsten;

Thank you for explaining. I need to do some examples to understand it better. I am thinking may be frame is similar to "plane Node" in grasshopper.

Regards,
sharif
  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:  Sharif (SR13765)
7713.287 In reply to 7713.282 
Hi Karsten;

I have created a Series and a Range Nodes from other example nodes. I like the math node under basic and I was wondering if we can use the math node to generate series and range numbers instead of having separate nodes.

Second question is how I could use these generated number from Series and Range to create points in MOI ( See Attached Image ).

Thanks,
sharif
Image Attachments:
Size: 37.2 KB, Downloaded: 55 times, Dimensions: 922x669px
  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:  Max Smirnov (SMIRNOV)
7713.288 
version 0.65
fixed several bugs

Karsten
>> and a seventh coordinate (maybe useful for homogenous proposes?)
It's a scale :)

>>Maybe Max can integrate something like that in his next release, maybe there is something like that already existing?
I wrote this node already But I'll check your version, maybe I'll find something interesting in it. :)

Marco
>> How would it be possible to collect a specified set of Point objects, into a PointArray ?
added ObjtoArray node. At the moment it works with point objects only.

>>Inside the NodeEditor, it would be possible to render the generated objects, using a particular style, just in order to better highlight them ?
added Style property in the Output node

Pilou
>>An Alert Message when we press "New" ?
Maybe in the next beta release..

EDITED: 7 Mar 2022 by SMIRNOV

  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)
7713.289 In reply to 7713.287 
@Sharif
Why not share your new nodes ?

EDITED: 12 May 2016 by PILOU

  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:  Karsten (KMRQUS)
7713.290 In reply to 7713.288 
Hello Max,

great news!

>>> But I'll check your version, maybe I'll find something interesting in it. :)
I don't think so! 99% is your own code - interesting could only be some bugs, that I placed in the rest;-)

Have a nice evening
Karsten
  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:  Max Smirnov (SMIRNOV)
7713.291 In reply to 7713.289 
Pilou, check the new version ;)
  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:  Max Smirnov (SMIRNOV)
7713.292 
Added properties fix for Output node for back compatibility with old .nod files.

EDITED: 7 Mar 2022 by SMIRNOV

  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:  Sharif (SR13765)
7713.293 In reply to 7713.289 
Hi Pilou

See attached, Includes:

Series
Range
DegToRad ( degree to Radian Conversion, You can use Math node for this )
RadToDeg ( Radian to Degree Conversion, You can use Math node for this )

Thanks,
sharif
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:  Frenchy Pilou (PILOU)
7713.294 In reply to 7713.288 
@Sharif: thx!

@Max

Any of previous nodes works with this new version ???

Result of expression "This properties style" [undefined] is not an object.

EDITED: 12 May 2016 by PILOU

  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:  Max Smirnov (SMIRNOV)
7713.295 In reply to 7713.294 
Pilou, yes, I'm sure.


Replace original litegraph-editor.js with the attached file
Now you need to press New button longer to reset the editor.

EDITED: 7 Mar 2022 by SMIRNOV

  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)
7713.296 In reply to 7713.295 
OK I have now several colors for the Style but not this "Draft" :)

but always all previous nodes loaded don't work with this version 6.5
Result of expression "This properties style" [undefined] is not an object.

Nodes saved with this version 6.5 work fine!
  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:  Karsten (KMRQUS)
7713.297 In reply to 7713.292 
Hello Max,

I'm not sure that the pushFrame works:

pointArray.prototype.pushFrame = function(frame)
{
var rx=ry=rz=0;
if ( frame.zaxis.y === 0 && frame.zaxis.z === 0) { ry = ( frame.xaxis.z > 0 )?90:-90; }
else
{
rx = Math.atan2(frame.zaxis.y, frame.zaxis.z);
ry = -Math.asin(frame.zaxis.x);
rz = Math.atan2(frame.xaxis.z*Math.sin(rx)-frame.xaxis.y*Math.cos(rx), frame.xaxis.x*Math.cos(ry)+(frame.xaxis.y*Math.sin(rx)+frame.xaxis.z*Math.cos(rx))*Math.sin(ry));
}

this.data.push(frame.origin.x); this.data.push(frame.origin.y); this.data.push(frame.origin.z);
this.data.push(rx); this.data.push(ry); this.data.push(rz);
this.data.push(1);
this.xlength++;
}
I'm missing the conversion to deg?
What works for me at the moment is something like:

pointArray.prototype.pushFrame = function (frame)
{
this.data.push(frame.origin.x);
this.data.push(frame.origin.y);
this.data.push(frame.origin.z);

var rx=ry=rz=0;
if ( frame.zaxis.y === 0 && frame.zaxis.z === 0) { ry = ( frame.xaxis.z > 0 )?Math.PI/4:-Math.PI/4; }
else
{
rx = Math.atan2(frame.zaxis.y, frame.zaxis.z);
ry = -Math.asin(Math.round(frame.zaxis.x*10000)/10000);
rz = Math.atan2(frame.xaxis.z*Math.sin(rx)-frame.xaxis.y*Math.cos(rx), frame.xaxis.x*Math.cos(ry)+(frame.xaxis.y*Math.sin(rx)+frame.xaxis.z*Math.cos(rx))*Math.sin(ry));
}
/////////////////////////
this.data.push(rx * 180 / Math.PI);
this.data.push(ry * 180 / Math.PI);
this.data.push(rz * 180 / Math.PI);

this.data.push(1);
// this.xlength++;
}
Although, for the gimbal lock is a calculation vor rx or rz is missing?? e.g. rz = Math.atan2(frame.yaxis.z,frame.yaxis.y); with rx=0;???

Nevertheless, tomorrow is a new day!
Karsten
  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:  BurrMan
7713.298 In reply to 7713.297 
Hey Max,
If you try and set output style property "before" running the node it will produce an error. If you run node first, then style is applied great!

I ran old "jitter node"... But example node and others like motor error out. Hopefully you are just making those future changes now...
  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:  Max Smirnov (SMIRNOV)
7713.299 
Pilou, BurrMan
http://moi3d.com/forum/index.php?webtag=MOI&msg=7713.292

Karsten,
Yes, I forgot about rad-deg translation :)
Thank you
  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)
7713.300 In reply to 7713.299 
Works now like a charm! :)

It's always no need to translate what is out of the lang.js file ?
(for the Info or some info node message like "(input locked)" when you Right Click on an input node point

EDITED: 12 May 2016 by PILOU

  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:  BurrMan
7713.301 In reply to 7713.299 
Hey Max,
Here's the workflow error with the new styles element:



And then a quick error on the old "example" node:

  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:  Karsten (KMRQUS)
7713.302 In reply to 7713.301 
Hello Burrman,

please try to replace the marked area with shown line in nodes\basic.js - and give a feedback:-)


MoIOutput.prototype.updateObjects = function()
{
this.onClear();
var changeStyle = (this.properties.style[0] !== this.properties.style[1] && this.sIndex !== -1);
var inObj = this.getInputData(0, moi.geometryDatabase.createObjectList());
/////////////////////////////////////////////////
if(inObj!==null){for ( var i = 0; i<inObj.length; i++) this.tempobjects.addObject(changeStyle?inObj.item(i).clone():inObj.item(i));};
/////////////////////////////////////////////////
for ( var i=this.tempobjects.length; i>0; i-- ) this.tempobjects.item(i-1).setHitTest(0);
if (changeStyle) this.tempobjects.setProperty( 'styleIndex', this.sIndex);
moi.geometryDatabase.addObjects(this.tempobjects);
}

Have a nice day
Karsten
  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:  BurrMan
7713.303 In reply to 7713.302 
That worked..... That eliminated the workflow error. Should ask Max to take a look.

Thanks Karsten.
  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-3  …  224-243  244-263  264-283  284-303  304-323  324-343  344-363  …  904-912