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 - 分分快3最准高手助赢计划-『8TBH·COM』福利彩票开奖结果012期查询--2023年3月19日6时48分50秒.H5c2a3.5jexii16x-gov-hk

Comment on: Topic 'Unconditioned, Addaptive Comfort set temperature'
Because the Adaptive methodology is founded upon the notion that there are hundreds of social factors that influence comfort and that the best we can do to forecast comfort is to find variables with good correlations to these social factors (like outdoor temperature), the premise that these published Adaptive model holds regardless of cultural norms is dangerous.  Notably, the founders of the adaptive model have stressed that this particular linear correlation that you cite comes from recent surveys of buildings where people have both the the ability to open windows AND a great freedom to dress down.  Hypothetically, if occupants were able to open the windows in Abraham's building but the cultural norm was that everyone was expected to wear multi-layered suits or dresses (as in historic Britain), a different correlation between outdoor temperature and comfort temperature would exist. In fact, historical European comfort surveys show that people likely preferred cooler temperatures in buildings (about 1-2C cooler) than today's occupants. Accordingly, after recognizing this social premise in the Adaptive model, I have built in a few ways to adjust/alter the version in Ladybug based on the literature I have read (even though these alterations are not a part of any official ASHRAE or European standard). Abraham, you might have to be a bit more specific about how you would like to adjust the Adaptive comfort model for me to help your particular case and this may lead to me adding in new functionality.  For the time being, I can tell you that the 'Ladybug_Adaptive Comfort Parameters' component is going to be your friend and I would recommend using the Adaptive Comfort Chart to visualize how you are changing the model.  You can plug these 'Adaptive Comfort Parameters' into the 'Adaptive Comfort Recipe' component to have the microclimate analysis run with these parameters.  Here are a few examples of how to alter the model: 1) Mixed-mode Building - Humphreys and the European Adaptive comfort team derived two separate correlations. One for naturally ventilated buildings: and conditioned buildings: The dimensionless value between 0 and 1 for _levelOfConditioning allows you to create different correlations depending on whether occupants have complete freedom of dress and window operability (0) or have slight restrictions like in a mixed mode building (0.5, for example): 2) Changing Response Time of Occupants - There has been a bit of a debate in Literature about whether it is better to use the average monthly temperature or a weekly running mean temperature.  The avgMonthORRunningMean input allows you to adjust this like so: Average Month: Running Mean: 3) Greater Temperature Range Tolerance - While this last one is actually a part of the European and Adaptive standards, you can adjust the range of the comfort band with either the 'eightyOrNintetyComf' input or the comfortClass input like so: Ninety Percent Comfortable Eighty Percent Comfortable Abraham, let me know if you would like more controls over the model or if this is enough to do what you are thinking of.  This example file allows you to construct the images I have above: http://hydrashare.github.io/hydra/viewer?owner=chriswmackey&fork=hydra_2&id=Adaptive_Comfort_Chart&slide=0&scale=1&offset=0,0 -Chris…
Added by Chris Mackey to Ladybug Tools at 7:06pm on February 15, 2016
Comment on: Topic 'Guitar Nut conundrum: equal spaces and equal centers question'
ther math and logic. i can usually conceptualise what i want to do and cobble some semi working thing together but don't know which components to use and how to patch it. so i'm super happy to have someone who knows what he's doing to find this interesting. and i'm glad you mention the fanned frets again, there is one input parameter that's still missing for the multiscale frets to be fully parametric, it's the angle of the nut or which fret should be straight. it depends a bit on personal preferences and playing posture what is more comfortable. so being able to adjust this easily would be cool. again i have no idea how the maths for that work or if you can just rotate each fret the same amount around it's middle point. The input either as fret number (for the straight fret) or as a simple slider from bridge to nut should do as input setting. Here are the two extremes and the middle ground: i've been thinkin today while analysing your patches and cleaning up my mess what exactly the monster should do. Here are the input parameters needed, i think it's the complete list scale length low E string scale length high e string fret angle/straight fret string width at nut string width at bridge number of frets fretboard overhang at nut (distance from string to fretboard bounds)  fretboard overhang at last fret string gauges string tensions fretboard radius at nut (for compound radius fretboard radius at bridge is calculated with the stewmac formula) fretwire crown width fretwire crown height action height at nut (distance between bottom of string and fretwire crown top) action height at last fret pickup 1 neck position pickup 2 middle position pickup 3 bridge position nut width the pickup positions should be used to draw circles for the magnet poles on each string so they are perfectly aligned and can be used for the pickup flatwork construction. ideally they would need a rotation control aligning the center line of the pickup so it's somewher between the last fret angle and bridge angle. personally i do this visually depending on the design i'm looking for, some people have huge theories on pickup positioning but personally i don't believe in it. that should result in everything needed to quickly generate all the necessary construction curves or geometry for nut/fingerboard/frets/pickups. this is the core of what makes a guitar work, the more precise this dynamic system is the better the guitar plays and sounds.  i posted another thread trying to understand how i could use datasets form spreadsheets,databse, csv to organize the input parameters. What would make sense for the strings for example is hook into a spreadsheet with the different string sets, i attached one for the d'Addario NYXL string line which basically covers all combos that make sense. The string tension is an interesting one, and implmenting it would sure be overkill albeit super interesting to try. it should be possible to extrapolate from the scale length of each string what the tension for a given string gauge of that string would be so that you could say 'i want a fully balanced set' or 'heavy top light bottom) and it would calculate which SKU from d'addario would best match the required tension. All the strings listed in the spreadsheet are available as single strings to buy. i'm trying to reorganize everything which helps me understand it. i just discovered the 'hidden wires' feature which is great since once i understood what a certain block does or have finished one of my own, i can get the wires out of the way to carry on undistracted. a bit risky to hide so many wires but it makes it so much easier not to get completely lost :-) btw, the 'fanned fret' term is trademarked, some guy tried to patent it in the 80's which is a bit silly since it has been done for centuries. there is a level of sophistication above this as well, check out http://www.truetemperament.com/ and that really is something else. it really is astounding how superior the tuning is on those wigglefrets, the problem is that it's rather awkward for string bending and also you can't easily recrown or level the frets when they are used. …
Added by discopimp at 2:45pm on June 18, 2017
Topic: voronoi_drilling
me logic produced by running the 2-d voronoi component. From a given set of polylines we can extract the centers and this can drive both the voronoi component as well as provide the XYZ drill points for the cnc. The definition has a variety of different options. You need Lunchbox, Weaverbird, and Starling. I can't tell you how amazing these 3 tools are from a design perspective. They are extremely powerful so if you don't have these you must install them asap. You can get the tools at http://www.food4rhino.com/ This definition works by first choosing a grid type, next you choose voronoi type, and subdivision type. From the voronoi type list you can choose basic (just grid), truncation (uses truncation calculated via the image sampler), truncation dual (uses the dual of the truncated image based grid), and subdivision (takes the basic grid type and uses different subdivision shcemes). Each of these provide different patterns of polylines from which we can extract our drilling points. I am rather proud of this definition since the overall idea is one which is so simple it's easy to overlook - the idea that drilling with a ball end mill makes voronoi plots. Now when you combine that with all of these amazing tools it can go off right quick. The nice thing is the paatern you see on screen is the pattern that gets made by drilling wysiwyg cnc patterns. VORONIO_DRILLing.gh Here are some on screen patterns in process in the following order truncation, basic, subdivision: here is a video moving over a machined example:  …
Added by machinehistories at 5:07pm on May 8, 2013
Topic: New tutorial - Developable strips - Part 1
l coarse mesh Subdividing this mesh into strips of thin quads Relaxing/Planarizing this mesh Splitting and Unrolling In this post I deal with the first 2 of these stages. You can download the example definition here: developable_strips_tutorial.gh Drawing the initial mesh   To begin with we need a simple quad mesh. This can be modelled manually in Rhino, and only needs to use enough quads to give the topology and very rough form. No need to worry too much about the exact geometry or dimensions at this point, as we will refine and alter it as we go. One very important thing that we do need to bear in mind though is that all internal vertices must have even valence (I covered this a bit in the earlier post here). So for example, this is bad:   (because the highlighted vertex is surrounded by 5 faces) While this is good (and can still be relaxed to the same shape):   (the top and bottom vertices have valence 8, and the vertices between the arms have valence 4) With a little practice it should be possible to convert any mesh into one that meets this condition. The reasons why we need this condition should become more clear in the later steps.   First subdivision   This is where we choose how many strips we want our final model to have, by applying a few rounds of subdivision using the Refine component (you could also use Weaverbird here):     Sorting the face directions   While quad meshes do not carry the same information about u/v directions as a NURBS surface, the individual faces do have a sort of direction given by their vertex ordering. However, these face directions are usually not consistently arranged, especially after subdivision. The Kangaroo MeshDirection component attempts* to orient all the faces in a mesh so that they match with their neighbours. For example, before sorting, if we draw a line from the midpoint of the first edge of each face to the midpt of its opposite edge, we might get something like this:   Whereas after sorting, we should get something like this: *note that I say it attempts to orient the faces consistently. In some cases no valid solution exists, for instance if 3 or 5 faces meet around a vertex, hence the requirement mentioned at the start for even valence vertices.   Directional Subdivision   Now that we have consistent face directions across the mesh, we can apply further subdivision, but this time in one direction only. So we go from roughly square quads to thin rectangles. The idea is that as we apply higher levels of this directional subdivision, the final relaxed result goes towards something semi-discrete. A NURBS surface is fully continuous, and a mesh is fully discrete (made up of separate facets), while this strip model will be smooth in one direction and faceted in the other.   Go to part 2 for the next step of the process  …
Added by Daniel Piker to Kangaroo at 7:34am on January 14, 2014
Topic: Complex geometry Glazing issues
ooking for an efficient way to perform glazing of complex shapes. I've only followed the Energy modelling workshops so far so i may have missed some essential components or workflows to achieve my needs. But i've made an attached  definition with all my current attempts to get a proper HBzone with the numerous windows faces i will always have to deal with in this project. I first thought that i was not using the HBObjWGZ correctly, then after some readings it was maybe an upgrading issue, then effectively i had my Therm 7.5 that needed to be reinstaled, but then ... I must be missing an essential HB tricks or workflow i guess ... So I divided my attempt in two series : - The Serie 1 : is a simplier version of the project step i'm working on but i'd be glad to achieve it first ! - The Serie 2 : is the real final direction of the project, which consist in sorting/dispatch faces to windowon one side and to an other material on the other, according to the winter sun and a pourcentage param. Despite it is more complicated than the Serie one, it seems seems to create the same diversity of issues. Until now, with the 5 different combinations of Serie 1, and the 3 of Serie 2, with and without using the different Glazing/window components, here are the logs i got from both HBZone component or OpenStudio component: From OpenStudio - "1. The simulation has not run correctly because of this severe error:    ** Severe  ** BuildingSurface:Detailed="00073E23257843B6A948", invalid Construction Name="ETFE" - has Window materials.">> Has to deal with the way i'm trying to assign too early a customized EPConstruction material ? Done it wrong ? I tried to reload it in the library but doesn't change anything... From OpenStudio - "1. The simulation has not run correctly because of this severe error:    ** Severe  ** BuildingSurface:Detailed="000579CD749E46DFA5EA", invalid Construction Name="EXTERIOR WINDOW" - has Window materials.">> Is it an issue in the way i define my surfs both as "WINDOW" (5) for srfType and Outdoors on the same component ? From Create HBZone -"1. Solution exception:'EPZone' object has no attribute 'shdCntrlZoneInstructs'" >> Happens when i try to introduce my ETFE EpMaterial after creating my first HBZone, with a Set EP Zone Construction, so this material seems to be not working either before and after trying to create an HB Zone From Create HBZone- "1. Solution exception: 73df51a3b2144b1e858b has been moved, scaled or rotated."If you need to move or rotate a Honeybee object you should use Honeybee move, rotate or mirror components. You can find them under 12|WIP tab. >> >> wich seems to exist in some on other thread Here and was a coding bug supposed to be fixed. And last but not least ... From OpenStudio - "1. The simulation has not run correctly because of this severe error:    ** Severe  ** checkSubSurfAzTiltNorm: Outward facing angle of subsurface differs more than 90.0 degrees from base surface.2. The simulation has failed because of this fatal error:    **  Fatal  ** GetSurfaceData: Errors discovered, program terminates" . I'm attaching the file with each attempt in this post. The definitions are disabled and the log already copied separatly so there is no need to compute each of them to see what's wrong. If someone from the beginner to one of the Kings of HoneyBee has any relevant  answer/solution to this attempt with complex geometry Issue it will be really nice for me so i could to move forward !! Thanks in advance guys and have a great day ! …
Added by edwin szabo to Ladybug Tools at 3:32am on July 6, 2017
Topic: Questions about Pachyderm options
y from the Rhino model and having the absorption coefficients of the materials that are entered into Pachyderm, why is it not possible to generate a reverberation time diagram, without the need to start any analysis? MAPPING METHOD: When for example the mapping of the Strenght Index (G) is generated through the "create map" option, succesively I can´t generate any other energy criterion map, but I have to redo the simulation. Is it a limitation of the software or am I wrong something? MAPPING METHOD: I kindly wanted to ask what is the difference between minimum and detailed convergence and why the number of reflections order it takes into account for the simulation is not specified. The mapping method take care only of the Raytracing Method or the Image Source too? MAPPING METHOD: Why is the mapping value that can be exported to Rhino not generated for all the calculation raster points, but maximal only for 100 values? MAPPING METHOD: This method hasn't been implemented in Grasshopper yet, has it? RAYTRACING METHOD (Pach:RT): I did a raytracing through the components of GH, using only the Pach_RT, and I had these curious results in terms of time: RaysCount: 15.000, IS_Order:1 = 5min RaysCount: 15.000, IS_Order:2 = 12min RaysCount: 15.000, IS_Order:3 = 3min RaysCount: 15.000, IS_Order:4 = 8min RaysCount: 15.000, IS_Order:5 = 3min Why a raytracing with only 2 order, is more and more extensive than the 3/4 and 5 order? ANALYSIS RESULT: Would there be a way to export all the results of a simulation, as is done via Odeon, to a .txt list?   I apologize in advance for asking so many questions, I hope you can find the time to answer, Yours sincerely from Müller-BBM…
Added by G.C.Ruvio to Pachyderm Acoustic at 9:11am on September 2, 2021
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
Blog Post: Design Modelling Symposium Copenhagen: Workshops & Master Class

This fall the…

Added by David Stasiuk at 11:10am on July 9, 2015
Comment on: Topic 'DataTree(of object) > GH_Structure(of ?)'
3. receiver gets data from sender via input (0) < the data here may be changed in the meantime, for instance if its a double then I would like to add 1 to it. 4. receiver sends data to sender's input(2) 5. go to 1. VS 2013 studio project folder SENDER  Public Class loopStart Inherits GH_Component Dim cnt As Integer Friend Property counter() As Integer Get Return cnt End Get Set(value As Integer) cnt = value End Set End Property Dim iData As New GH_Structure(Of IGH_Goo) Friend Property startData() As GH_Structure(Of IGH_Goo) Get Return iData End Get Set(value As GH_Structure(Of IGH_Goo)) iData = value End Set End Property Public Sub New() MyBase.New("loopStart", "loopStart", "Start the loop with this one.", "Extra", "Extra") End Sub Public Overrides ReadOnly Property ComponentGuid() As System.Guid Get Return New Guid("bdf1b60d-6757-422b-9d2d-08257996a88c") End Get End Property Protected Overrides Sub RegisterInputParams(ByVal pManager As Grasshopper.Kernel.GH_Component.GH_InputParamManager) pManager.AddGenericParameter("Data", "dIn", "Data to loop", GH_ParamAccess.tree) pManager.AddIntegerParameter("Steps", "S", "Number of loops", GH_ParamAccess.item) pManager.AddGenericParameter("<X>", "<X>", "Please leave this one alone, don't input anything.", GH_ParamAccess.tree) pManager.Param(2).Optional = True End Sub Protected Overrides Sub RegisterOutputParams(ByVal pManager As Grasshopper.Kernel.GH_Component.GH_OutputParamManager) pManager.AddGenericParameter("Data", "dOut", "Data to loop", GH_ParamAccess.tree) End Sub Public Overrides Sub CreateAttributes() m_attributes = New loopStartAttributes(Me) End Sub Protected Overrides Sub SolveInstance(ByVal DA As Grasshopper.Kernel.IGH_DataAccess) Dim numLoop As Integer DA.GetData(1, numLoop) Dim loopDt As New Grasshopper.Kernel.Data.GH_Structure(Of IGH_Goo) If cnt = 0 Then Me.startData.Clear() DA.GetDataTree(0, Me.startData) loopDt = startData.Duplicate DA.SetDataTree(0, loopDt) End If If cnt < numLoop - 1 And cnt > 0 Then DA.GetDataTree(2, loopDt) DA.SetDataTree(0, loopDt) Me.ExpireSolution(True) Else DA.GetDataTree(2, loopDt) DA.SetDataTree(0, loopDt) End If cnt += 1 End Sub End Class RECEIVER Public Class loopEnd Inherits GH_Component Dim aData As New GH_Structure(Of IGH_Goo) Friend Property anyData() As GH_Structure(Of IGH_Goo) Get Return aData End Get Set(value As GH_Structure(Of IGH_Goo)) aData = value End Set End Property Public Sub New() MyBase.New("loopEnd", "loopEnd", "End the loop with this one.", "Extra", "Extra") End Sub Public Overrides ReadOnly Property ComponentGuid() As System.Guid Get Return New Guid("3ffa3b66-8160-4ab3-87c9-356b2c17aadd") End Get End Property Protected Overrides Sub RegisterInputParams(ByVal pManager As Grasshopper.Kernel.GH_Component.GH_InputParamManager) pManager.AddGenericParameter("Data", "dIn", "Data to loop", GH_ParamAccess.tree) End Sub Protected Overrides Sub RegisterOutputParams(ByVal pManager As Grasshopper.Kernel.GH_Component.GH_OutputParamManager) pManager.AddGenericParameter("Data", "dOut", "Data after the loop", GH_ParamAccess.tree) End Sub Protected Overrides Sub SolveInstance(ByVal DA As Grasshopper.Kernel.IGH_DataAccess) Me.aData.Clear() DA.GetDataTree(0, Me.aData) runner() DA.SetDataTree(0, Me.aData) End Sub Sub runner() Dim doc As GH_document = Grasshopper.Instances.ActiveCanvas.Document Dim docl As list(Of iGH_DocumentObject) = (doc.Objects) For i As Integer = 0 To docl.count - 1 Step 1 Dim comp As Object = docl(i) If comp.NickName = "loopStart" Then Dim compp As IGH_Param = comp.Params.input(2) compp.VolatileData.Clear() compp.AddVolatileDataTree(anyData) Exit For End If Next End Sub End Class …
Added by Mateusz Zwierzycki at 2:47pm on November 28, 2013
  • 1
  • ...
  • 902
  • 903
  • 904
  • 905
  • 906
  • 907
  • 908
  • 909
  • 910
  • 911

About

Scott Davidson created this Ning Network.

Welcome to
Grasshopper

Sign In

Translate

Search

Photos

  • Beam/Column

    Beam/Column

    by Parametric House 0 Comments 0 Likes

  • banner

    banner

    by Parametric House 0 Comments 0 Likes

  • Diagrid Structure

    Diagrid Structure

    by Parametric House 0 Comments 0 Likes

  • Random Sphere Panel

    Random Sphere Panel

    by Parametric House 0 Comments 0 Likes

  • Galapagos Rectangle

    Galapagos Rectangle

    by Parametric House 0 Comments 1 Like

  • Add Photos
  • View All
  • Facebook

Videos

  • Beam/Column

    Beam/Column

    Added by Parametric House 0 Comments 0 Likes

  • Grasshopper Pufferfish + Dendro Tutorial

    Grasshopper Pufferfish + Dendro Tutorial

    Added by Parametric House 0 Comments 0 Likes

  • Diagrid Structure

    Diagrid Structure

    Added by Parametric House 0 Comments 0 Likes

  • Random Sphere Panel

    Random Sphere Panel

    Added by Parametric House 0 Comments 0 Likes

  • Galapagos Rectangle

    Galapagos Rectangle

    Added by Parametric House 0 Comments 0 Likes

  • Fennec Knot

    Fennec Knot

    Added by Parametric House 0 Comments 0 Likes

  • Add Videos
  • View All
  • Facebook

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

Badges  |  Report an Issue  |  Terms of Service