cs/numpy-for-iron-python-wit... ) also fails to allow numpy import:
Numpy and Scipy are in directories here:
C:\Program Files (x86)\IronPython 2.7\Lib\site-packages\
This is all a sad joke, taking a full day so far. Rhino just sort of sucks for serious work. There's no way I can offer any Numpy/Scipy scripts to clients this way, just impossible. Rhino/Grasshopper Python should come with this stuff, dear developers, or have a simple installer that just works. It comes with math already doesn't it? So why not Numpy and Scipy for serious users?
Upon restarting Rhino, it totally changes behavior and spits out a crazy error upon importing Numpy:
Message: The type initializer for 'NumpyDotNet.NpyCoreApi' threw an exception.Traceback: line 11, in <module>, "C:\Program Files (x86)\IronPython 2.7\Lib\site-packages\numpy\core\multiarray.py" line 6, in <module>, "C:\Program Files (x86)\IronPython 2.7\Lib\site-packages\numpy\core\__init__.py" line 155, in <module>, "C:\Program Files (x86)\IronPython 2.7\Lib\site-packages\numpy\__init__.py" line 1, in <module>, "C:\Users\Nik\AppData\Local\Temp\TempScript.py"
The Grasshopper Python node editor gives the same error. Perhaps I can only import parts of Numpy using "from Numpy import XXXX"?…
Added by Nik Willmore at 3:32pm on October 11, 2015
and visualizing data for ENVI-Met 4 software. ENVI-met is a cutting edge software used to analyse microclimate interactions in urban environment. Tens of different analysis types can be performed on the chosen building context. From Mean radiant temperature and local Wind speed to CO2 concentration and Pollutant dispersion in the air. To generate the building context for Ladybug ENVI-met components, Antonello used Gismo:
An example similar to results in upper screenshots has been been attached below. To run it, Gismo, Ladybug and Human plugins need to be installed. To perform the ENVI-met analysis, download ENVI-met 4 Basic for free, and install it. Steps in the .gh example file have been labelled from 1 to 11. They mostly consist of just setting a boolean toggle to True. An exception to this are steps 6 (set the folder path of your ENVI-met application install folder), and 8 (running the ENVI-met simulation). Step 8 has been explained in detail in the photo attached below (step8.jpg). Special thanks to Antonello for developing and guidance on ENVI-met application and components! Post questions below if you have any issues!…
Added by djordje to Gismo at 11:30am on March 25, 2017
d.com/guides/yak/what-is-yak/
This component was a good learning experience for me and I thought I would share. Hopefully there are some bits that might help you too.
With that said it will analyze the current GH document, and perform 2 actions:
It will list all the used components and write them to a text panel. The component will automatically create the text panel if it does not exist. Text is formatted as a string. Text is listed in a "mock" outline/indented format. Text is overwritten each time the component is run....take it for whatever it's worth. NOTE:a refinement could/should include looking inside clusters, currently this does not.
It will gather the list of plug-in libraries and versions, and write them to a text panel.
This type of (de)serialization of information is valuable when multiple people are working/sharing files. Perhaps a more interesting/future development would be writing the information to a database, and over time, your organization could start to see trends.
I am posting two versions of the user objects. 1 - the procedural version, done in rhino 5. (GetComponents3.ghuser)2 - the SDK mode version, done in rhino 6, ready to be compiled...as of the current WIP. (this will not work in rhino 5). (GetUsedComps_SDKMode)
There are too many people to thank for continually contributing to this forum, but I would be remiss if I did not specifically mention Giulio Piacentino, Andrew Heumann, Anders Holden Deleuran, and Brian Ringley. I have learned a lot from your discussions and contributions to the forum. Thanks!
Relevant discussions:http://www.grasshopper3d.com/forum/topics/override-disable-zui-display-on-a-python-component…
Added by Chris Hanley at 9:04am on August 17, 2017
A repository of generic or complex examples.
Example 01: Attractor Values
ND_001_AttractorValues.gh
Example 02: Curve Values
ND_002_CurveValues.gh
Example 03: Point Attractor
ND_003_PointAttract
ents but repeated 16 times each. As if to multiply by 16 each one of the original elements.
I am sure that the solution is easy but believe me I tried several things and not get a satisfactory solution, so I write to see if someone comes up with something moreinteresting than me.
thanks in advance.…
.
Things have been working swimmingly in many areas of the plugin, but one particular problem has been tough to solve. I have two components that are trying to read/write to the same memory at the same time, causing Rhino exceptions and crashes.
The conflicts appear to be happening between two components -- one is a "Layer Events Listener" that reports essentially what type of layer event just happened. The other is a "Set Layer Visibility" component that toggles the visibility of a list of layers.
The code:
public class LayerTools_LayerEventsListener : GH_Component { /// <summary> /// Initializes a new instance of the LayerTools_LayerListener class. /// </summary> public LayerTools_LayerEventsListener() : base("Layer Events Listener", "Layer Listener", "Get granular information about the layer events happening in the Rhino document.", "Squirrel", "Layer Tools") { }
/// <summary> /// Registers all the input parameters for this component. /// </summary> protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager) { pManager.AddBooleanParameter("Active", "A", "Set to true to listen to layer events in the Rhino document.", GH_ParamAccess.item, false); pManager.AddTextParameter("Exclusions", "E", "Provide a list of exclusions to stop reading specific events (Added, Deleted, Moved, Renamed, Locked, Visibility, Color, Active).", GH_ParamAccess.list); pManager[1].Optional = true; }
/// <summary> /// Registers all the output parameters for this component. /// </summary> protected override void RegisterOutputParams(GH_Component.GH_OutputParamManager pManager) { pManager.AddBooleanParameter("Initialized", "I", "Whether the listener changed from passive to active.", GH_ParamAccess.item); pManager.AddTextParameter("Document Name", "doc", "Name of the Rhino document that is changing.", GH_ParamAccess.item); pManager.AddTextParameter("Layer Path", "path", "Path of the modifed layer.", GH_ParamAccess.item); pManager.AddIntegerParameter("Layer Index", "ID", "Index of the modified layer.", GH_ParamAccess.item); pManager.AddIntegerParameter("Sort Index", "SID", "Sort index of the modified layer.", GH_ParamAccess.item); pManager.AddTextParameter("Event Type", "T", "Type of the modification.", GH_ParamAccess.item); pManager.AddBooleanParameter("Added", "A", "If the layer has been added.", GH_ParamAccess.item); pManager.AddBooleanParameter("Deleted", "D", "If the layer has been deleted.", GH_ParamAccess.item); pManager.AddBooleanParameter("Moved", "M", "If the layer has been moved.", GH_ParamAccess.item); pManager.AddBooleanParameter("Renamed", "R", "If the layer has been renamed.", GH_ParamAccess.item); pManager.AddBooleanParameter("Locked", "L", "If the layer locked setting has changed.", GH_ParamAccess.item); pManager.AddBooleanParameter("Visibility", "V", "If the layer's visibility has changed.", GH_ParamAccess.item); pManager.AddBooleanParameter("Color", "C", "If the layer's color has changed.", GH_ParamAccess.item); pManager.AddBooleanParameter("Active", "Act", "If the active layer has changed.", GH_ParamAccess.item); }
/// <summary> /// This is the method that actually does the work. /// </summary> /// <param name="DA">The DA object is used to retrieve from inputs and store in outputs.</param> protected override void SolveInstance(IGH_DataAccess DA) { bool active = false; List<string> exclusions = new List<string>();
DA.GetData(0, ref active); DA.GetDataList(1, exclusions);
RhinoDoc thisDoc = null;
bool initialize = false;
string dName = null; string activePath = null; int layerIndex = -1; int sortIndex = -1; string eventType = null; bool added = false; bool deleted = false; bool moved = false; bool renamed = false; bool locked = false; bool visibility = false; bool color = false; bool current = false;
if (active) { thisDoc = RhinoDoc.ActiveDoc;
initialize = (!previouslyActive) ? true : false;
RhinoDoc.LayerTableEvent -= RhinoDoc_LayerTableEvent; RhinoDoc.LayerTableEvent += RhinoDoc_LayerTableEvent; previouslyActive = true;
} else {
RhinoDoc.LayerTableEvent -= RhinoDoc_LayerTableEvent; previouslyActive = false; }
if (ev != null) { dName = ev.Document.Name; layerIndex = ev.LayerIndex; eventType = ev.EventType.ToString();
if (!exclusions.Contains("Active")) { if (ev.EventType.ToString() == "Current") { // active layer has just been changed current = true; }
}
if (!exclusions.Contains("Moved")) { if (ev.EventType.ToString() == "Sorted") { // active layer has just been changed moved = true; }
}
if (!exclusions.Contains("Added")) { if (ev.EventType.ToString() == "Added") { // layer has just been added activePath = ev.NewState.FullPath; added = true; }
}
if (!exclusions.Contains("Active")) { if (ev.EventType.ToString() == "Deleted") { // layer has just been added
deleted = true; } }
if (ev.EventType.ToString() == "Modified") { // layer has been modified activePath = ev.NewState.FullPath;
//skip sortindex eventType = ev.EventType.ToString();
if (ev.OldState != null && ev.NewState != null) { if (!exclusions.Contains("Locked")) { if (ev.OldState.IsLocked != ev.NewState.IsLocked) locked = true;
} if (!exclusions.Contains("Visibility")) { if (ev.OldState.IsVisible != ev.NewState.IsVisible) visibility = true; }
if (!exclusions.Contains("Moved")) { if (ev.OldState.ParentLayerId != ev.NewState.ParentLayerId) moved = true; }
//if (ev.OldState.SortIndex != ev.NewState.SortIndex) moved = true; if (!exclusions.Contains("Renamed")) { if (ev.OldState.Name != ev.NewState.Name) renamed = true; }
if (!exclusions.Contains("Color")) { if (ev.OldState.Color != ev.NewState.Color) color = true; } }
} }
DA.SetData(0, initialize); DA.SetData(1, dName); DA.SetData(2, activePath); DA.SetData(3, layerIndex); DA.SetData(4, sortIndex); DA.SetData(5, eventType); DA.SetData(6, added); DA.SetData(7, deleted); DA.SetData(8, moved); DA.SetData(9, renamed); DA.SetData(10, locked); DA.SetData(11, visibility); DA.SetData(12, color); DA.SetData(13, current);
}
static bool previouslyActive = false; Rhino.DocObjects.Tables.LayerTableEventArgs ev = null;
void RhinoDoc_LayerTableEvent(object sender, Rhino.DocObjects.Tables.LayerTableEventArgs e) { ev = e;this.ExpireSolution(true); }
And for the layer visibility component:
public LayerTools_SetActiveLayer() : base("Set Active Layer", "SetActiveLayer", "Set the active layer in the Rhino document.", "Squirrel", "Layer Tools") { }
/// <summary> /// Registers all the input parameters for this component. /// </summary> protected override void RegisterInputParams(GH_Component.GH_InputParamManager pManager) { pManager.AddBooleanParameter("Active", "A", "Set to true to change the active layer in Rhino.", GH_ParamAccess.item, false); pManager.AddTextParameter("Path", "P", "Full path of the layer to be activated.", GH_ParamAccess.item); }
/// <summary> /// Registers all the output parameters for this component. /// </summary> protected override void RegisterOutputParams(GH_Component.GH_OutputParamManager pManager) { pManager.AddIntegerParameter("Layer ID", "ID", "Index of layer that has been activated.", GH_ParamAccess.item); pManager.AddBooleanParameter("Status", "St", "True when the layer has been activated.", GH_ParamAccess.item); }
/// <summary> /// This is the method that actually does the work. /// </summary> /// <param name="DA">The DA object is used to retrieve from inputs and store in outputs.</param> protected override void SolveInstance(IGH_DataAccess DA) { bool active = false; string path = "";
if (!DA.GetData(0, ref active)) return; if (!DA.GetData(1, ref path)) return;
int layer_index = -1; bool status = false;
if (path != null) {
Rhino.RhinoDoc doc = Rhino.RhinoDoc.ActiveDoc; Rhino.DocObjects.Tables.LayerTable layertable = doc.Layers;
layer_index = layertable.FindByFullPath(path, true);
if (layer_index > 0) { // if exists RhinoDoc.ActiveDoc.Layers.SetCurrentLayerIndex(layer_index, true); status = true; } }
DA.SetData(0, layer_index); DA.SetData(1, status); }
Now originally I was getting exceptions when changing multiple layers' visibility properties, which would cause the Event Listener to fire and try to read the Visibility property before the memory has been released by the Set Layer Visibility component. That led me to add an "Exceptions" input, that would allow me to disable the reading of Visibility events at the source in the Layer Events listener. That helped me manage about 95% of the crashes I was getting, but I still get strange crashes in other event properties, even when that property shouldn't be affected. For instance, I am getting a crash here on the Name property in the event from the delegate function, even though I am only changing Visibility at any one time:
I have a few ideas but they all seem pretty hacky. One is to try to set a flag that is readable by any component in the plugin -- so that the event listener can see if a "set" component is currently running and abort before causing an exception. The other is creating a delay in the event listener, somthing like 200ms, to allow any set components to finish what they are doing before reading the event. Neither seems super ideal.
Any ideas?
Thanks,
Marc
…
and export the geometry out to VVVV to render it LIVE! RawRRRR. In this case, a digital audio workstation Ableton Live, a leading industrial standard in contemporary music production.
the good news is that VVVV and ableton live lite is both free.
https://www.ableton.com/en/products/live-lite/
i am not trying to use ipad as a controller for grasshoppper. I wanted to work with a timeline (similar to MAYA or Ableton or any other DAW(digital audio workstation)) inside grasshopper in an intuitive way. Currently there is no way of SEQUENCING your definition the way you want to see that i know of.
no more combersome export import workflows... i dont need hyperrealistic renderings most of the time. so much time invested in googling the right way to import, export ... mesh settings...this workflow works for some, for some not ...that workflow works if ... and still you cannot render it live nor change sequence of instruction WHILE THE VIDEO is played. and I think no one wants to present rhinoceros viewport. BUT vvvv veiwport is different. it is used for VJing and many custom audio visual installation for events, done professionally. you can see an example of how sound and visuals come together from this post, using only VVVV and ableton. http://vvvv.org/documentation/meso-amstel-pulse
I propose a NEW method. make a definition, wire it to ableton, draw in some midi notes, and see it thru VVVV LIVE while you sequence the animation the WAY YOU WANT TO BE SEEN DURING YOUR PRESENTATION FROM THE BEGINNING, make a whole set of sequences in ableton, go back change some notes in ableton and the whole sequence will change RIGHT INFRONT of you. yes, you can just add some sound anywhere in the process. or take the sound waves (sqaure, saw, whateve) or take the audio and influence geometric parameters using custom patches via vvvv. I cannot even begin to tell you how sophisticated digital audio sound design technology got last ten year.. this is just one example which isn't even that advanced in todays standard in sound design ( and the famous producers would say its not about the tools at all.) http://www.youtube.com/watch?v=Iwz32bEgV8o
I just want to point out that grasshopper shares the same interface with VVVV (1998) and maxforlive, a plug in inside ableton. audio mulch is yet another one that shares this interface of plugging components to each other and allows users to create their own sound instruments. vvvv is built based on vb, i believe.
so current wish list is ...
1) grasshopper recieves a sequence of commands from ableton DONE
thanks to sebastian's OSCglue vvvv patch and this one http://vvvv.org/contribution/vvvv-and-grasshopper-demo-with-ghowl-udp
after this is done, its a matter of trimming and splitting the incoming string.
2) translate numeric oscillation from ableton to change GH values
video below shows what the controll interface of both values (numbers) and the midi notes look like.
https://vimeo.com/19743303
3) midi note in = toggle GH component (this one could be tricky)
for this... i am thinking it would be great if ...it is possible to make "midi learn" function in grasshopper where one can DROP IN A COMPONENT LIKE GALAPAGOS OR TIMER and assign the component to a signal in, in this case a midi note. there are total 128 midi notes (http://www.midimountain.com/midi/midi_note_numbers.html) and this is only for one channel. there are infinite channels in ableton. I usually use 16.
I have already figured out a way to send string into grasshopper from ableton live. but problem is, how for grasshopper to listen, not just take it in, and interpret midi and cc value changes ( usually runs from 0 to 128) and perform certain actions.
Basically what I am trying to achieve is this : some time passes then a parameter is set to change from value 0 to 50, for example. then some time passes again, then another parameter becomes "previewed", then baked. I have seen some examples of hoopsnake but I couldn't tell that you can really control the values in a clear x and y graph where x is time and y is the value. but this woud be considered a basic feature of modulation and automation in music production. NVM, its been DONE by Mr Heumann. https://vimeo.com/39730831
4) send points, lines, surfaces and meshes back out to VVVV
5) render it using VVVV and play with enormous collection of components in VVVV..its been around since 1998 for the sake of awesomeness.
this kind of a digital operation-hardware connection is usually whats done in digital music production solutions. I did look into midi controller - grasshopper work, and I know its been done, but that has obvious limitations of not being precise. and it only takes 0 o 128. I am thinking that midi can be useful for this because then I can program very precise and complex sequence with ease from music production software like ableton live.
This is an ongoing design research for a performative exhibition due in Bochum, Germany, this January. I will post definition if I get somewhere. A good place to start for me is the nesting sliders by Monique . http://www.grasshopper3d.com/forum/topics/nesting-sliders
…
rder in which these polylines are drawn is not important (correct me if this is not the case).
2. We explode the polylines. This outputs all the line segments and all the endpoints (both groups with duplicates inside them). So we have 204 lines (including duplicates) and 246 points (including duplicates). We flatten both outputs in order to get 2 simple lists.
3. We use [dupPt] to remove all duplicates from the points list. So we get a list of all the nodes with each node contained one time, so we have 108 points.
3a. We can use [pointList] to display the index of each node on screen.
4. For each line segment we find the 2 endpoints and put them together in a list. So we have 204 lists with 2 points each. (We graft the list of lines so that the endpoints of each one will be in a different branch/list)
5. We use [closestPoint] and so for each endpoint we get the index number of the corresponding node. So we have 204 lists with 2 indices each.
6. We get each couple of indices and join them as text with a comma separator. (We flatten the data so that we have a single list with 204 texts)
7. BUT some of these 204 texts are duplicates (because they originate from duplicate lines), so we use [cSet] which returns the unique values from a list. So we end up with a list of 180 texts (one for each unique line). Instead of using [cSet] you could also eliminate duplicate lines using kangaroo's [dupLn] (which is the equivalent of [dupPt] but for lines) before step 4.
Hope it is more clear like this. I am not sure I understand what you mean by "But they are not connected in the order to form the tessellation.". If you still have problems with the definition please explain this a little better.
cheers, Nikos
…
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
…
trying to develop it for my own project.
http://www.grasshopper3d.com/forum/topics/shortest-walk-tapered-branching-script?xg_source=activity&id=2985220%3ATopic%3A1450323&page=2#comments
On this page, he shared few 3D coral difinitions and especially interested in first and second one.
First one( bunny like 3D coral) - posted on February 2, 2016 at 9:43pm
Second one( sofa like 3D coral) - posted on February 6, 2016 at 3:16am
I followed these instructions, succeeded to build Tetgen, placed the built files in C drive directory and tried to run the definition. Then some WindowsError came out as follows which I don't know how to fix.
My working environment is;
OS is Windows 7 Ultimate 64 bit.
Rhino is version 5, 64 bit.
Grashoppper is version 0.9.0076, the latest version at this moment.
It would be great if I can have some help advice / comment.
I appreciate for your attention.
…