ed file and code below:
Color ColorAt(Mesh mesh, int faceIndex, double t0, double t1, double t2, double t3) { // int rc = -1; var color = Rhino.Display.Color4f.Black;
if( mesh.VertexColors.Count != 0) { // test to see if face exists if( faceIndex >= 0 && faceIndex < mesh.Faces.Count ) { /// Barycentric quad coordinates for the point on the mesh /// face mesh.Faces[FaceIndex].
/// If the face is a triangle /// disregard T[3] (it should be set to 0.0).
/// If the face is /// a quad and is split between vertexes 0 and 2, then T[3] /// will be 0.0 when point is on the triangle defined by vi[0], /// vi[1], vi[2]
/// T[1] will be 0.0 when point is on the /// triangle defined by vi[0], vi[2], vi[3].
/// If the face is a /// quad and is split between vertexes 1 and 3, then T[2] will /// be -1 when point is on the triangle defined by vi[0], /// vi[1], vi[3]
/// and m_t[0] will be -1 when point is on the /// triangle defined by vi[1], vi[2], vi[3].
MeshFace face = mesh.Faces[faceIndex];
// Collect data for barycentric evaluation. Color p0, p1, p2;
if(face.IsTriangle) { p0 = mesh.VertexColors[face.A]; p1 = mesh.VertexColors[face.B]; p2 = mesh.VertexColors[face.C]; } else { if( t3 == 0 ) { // point is on subtriangle {0,1,2} p0 = mesh.VertexColors[face.A]; p1 = mesh.VertexColors[face.B]; p2 = mesh.VertexColors[face.C]; } else if( t1 == 0 ) { // point is on subtriangle {0,2,3} p0 = mesh.VertexColors[face.A]; p1 = mesh.VertexColors[face.C]; p2 = mesh.VertexColors[face.D]; //t0 = t0; t1 = t2; t2 = t3; } else if( t2 == -1 ) { // point is on subtriangle {0,1,3} p0 = mesh.VertexColors[face.A]; p1 = mesh.VertexColors[face.B]; p2 = mesh.VertexColors[face.D]; //t0 = t0; //t1 = t1; t2 = t3; } else { // point must be on remaining subtriangle {1,2,3} p0 = mesh.VertexColors[face.B]; p1 = mesh.VertexColors[face.C]; p2 = mesh.VertexColors[face.D]; t0 = t1; t1 = t2; t2 = t3; } }
/** double r = t0 * p0.FractionRed() + t1 * p1.FractionRed() + t2 * p2.FractionRed(); double g = t0 * p0.FractionGreen() + t1 * p1.FractionGreen() + t2 * p2.FractionGreen(); double b = t0 * p0.FractionBlue() + t1 * p1.FractionBlue() + t2 * p2.FractionBlue();
ON_Color color; color.SetFractionalRGB(r, g, b);
unsigned int abgr = (unsigned int)color; rc = (int) ABGR_to_ARGB(abgr); **/ var c0 = new Rhino.Display.Color4f(p0); var c1 = new Rhino.Display.Color4f(p1); var c2 = new Rhino.Display.Color4f(p2); float s0 = (float) t0; float s1 = (float) t1; float s2 = (float) t2;
float R = s0 * c0.R + s1 * c1.R + s2 * c2.R; float G = s0 * c0.G + s1 * c1.G + s2 * c2.G; float B = s0 * c0.B + s1 * c1.B + s2 * c2.B; color = new Rhino.Display.Color4f(R, G, B, 1); } } return color.AsSystemColor(); }
…
ort and export from the images below and also from the HELP file of DB in attachments (Page 71: Importing Geometric Data; Page 78-80: Import 3 - D CAD Data). In their HELP file, they mention about "import geometric data".
However, regarding the input of schedules, loads, constructions and etc., DB normally uses "Component " and "Template" (Page 29: Templates And Components; Page 591: Templates; Page 533: Components). "Templates" are databases of typical generic data, including Activity templates, Construction templates, Glazing templates, Facade templates, HVAC templates, Location Templates, and etc. "Component " are databases of individual data items (e.g. a construction type, material, window pane).
Both "Component " and "Template" are allowed to be imported and exported by using "Import / Export library data" command (.ddf format - DB Database File; Page 734: Import Components/Templates, Export Components/Templates). DB also allows us to build up our own libraries of templates and components (Page 731: Library Management; Page 733: Template Library Management).
In order to import both geometric information and other information related to schedules, loads, constructions and etc. from GH to BD, we supposed the following two ways:
1. GH(HB+GB) --> gbXML (both geometric and "Component " and "Template" information) --> DB
This is the way we most prefer. We did see information related to schedules, loads, constructions encoded in the gbXML file generated by GB, but still do not know the reason why DB did not take this information (I also mentioned this in Q6 within the gh file). We assume this might because the gbXML file we create encodes the schedules based on a different template / schema than the one DB expects. We also post this question to the DB forum for help.
(http://www.designbuilder.co.uk/component/option,com_forum/Itemid,25/page,viewtopic/p,13755/#13755)
2. GH(HB+GB) --> gbXML (geometric information only) + .ddf ("Component " and "Template" information only) --> DB
If the first way doesn't work and DB only takes geometric information from the gbXML, then we might think of the other way - generating the .ddf files from GH(HB+GB) to pass the schedule, load and construction information to DB.
I was wondering if it is feasible for HB and GB to have this function? And what is your suggestion to achieve this?
In addition, we notice that DB can export XML files (not gbXML), so we are trying to figure out if DB also accepts / reads the XML file. If so, we might be able to convert the gbXML (with both geometric and schedule information) to XML. What do you think about that?
Thank you again for all your help!
Best,
Ding
DB import
DB export
Template libraries
Component libraries
…
will work slightly different from before. Sorry about breaking this, but it proved impossible to improve the selection logic with the fairly ambiguous notation that was implemented already.
Not every change is breaking though and I hope that most simple matching rules will work as before. There will be a McNeel webinar on Wednesday the 6th of November where I discuss the new selection rules (as well as path mapping syntax and relative offsets within one or more data trees). This will be a pretty hard-core webinar aimed at expert users. The event will be recorded so you can always go and watch it later. I figured I'd briefly explain the new selection rules on Ning before I release the update though.
-------------------------------------------------------------------------------
Imagine we have the following data tree, containing a bunch of textual characters:
{0;0} = [a,e,i,o,u,y] {0;1} = [ä,ë,ê,ï,î,ö,ô,õ,ü,û,ÿ,ý] {1;0} = [b,c,d,f,g,h,j,k,l,m,n,p,q,r,s,t,v,w,x,z] {1;1} = [ç,ĉ,č,ĝ,ř,š,ş,ž]
There are a total of four branches {0;0}, {0;1}, {1;0} and {1;1}. The first branch contains all the vowels that are part of the standard English alphabet. The second branch contains all non-standard vowels and branches three and four contain the standard and non-standard consonants respectively.
So what if we want to select from this tree only the standard vowels? Basically include everything in the first branch and disregard everything else. We can use the [Tree Split] component with a selection rule to achieve this:
{0;0}
This selection rule hard-codes the number zero in both tree path locations. It doesn't define an item index rule, so all items in {0;0} will be selected.
If we want all the vowels (both standard and non-standard), then we have several options:
{0;?} = select all branches that start with 0
{0;(0,1)} = select all branches that start with 0 and end in either 0 or 1
{0;(0 to 1)} = ......................................... and end in the range 0 to 1.
Conversely, selecting all standard vowels and consonants while disregarding all non-standard character can be achieved with rules as follows:
{?;0}
{(0,1);0}
{(0 to 1);0}
It is also possible to select items from each branch in addition to limiting the selection to specific branches. In this case another rule stated in square brackets needs to be appended:
{0;?}[0 to 2]
The above rule will select the first three vowels from the standard and the non-standard lists.
Basically, rules work in a very consistent way, but there are some syntax conventions you need to know. The first thing to realize is that every individual piece of data in a data-tree can be uniquely and unambiguously identified by a collection of integers. One integer describes its index within the branch and the others are used to identify the branch within the tree. As a result a rule for selection items always looks the same:
{A;B;C;...;Z}[i] where A, B, C, Z and i represent rules.
It's very similar to the Path Mapper syntax except it uses square brackets instead of parenthesis for the index (the Path Mapper will follow suit soon, but that won't be a breaking change). You always have to define the path selector rule in between curly brackets. You can supply any number of rules as long as you separate them with semi-colons.
The index rule is optional, but -when provided- it has to be encased in square brackets after the path selection rule(s).
The following rule notations are allowed:
* Any number of integers in a path
? Any single integer
6 Any specific integer
!6 Anything except a specific integer
(2,6,7) Any one of the specific integers in this group.
!(2,6,7) Anything except one of the integers in this group.
(2 to 20) Any integer in this range (including both 2 and 20).
!(2 to 20) Any integer outside this range.
(0,2,...) Any integer part of this infinite sequence. Sequences have to be at least two integers long, and every subsequent integer has to be bigger than the previous one (sorry, that may be a temporary limitation, don't know yet).
(0,2,...,48) Any integer part of this finite sequence. You can optionally provide a single sequence limit after the three dots.
!(3,5,...) Any integer not part of this infinite sequence. The sequence doesn't extend to the left, only towards the right. So this rule would select the numbers 0, 1, 2, 4, 6, 8, 10, 12 and all remaining even numbers.
!(7,10,21,...,425) Any integer not part of this finite sequence.
Furthermore, it is possible to combine two or more rules using the boolean and/or operators. If you want to select the first five items in every list of a datatree and also the items 7, 12 and 42, then the selection rule would look as follows:
{*}[(0 to 4) or (6,11,41)]
The asterisk allows you to include all branches, no matter what their paths looks like.
It is at present not possible to use the parenthesis to define rule precedence, rules are always evaluated from left to right. It is at present also not possible to use negative integers to identify items from the end of a list.
If you want to know more, join the Webinar on Wednesday!
--
David Rutten
david@mcneel.com
Seattle, WA…
Added by David Rutten at 8:57pm on November 3, 2013
Introduzione a Grasshopper", il primo manuale su Grasshopper.
.
I corsi PLUG IT nascono dalla volontà di promuovere le nuove tecnologie digitali di supporto alla progettazione e condividere il know-how maturato attraverso ricerca, collaborazione con i più importanti studi di architettura e pubblicazioni internazionali.
.
Verranno introdotte le nozioni base di Grasshopper approfondendo le metodologie della progettazione parametrica e le tecniche di modellazione algoritmica per la generazione di forme complesse. Il corso è rivolto a studenti e professionisti con esperienza minima nella modellazione 3D e si articolerà in lezioni teoriche ed esercitazioni.
. Argomenti trattati:
- Introduzione alla progettazione parametrica: teoria, esempi, casi studio - Grasshopper: concetti base, logica algoritmica, interfaccia grafica - Nozioni fondamentali: componenti, connessioni, data flow
- Funzioni matematiche e logiche, serie, gestione dei dati - Analisi e definizione di curve e superfici
- Definizione di griglie e pattern complessi - Trasformazioni geometriche, paneling - Attrattori, image sampler
- Data tree: gestione di dati complessi - Digital fabrication: teoria ed esempi - Nesting: scomposizione di oggetti tridimensionali in sezioni piane per macchine CNC
.
Verrà rilasciato un attestato finale.
.
Ulteriori info e programma completo su: www.arturotedeschi.com e su www.edizionilepenseur.it…
of the new challenges presented to the society and architecture in Portugal. With technological developments, tools once limited to not creative areas begin to be part of the everyday life of students in University Architecture Laboratories and change its design processes. The architecture design methods are changing rapidly with the introduction of CAD-CAM software’s. In recent years, new software’s have been available for 3D representation and digital fabrication, which have allowed creating new ways of interacting with the computer and architecture. Contemporary architecture in its various scales, seeks greater flexibility, adaptability and interactivity taking into account both the means and goals of kinetic systems. Thus, it is essential to the creative industry players to acquire new knowledge about the latest technological innovations and how they can solve some of the problems and challenges of today’s society.
The workshop will explore the use of Grasshopper, Firefly and Arduino as creative and technical tools in all the design process, to simulation and prototype 3D interactive architecture solutions.
The theoretical and practical workshop (64 hours) taught in English and Portuguese, will be composed of two modules: (1) LS_01: Firefly +Grasshopper + Arduino and Scale Model Fabrication; (2) LS_02: Design Studio – Discursive Wall.
This workshop is intended for students and professionals from different areas of knowledge, (architecture, design, fine arts, engineering, music and programming) who are interested in the process of design: from ideation to prototyping. The participants will generate scale models.
Registration is limited to 20 participants with or without software knowledge. Participants will work individually and in group. Participants must take their own laptops to the workshop. Registrants should complete the form by 28 February 2012. Once registered, you will receive an email confirming your acceptance.
Questions or doubts contact us:
alivingsystem@gmail.com
…
Added by Brimet Silva at 7:07pm on January 16, 2012
rendo posizioni lavorative fino a qualche tempo fa impensabili. Questo nuovo approccio ha infatti la caratteristica di avvicinarsi alla programmazione informatica, ma con un approccio facilitato grazie ai componenti visuali.Hai bisogno di un motivo in più per usare Grasshopper? Eccolo! Trattandosi di uno strumento ancora in fase di testing (anche se perfettamente funzionante) l’applicativo è completamente gratuitoScarica la tua versione e inizia subito ad usarlo!Corsi certificatiLe lezioni sono tenute da Antoni(n)o Marsala, docente certicato McNeel, con alle spalle oltre 5 anni di esperienza nell’insegnamento di Rhinoceros. Negli ultimi anni abbiamo tenuto in grande considerazione l’evolversi di questo plugin e abbiamo deciso di investire sulle sue potenzialità.Nel Febbraio del 2011, grazie ad Antoni(n)o Marsala, è uscito Algoritmi Generativi, edizione italiana del libro di Zubin Khabazi Generative Algorithms with Grasshopper. Entrami sono scaricabili gratuitamente e rappresentano dei validi strumenti per capire il mondo di Grasshopper.Da diversi mesi inoltre, il Mandarino BLU, ha attivato una collaborazione con La Bottega di Galileo di Pisa, officina del libero scambio di idee, presentando dei progetti formativi post universitari, per coloro che vogliono entrare nel mondo della progettazione di nuova generazione.Dalla collaborazione con Multiverso, nasce invece un progetto formativo più ampio sviluppato a Firenze in via Campo d’Arrigo 40rLeggi il nostro programma didattico o scarica la versione in pdf…
2:
-Developing the winning design into a working application -Testing -Beers and BBQ
Details:
-Tutors: Gregory Epps, RoboFold founder, Florent Michel RoboFold software developer. -See previous workshops here. -Download Poster here.
-Please install Rhino5 and Grasshopper and Godzilla before this event.
-No previous experience with Grasshopper necessary. -Hours: 10am-6pm. -Location details: here.
***COMPETITION: THE BEST USE OF GODZILLA GETS A FREE PLACE***
Judged on creativity and practicality. Submit your name, association and a link to your video to robots@robofold.com We add an additional place for the winner. Flights, accommodation etc are not free...
Join us for the first Godzilla robot workshop - experiment with the easiest robot software on the Grasshopper platform.
More details and resources on: http://www.grasshopper3d.com/group/godzilla
Workshop Fee:
Student: £ 399
Professional: £ 599…
dellatore nurbs, Rhinoceros. Attraverso una serie di esercizi che si svolgeranno durante il corso, si spiegheranno i temi fondamentali che stanno alla base della modellazione generativa e del design parametrico.
Il corso è rivolto a chi ha già una familiarità minima con la modellazione attraverso Rhinoceros e vuole ampliare le proprie competenze verso il campo della modellazione parametrica e generativa, e si terrà da martedì 22.10.2016 a giovedì 24.10.2016 – dalle 10:00 alle 17:00.
Potete scaricare qui il PROGRAMMA DEL CORSO.
Il calendario dei corsi è consultabile qui.
VEGA Parco Scientifico TecnologicoVia della Libertà 12 – VeneziaEdificio Porta dell’Innovazione – Piano Terra
Per iscriversi al corso è necessario essere registrati al sito.Per tesserarvi al Fablab Venezia, diventare maker, usufruire dei vantaggi, clicca qui.
Le iscrizioni chiuderanno giovedì 17.11.2016.
Il corso ha un costo di 270,00 euro + iva (329.40) per i tesserati e convenzionati,per i non tesserati il costo sarà di 330,00 + iva (402.60) euro.
Vuoi risparmiare? Iscriviti entro tre settimane dalla data di inizio corso, usufruirai automaticamente dell’offerta “early bird” ovvero uno sconto del 20% sul costo a te dedicato.
Per iscriversi:
http://www.fablabvenezia.org/parametric-design-with-grasshopper/…
it could look like this:
Once you're told it's to do with flattening data structures called 'trees' it becomes obvious what it means and very easy to remember. If you had to guess what it meant before you were told about trees I'm not sure what you'd make of it. Perhaps something to do with downloading? Downward pointing arrows are often associated with downloading things.
If I compress the tree image the arrow can be above it, but now the tree doesn't look like a tree any more:
Unless you've seen it before on another icon and you know that shape represents a data tree in Grasshopper.
I in fact did use a downward pointing arrow to represent flatten in the parameter post-processes:
These icons only have 10x10 pixels so anything beyond a single, simple shape cannot be represented so I couldn't go with the stump.
I'm not particularly hesitant to change the UI from version to version. I know it annoys some people and I know that some tutorials and course materials will become outdated because of it. But while GH is in alpha mode I think it is more important to try and figure out what interface works best. I'm not particularly impressed by the improvement of the tree+arrow icon, because even if it immediately conjures up the words "Flatten Tree" in your mind, you still don't know what to make of it unless you already know about data trees and what it means to flatten them.
--
David Rutten
david@mcneel.com
Poprad, Slovakia…