complicated than it seems as I have an event and a subscriber method receiving data from a serial port.
In the code below, the strings received within myReceivedLines appear when connecting with the serial port (when connecttodevice is true). However they disapear when I launch another command (when homeallis true).
As you recommended in your reply, I have added the field called myReceivedLineswithin the class so that I could use the method String.Add() to all the feedback received and commands sent.
Why does the feedback dispear when a command is sent? Is the string going to myReceivedLine disappearing because they happen within a subscriber method or is it related to the DA.SetDataList() method used to assign myReceivedLinesto the output?
Many thanks!
public class SendToPrintComponent : GH_Component { //Fields List<string> myReceivedLines = new List<string>(); SerialPort port; //subscriber method for the port.DataReceived Event private void DataReceivedHandler(object sender, System.IO.Ports.SerialDataReceivedEventArgs e) { SerialPort sp = (SerialPort)sender; while (sp.BytesToRead > 0) { try { myReceivedLines.Add(sp.ReadLine()); } catch (TimeoutException) { break; } } } protected override void SolveInstance(IGH_DataAccess DA) { //Opening the port if (port == null) { string selectedportname = default(string); DA.GetData(1, ref selectedportname); int selectedbaudrate = default(int); DA.GetData(2, ref selectedbaudrate); //Assigning an object to the field within the SolveInstance method() port = new SerialPort(selectedportname, selectedbaudrate, Parity.None, 8, StopBits.One); //Enables the data terminal ready (dtr) signal during serial communication (handshaking) port.DtrEnable = true; port.WriteTimeout = 500; port.ReadTimeout = 500; } //Event Handling Method bool connecttodevice = default(bool); DA.GetData(3, ref connecttodevice); if (connecttodevice == true) { if (!port.IsOpen) { port.DataReceived += new SerialDataReceivedEventHandler(DataReceivedHandler); DA.SetDataList(0, myReceivedLines); port.Open(); } } else if (port.IsOpen) { port.DataReceived -= new SerialDataReceivedEventHandler(DataReceivedHandler); port.Close(); } if (port.IsOpen) { DA.SetData(1, "Port Open"); } //If the port is open do all the rest if (port.IsOpen) { bool homeall = default(bool); DA.GetData(5, ref homeall); //Home all sends all the axis to the origin if (homeall == true) { port.Write("G28" + "\n"); myReceivedLines.Add("G28" + "\n"); DA.SetDataList(2, myReceivedLines); } } else { DA.SetData(1, "Port Closed"); } }}…
hit Commit.
I'm wondering how hard it would be to have an edit box which shows the
number the user could click inside of then type in a new number, then
hit enter. :)
2) How would I go about using one line from a table and assign each
field to a variable? Then, move a slider or something and use the values
from the next row?
background: I'm recreating elbows, Tees, and other fittings using
paramatric scripts, then baking and exporting them. Here's one source
table, http://www.wardfittings.com/Assets/PDFs/0902CatalogColorOld.pdf
page 5, the uniform elbows.
Current Setup: the attached ghx file. Create a point at 0,5,0 in a blank
document with units set to inches, then assign that point to the top
left 'Center Pnt' in the ghx file.
Current workflow:
a) Modify variables A, B, H, and Nominal Dia to match one line from the
table in the linked PDF file, page 5, table of regular elbows.
b) Select the 'Nodes' and 'Surfaces' with a drag box
c) Click 'Bake'
d) Switch to Rhino window, do the 'sellast' command.
e) Drag baked objects along Y axis so the center point is at 0,0,0
f) Run 'Join'
g) Run 'Cap'
h) set the 'node' points to a layer called 'nodes'
i) set the surface to a layer called 'fit-3d'.
j) select the surfaces and nodes
k) export selected
This elbow that I'm doing only has 12 rows, so doing it the above method
doesn't take THAT long. I'm also going to be doing a couple with larger
tables like the Tee on page 8, and in other spec files. As you can
imagine, entering in EACH value into a slider is a bit tedious.
I'd love to take the pdf table, run it through an OCR program to convert
to excel, modify the headers so the ghx script knows what they are, then
paste it into grasshopper, or save it and have grasshopper read it, and
I be able to move a slider or something to to select one line at a time.
Has anyone done something similar? ie: assigned one row in a table to a
predefined set of variables, each variable coming from one field in the row?
Thanks for taking the time to read this message. :)
I'm making a rhino script to do steps d-k, so that part will be much faster.
-Suthern…
ed to do:
FOA_Bundle_Tower.pdf
The tower height is a variable
The degrees of symmetry in plan is variable from 2 to 10 (2 bundles up to 10 bundles; the actual project has 4 bundles made from 8 individual towers or tubes).
The overall radius or diameter of the circle on which each tower is located is a variable
The tower should match the overall topology of the Bundle Tower: each tube should alternate between touching its neighboring tube on the left and right twice.
The number of floors is a variable
Overall tower height: 500m- Floor to floor height: 4.5m (I recommend that you increase this to 10m while testing)- Each tube's plan roughly has an area of 1000m2
this is what i have got so far:
foa tower.ghx
I just need guidance because i am soo lost. thank you
…
rolling in the Fabricating Luminance workshop. The INTEGRATE Bursary is sponsored by Studio Integrate and gives students the opportunity to receive a 50% bursary on workshop fees. The bursary is both based on need and merit; if you are interested in attending a workshop but are unable to afford the fees, contact us via our website. Upon receipt of your query, we will ask for a digital portfolio submission (5MB or less) on which we will award the INTEGRATE Bursary.
Fabricating Luminance is an intense 2-day workshop focused on the design and fabrication of a luminous artefact through surface manipulation in Grasshopper, Rhino’s parametric modelling plug-in. The workshop will introduce participants to the concepts of algorithmic design and associative modelling through focused design exercises, investigating possibilities for heterogeneous lighting conditions through the differentiation of component-based systems. Each student will have the opportunity to fabricate and construct their own design with the use of our CNC laser cutter. Objects produced will have the opportunity to be developed further and showcased on the online jewellery and product design shop cyberth.com. The design-based workshop will be supported by a series of presentations related to the workshop content.
The workshop is open to both students and professionals in architecture, product design, industrial design, and any other related fields. To ensure maximum time with tutors, the workshop is limited to 8 students.
WORKSHOP CONTENT
Day 01 Morning Session 10 AM – 6 PM - Introduction to parametric/associative modelling - Parameters and components - Lists and data management - Curve and surface subdivision
Afternoon Session 2 PM – 6 PM - Component creation and surface proliferation for flat-sheet fabrication (triangulation of surfaces) - Component manipulation through an attractor - Design tutorials
Day 02 Morning Session 10 AM – 6 PM - Representation tools in Grasshopper (dashed lines, colors, etc.) - Sheet layout and unfolding (how to create a tabbed model) - Design tutorials
Afternoon Session 2 PM – 6 PM - Design tutorials - Laser cutting and model construction
Visit www.integrateacademy.com for more information.…
eroberfläche des Grasshopper Programms
Funktionsprinzip eines grafischen Algorithmus-Editors (Datenfluss)
Unterscheidung von Parametern (Datentypen) und Komponenten (Datenverarbeitung)
Erzeugung, Bearbeitung und Analyse von Geometrie-Typen: Punkte, Vektoren, Linien, Kurven, Flächen (surfaces, brep) und Netze (meshes)
Strukturierung der Daten anhand von Listen und Bäumen
unterschiedliche Verknüpfungsmöglichkeiten von Parametern (data matching)
praxisnahe Grundlagen der Geometrie und Vektorrechnung für generatives Design
effizienter Aufbau von parametrischen Modellen anhand Übungsaufgaben
Auszug von Daten aus Modellen für die Fertigung; Daten aus Tabellen (Excel, CSV) importieren, exportieren
Einsatz von benutzerdefinierten Komponenten (custom components)
Vorkenntnisse: Rhinoceros3d Benutzeroberfläche der Software: Englisch Unterrichtssprache: Deutsch
Details und Anmeldung:
www.vhs-sha.de
click: SUCHE
Kurstitel: GRASSHOPPER
oder direkt:
http://www.vhs-sha.de/index.php?id=90&kathaupt=11&knr=3151053&kursname=Grasshopper+I
Trainer: Peter Mehrtens
Kursdauer: 3 Tage / 8 Stunden pro Tag
Freitag, 19.07.2013, 08:00-17:00 Uhr Samstag, 20.07.2013, 08:00-17:00 Uhr Sonntag, 21.07.2013, 08:00-17:00 Uhr Ort: Volkshochschule Schwäbisch Hall, im Haus der Bildung
Teilnahmegebühr: 349,00 € Teilnehmerzahl: 4-10 Personen
…
berfläche des Grasshopper Programms
Funktionsprinzip eines grafischen Algorithmus-Editors (Datenfluss)
Unterscheidung von Parametern (Datentypen) und Komponenten (Datenverarbeitung)
Erzeugung, Bearbeitung und Analyse von Geometrie-Typen: Punkte, Vektoren, Linien, Kurven, Flächen (surfaces, brep) und Netze (meshes)
Strukturierung der Daten anhand von Listen und Bäumen
unterschiedliche Verknüpfungsmöglichkeiten von Parametern (data matching)
praxisnahe Grundlagen der Geometrie und Vektorrechnung für generatives Design
effizienter Aufbau von parametrischen Modellen anhand Übungsaufgaben
Auszug von Daten aus Modellen für die Fertigung; Daten aus Tabellen (Excel, CSV) importieren, exportieren
Einsatz von benutzerdefinierten Komponenten (custom components)
Vorkenntnisse: Rhinoceros3d Benutzeroberfläche der Software: Englisch Unterrichtssprache: Deutsch, auf Wunsch auch Englisch
Details und Anmeldung:
www.vhs-stuttgart.de
Dieser Kurs wird in Kooperation mit ifBau gGmbH und VHS Stuttgart angeboten, und wird von ifBau als Fortbildung für Mitglieder der Architektenkammer BW anerkannt.
Trainer: Peter Mehrtens
Kursdauer: 3 Tage / 8 Stunden pro Tag
Freitag, 24.01.2014, 09:00-17:00 Uhr Samstag, 25.01.2014, 09:00-17:00 Uhr Sonntag, 26.01.2014, 09:00-17:00 Uhr Ort: VHS Stuttgart, Fritz-Elsas-Str. 46/48
Teilnahmegebühr: 510,00 € Teilnehmerzahl: 4-10 Personen
…
ction only generic double glazing 72 (first in my list) and two others in opposition to the 8 different which are in the Geko mat component. If i select in Geko lets say type of object 6 (window) and no matter which material of object I choose it always selects the generic double glazing 72. I guess that makes sense that Ecotect switches its material object to 0 in the list because the lists are not corresponding and the material Geko calls does not exist in Ecotect? What puzzles me more is the fact if I change a given material property within Ecotect in a list where both mat lists (Ecotect & Geko) are corresponding after switching on Geko my changes of the material properties within Ecotect are gone and set back to its original values. Any idea?
For the other issue:
We would like to create new materials. Here we would like to experiment with fabric materials. I'm currently trying to figure out how the given material values of the fabric manufacturer (Ts, Rs, As, Tv, SHGC, Colour) to be translated into Ecotect material properties.
But anyway, what would be better? Defining a set of new materials within Ecotect and being able to assign them from Geko or being able to change material properties within Geko and transfer them to Ecotect for incident solar radiation and DF tests?
The first option if possible could give users the freedom to have a different material library then that one in Geko. Then the user only has to know how to asign which object type number and material number to get the right ecotect material. It would be also more easy to connect one slider to galapagos, meaning object type could stay constant but only switching through different materials which could be easily be found back since those correspond with the manufactures data (if properly done).
The second option would create more freedom I guess but one would have to connect several sliders to galapagos switching the material properties themselves which means one would end up with new (utopian) materials rather than existing materials which are on the market.
If you have any suggestions we would be happy to hear them. Thanks a lot.
best,
Florian
…
. Now i can duild the angle (i check angle with a vec cross prod). I sort the angles and the node index
now i can pass the point as ventrices to a polyline component.
and at the end the polyline in green
Example of a bad figure
Why bad?
Because i can order the points in the marked area. The angle method is not working enymore.
Point 8 and 9 are ok. Point 6 comes now before the 9.
Point 14 is ok. But point 15 comes before. And so on...
I have no idea how to solve this…
interested in a certain area or floor of a scanned building.
Having access to the Scan positions, without the need to load tens of Gigabytes, allows to quickly select and import only scans in a certain height and range.
Here a small GH definition, which uses the A-House Scan June E57 file from data.duraark.eu (10.4GB in size, 16 scans covering two levels) The GH definition allows to select and subsequently import:
a) only scans from a certain range in height - lower scans
upper
b) only scans in a certain range in XYZ direction
The definition is not very sophisticated, but demonstrates how Volvox and Point Clouds can integrate into Grasshopper workflows. The GH definition can be found here
The scan can be directly downloaded from here
Here a full view on the A-house scan with 8% of points loaded:
…
used of 180 being for the northern hemisphere and 0 for the southern hemisphere.For the optimal tilt, to my knowledge, they are mostly based on correcting location's latitude through a single formula.TOF component is more sophisticated. It essentially replicates the Solmetric's Annual Insolation Lookup tool.What it does is that it creates a grid of points. Each point represents the calculated annual insolation on the surface (PV module, SWH collector, facade, any kind of surface) for a single tilt and azimuth angle.Each point is then elevated according to the annual insolation values. The mesh is created from that grid of points. The portion of the mesh which is the highest, represents the optimal tilt and azimuth angles. So the higher your "precision_" input is, the more points in a mesh you'll have - thus the more precise final optimal tilt and azimuth will be.For the diffuse component of the annual incident solar radiation for each point the Perez 1990 modified model is used. Direct is from classical cosine law, and Ground reflected component from Liu and Jordan (1963).So TOF component calculates the optimal tilt and azimuth based on annual incident solar radiation, not AC energy....…