I don't have an answer but I think the counting of the sides may be different than indicated, for instance this is indicated as 4 sides, I think it's 6...
h the integer part (2 ')
and decimal part: 0.05 * 60 = 3 sand we stayed with the decimal part (3'')
therefore, 123 seconds is 0h 2 min 3 s
Well, I have a counter and I can not convert the integer in real seconds ...
Maybe I'm doing wrong:if the timer interval is 0020 seconds, so if the counter reaches 250, it means that it has been 5 seconds (interval timer * counter)
However, it takes longer than 5 seconds to process the script, so I don't get the real time that the counter is active.
How could get the real time (in seconds) maintaining a timer component in 20 ms?
I am new to VB, so any help with this or to pass the integer to hours, minutes and seconds will be very grateful.
Muchas gracias :)
…
that Paris Hilton plays with that (after reading 123 times the User's Manual). Big Pink ball is affected by Guilio's stuff. But Paris wants the small ball to orbit around the big one with a second "time-control" thingy. And then she wants a third ball to orbit around the second one with a third ... blah blah. Then she wants many balls to orbit around many balls that orbit ... blah blah.
4. Is that sort of nested "timers" chaos your issue?…
ou have 2 logical cores OFC ;)). Feel free to extend it to any amount of threads, the strategy should be very similar.
In this script, every of the 2 (potentially more) point clouds gets a separate list of instructions - those are classes as well, and I'm not sure how would they react to be called from 2 separate threads. After creating a list of instructions, we run the Parallel.For loop which takes care of all the multithreading mess for us. Select Case is probably not the nicest way of deciding on which list to take in, but it is good in showing visually what is going on in there.
Note that this code wasn't tested properly, I did run it only with those 2 simple point clouds. Double save everything whenever multithreading...
'create 2 lists of instructions, one for each threadDim inList1 As New list(Of Volvox_Instr.Instr_Base)Dim inList2 As New list(Of Volvox_Instr.Instr_Base)
'create and add the instructions to the listsinList1.add(New volvox.Instr_planeclip(plane.WorldXY))inList2.add(New volvox.Instr_planeclip(plane.WorldXY))inList1.add(New Volvox.Instr_RandomSub(0.5, 123))inList2.add(New Volvox.Instr_RandomSub(0.5, 234))
'create 2 rhino pointcloudsDim pc1 As New pointcloudDim pc2 As New PointCloud
'populate them with some pointsFor i As Integer = -100 To 100 Step 1 pc1.Add(New point3d(10, 0, i)) pc2.Add(New point3d(0, 0, i))Next
'a good coding practiceDim pccount As Integer = 2
'a classic parallel for loop, note the upper bound is exclusiveSystem.Threading.Tasks.Parallel.For(0, pccount, Sub(index As Integer)Select Case indexCase 0 For i As Integer = 0 To inList1.count - 1 Step 1 inList1(i).execute(pc1) NextCase 1 For i As Integer = 0 To inList2.count - 1 Step 1 inList2(i).execute(pc2) NextEnd SelectEnd Sub)
'get the clouds out with the GH_Cloud class,'so that Grasshopper understands it as geometry objecta = New GH_cloud(pc1)b = New GH_Cloud(pc2)
…
the list. The problem is:
1. I open the octopus window
2. reinstate a design option ( lets call this design option A)
3. Octopus and rhino will visualize design option A.
All of The above is perfect and expected. But now I want to reinstate another design option/solution:
1. reinstate a different design option ( lets call it design option B )
2. before reinstating Octopus shows the configuration of option B and when reinstated Rhino matches the visualization from Octopus.
3. The PROBLEM: Once the option is reinstated in rhino, design option B in the Octopus window changes to look like design option A !!
4. everytime I reinstate a design option, Rhino shows the correct mesh, Octopus changes the mesh to look like design option A in the octopus window. basically rendering the idea useless to have the meshes.
Is there a solution to this problem?
Best,
Jawad
PS: if the above is not clear I'd be happy to share images. …
e or assembly 'StrandCommon, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ef1982adf4660b58' or one of its dependencies. The system cannot find the file specified.Traceback: line 123, in __build_module, "C:\Users\murat.melek\AppData\Roaming\McNeel\Rhinoceros\5.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\ghpythonlib\components.py" line 126, in <module>, "C:\Users\murat.melek\AppData\Roaming\McNeel\Rhinoceros\5.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\ghpythonlib\components.py" line 2, in script…
Added by Murat Melek at 4:33pm on November 19, 2015
e string so i will separate values by the char 'x')
for example
value1=123 and value2=456 and value3=789
will be
"123x456x789"
and in processing you will have to split the message whenever the program finds the char 'x'
String message = new String(data);
String[] messageParts = message.split("x");
from here you can read any part from the array
float value1 = Float.valueOf(messageParts[0]).floatValue();
float value2 = Float.valueOf(messageParts[1]).floatValue();
float value3 = Float.valueOf(messageParts[2]).floatValue();
i am not really sure if it is the fastest way.
check the attached files…