like to use a single VRay material as a template for creating multiple identical materials with different colors within the GH environment (instead of creating manually in the document).
I have gotten as far as creating the materials. Now I need to add them to the document material table so that they can be used with Giulio's rendering component (which looks for either Rhino.Display.DisplayMaterial or a String that references a document object). I'm not going to learn C# to modify his script, so I am catering to its demands.
Private Sub RunScript(ByVal M As Object, ByVal C As Color, ByRef Mat As Object)
Dim mTemp As Rhino.DocObjects.Material mTemp = CType(M, Rhino.DocObjects.Material) If mTemp.Name.Length > 0 Then mTemp.DiffuseColor = C Dim nTemp As String = mTemp.Name & "_" & C.R & "_" & C.G & "_" & C.B mTemp.Name = nTemp End If
Rhino.DocObjects.Tables.MaterialTable.Add(mTemp) Mat = mTemp
End Sub
The code throws the error: Reference to a non-shared member requires an object reference. (line 96)
Do I understand that the material has to be assigned to a particular object in order to enter the Material Table? Can I assign it to a Layer instead? Any ideas? A better way to do this?
Thanks,
Marc
…
cannot be cast to [B]CustomClassXY. Type A originates from 'CustomLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' in the context 'LoadNeither' in a byte array. Type B originates from 'CustomLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' in the context 'LoadFrom' at location 'C:\Users\T\AppData\Roaming\Grasshopper\Libraries\CustomLib.gha'. (line: 96)This is how I do the casting:List<CustomLib.SomeClass.CustomClassXY> AllINPUTs = new List<CustomLib.SomeClass.CustomClassXY>();
for (int i = 0 ; i < INPUT.Count; i++)// { AllINPUTs.Add((CustomLib.SomeClass.CustomClassXY) INPUT[i]); }
The GHA is compiled with two namespaces, one for the component one for the library.
Thanks a lot in advance,
Tim…
o be less from a tool-centric perspective, and more often geared toward general platforms (like BIM, or "computational" design).
For papers, I would search Cumincad first, as it captures a great deal of history as well as more current research from the proceedings of the eCAADe and ACADIA family of conferences. There are thousands of articles there.
Robert Woodbury's "Elements of Parametric Design" is considered pretty foundational. Sean Ahlquist and Achim Menges also put together a good anthology a few years back called "Computational Design Thinking" that collects several texts that are in line with the ICD's interests in biomimesis and emergence. "Inside Smartgeometry" is a good combination of theory, historical reflection, and state-of-the-art and edited by Brady and Terri Peters.
But really there is so much out there! One of my favorite short papers is Tom Maver's "CAAD's Seven Deadly Sins" which was basically a keynote mic-drop at the 1995 CAAD Futures conference. I'll spoil the end for you:
"7 Failure to criticise: Above all we have failed to exercise our critical faculties in relation to almost all of the research and development carried out by ourselves and by our peers in recent years. There has been a cosy conspiracy in the community to condone, even encourage, selfindulgent speculation and solipsism - a thoroughly bad example to set for young people in the academic community.
Conclusion: Perhaps these criticism are unjustly hard. Hopefully CAAD Futures 95 will prove me wrong or at least provide the opportunity for discussion."
…
Added by David Stasiuk at 11:10am on August 25, 2015
tween them)
However its not possible (Well its very tricky) for me to go back to the original geometry and merge the perimeter and the core into one zone.
As a result I thought that adding internal glazing would do the trick. However apart from using the addGlazing component I couldn't see any other way of adding internal glazing to the core zone without exploding it and putting it back together. So I modified the Glazing based on Ratio component so that the internal walls of the core would automatically be 95% glazing.
After passing the core zone through the modified Glazing based on Ratio component and then passing all the HB zones through the Solve Adjacency component I ran the daylight simulation. However the result is not what you would expect it appears as though there are no internal windows. (See the picture).
So two questions.
1. Is there a better way to merge these zones for a daylight study without going back to the original geometry?
2. From the illuminance map it appears that no light is passing through the internal windows. Why is this the case? Should I create a material that is like air so that the light can effectively pass through and then use this material instead?
…
ple I have to drag it through a panel before I can use it as an input to my python script. The supports comes as a list of strings (see figure) and I want to extract some of that information (e.g. what nodes are fixed) and write that to my txt file.
I extract the info with these lines:
for row in Support: node = row[8:row.find(' DOF')] file.write(" %s,\n" % node)
print node
>> 95
If I however don't drag it via a panel i get the following output:
for row in Support: node = row[8:row.find(' DOF')] file.write(" %s,\n" % node)
print node
>> Supports.Suppor
It's like the script doesn't get that each row is a string.
I have the input set to "list access" and type hint to "str" and I've tried to simplifying and flatten the list.
Greatful for help…
can be found in "C:\Documents and Settings\<user name>\Application Data\McNeel\Rhinoceros\5.0\Plug-ins\IronPython\settings\lib\rhinoscript" folder on WinXP. So could have used yours too.
RhinoCommon is a SDK and basically the power behind grasshopper and rhinoscriptsyntax functions. In fact each time you call a rhinoscriptsyntax, a RhinoCommon code gets executed.
And, yes:
import Rhino - imports RhinoCommon
import utility - enables importing utility.coercebrep() (or coerce3dpoint() coercecurve() ... so on)
Item access means an input is consisted of a single item.List access means an input is a list.Tree access means an input is consisted of a tree with data on different branches.rs.BooleanDifference requires both of it's arguments to be lists, so it would be logical to set the inputs b1 and b2 as lists. But there is one problem, that Mitch pointed out to me: it seems that python components (like grasshopper components) are "intelligent", and can distinguish whether you are inputting item, list, or tree. Setting your input as list, might disable this ability and leave you with only possible type of input (list).So honestly I do not know why in this case, setting the inputs to Lists worked - due to mentioned "intelligence" of python component, even an Item type would work.This might be a question for an experienced user, I am just a beginner.…
have some spare time please fill in my 3D Printing Open Survey - If you could make almost anything, what would it be ? Updated results are publicly available after completing questionnaire (Please press "Wyślij" - Send button and "Wyniki ankiety" - Results button at the end). This survey will be used to evaluate demand for 3d printing services globally. It consist of 30 questions about: - open-source 3d printers - future of additive manufacturing - 3d printing services - ecology in 3d printing - copyright issues and 3d printing Three example questions: 2. Which of the following 3d printing applications is the most interesting? * - Things personalization - Printing food - Attempts to print structures resembles in functioning living tissues or blood vessels - Creating impossible or difficult to create by using conventional technology things - Printing rooms or buildings on earth/moon - Printing chemical compounds (for example drugs) - Using in renewable energy sources - Printing parts and/or mechanical vehicles 3 . Have you ever heard about cheap DIY 3D Printers (for example RepRap, PrintrBot, MakiBox A6) ? * DIY - Do It Yourself - Yes - No 4 . When 3D Printers will become one of the typical household appliances ? * - After 5 years - After 10 years - After 15 years - After 20 years or later - Never - I don't know Feel free to ask questions!…
azione parametrica e generativa attraverso Grasshopper, plug-in di programmazione visuale per Rhinoceros 3D (uno dei più diffusi modellatori NURBS per l‘architettura e il design). Il workshop mira a gestire e sviluppare il rapporto tra informazione e geometria lavorando sui sistemi ad involucro in condizioni specifiche.La discretizzazione di superfici (pannellizazione Nurbs o Mesh), la modellazione delle geometrie attraverso informazioni (siano esse provenienti da analisi ambientali, mappe o database) e l’estrazione e la gestione di queste informazioni, richiede la comprensione di strutture di dati al fine di gestire completamente processo che va dalla progettazione alla costruzione.I partecipanti impareranno come costruire e sviluppare strutture di dati parametrici per informare geometrie ‘data-driven’ e come estrarre le informazioni rilevanti da tali modelli per il processo di costruzione.
Modulo 2 – Il workshop, volto a promuovere le nuove tecnologie digitali di supporto alla progettazione e alla fabbricazione, esplorerà l’integrazione tra design e prototipazione tramite processi di stampa 3d di materiale ceramico al fine di comprenderne allo stesso tempo sia il comportamento del materiale che i vincoli e le opportunità offerte dall’utilizzo di tali tecnologie.Infatti utilizzando grasshopper ed una macchina a controllo numerico i partecipanti apprenderanno le modalità per la generazione parametrica dei modelli e la creazione del codice per la loro prototipazione (Gcode creato direttamente in Grasshopper). Il workshop darà quindi ai partecipanti la possibilità di testare direttamente i loro elaborati digitali stampandoli in modo da comprendere come le informazioni articolate tramite tali strumenti di design producano specifici effetti sia morfologici che estetici.…