Parametric design in MoI?
 1-17  …  278-297  298-317  318-337  338-357  358-377  …  898-912

Message 7713.318 deleted 25 Apr 2019 by JFH

Previous
Next
 From:  Karsten (KMRQUS)
7713.319 In reply to 7713.317 
Hello Marco,

I don't have tested the pattern manipulation at the moment, but it's another very interesting idea. I'm not a "pattern man", but I can't avoid some ideas to the stuff (damn, I really wanted to do something different ;-): Is it possible to make a random option? Would it then be possible to create sinter materials, porous materials like cheese, particles ... with some clicks? Or is it possible to split in two,three, ... streams of pointarrays (random or structured) to create mosaics???

Anyway, let the ideas flow and share them:-)
Many 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

Previous
Next
 From:  Karsten (KMRQUS)
7713.320 In reply to 7713.319 
@Marco,
in my opinion, the idea with the node overview panel can help a lot in the future, but think about scrollbars:-) Max should have a look!
  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.321 
Hi Marco,
thank you for nodes.

In fact I already writing SplitArray node, which can split point arrays according a pattern or a logical expression.
Also I have plans to use series everywhere instead of number type. Therefore I'll rewrite all basic nodes such as circle, sphere, cone 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:  mkdm
7713.322 In reply to 7713.318 
Hi James,

Thanks a lot for your appreciations...

At the moment i'm thinking about many ideas regarding the possibility to integrate all pointArray nodes,
with a unified logic in order to better manages series, patterns, and the order in witch those points are picked and passed to output.

But i must admint that it's not so easy, 'cause i'm not quite familiar with math formulas :)

But, some minutes ago, i've just read that Max is working on all these ideas....

So while waiting its solutions, i keep on working on my personal tests.

Have a nice day!

P.S. Where's the Sweep node that you used in your test ? Could you share it ?

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:  mkdm
7713.323 In reply to 7713.321 
Hi Max,

Thanks for everything, i'm pleased that you appreciated my attempts to create new logic for array nodes.

At the moment i'm thinking about many ideas regarding the possibility to integrate all pointArray nodes,
with a unified logic in order to better manages series and patterns.

I'm also thinking about a unified method to specify how is the order in witch the points of the array, could be picked up.
just in order to create a less random and not predictable outputs.
This is hard to achieve i think...

But i must admit that it's not so easy, 'cause i'm not quite familiar with math formulas :)

Anyway, i was happy to read that you are already working on all these ideas!

So while waiting your solutions, i keep on working on my personal tests.

P.S.
Karsten wrote :
>>in my opinion, the idea with the node overview panel can help a lot in the future, but think about scrollbars:-) Max should have a look!

I hope hat you share this idea.

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:  mkdm
7713.324 In reply to 7713.319 
Hi Karsten,

Thanks a lot for your appreciations and suggestions!

And keep on working together on sharing new ideas.

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:  James (JFH)
7713.325 In reply to 7713.322 
Hi Marco

Sweep node was one contributed by Karsten.
I can't find the original thread
but please find all attached

-James

EDITED: 14 May 2019 by JFH

  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.326 In reply to 7713.324 
Hello Marco,

if you want to use sweep it is also useful to evaluate the startFrame of the railcurve for profile placement. You will find a node for that in infonodes. To get it run you have to replace the pushFrame function in litegraph.js with the posted in this thread. What I am think about at the moment is to put such meta informations like startframes of curves, boundingboxes, curve length, mass, ... in a functions container. Max has already made a addOutput-function. I think it would be better to put such functions as additional outputs to nodes, than create separate nodes for it. Unfortunateli are my programming skill are very limited and I can't find a node with an addOutput as a template to study. Maybe Max have one?
A nice weekend to all
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:  mkdm
7713.327 In reply to 7713.325 
Hi James,

Thanks for your prompt reply!

Ciao!

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:  mkdm
7713.328 In reply to 7713.326 
Hi Karsten,

Thanks for your reply and your suggestions.

As soon as possible i'll take a better look at those functions and nodes.

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:  Barry-H
7713.329 
Hi Karsten,
looking at your motor node using the boolean function to indicate a clash of objects gave me an idea.
Is it possible to automatically space an array by using the boolean function.
At the moment I have a AutoArray based on the object bounding box plus gap and orientation
that will automatically fill a given square or rectangle area.
The only problem with this is I have to manually adjust the gap for objects that can
overlap the bounding box.
Ideally I would like to set a minimum gap between objects to maximise the fill.
The way I see it working is to Offset the object by half the gap required.
Space the array centres based on the offset object bounding box .
If boolean of offset object = true ok finish
else reduce centres by given step till boolean true.
So the question is how do I get a true or false from the boolean to use and how to keep
looping reducing the centre distance till true.
Any idea's ?

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:  Karsten (KMRQUS)
7713.330 In reply to 7713.329 
Hi Barry,

the simplest way to detect a clash is in my opinion the number of result objects of an intersection. No intersection - no result. So it should be possible to make an interation until no resultobjects exists or vice versa. I don't have time at the moment, so I hope it helps in a first step.

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:  Karsten (KMRQUS)
7713.331 In reply to 7713.330 
p.s.: An iterration algorithm has to be defined inside one node, because I`m not sure if loops are really possible in the nodeeditor.
  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
7713.332 In reply to 7713.331 
I have seen a feedback loop for another node-type program.
  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:  mkdm
7713.333 In reply to 7713.321 
Hi Michael and Max (and everyone),

While i was doing some testing with "Array" family nodes, i wondered a thing regarding the rules followed by Moi and Nodeeditor,
in order to manage the order of selected objects.

I hope that both the .3dm and .nod files that i have attached, are sufficiently clear to explain what i'm trying to understand.

In order to run the example i think that it is necessary the latest Nodeeditor version (0.65).

But, to be clearer, i'll show you what are the steps that i have followed, what is the result that i wanted and what instead is the result that i get.

Given that this is nothing more than an exercise, my goal is to better understand the way used by Moi to manage a set of selected objects,
and if it could be possible to control the order of the objects inside a specific set of selected objects,
and if it could be possible to get the same behavior inside Nodeeditor.

So, i have followed these steps :

01 - Open the .3dm and .nod files
02 - Select all the points in .3dm file, picking them individually in the order shown by the numbers
03 - Assign the selection to the "Selected" node present into the nodeeditor, via the "update" command by right-clicking the node
04 - Run the editor

And....as you can see in the 01_Capture.PNG file, the resulting curve, displayed in violet, doesn't follows the order of picked points.

My question is.....am i doing something wrong ?

Is there a way to instruct Moi or NodeEditor to keep unaltered the order of picked objects ?
Or does Moi apply a different rules to the selected objects, in order to manage a different ordering ?

And, a final consideration...

I think that having the ability to control the order of selected objects, manually or via some sort of programmatic criteria,
would be a very powerful thing inside both Moi and Nodeeditor.

Well then everyone... have a good day,

Marco (mkdm).

Image Attachments:
Size: 832.5 KB, Downloaded: 48 times, Dimensions: 1918x1039px
Size: 105.5 KB, Downloaded: 40 times, Dimensions: 1521x821px
  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.334 
Hello to all,

I want to share the idea to make a wrapping function for additional outputs. The advantage would be to reduce nodes. Every node have nearly the same code and new functions could be registered central in one function. The new function would than present in every node that carries the code. The attached code is experimental and full of bugs, but it's the best I can give at the moment. So please study and give a feedback, if it worth to think about.





It's not useful to play with it or integrate the files - only to study what I'm making wrong or make it perhaps better.
The litegraph.js is needed for a function that Marco posted. Thanks for that(for those who can not leave it;-)

Have a nice day
Karsten

EDITED: 6 Mar 2019 by KMRQUS


  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.335 In reply to 7713.334 
forgot to post!
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:  mkdm
7713.336 
Hi everyone!

While waiting for new versions of Max's NodeEditor,
i'm doing some experiments with PatternArray selection :

Here's my current unfinished version of the node PatternSelectArray :

code:
// PatternSelectArray
function PatternSelArray()
{
	this.addInput("In","pointarray");
	this.addInput("Start","number");
	this.addInput("Qt_Max","number");
	this.addInput("Step","number");		
	
	this.addOutput("Out","pointarray");
	this.addOutput("Elems","number");
	this.addOutput("Source","pointarray");
	
	this.properties = { mode:["Pattern + Subset", "Pattern + Subset", "Subset + Pattern"],
		pattern:"+",
		start:0,
		qt_max:-1,
		step:1};
	
}

PatternSelArray.title = "PatternSelArray";
PatternSelArray.desc = "PatternSelArray";

PatternSelArray.prototype.onExecute = function()
{
	//if (this.properties.order[0] == "By Selection") {
		
	var source = this.getInputData(0, new pointArray());
	this.properties.pattern = this.properties.pattern.trim();
	
	var usePattern = false;
	var isMixedPattern = false;
	
	// check the pattern
	if (this.properties.pattern != '') {
		// check if pattern contains valid characters
		usePattern = this.properties.pattern.match('^[+\-0-1]+$');
		
		if (usePattern) {
			// check if pattern contains only include characters (+ or 1)
			usePattern = !this.properties.pattern.match('^[+1]+$');
			
			if (usePattern) {
				// if pattern contains both include and exclude characters, then the pattrn will be used
				// otherwise it means that contains only exclude characters (- or 0), and therefore
				// the output pointarray list will be empty
				isMixedPattern = !this.properties.pattern.match('^[\-0]+$');
			}
		}
	}

	var output = new pointArray(); // init to empty list

	if (usePattern) {
		if (isMixedPattern) {
			var len = source.getLength();
			var cn = 0;
			
			for (i = 0; i < len ; i++) {
				if ( this.properties.pattern[cn] === '1' || this.properties.pattern[cn] === '+') {
							
					var source_elem = source.getElement(i);
					
					output.push(source_elem.pt.x,
						source_elem.pt.y,
						source_elem.pt.z,
						source_elem.AngleX,
						source_elem.AngleY,
						source_elem.AngleZ,
						source_elem.Size);
				}
				cn = (cn < this.properties.pattern.length-1) ? cn+1 : 0;
			}
		}
	} else {
		// elaborate the whole source pointarray
		this.properties.pattern = '';
		output = source;		
	}

	var outLength = output.getLength();
	
	this.properties.start = this.getInputData(1, this.properties.start);
	if (this.properties.start < 0) this.properties.start = 0;
	if (this.properties.start > (outLength - 1)) this.properties.start = (outLength - 1);

	this.properties.qt_max = this.getInputData(2, this.properties.qt_max);
	if ((this.properties.qt_max < 0) || (this.properties.qt_max > outLength)) this.properties.qt_max = outLength;
	
	this.properties.step = this.getInputData(3, this.properties.step);
	if (this.properties.step <= 0) this.properties.step = 1;
	if (this.properties.step > outLength) this.properties.step = outLength;
	
	// generate the final pointarray list
	var outputFinal = new pointArray();
		
	for (i = this.properties.start, cont = 0; i < outLength && cont < this.properties.qt_max; i += this.properties.step, cont++) {
		var source_elem = output.getElement(i);
		
		outputFinal.push(source_elem.pt.x,
			source_elem.pt.y,
			source_elem.pt.z,
			source_elem.AngleX,
			source_elem.AngleY,
			source_elem.AngleZ,
			source_elem.Size);
	}
	
	output = null;
	
	this.setOutputData(0, outputFinal);
	this.setOutputData(1, outputFinal.getLength());
	this.setOutputData(2, source);
	
	this.outputs[1].label = "Elems(" + outputFinal.getLength() + ")";
}

LiteGraph.registerNodeType("Arrays/PatternSelArray", PatternSelArray);


The inputs and outputs are :

1 - In : the source PointArray
2 - pattern : the filter pattern string : 1 or + pick the element, 0 or - skip the element
Example "1001" or "+--+"

3 - Start : the first element index of the resulting array after the pattern filtering
4 - Qt_Max : Max quantity of elements present in the final output array
5 - Step : The step used while iterate over the patterned array

6 - Out : the final array
7 - Elems : the number of elements present in the final array
8 - Source : The initial source PointArray


Actually the node works in this way :

1) The pattern is applied to the source array
2) Start , Qt_Max and Step are used to iterate over the patterned PointArray

Actually the property "mode" is not used, but when activated,
will determine the order of the used logic :
First do Pattern operation and then Iterates
or
First Iterates and then do Pattern operation


Nice evening to all,


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:  James (JFH)
7713.337 In reply to 7713.334 
Hi Karsten

Great work!

I am totally onboard with your wrapping function for additional outputs proposal.
However could it be achieved with a two tiered menu as shown?
& removed in a similar method to the removal of additional inputs

This way the info panel is not further crowded with non-dynamic elements.

Just a thought
-James

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
 

Reply to All Reply to All

 

 
Show messages:  1-17  …  258-277  278-297  298-317  318-337  338-357  358-377  378-397  …  898-912