UDP Send/Receive from Grasshopper to Processing - Grasshopper2024-03-29T11:12:04Zhttps://www.grasshopper3d.com/forum/topics/udp-send-receive-from-grasshopper-to-processing?groupUrl=ghowl&feed=yes&xn_auth=noHi I was wondering is somebod…tag:www.grasshopper3d.com,2018-05-31:2985220:Comment:19123552018-05-31T03:07:21.718Zvapeurhttps://www.grasshopper3d.com/profile/vapeur
<p>Hi I was wondering is somebody still on working with UDP? Cos my processing sketch does not work, saying the library is incompatible for the processing version (3.3.6), and I did not find a newer version for the UDP library...</p>
<p>Hi I was wondering is somebody still on working with UDP? Cos my processing sketch does not work, saying the library is incompatible for the processing version (3.3.6), and I did not find a newer version for the UDP library...</p> Anyone knows how to send data…tag:www.grasshopper3d.com,2014-04-29:2985220:Comment:10619292014-04-29T18:43:03.318ZGeorge Lhttps://www.grasshopper3d.com/profile/GeorgeL
<p>Anyone knows how to send data from grasshopper to processing just once? I'm sending values from a slider and I'm doing some calculations on Processing until I reach a specific number but it doesn't work since each millisecond grasshopper sends the original values to processing.</p>
<p>Anyone knows how to send data from grasshopper to processing just once? I'm sending values from a slider and I'm doing some calculations on Processing until I reach a specific number but it doesn't work since each millisecond grasshopper sends the original values to processing.</p> Hi Peter,
Thank you for your…tag:www.grasshopper3d.com,2014-04-29:2985220:Comment:10618122014-04-29T14:10:10.235ZGeorge Lhttps://www.grasshopper3d.com/profile/GeorgeL
<p>Hi Peter,</p>
<p>Thank you for your answer.</p>
<p>Yes I have try that but the main problem is the other way around. I like to control the values sent from grasshopper to be send only once.</p>
<p>Now Grasshopper sends continously the slider values and I cannot control the values since after the calulations in processing it gets back the slider value.</p>
<p>Hi Peter,</p>
<p>Thank you for your answer.</p>
<p>Yes I have try that but the main problem is the other way around. I like to control the values sent from grasshopper to be send only once.</p>
<p>Now Grasshopper sends continously the slider values and I cannot control the values since after the calulations in processing it gets back the slider value.</p> i think it would be much simp…tag:www.grasshopper3d.com,2014-04-29:2985220:Comment:10613002014-04-29T08:34:05.961ZPeter Ayadhttps://www.grasshopper3d.com/profile/m5tfi
<p>i think it would be much simpler if you stated your initial values in processing; that way you won't have to change the value of the sliders after the first communication (which i don't think it'd be possible) instead of the sliders you will read the input values from the message.</p>
<p>i think it would be much simpler if you stated your initial values in processing; that way you won't have to change the value of the sliders after the first communication (which i don't think it'd be possible) instead of the sliders you will read the input values from the message.</p> have you tried to build the s…tag:www.grasshopper3d.com,2014-04-29:2985220:Comment:10612982014-04-29T08:22:03.757ZPeter Ayadhttps://www.grasshopper3d.com/profile/m5tfi
<p>have you tried to build the send command inside the loop in processing ? </p>
<p>for example:</p>
<p></p>
<blockquote><p>for(int i=20;i>=0;i--){</p>
<p> // rest of the code here //</p>
<p> udps.send( message, ip, port );</p>
<p>}</p>
</blockquote>
<p></p>
<p>whenever the loop ends it will stop sending messages ... </p>
<p>have you tried to build the send command inside the loop in processing ? </p>
<p>for example:</p>
<p></p>
<blockquote><p>for(int i=20;i>=0;i--){</p>
<p> // rest of the code here //</p>
<p> udps.send( message, ip, port );</p>
<p>}</p>
</blockquote>
<p></p>
<p>whenever the loop ends it will stop sending messages ... </p> I need multiple loops until I…tag:www.grasshopper3d.com,2014-04-28:2985220:Comment:10610452014-04-28T19:47:54.501ZGeorge Lhttps://www.grasshopper3d.com/profile/GeorgeL
<p>I need multiple loops until I my value reaches 0 and then I need to stop the communication. Is that possible?</p>
<p>I need multiple loops until I my value reaches 0 and then I need to stop the communication. Is that possible?</p> Hello,
I have another issue.…tag:www.grasshopper3d.com,2014-04-28:2985220:Comment:10610402014-04-28T18:18:03.902ZGeorge Lhttps://www.grasshopper3d.com/profile/GeorgeL
<p>Hello,</p>
<p>I have another issue. I like to send the values from Grasshopper sliders to Processing and do some calculations inside Processing.</p>
<p>After that sending back the values from Processing to Grasshopper and update my sliders values with the new values from processing. </p>
<p>Actually what I'm doing is a loop until a number reaches 0. For example starts from 5 and follows this loop until get 0. Any idea of how to update sliders value in each loop and send it back?</p>
<p>Hello,</p>
<p>I have another issue. I like to send the values from Grasshopper sliders to Processing and do some calculations inside Processing.</p>
<p>After that sending back the values from Processing to Grasshopper and update my sliders values with the new values from processing. </p>
<p>Actually what I'm doing is a loop until a number reaches 0. For example starts from 5 and follows this loop until get 0. Any idea of how to update sliders value in each loop and send it back?</p> Thank you Peter so much Peter…tag:www.grasshopper3d.com,2014-04-26:2985220:Comment:10596112014-04-26T15:55:13.612ZGeorge Lhttps://www.grasshopper3d.com/profile/GeorgeL
<p>Thank you Peter so much Peter now I got it. The way you show me in Grasshopper is much easier since I will have many values.</p>
<p></p>
<p>Thanks</p>
<p>George</p>
<p>Thank you Peter so much Peter now I got it. The way you show me in Grasshopper is much easier since I will have many values.</p>
<p></p>
<p>Thanks</p>
<p>George</p> i modified the last gh file .…tag:www.grasshopper3d.com,2014-04-26:2985220:Comment:10593832014-04-26T15:00:18.974ZPeter Ayadhttps://www.grasshopper3d.com/profile/m5tfi
<p>i modified the last gh file ... i think this way is easier </p>
<p></p>
<p><a href="http://storage.ning.com/topology/rest/1.0/file/get/2768884607?profile=original" target="_self"><img class="align-right" src="http://storage.ning.com/topology/rest/1.0/file/get/2768884607?profile=RESIZE_1024x1024" width="721"></img></a></p>
<p></p>
<p></p>
<p>for processing .. the code you retrive from this line</p>
<p></p>
<p><em>String[] messageParts = message.split("x");</em></p>
<p></p>
<p>is an array of string you can convert an array of string to an array of floats this way</p>
<p></p>
<p><em>String[] messageParts =…</em></p>
<p>i modified the last gh file ... i think this way is easier </p>
<p></p>
<p><a href="http://storage.ning.com/topology/rest/1.0/file/get/2768884607?profile=original" target="_self"><img width="721" src="http://storage.ning.com/topology/rest/1.0/file/get/2768884607?profile=RESIZE_1024x1024" width="721" class="align-right"/></a></p>
<p></p>
<p></p>
<p>for processing .. the code you retrive from this line</p>
<p></p>
<p><em>String[] messageParts = message.split("x");</em></p>
<p></p>
<p>is an array of string you can convert an array of string to an array of floats this way</p>
<p></p>
<p><em>String[] messageParts = message.split("x");</em></p>
<p><em>float[] value = new float[messageParts.length];</em></p>
<p><em>for(int i=0;i<value.length;i++)</em><br/><em> value[i] = Float.parseFloat(messageParts[i]);</em></p>
<p></p>
<p>now value contains all the values coming from the string </p>
<p></p>
<p></p> Hi Peter,
Thank you so much f…tag:www.grasshopper3d.com,2014-04-26:2985220:Comment:10593732014-04-26T14:19:13.927ZGeorge Lhttps://www.grasshopper3d.com/profile/GeorgeL
<p>Hi Peter,</p>
<p>Thank you so much for your help! That helps me a lot. Just a question. Is not possible to have an array to store the values coming from grasshopper instead of store one by one?</p>
<p></p>
<p>For example:</p>
<p><span>value[i] = Float.valueOf(messageParts[i]).floatValue();</span></p>
<p></p>
<p><span>Thank you again</span></p>
<p>George</p>
<p>Hi Peter,</p>
<p>Thank you so much for your help! That helps me a lot. Just a question. Is not possible to have an array to store the values coming from grasshopper instead of store one by one?</p>
<p></p>
<p>For example:</p>
<p><span>value[i] = Float.valueOf(messageParts[i]).floatValue();</span></p>
<p></p>
<p><span>Thank you again</span></p>
<p>George</p>