Serial.println function). The print line function adds a carriage return and new line feed symbol at the end of each line (which is when in the serial monitor it puts each new statement on it's own line). The Firefly Generic Serial Read uses the new line feed character as its designation symbol on which to terminate the line and spit it out to Grasshopper. I think what's happening is that you need to format the string coming over from your Arduino so all of your sensor data is sent on a single line (not three lines) of text. You can do this using the Serial.print statement (not println). You will need to use the println function on which ever print statement that ultimately concludes the line you want to print... but you can concatenate longer strings together simply by printing using the other print statement. You also don't need the metadata that is sent over (like "Light Level:" or "Sound Pressure:"). You're really just interested in the actual numbers (assuming you know the order of the numbers in the string your sending over the serial port). My recommendation would be to concatenate all of your sensors into a single line of text separated by commas. Then, once you read the string into GH, then you can split it up at the commas using some of the built in string components.
Now, all of that said... I notice that all of your sensors are just standard analog sensors (you're simply using the analogRead() function). Since this is the case, you can easily upload the Firefly Firmata (which handles all of the formatting for you) then you can simply use the Uno Read component (the reason it threw an error was because it was expecting a specifically formatted string of data... and the string you were sending was of a different format). If you upload the Firefly Firmata, then you can use the Uno Read and all should work well. Note that you're using the baud rate of 38400 in your sketch, but the Firmata uses 115200. It doesn't really matter (too much) which you use in this instance... but you have to make sure the baud rate on the Open Port component matches that of the Arduino sketch. If you're using the Firmata, then the default is set to 115200, so you don't need to worry about it... but I just wanted to bring it to your attention since you were using a different baud rate in your other sketch.
I hope this helps.
-Andy…
it provided that you know how to use it, he he).
Note: prior switching from mesh (via StarlingStar) to brep+holes (via C#) - each one has his own K Engine - stop/kill the Kangaroo animation control mini Dialog otherwise ... you'll have "some" troubles.
djodje:
This thing used (see script in v4b) IS NOT the same as the P thing that you posted (the one that takes 3 arguments where the splitter is a curve).
for David:
Irrelevant with the thread, but a 100% repro case related with the GH inability to internalize data:
This brep is a human figure internalized (but every time when the def is stored and reopened GH reports it as "Null").
So import the man-and-dog.3dm, reference the man (or the doberman), save definition and reopen it.
I'm not sure if Image sampler can store (in file) a thing or two as well:
v5 "soon" (lot's of new stuff and 4.56 divisions by zero) , best, Peter…
ules and provide suggestions. It comes with some goodies useful along with SYNTACTIC tools, such as Spectral Graph Drawing and Matrix Plots. Simple connectors are also provided for SYNTACTIC and SpiderWeb. This new toolkit is in some ways fundamentally different from the version you have been using so far. For more info please check my dissertation:
http://abe.tudelft.nl/index.php/faculty-architecture/issue/archive
if you don't have the time to read this, check this one out:
https://www.researchgate.net/publication/303944600_Spectral_Modelli...
If you want to try this version you need to install two libraries in your Grasshopper/Special Folders/Components Folder
* Math.NET (MathNet.Numerics.dll): http://www.mathdotnet.com/
* Configraphics_CS.dll (the library to be completed by me)
Please note that because this package uses Math.NET their licencing terms apply as well as those of mine. Please read the Read-Me panel in the file.
If you want to write a C#/VB snippet to do something in connection to this package we'd be happy to help you with that (as much as the schedules and other things allow us) and eventually involve you as a developer in the next versions.
Our vision for the next versions is to connect/integrate this package with SYNTACTIC and SpiderWeb.
I will replace some of the groups with better/newer modules in the coming days. Stay tuned.
CONFIGURBANIST_Nov2016_TestVersion.gh
Configraphix_CS.dll
NOTE: This file is a Work-in-Progress and likely to contain bugs and errors. Use at your own risk. In no circumstances the authors (mentioned in the CC licence above) can be held responsible for any kind of damage (hardware, software or other kinds of property) caused by using these packages. The package does not come with any sort of guarantee. …
ules and provide suggestions. It comes with some goodies useful along with SYNTACTIC tools, such as Spectral Graph Drawing and Matrix Plots. Simple connectors are also provided for SYNTACTIC and SpiderWeb. This new toolkit is in some ways fundamentally different from the version you have been using so far. For more info please check my dissertation:
http://abe.tudelft.nl/index.php/faculty-architecture/issue/archive
if you don't have the time to read this, check this one out:
https://www.researchgate.net/publication/303944600_Spectral_Modelli...
If you want to try this version you need to install two libraries in your Grasshopper/Special Folders/Components Folder
* Math.NET (MathNet.Numerics.dll): http://www.mathdotnet.com/
* Configraphics_CS.dll (the library to be completed by me)
Please note that because this package uses Math.NET their licencing terms apply as well as those of mine. Please read the Read-Me panel in the file.
If you want to write a C#/VB snippet to do something in connection to this package we'd be happy to help you with that (as much as the schedules and other things allow us) and eventually involve you as a developer in the next versions.
Our vision for the next versions is to connect/integrate this package with SYNTACTIC and SpiderWeb.
I will replace some of the groups with better/newer modules in the coming days. Stay tuned.
CONFIGURBANIST_Nov2016_TestVersion.gh
Configraphix_CS.dll
NOTE: This file is a Work-in-Progress and likely to contain bugs and errors. Use at your own risk. In no circumstances the authors (mentioned in the CC licence above) can be held responsible for any kind of damage (hardware, software or other kinds of property) caused by using these packages. The package does not come with any sort of guarantee. …
three vertices:
When using the _DupBorder command I get the single loop, which, when exploded, actually behaves correctly. This is probably because Rhino applies some fixing routines to geometry which is added to the document via regular commands.
However the _DupEdge command shows clearly where the problem lies:
That yellow edge was selected with a single click. Inspecting just that particular curve, it turns out it is actually comprised of six distinct curves all strung together. There's four, very short, curves right in the corner:
So, verdict. This geometry has problems. Was it made in Rhino or was it imported from elsewhere?
Using the following commands I can fix it in Rhino, but as you said, it's pretty cumbersome:
_DupBorder
_Untrim
_Explode
_SelShortCrv
_Delete
_Join
_ExtendCrvOnSrf
_Split
_Delete
_Delete
The 'gap' that has to be bridged when the short curves are removed is 2cm in size.
I haven't looked into whether this can easily be automated in GH.
…
len , I lost all of my work (at least the 3d modeling)
And I frankly if I want to participate I´ll need to finnish up the board and i cant do the renders on my own I need more time , but I only have until 11:59 pm of July 6 to finnish up one render, if you feel up to the challenge, whoever completes it will receive 290 dollars (its all I can give) to any account you want. I basically need one single image.
It consists on 3 towers, with an organic facade, I'm including the competition board I had saved on in my dropbox, I want more or less the same perspective shown on the left of the board.
Sorry, but i'm desperate, I had it all done but well cant control everything in life i guess, only do it if you feel you can pull off a professional render.
Thanks. (contact me and I´ll give you more info on the towers, I was able to save some limited sections and floor plans .... but yeah.. limited, so you´ll have to base your work on the images I provide here.
I can give some files now, including images of the physical model.
Board: http://i.minus.com/idYpFK844DWns.jpg
Physical model: http://imgur.com/a/PywJa
Hope its enough, I'm also including one image i had where I explored the footprints of all the buildings, but its just for reference.
I know theres barely enough time to finnish it... but I dont know what else to do, do you guys think i should probably just take a good photograph of the model and run with that? I feel that would probably look very unprofessional :l but I really dont have a choice here
…
depending on the floor level.
Concerning the structure, it is not based on a curved surface but a triangulated one. Each ellipse is segmented in 10 points that will be connected to the next 10 points of the next level. We have modelise theese connections by polylines that links theese points together.
Our problem is that we don't manage to create a surface (or mesh ?) from this simple closed polyline wich could be represented like that : /\/\/\/\/\/\/\/\/\/\
Attached you will find our grasshopper file, if somebody has a minute to look at it and find a solution it will be perfect.
In the file two solutions on the right :
-1up that generates the whol structure of the tower
-1down that generates 3 polylines for a single floor (more interesting for us and the post production, unfolding surface and model creation)
Thank you for your time and patience !
Rémi
…
my own, so be gentle with my programming ;) .
Now my problem:
I built a chair-generator, where I can randomize the different components of the chair via sliders. Now I want to interbreed two chair configurations. So I wanna be able to either choose one of the „parents“-value or the middle between both values. As you can see in my file, I found kind of a solution for this (marked by the 3, in the picture), but its quite complicated and time consuming, especially considerung, that I want to do this proces with several generations of interbred chairs. Do you know any way to maybe automatize or simplify this process?
Greetings,
Ben
Picture explanation:
First chair-data (as visualized in Rhino)
Second chair-data
My approach to my problem
Executing functions that build up my chair
…
I took a look around and mainly took advantage of the examples at the following links:
http://www.grasshopper3d.com/forum/topics/c-multithreading-failure
http://james-ramsden.com/multithreading-a-foreach-loop-in-a-grasshopper-components-in-c/
As well as studying the code that Vicente Soler wrote for this: http://www.grasshopper3d.com/video/differential-growth, which contains several multi-threaded forEach loops, like this one for instance:
System.Threading.Tasks.Parallel.ForEach(springs, spring => spring.restLength += growth);
That updates the rest length of the springs with a growth factor.
I tried with a very simple operation of adding a quantity to an array of numbers and doing the same operation on the Y coordinate for a list of points (using ConcurrentBag as variable structure for the list).
My main question is: why my code does not work? More specifically: the code performs the loop and the values in there are changed, but the output is as the loop never happened (see attached .gh file). There are 3 components, one with a simple list of points from the main script context, the second one from within a class and the third one is a working example - here the list used to go through the loop is not the same containing the data I am manipulating, but then what I don't understand is why Vicente's example (in which the list used to perform the forEach is the same where the data is manipulated) works.
Like I said, I am a beginner at multi-thread in general and multi-thread in C# in particular, so any help in understanding why my cases do not work, why the other working I cited do work, and if there are more general rules that I didn't consider in coding multi-thread loops is appreciated. Also, any hint on introductory reading/literature on the matter (of multi-threading in C# and within GH) would really be appreciated; there is really a ton of stuff out there and I could very well start from that, but any advice from people who have already gone through the same struggle would be a huge bonus.
Thank you in advance!…
printers.
How I want to communicate this: The depth of transparent cubes is relative to the brightness of a picture (low depth = bright, high depth = dark). Then I assign each cube as red or blue depending on the RGB values of the cube column's corresponding pixel - this is where I'm stuck.
What I've done: I have one image sampler containing a greyscale version of my image which is outputting the brightness measurements. This made into lines, which are divided to create the points from which the cubes are created. (I have had to invert the image in photoshop as brightness gives black a low value when I need a high one, and vice versa)
What I want to do next: In the second image sampler I have an image which has a Red to Blue gradient applied to it. I want to group my cubes into reds and blues depending on the colour values in this image (so they could eventually be saved as a "blue" and "red" stl to be 3D printed).
So columns that correspond to a blue part of the image will contain a completely blue stack of cubes, and the same with red. But where there's a combination of blue and red values I need a combination of blue and red cubes mixed together. I was hoping to do this by turning the RGB values into some kind of ratio that will help assign each cube a group but I'm struggling.
Would love any thoughts on resolving my problem, even if it's only for part of it! This was quite hard to explain so let me know if there's anything that needs clarifying.
Thanks…