Search
  • Sign In

Grasshopper

algorithmic modeling for Rhino

  • Home
    • Members
    • Listings
    • Ideas
  • View
    • All Images
    • Albums
    • Videos
    • Architecture Projects
    • Installations
    • Add-ons
  • Download
    • Rhino 7 w/Grasshopper
    • Add-ons
  • Forums/Support
    • Current Discussions
    • Legacy Forum
  • Learn
    • Getting Started
    • Online Reference
    • API documentation
    • Video Tutorials
    • Common Questions
    • Scripting and Coding
    • Books and Articles
  • Attend
  • My Page

Search Results - 广东11选5体育彩票开奖结累查询-『8TBH·COM』下载青蛙彩票网--2023年3月19日6时33分12秒.H5c2a3.rynzzgon4-cc

Topic: Time complexity; C#
t sure about my decision.  Let's take a look at the method <createPopulation>:  public static List<List<Point3d>> createPopulation(List<Point3d> cP, int populationCount) {   List<List<Point3d>> Population = new List<List<Point3d>>();  // 1   for(int i = 0; i < populationCount; i++)  //2   {     List<Point3d> individual = cP.ToList();  // 3     Population.Add(individual);  // 4     System.Security.Cryptography.RNGCryptoServiceProvider provider = new System.Security.Cryptography.RNGCryptoServiceProvider();     int n = Population[i].Count;     while (n > 0)     {       byte[] box = new byte[1];       do provider.GetBytes(box);  // 5       while (!(box[0] < n * (Byte.MaxValue / n)));       int k = (box[0] % n);       n--;       Point3d value = Population[i][k];       Population[i][k] = Population[i][n];       Population[i][n] = value;     }   } In my algorithm there are lots of declarations like: List<Point3d> = new List<Point3d>(); or Random r = new Random(); these are constant time O(1) right?  i = 0 executes once; i < populationCount executes (N+1) times; i++ N times this executes M times? because every point needs to be added individually?  this one I don't really know; at msdn it is stated: If P:System.Collections.Generic.List`1.Count is less than P:System.Collections.Generic.List`1.Capacity, this method is an O(1) operation. If the capacity needs to be increased to accommodate the new element, this method becomes an O(n) operation, where n is P:System.Collections.Generic.List`1.Count. Shouldn't it be O(N), because I am adding every individual separately?  can't find any statements about this one either, I am guessing it should be of constant time O(1), because just one random number is being generated? …
Added by Tülin Altinkaynak at 4:17am on June 13, 2017
Topic: Repeat datatree with branches.
ext 1:Text {2} 0:Text 1:Text 2:Text Datatree after repeat: {0} 0:Text {1} 0:Text 1:Text {2} 0:Text 1:Text 2:Text {3} 0:Text {4} 0:Text 1:Text {5} 0:Text 1:Text 2:Text ... Thank you for help…
Added by Nils Heinemann at 9:00am on December 6, 2016
Comment on: Topic 'questions about Outdoor Microclimate Map'
hat, in accordance with this stable release, I have posted an updated version of this outdoor microclimate map example to the same link: http://hydrashare.github.io/hydra/viewer?owner=chriswmackey&fork=hydra_2&id=Outdoor_Microclimate_Map 1. You will see that, in the new file, I now have a single component that is able to turn a zone into a "ground zone" (similar to a plenum).  To clarify, both the plenum and ground zone components set all of the loads of the zone to 0 (no internal heat gain).  So this means that any of the characteristics of the default office program will be negated.  From your comments, Grasshope, it seems that you understand that the reason why I have a ground zone defined in this model is to account for the variation in ground surface temperatures that can occur with different objects casting shade onto the ground.  Therefore, the key property that defines this zone is the construction of the top surfaces, which is now changed based on a number that you input into the Ground Zone component. 2. You are correct in understanding the need for both "set zone construction" components in the old file.  Because of the zone's position below the Rhino model origin, the walls and floor are defined as underground surfaces and so I need the extra "Set EP Ground Construction" component.  Admittedly, the constructions on the underground surfaces should have a minimal effect on the modeling of the surface temperature above the zone (the roof construction is most important) but it made sense to me that results would be more accurate by setting all of the constructions of the zone to the ground material.  The current Ground Zone component ensures that all surfaces of the zone are assigned the ground material construction.  It also ensures that all walls and floor surfaces have a ground boundary condition regardless of where they sit in relation to the rhino model origin. 3. The distFromFlrOrSrf input can take either a number representing the distance from the floor of zones at which you would like to build a microclimate map or any surface on which you would like to see temperature variation.  So the input is flexible and allow you to both build micro-climate maps quickly or take a longer time building them with more customization.  For a visual of what you can do by inputting surfaces into this component, see this thermal animation of a section through a building that I designed for my thesis: https://www.youtube.com/watch?v=WJz1Eojph8E&list=PLruLh1AdY-Sj3ehUTSfKa1IHPSiuJU52A&index=3 For an example of a file using a numerical input for the microclimate map, see here: http://hydrashare.github.io/hydra/viewer?owner=chriswmackey&fork=hydra_2&id=Indoor_Microclimate_Map 4. The component has since been renamed (sometime in early July) to be called "Honeybee_Microclimate Map Analysis".  Originally, I developed the component to help me understand thermal diversity within zones but realized after building it out that the same method could be used to give deeper understandings of the outdoor environment.  So, at present, it can do both indoor and outdoor microclimate maps.  The only shortcoming at present is that the outdoor microclimate map uses EnergyPlus's oversimplified means of accounting for outdoor wind (a simple wind profile that does nto account for obstructions).  This shortcoming will be addressed once the first stable release of butterfly is out or I manage to work in components into LB that use the botlzman lattice particle collision method to approximate outdoor wind speeds.  Other than this shortcoming, you can trust that all results you are getting from these components are to a high degree of accuracy (meaning that all air temperature and MRT values are accurate). 5. Thanks for pointing this out.  This is a mistake in my labeling of the file names and I will fix this before the end of today.  When you use the workflow with the PMV recipe, these values are actual PMV/PPD values.  When you use the Adaptive comfort recipe, these values are "degrees from neutral temperature" and "Comfortable Or Not" values.  When you use the workflow with the UTCI recipe, these values are also "degrees from neutral temperature" and "Comfortable Or Not" values but they are different for UTCI than they are for the adaptive model.  Specifically, the neutral temperature and comfort zone for UTCI is defined to be the same as it is in this publication: https://www.ipma.pt/en/enciclopedia/amb.atmosfera/index.bioclima/index.html?page=utci.xml Hope this helps and let me know if you have any more questions, -Chris…
Added by Chris Mackey to Ladybug Tools at 8:32am on November 11, 2015
Topic: 3D FingerPrint - need to extract ridges and valleys?? Principal Curvatures Estimation
t file** - ply file with just x,y,z locations. I got it from a 3d scanner. Here is how first few lines of file looks like -    ply    format ascii 1.0    comment VCGLIB generated    element vertex 6183    property float x    property float y    property float z    end_header    -32.3271 -43.9859 11.5124    -32.0631 -43.983 11.4945    12.9266 -44.4913 28.2031    13.1701 -44.4918 28.2568    13.4138 -44.4892 28.2531    13.6581 -44.4834 28.1941    13.9012 -44.4851 28.2684    ...     ...      ... In case you need the data - please email me on **nisha.m234@gmail.com**. **Algorithm:** I am trying to find principal curvatures for extracting the ridges and valleys. The steps I am following is: 1. Take a point x 2. Find its k nearest neighbors. I used k from 3 to 20. 3. average the k nearest neighbors => gives (_x, _y, _z) 4. compute covariance matrix 5. Now I take eigen values and eigen vectors of this covariance matrix 6. I get u, v and n here from eigen vectors.    u is a vector corresponding to largest eigen value    v corresponding to 2nd largest    n is 3rd smallest vector corresponding to smallest eigen value 7. Then for transforming the point(x,y,z) I compute matrix T T =  [ui ]    [u ]    [x - _x]  [vi ] =  [v ]  x [y - _y]  [ni ]    [n ]    [z - _z] 8. for each i of the k nearest neighbors:<br>  [ n1 ]   [u1*u1  u1*v1  v1*v1] [ a ]<br>  [ n2 ] = [u2*u2  u2*v2  v2*v2] [ b ] <br>  [... ]   [ ...    ...    ... ] [ c ] <br>  [ nk ]   [uk*uk  uk*vk  vk*vk]<br>  Solve this for a, b and c with least squares 9. this equations will give me a,b,c 10. now I compute eigen values of matrix     [a b      b a ] 11. This will give me 2 eigen values. one is Kmin and another Kmax. **My Problem:** The output is no where close to finding the correct Ridges and Valleys. I am totally Stuck and frustrated. I am not sure where exactly I am getting it wrong. I think the normal's are not computed correctly. But I am not sure. I am very new to graphics programming and so this maths, normals, shaders go way above my head. Any help will be appreciated. **PLEASE PLEASE HELP!!** **Resources:** I am using Visual Studio 2010 + Eigen Library + ANN Library. **Other Options used** I tried using MeshLab. I used ball pivoting triangles remeshing in MeshLab and then applied the polkadot3d shader. If correctly identifies the ridges and valleys. But I am not able to  code it. **My Function:** //the function outputs to ply file        void getEigen()        {        int nPts; // actual number of data points        ANNpointArray dataPts; // data points        ANNpoint queryPt; // query point        ANNidxArray nnIdx;// near neighbor indices        ANNdistArray dists; // near neighbor distances        ANNkd_tree* kdTree; // search structure        //for k = 25 and esp = 2, seems to got few ridges        queryPt = annAllocPt(dim);                                      // allocate query point        dataPts = annAllocPts(maxPts, dim);                     // allocate data points        nnIdx = new ANNidx[k];                                          // allocate near neigh indices        dists = new ANNdist[k];                                         // allocate near neighbor dists        nPts = 0;                                                                       // read data points        ifstream dataStream;        dataStream.open(inputFile, ios::in);// open data file        dataIn = &dataStream;        ifstream queryStream;        queryStream.open("input/query. pts", ios::in);// open data file        queryIn = &queryStream;        while (nPts < maxPts && readPt(*dataIn, dataPts[nPts])) nPts++;        kdTree = new ANNkd_tree(                                        // build search structure                                        dataPts,                                        // the data points                                        nPts,                                           // number of points                                        dim);                                           // dimension of space        while (readPt(*queryIn, queryPt))                       // read query points        {                kdTree->annkSearch(                                             // search                                queryPt,                                                // query point                                k,                                                              // number of near neighbors                                nnIdx,                                                  // nearest neighbors (returned)                                dists,                                                  // distance (returned)                                eps);                                                   // error bound                double x = queryPt[0];                double y = queryPt[1];                double z = queryPt[2];                double _x = 0.0;                double _y = 0.0;                double _z = 0.0;                #pragma region Compute covariance matrix                for (int i = 0; i < k; i++)                {                        _x += dataPts[nnIdx[i]][0];                        _y += dataPts[nnIdx[i]][1];                        _z += dataPts[nnIdx[i]][2];                }                _x = _x/k; _y = _y/k; _z = _z/k;                double A[3][3] = {0,0,0,0,0,0,0,0,0};                for (int i = 0; i < k; i++)                {                        double X = dataPts[nnIdx[i]][0];                        double Y = dataPts[nnIdx[i]][1];                        double Z = dataPts[nnIdx[i]][2];                        A[0][0] += (X-_x) * (X-_x);                        A[0][1] += (X-_x) * (Y-_y);                        A[0][2] += (X-_x) * (Z-_z);                        A[1][0] += (Y-_y) * (X-_x);                        A[1][1] += (Y-_y) * (Y-_y);                        A[1][2] += (Y-_y) * (Z-_z);                        A[2][0] += (Z-_z) * (X-_x);                        A[2][1] += (Z-_z) * (Y-_y);                        A[2][2] += (Z-_z) * (Z-_z);                }                MatrixXd C(3,3);                C <<A[0][0]/k, A[0][1]/k, A[0][2]/k,                        A[1][0]/k, A[1][1]/k, A[1][2]/k,                        A[2][0]/k, A[2][1]/k, A[2][2]/k;                #pragma endregion                EigenSolver<MatrixXd> es(C);                MatrixXd Eval = es.eigenvalues().real().asDiagonal();                MatrixXd Evec = es.eigenvectors().real();                MatrixXd u,v,n;                double a = Eval.row(0).col(0).value();                double b = Eval.row(1).col(1).value();                double c = Eval.row(2).col(2).value();                #pragma region SET U V N                if(a>b && a>c)                {                        u = Evec.row(0);                        if(b>c)                        { v = Eval.row(1); n = Eval.row(2);}                        else                        { v = Eval.row(2); n = Eval.row(1);}                }                else                if(b>a && b>c)                {                        u = Evec.row(1);                        if(a>c)                        { v = Eval.row(0); n = Eval.row(2);}                        else                        { v = Eval.row(2); n = Eval.row(0);}                }                else                {                        u = Eval.row(2);                        if(a>b)                        { v = Eval.row(0); n = Eval.row(1);}                        else                        { v = Eval.row(1); n = Eval.row(0);}                }                #pragma endregion                MatrixXd O(3,3);                O <<u,                        v,                        n;                MatrixXd UV(k,3);                VectorXd N(k,1);                for( int i=0; i<k; i++)                {                        double x = dataPts[nnIdx[i]][0];;                        double y = dataPts[nnIdx[i]][1];;                        double z = dataPts[nnIdx[i]][2];;                        MatrixXd X(3,1);                        X << x-_x,                                 y-_y,                                 z-_z;                        MatrixXd T = O * X;                        double ui = T.row(0).col(0).value();                        double vi = T.row(1).col(0).value();                        double ni = T.row(2).col(0).value();                        UV.row(i) << ui * ui, ui * vi, vi * vi;                        N.row(i) << ni;                }                Vector3d S = UV.colPivHouseholderQr().solve(N);                MatrixXd II(2,2);                II << S.row(0).value(), S.row(1).value(),                          S.row(1).value(), S.row(2).value();                EigenSolver<MatrixXd> es2(II);                MatrixXd Eval2 = es2.eigenvalues().real().asDiagonal();                MatrixXd Evec2 = es2.eigenvectors().real();                double kmin, kmax;                if(Eval2.row(0).col(0).value() < Eval2.row(1).col(1).value())                {                        kmin = Eval2.row(0).col(0).value();                        kmax = Eval2.row(1).col(1).value();                }                else                {                        kmax = Eval2.row(0).col(0).value();                        kmin = Eval2.row(1).col(1).value();                }                double thresh = 0.0020078;                if (kmin < thresh && kmax > thresh )                        cout    << x << " " << y << " " << z << " "                                        << 255 << " " << 0 << " " << 0                                        << endl;                else                        cout    << x << " " << y << " " << z << " "                                        << 255 << " " << 255 << " " << 255                                        << endl;        }        delete [] nnIdx;    delete [] dists;    delete kdTree;        annClose(); } Thanks, NISHA…
Added by Nisha M at 10:30am on June 20, 2011
Blog Post: FORM FINDING STRATEGIES WORKSHOP | MILANO DICEMBRE 2015

FORM FINDING STRATEGIES WORKSHOP

strategie di form finding per l’architettura ed il…

Added by Arturo Tedeschi at 9:30am on October 24, 2015
Comment on: Topic 'Electric lighting components for Honeybee'
mething? I think it would be very useful to have a mapping of light intensity over the field of view of the used camera, and possibly and option to overlay it on the luminance mapping. It would in a very visual way provide information about contrast and glare. Doesn't the falsecolor option already do that for luminance mappings? If not can you post an image/screenshot of such a mapping from Dialux/AGI32 or any other software. 4. It's just a shoebox type simulation. 11x11 luminaires pointing down to simple materials. The default elapsed time was 3m40s. I have found the _RadParameters component meanwhile, and got it down to 0m30s. I have noticed that the simulation doesn't tax multiple cpu threads completely, most of the time cpu is at 25% during execution. The under-utlization of CPUs is a known issue with Radiance (the calculation engine) on Windows based systems. Unfortunately there isn't much that can be done about it at the moment. 5. Is it possible to map different degrees of translucency, diffuse color, absorptance, reflectance, etc..., by means of a bitmap image, expression, or other? 6. There is a feature that I consider absolutely necessary (and I haven't found it yet), which is the emitting surface feature, with the ability to stipulate homogeneous intensity with luminance values (in cd/m^2) or flux; and by mapped distribution of intensities or luminances (in cd or cd/m^2). By emitting surface I don't mean just a flat rectangular plane, such as an area light. It would be absolutely amazing! to perform photometric analysis on irregular and convoluted shapes and the light falling on neighbouring surfaces. 3DS Max with MentalRay provides similar functionality, but without the power of GH + HB. In the image below, the HB logo is assigned as a texture to a glass which then creates a pattern of that on the wall when daylight falls on it. ln the image below the light from the Batman logo illumninates the scene. The images above were Rendered with Radiance. While these things are possible with Radiance, and therefore HB, the reason why they aren't incorporated into the code is that these effects are not "physically based" and are not rooted in reality. Radiance is arguably the most intensively tested and validated lighting simulation software in the world. However, once we start applying such "magic" to it, the results from it are no longer reliable and therefore no different from other photorealistic engines such as V-ray, Mental-Ray etc. …
Added by Sarith Subramaniam to Ladybug Tools at 7:13pm on January 6, 2017
Blog Post: Cordyceps

So I've been working on a more haptic way of designing, as I felt a necessity…

Added by Zakaria Djebbara at 2:07am on January 10, 2017
Blog Post: rese arch LIVE Workshop

Let me invite you to the Grasshopper+Karamba workshop with Robert Vierlinger and Matthew Tam on 21-25 July 2015 in Bratislava, Slovakia.…



Added by Jan Pernecky at 6:28am on June 29, 2015
Topic: Memory exception in a custom plugin, manipulating Rhino layers
. 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 …
Added by Marc Syp at 10:45pm on July 5, 2017
Event: AA Athens Visiting School 2013
teraction for its Correlations cycle, AA Athens Visiting School scales up its design intentions in order to investigate links among discrete individual architectural systems in its 2013 version, Recharged.     Recharged with interconnectivity on different levels, the theme of investigation will revolve around the design of semi-independent design prototypes acting together to form elaborate unified results. The driving force in Cipher City: Recharged is the synergistic effect behind complex form-making systems where interactive design patterns arise out of a multiplicity of relatively simple rules.   In collaboration with the National Technical University of Athens, Cipher City: Recharged will explore participatory design and active engagement modeling and will continue building novel prototypes upon horizontal planes.   As in 2012, the design agendas of AA Athens and AA Istanbul Visiting Schools will directly create feedback on one another, allowing participation in either one or both Programmes.   Discounts The AA offers several discount options for participants wishing to apply as a group or participants wishing to apply for both AA Istanbul and AA Athens Visiting Schools:   1.       Standard application The AA Visiting School requires a fee of £695 per participant, which includes a £60 Visiting Membership. If you are already a member, the total fee will be reduced automatically by £60 by the online payment system. Fees are non refundable.   2.       Group registration For group applications, there will be a range of discounts depending on the number of people in the group.  The discounted fee will be applied to each individual in the group. Type A. 3-6 people group: £60 (AA Membership fee) + 635*0.75 = £536.25 (25 %) Type B. 6-15 people group: £60 + 635*0.70 = £504.5 (30%) Type C. more than 15 people group: £60 + 635*0.65 = £472.75 (35%)   3.       Participants attending both AA Istanbul and AA Athens | 40% discount For people wishing to attend both AA Istanbul 2013 and AA Athens 2013, a discount of 40% will be made for each participant. (The participant will pay the £60 membership fee only once.) £60 (AA Membership fee) + (635*0.60)*2 = £822   For more information in discounts, please visit: http://ai.aaschool.ac.uk/athens/portfolio/discounts-2013/   Applications The deadline for applications is 11 March 2013. A portfolio or CV is not required, only the online application form and payment. The online application can be reached from: http://www.aaschool.ac.uk/STUDY/VISITING/athens…
Added by elif erdine at 12:33pm on December 13, 2012
  • 1
  • ...
  • 195
  • 196
  • 197
  • 198
  • 199
  • 200
  • 201
  • ...
  • 205

About

Scott Davidson created this Ning Network.

Welcome to
Grasshopper

Sign In

Translate

Search

Photos

  • Spiral Stair

    Spiral Stair

    by Parametric House 0 Comments 0 Likes

  • Millipede Kangaroo

    Millipede Kangaroo

    by Parametric House 0 Comments 0 Likes

  • Inflate Mesh

    Inflate Mesh

    by Parametric House 0 Comments 0 Likes

  • cover

    cover

    by Parametric House 0 Comments 0 Likes

  • Parametric Structure

    Parametric Structure

    by Parametric House 0 Comments 0 Likes

  • Add Photos
  • View All
  • Facebook

Videos

  • Spiral Stair

    Spiral Stair

    Added by Parametric House 0 Comments 0 Likes

  • Millipede Kangaroo

    Millipede Kangaroo

    Added by Parametric House 0 Comments 0 Likes

  • Inflate Mesh

    Inflate Mesh

    Added by Parametric House 0 Comments 0 Likes

  • Voronoi Roof

    Voronoi Roof

    Added by Parametric House 0 Comments 0 Likes

  • Parametric Structure

    Parametric Structure

    Added by Parametric House 0 Comments 0 Likes

  • Tensile Column

    Tensile Column

    Added by Parametric House 0 Comments 0 Likes

  • Add Videos
  • View All
  • Facebook

© 2025   Created by Scott Davidson.   Powered by Website builder | Create website | Ning.com

Badges  |  Report an Issue  |  Terms of Service