ur setup. Can you say what sensor you are using? Are you using an Arduino to write this ascii information to the serial port? If so, there may be some formatting code for the string that you'll need to do to get the Read component to function properly. I see that you were able to open the port and Start reading... so my first thought is that the data is formatted correctly....
All of the read components look for a specific character (in this case two characters) to indicate when it has reached the end of the line being read and should spit out the data. In this case, Firefly uses the Carriage Return (\r) and Line Feed (\n) to know when it has reached the end of the line. In arduino, these are automatically added to any line if you use the Serial.println("blah, blah, blah"); command. Notice, this is different from the Serial.print("nothing to see here"); command. This doesn't mean that you can't still use the regular print command... it's just you need to use the println command to indicate when you've reached the end of the line. Let's take a look at a simple example.
void setup() { Serial.begin(9600);}void loop() { int sensorValue = analogRead(A0); Serial.print("The value of the sensor is: "); Serial.println(sensorValue);
delay(20); // important to wait some small time so you aren't sending just a ton of info over to GH which will cause it to crash :(
}
The first print statement prints a string to the serial port... and the next one adds the current sensor value... and THEN adds the carriage return and line feed to start a new line. The nice thing about using these together is that you can concatenate any type of data you want. If you were to upload this sketch, you should see a sentence being printed to the serial port that says "The value of the sensor is: 512". I made up the number, but you get the idea. Notice, I also had to include a delay function. You don't always need this (there are other ways to go about this) but the important thing to note is that the loop cycle on the Arduino can run really fast. I mean... really fast. So, you wont want to send so much data over to GH, because this could flood the string buffer in the Read component and cause it to crash (eventually). It's a good idea to add some small time interval just to slow it down a bit. I should say that I've optimized the refresh rate in the next release so it's significantly faster... so hopefully this wont be as big of a problem... but hopefully that helps some.
Now... Why are you writing data to a sensor? Sensors by default are considered inputs... so I'm quite confused as to why you would want to send data back (if you are... then you need some way to handle the string data being sent from GH... this is the whole reason we built the Firefly firmata... it sets up the two-way protocol so you don't have to deal with all of that mess... If you're going to read and write, you're better off just uploading the firmata and using the Uno Read and Write components). Also, I'm not very familiar with the Hyperterm or Advanced Serial Port Terminal... but I will say that could get COM conflicts if you're trying to open the port with different tools. Anyway, I hope some of this helps you get up and running.
Cheers,
Andy
…
ne. Though I suppose providing a help file which lists some useful tricks for some operations would be a good place to start.
It would be possible to add persistent undo to Clusters, and it wouldn't even be that difficult. Adding undo data into the GH file is something I've been meaning to add since the first day of undo/redo, and the plumbing is in fact there, but it was never fully hooked up. I will definitely try this for GH2. And I'll also have a think about how to implement version history for clusters.
Phew, my brain hurts even just to think about this. I suppose step one would be to write a clever merge algorithm for two files that have some things in common and some not. But even that will be tricky as heck.
This is a major problem. First of all, running the solver in a thread and keeping the UI alive will only slow things down even more. On a file which takes 15 minutes to solve that's no big deal, but you certainly don't want to be adding a 20 millisecond delay to a solution which only takes 30 milliseconds.Multi-threading will be something I'm going to try and implement in GH2, but there's only so much I can do. If you run a solid boolean operation on a boatload of shapes, it's a single operation that is performed inside Rhino and there's nothing I can do to make it run on multiple threads. This is in general an issue, sometimes it takes a long time because there are many operations to perform; like offsetting 2500 curves. I can probably multi-thread that provided the Rhino curve offsetter is thread-safe. However stuff may also take a long time because there is a single operation (like the aforementioned huge solid boolean).Lastly, I have no way to predict how long a component is going to take. I can probably work out how far along in steps a component is, but not how far along in time.
What would you do with a solver which runs in the background? How does it differ from only running solutions when you want to? Let's say the solver is threaded and the canvas remains responsive. As soon as you make a change to the GH file, the solver needs to be terminated as it is now computing stale data. Wouldn't it be just as effective to disable the solver, make all the changes you want to make, then press F5?
Just because something runs in a thread doesn't mean you can shoot it in the head any time you want without consequences. Aborting threads typically means setting a boolean somewhere and then letting the thread commit suicide, while performing all the necessary cleanup. If you just destroy a thread there's no saying in what state you leave the memory.
I think a good place to start with these sort of problems is to keep on improving clusters, add more flexible structuring UI such as Layers or Filters or Pages or whatever to the canvas, add ways to share data between remote parts of a file without suffocating the display with wires, and to provide easy ways to temporarily disable parts of a file (think of it as Clipping planes for GH). That way you can make local changes and see local effects before solving the entire file again.
I'm certainly impressed by the sheer extent of the file you people made, it will be a lovely test case for UI improvements.
--
David Rutten
david@mcneel.com
Tirol, Austria…
Added by David Rutten at 3:34am on September 4, 2013
er" logic but it miss when comes the copy or offset.
Here is my following logic
Take the square of 25 m x 12 m ; make it a surface
I divide it in "blades" of 20 cm
I take the edges of the "blades",
I divide this edges in 40 points (or equivalent) (A)
I identify my curves (curves) which are on the floors, which are curves (B)
First i do this "test" :
for each crossroad between A and B, i make a circle of X cm (slider) of diameter and the rule is the following :
* In this circle, the future movement of my A curve must be at Z = 0
Second step :
for each next point, i have to : leave a copy on Z = 0 and rise the second one for a heigh of Y cm (slider) from the ground.
the next (W = slider to chose every each number of point, i decide to do the following point) point, which is a little bit farer from the previous point, must duplicate the same height of Y ; and also be copied to Y + Y cm.
There is a Z number (slider) which is the max height possible for these points, which mean that the next point must be at this very same level except ... The third step scenario.
The purpose is to be able to have flat area, like step in a stairway.
Third step :
The grasshopper must test if the A points are between two or more "area at Z = 0". Why ?
The goal is to obtain something like screen "side view" if there are two starting points at Z = 0.
Which also mean that if there is an odd number of points, the remaining odd number must be at the top of the "stairs"
At this point of the grasshopper, we might be able to obtain, thanks to the sliders the "staircase form" regarding :
- The size of the test circle between A and B curves
- The "footstep" of each points (height)
- The number of points before a "copy of the point + the next footstep rise"
- The max heigh possible for all the point off B curves
And at this moment i have a new problem in my logic. You will get my idea, but it might be wrong as well...
Therefore, and after that, we should be able to link every point by a straight line.
To fillet with P (angle) a line with the following one
To join all the line of a same B curve
To cut it at the center of each circle at Z = 0 (the crossroad of A and B)
To offset it with Q (distance)
To rise a line from the center of each circle at Z = 0
To cut the extra part of each Offset"ed" curve to get an offset curve "aligned in Z" with the original one.
To create loft the original and offset"ed" one
To extrude the surface to a distance of R
And grasshopper "should be done" because, i will duplicate it for the ceiling, reverse the form with a -Z vector to the Y value and modifie my Z in Z' to modify my max height
Could you help me ?
…
ly one (Cost of the structural material in my case) and penalize the individuals that not satisfy the structural verification by multipliyng the cost for that iteration for a factor 10. This seem to work really good, infact I obtained a convergence of the results in a specific area and number of beams.
Now, I've to modify something because the thickness of the insole, tend to minimum of the range (only because it's the most expensive material in my case), despite the validation of structural verification that is satisfied with the maximum height of the beams.
I'm expecting a insole thickness about 20-30 cm and beams height less that the maximum. I increase the range of the thickness insole to a minimum of 20 cm, but I hope the solution tend to a larger value.
Do you have some suggestion in this case?
Your post was really helpful, thank you so much again for the perfect explanation!
Leonardo…
aph relaxation in 3D and more). There is much more already in our GitHub repos and more to be added. For getting an idea of our future direction check this lecture out. For getting a better understanding of graphs and graph theory watch this lecture and this lecture on a gamified spatial configuration process. Stay tuned for more and do not hesitate to post Python questions in the meantime.
ps. If you are having installation problems, please check the remedy suggested below:
Comment by Iman Sheikhansari on August 26, 2019 at 8:33amDelete Comment
HiIf you are encountering a problem with rhino 6 versions don't worryFollow these steps.1. Download SYNTACTIC from https://sites.google.com/site/pirouznourian/syntactic-design2. Install it and go to the installation folder, Drag & drop SYNTACTIC(green one) over your grasshopper canvas.3. Close your rhino and reopen it. 4. Type GrasshopperDeveloperSettings5. Tick the Memory load *.GHA assemblies using COFF byte arrays option6. Run grasshopper and enjoy plugin
…
onents (radiation, sunlight-hours and view analysis) which let you study the effect of the orientation of your building and the analysis result. When you come to a question similar to "what is the orientation that the building receives the most/least amount of radiation?" is probably the right time to use this component.
HOW?
I'll try to explain the steps using a simple example. Here is my design geometries. The building in the center is the building to be designed and the rest of the buildings are context. I want to see the effect of orientation on the amount of the radiation on the test building surfaces from the start of Oct. to the end of Feb. for Chicago.
First I need to set up the normal radiation analysis and run it for the building as it is right now. [I'm not going to explain how you can set up this since you can find it in the sample file (Download the sample file from here)]
Now I need to set up the parameters for orientation study using orientationStudyPar component. You can find it under the Extra tab:
At minimum I need to input the divisionAngle, and the totalAngle and set runTheStudy to True. In this case I put 45 for divisionAngle and 180 for the totalAngle which means I want the study to be run for angles 0, 45, 90, 135 and 180.
[Note1: The divisionAngle should be divisible by totalAngle.]
[Note 2: If you don't provide any point for the basePoint, the component will use the center of the geometry as the center of the rotation.]
[Note 3: You can also rotate the context with the geometry! Normally you don't have the chance to change the context to make your design work but if you got lucky the rotateContext input is for you! Set it to True. The default is set to False.]
You're all set for the orientation study, just connect the orientationStudyPar output to OrientationStudyP input in the component and wait for the result!
The component will run the study for all the orientations and preview the latest geometry. To see the result just grab a quick graph and connect it to totalRadiation. As you can see in the graph 135 is the orientation that I receive the maximum radiation. Dang!
If you want to see all the result geometries set bakeIt to True, and the result will be baked under LadyBug> RadaitionStudy>[projectname]> . The layer name starts with a number which is the totalRadiation.
Mostapha…
her people) a tremendous amount of time creating them by hand. Dog Treat was far from perfect, however it was good enough to use almost daily.
Three years is a long time. Since 2016 my Gh knowledge has expanded and I’ve seen how dodgy some of the scripting is. With this in mind I started work on a new build. Many things have been tweaked and some things have been rebuilt from the ground up.
Everything has been designed to be leaner and be a general solution to the problem of creating dog bone corners on geometry for quick, efficient and safe CNC fabrication.
Some of these things are:
Adding prompts about user geometry to make them aware about open curves, varying curve heights and if their geometry had been altered (mostly removing unnecessary points on curves).
Smooth Transfers. If you’re in a rush and need to speed through cutting, smooth transfers mean that a lead in geometry is now created alongside the actual dog bone arc. This means the router bit doesn’t have to come to a minute stop at every corner. This is turned on by default.
Acute Angle Condition If the angle between the two curves adjacent to a dog bone point is acute, previously the dog bone corner was useless. This was because the distance between the end points of the dog bone arc were less than the diameter of the router bit. There are many ways this condition could be addressed. I chose to circumscribe a larger arc based on the original angle between the adjacent curves. While it removes more material from the corner, it minimises tool wear and any potential for material to burn.
Single Curve A single curve can now be input into Dog Treat. It will be output with both internal and external treatments.
I’ll continue to update Dog Treat as the need arises, it’s become somewhat of a hobby now. Maybe one day it will become part of a Plug-in… once I learn to code it though!
Happy Treating!
Hi Everyone,
Here's a tool I've been working on for the past 4 months or so in my free time. It's a dog bone corner generator, however it's a little different to some of the existing ones. It's designed to be used for large amounts of geometry and as such, it avoids using any curve boolean operations that are computationally taxing. You don't have to split your curves up into internal and external lots either, it works it all out so you can be lazy. I've also incorporated Lunch Box's Object Bake Component for a one click operation that bakes geometry back out to Internal and External profile layers.
Let me know how it goes, will update where necessary.
Best,
Darcy
Change Log
06/11/19 - Version 2.0 SECOND DINNER - Rebuild
29/09/17 - Version 1.3 - Now with smooth corners option, True for smooth default/False for original
18/05/17 - Version 1.2 - Now includes variable angle domain input (defaults at 90°) for angled corners
13/11/16 - slight change to enable acceptance of very large interior curves
…
Added by Darcy Zelenko at 8:44pm on November 9, 2016
gap as for a 20 meter gap, it's not a good argument.
I fully concede that not every single thing may be backed up by logic. There are simply too many design decisions to make and not enough time to make them rigorously. And I do believe there is place for human intuition and art in architecture, but I also think that artistic (or intuitive, or emotional) considerations should clearly be labelled as such.
When Le Corbusier designed the urban layout of the city of Chandigarh he used his intuition to distribute the buildings and clusters. His intuition however was grounded in European climes and it failed him in India. On hot days it becomes almost impossible to walk the distance between them. Would Chandigarh have been a better place if the maximum distance was defined by the largest walkable distance on the hottest day of the year instead of the unjustifiable intuition of the designer? I suspect it would.
Furthermore, I believe that architects - student and professionals alike - regularly make formal decisions according to their aesthetic judgement. To suggest that students aren't qualified to make a design decision during their studies because they think it's formally successful seems exceedingly stingy;
There are plenty of rational decisions which are made by tacit processes. People can become very good at mimicking rational behaviour using intuition. And -as I said- if you are an architect with a distinguished career; if you've already proven yourself to be capable of good design then there comes a point where your intuitions can be trusted (to an extend).
But students whose every design has always been virtual, who have not been able to evaluate their decisions by a follow-up study, I don't see how anybody can trust their instincts. Instincts aren't just sitting in someone's brain, they are cultivated by relentless exercise and trial-and-error. Until you actually build something there is no error, only trial, and virtual trial at that.
I find architects' attempts to justify what are obviously decisions based on formal taste using other means often taking the same form of obfuscation that makes architects appear to be intellectual charlatans to specialists in other fields.
I fully agree here. If there are non-communicable aspects to a design, just say that. There's no shame in it as long as you're honest about it and have considered -however briefly- the consequences in case you're wrong.
I'm by no means advocating that all architects must master every detail in their work. Rather, that architects have at least a generalist's working knowledge of materials and construction systems. Floors don't levitate, and windows require depth; rules of thumb count as vital knowledge.
I think we're on the same page here. If you want to make a physical building, then there's more to it than pure design. Engineering comes into play. I don't mean to imply that engineering doesn't require creativity or even artistic intellect, but it is a different kind of problem-solving.
I fully agree with your fourth point. I just wasn't sure what performance-driven meant.
--
David Rutten
david@mcneel.com
Tirol, Austria…
Added by David Rutten at 4:19pm on August 14, 2013
si à faire le tri avec Grasshopper et l'outil Points in Brep, comme je pensais. Je suis passé d'environ 400 000 points à uniquement 20 000 points autour de mes 3 rails. C'est très efficace (mais un peu dangereux avec tous ces points).
J'ai interdit au composant CircleFit de faire un cercle, s'il n'y a pas au moins 5 points présents sur la section. Car lorsqu'il y a seulement 3 ou 4 points, il suffit qu'il y en ait un pour que le cercle soit faux, alors qu'au delà, le cercle a plus de chance d'être "bon".
J'ai également créé des "Pipe" (créés à partir de portions de l'axe) au lieu des "Box » de sélection des points pour éviter de sélection trop de points que ne serait pas des points du rail.
J'ai ensuite créé des « panel » pour la moyenne des distances en X et en Y et la moyenne des distances centre à centre.
Tout cela fonctionne bien avec un axe et un tuyau. Mais maintenant j'essaie d'appliquer ça à plusieurs rails en même temps. Je crois avoir compris qu'il faut créer des « path » dans l'imput manager, et faire correspondre le « path » de l'axe et celui du Tuyau.
Dans mon exemple j’ai mis 3 courbes et 21 sections. Au moment où j'utilise les boîtes pour créer les portions des axes, il crée 63 « sous-path » de 1 courbe alors qu'il faudrait qu'il crée 3 "paths" de 21 courbes, enfin si j'ai bien compris.
Car une fois qu’il a créé les points à l’intérieur des « Pipe », il doit les projeter sur les plans correspondant. Et c’est là que le problème se voit. Il ne fait pas correspondre les points à projeter et les plans.
Je vous envoie la version à une courbe et un tuyau (c’est la v5 avec un fichier rhino ou la courbe d'axe est "bakée" pour pouvoir faire un zoom sur la zone plus rapidement) et je vous envoie également, celle avec 3 courbes et 3 tuyaux. Sachant qu’il faudra également attribuer un rayon pour un des tuyaux et un autre rayon pour les deux autres.
Tout ça est bien compliqué, j’espère que je ne vous embête pas trop.
Merci d’avance.…