h, and using the BScale and BDistance are creating havoc somehow too. I've simplified first, and used the Kangaroo Frames component along with setting internal iterations, to make MeshMachine act like a normal component, along with releasing the FixC and FixV. The FixV didn't make any sense anyway. I've also set Pull to 0 to speed it up during testing, since much less calculation is involved to just let the meshes collapse, prevented from disappearing altogether by using a mere 15 iterations.
Also, your breps are open so that allows much more chaos and then collapse, though they did manage to close themselves too at times. Here is closed breps with a full 45 iterations:
So now that it's working, lets re-Fix the curves, and the problem arises that there is an extra seam line that is getting fixed too, running along the cylinder, stopping the mesh from pulling tight under tension wherever a vertex happens to be near that line:
So lets grab only the naked edge curves instead:
And what happens if we lose the end caps, now that we don't have an extra line skewing the result?:
There is no real curvature differences since it's not a curvy brep so the Adapt at full 1 setting has little to do. Now what does the BScale and BDist do? Nothing! Why? Your scale is out of whack, 99 mm high cylinders but only a falloff maximum of about 5, so let's make the falloff be 25 instead, but I must restore the end caps or the meshes collapse away for some reason and freezes Rhino for a minute or so the first time I try it:
It's a start.
If I intersect the cylinders, nothing changes, since they are being treated as separate runs. MeshMachine outputs a sequence of two outputs though, due to Frames being set to a bare minimum of 2 needed to get it to work, so I filter out the original run, which is just the unmodified initial mesh it creates.
The lesson so far is that closed meshes are much less prone to collapse and glitches leading to screw ups.
A Boolean union of the cylinders is when it gets funner, here show with and without the fixed curves that seem to define boundaries too where really there are just polysurface edges:
…
se (like in nature). the length of the sticks shall be controlled by the brightnessvalues of a picture. so the bend have to be controlled, too.
now we have several problems:
1. how can i map a hexgrid on a curved surface?
2. how can i adapt the grid to the dimensions of the surface (no overlap, no gaps to the bound)?
3. important
: to create the curved sticks, we use points on a line and we move some of them and then we want to connect the right points via interpolated curve to create each curved stick. now the problem is that the points have to been filtered in the right way. we know that we have to filter each list of points to the index values of the points. the number of index values is the number of hexgrid rows, so there are a lot and we can't use a list item for each one. it could be hundreds.
is there any opportunity to sort a list after the index values (first every index=0, then index=1, ...n)?
or is there any component which does a group of operations for n-times (n is the flexible number of index values) ?
4. how can i control the length and bend of the sticks via the brightnessvalues of a picture?
please help us. thanks.
german version:
In einem hexagonalen Raster soll sich senkrecht zu Oberfläche ein Stab im Mittelpunkt jedes Sechsecks befinden. Dieser soll sich ab einem gewissen (festgelegten) Punkt Richtung Boden biegen. Zusätzlich wird die Länge des Stabes zum Beispiel durch die Information eines Bildes gesteuert, so dass auch die Biegung, je nach Länge, geregelt werden muss.
Wir haben ein Hexagonales Grid (HexGrid) erzeugt und in jeden Mittelpunkt eine Linie senkrecht zum Grid erzeugt, aus der wir uns Punkte mit CurvePoint ausgeben lassen. Der letzte ist verschoben, um eine Biegung zu simulieren. Um die Punkte zu einer interpolierten Kurve zu verbinden, müssen sie nach dem Index sortiert werden. Gibt es eine andere Möglichkeit, als jeden einzelnen Indexwert über ein ListItem herauszufiltern (Da die Rasterung flexibel einstellbar sein soll, entstehen n Indexwerte)? Oder kann man eine Liste nach den Indexwerten, also nicht nach den Punkten, sortieren?
Und wie kann man über Bildhelligkeitswerte die Länge der Stäbe und damit auch die Biegung steuern (ein kurzer Stab biegt sich weniger als ein langer Stab)?
Gibt es die Möglichkeit ein hexagonales Raster auf eine gekrümmte Fläche zu mappen?
Und wie passt man ein solches Raster (HexGrid) in eine Fläche mit definierten Maßen ein, ohne dass das Raster an den Rändern übersteht oder die Fläche nicht vollkommen ausfüllt?
danke.…
Added by doro hamann at 7:34am on December 20, 2011
es has guided me in a - what I once thought - specific path within architecture, but recent discoveries (like the Grasshopper-community etc.) have learned me that the field of digital and parametric architecture is so-to-speak alive and kicking. This is also the main subject I would like to write my thesis about. It is however mainly the subject and defining its boundaries – what do I really want to explore and research? – which is the most difficult factor at this time.
A concrete idea is non-existant, and my current visions will probably be redirected when I have a first meeting with the promotors in February. Moreover there is the knowledge that it is impossible to make a thesis at the institute in Antwerp on no matter what subject in the world of digital architecture. Understandably too, it’s a small world and does not always result in realised projects, but in impressive imagery. At this moment however, I am thinking of two possible research fields to focus on.
In a first option the focus might lie on how digital design tools can be used to bring a certain aspect of interactivity to building facades. Such interactivity can occur both in the design phase and throughout the use of the building. The first scenario, in which the interactivity occurs when designing, I would focus on how the designer can shape a building’s outer perspective in function of environmental parameters: obstacles, elements that block sunlight from entering the building, visually important landmarks, etc. It should be noted however that focus will mostly lie on the design element, and less on the energy-efficiency and sustainability. Tools that will be researched would include Grasshopper, Rhino Scripting, Processing and ParaCloud.
A second possible approach could be categorized under both Swarm Intelligence and Generative Design and might study how the aforementioned digital techniques might be implemented in the new urbanism. We notably see more (innovative) interventions in which the design and planning is heavily influenced by movement patterns and morphogenetic parameters and functions. Based on the outcome of these scripted techniques, designers tend to work towards a proposal which answers a certain urbanistic issue.
All additional insights, guidelines, tips, comments are more than welcome in order to help me define the scope of my thesis subject. I must admit I am pretty new to this digital design world (it is not actively promoted at my home university, but it is promoted at the university where I am studying for one year now) and thus have limited experience at the time of writing.
Please also feel free to check out the blog post concerning this topic, which is a little more elaborate: http://nielswouters.be/thesis-digital-design-english/
Thanks for all your help!
…
mplex the models are. If we are running multi-room E+ studies, that will take far longer to calculate.
Rhino/Grasshopper = <1%
Generating Radiance .ill files = 88%
Processing .ill files into DA, etc. = ~2%
E+ = 10%
Parallelizing Grasshopper:
My first instinct is to avoid this problem by running GH on one computer only. Creating the batch files is very fast. The trick will be sending the radiance and E+ batch files to multiple computers. Perhaps a “round-robin” approach could send each iteration to another node on the network until all iterations are assigned. I have no idea how to do that but hope that it is something that can be executed within grasshopper, perhaps a custom code module. I think GH can set a directory for Radiance and E+ to save all final files to. We can set this to a local server location so all runs output to the same location. It will likely run slower than it would on the C:drive, but those losses are acceptable if we can get parallelization to work.
I’m concerned about post-processing of the Radiance/E+ runs. For starters, Honeybee calculates DA after it runs the .ill files. This doesn’t take very long, but it is a separate process that is not included in the original Radiance batch file. Any other data manipulation we intend to automatically run in GH will be left out of the batch file as well. Consolidating the results into a format that Design Explorer or Pollination can read also takes a bit of post-processing. So, it seems to me that we may want to split up the GH automation as follows:
Initiate
Parametrically generate geometry
Assign input values, material, etc.
Generate radiance/ E+ batch files for all iterations
Calculate
Calc separate runs of Radiance/E+ in parallel via network clusters. Each run will be a unique iteration.
Save all temp files to single server location on server
Post Processing
Run a GH script from a single computer. Translate .ill files or .idf files into custom metrics or graphics (DA, ASE, %shade down, net solar gain, etc.)
Collect final data in single location (excel document) to be read by Design Explorer or Pollination.
The above workflow avoids having to parallelize GH. The consequence is that we can’t parallelize any post-processing routines. This may be easier to implement in the short term, but long term we should try to parallelize everything.
Parallelizing EnergyPlus/Radiance:
I agree that the best way to enable large numbers of iterations is to set up multiple unique runs of radiance and E+ on separate computers. I don’t see the incentive to split individual runs between multiple processors because the modular nature of the iterative parametric models does this for us. Multiple unique runs will simplify the post-processing as well.
It seems that the advantages of optimizing matrix based calculations (3-5 phase methods) are most beneficial when iterations are run in series. Is it possible for multiple iterations running on different CPUs to reference the same matrices stored in a common location? Will that enable parallel computation to also benefit from reusing pre-calculated information?
Clustering computers and GPU based calculations:
Clustering unused computers seems like a natural next step for us. Our IT guru told me that we need come kind of software to make this happen, but that he didn’t know what that would be. Do you know what Penn State uses? You mentioned it is a text-only Linux based system. Can you please elaborate so I can explain to our IT department?
Accelerad is a very exciting development, especially for rpict and annual glare analysis. I’m concerned that the high quality GPU’s required might limit our ability to implement it on a large scale within our office. Does it still work well on standard GPU’s? The computer cluster method can tap into resources we already have, which is a big advantage. Our current workflow uses image-based calcs sparingly, because grid-based simulations gather the critical information much faster. The major exception is glare. Accelerad would enable luminance-based glare metrics, especially annual glare metrics, to be more feasible within fast-paced projects. All of that is a good thing.
So, both clusters and GPU-based calcs are great steps forward. Combining both methods would be amazing, especially if it is further optimized by the computational methods you are working on.
Moving forward, I think I need to explore if/how GH can send iterations across a cluster network of some kind and see what it will take to implement Accelerad. I assume some custom scripting will be necessary.…
y in English. ○Presenter
Robert (Bob) McNeel (McNeel & Associates founder) Robert (Bob) McNeel is the founder and president of Robert McNeel & Associates (RMA). Founded in 1978, RMA originally focused on developing accounting software for accounting, architecture, engineering, and other personal services firms. Within a few years, RMA expanded its services to include selling and supporting microprocessor-based engineering and design software including AutoCAD. By 1985, the main focus of the business had shifted to AutoCAD sales, service, training, and software development. Bob McNeel grew up in the mountains of southern Washington State on a subsistence dairy farm. To pay for college, he worked in construction as a carpenter, welder, and cement finisher. Bob has a BA in Accounting from Washington State University. Prior to founding McNeel & Associates, he was a practicing Certified Public Accountant and the comptroller for a large construction company in Spokane. Andrés González (Rhino Fablab director) Andrés is a software trainer and developer since the 1980s. He has developed applications for diverse design markets as well as training materials for different CAD and Design software including the community of training materialswww.Rhino3D.TV Andrés has been working with the Rhino Team since the very early stages. He is now the head of the McNeel Southeast US & Latin American Division. He is the worldwide director of the digital fabrication community called RhinoFabLabwww.RhinoFabLab.com as well as the Generative Jewelry & Fashion Design community GJD3D www.GJD3d.com and Generative Furniture Design community GFD3D www.GFD3d.com 1981 -1985 University of North Carolina at Charlotte N.C. - EE.UU. B.S., Bachelor of Science in Engineering
…
Added by Yusuke Oono at 9:28pm on October 16, 2013
ating to new speakers.
For more information: https://medium.com/@carspeakerland/a-guide-to-the-simple-way-difference-in-car-speakers-2-way-3-way-4-way-25e0bf215b00
Adding new speakers for your automobile could improve the sound quality dramatically. Some sound technicians say it is the number-one update you may make to improve the overall quality of your vehicle.
"They do not care how it sounds. Speakers are often form of continue on the list. Updating to new speakers offers you a much fuller sound."
There is a whole lot to pick from in regards to car speakers. (Photo from Eldon Lindsay)
"New speakers will make a greater fidelity and clarity of sound," states Robert Nevitt, proprietor of Audio Electronics at Indianapolis. "The audio is more different without distortion. People will not get bored listening to it."
Cook says customers need to pick the type of sound they enjoy. The very first thing Cook does having a customer is sit in the car together to talk about their personal taste.
"Everybody's ear is different," he states. "That which I believe sounds great, you might believe is dreadful. It is a fantastic idea to get outside and listen to everything you enjoy and do not like about doing it."
When you've discovered a sound you want, you are going to discover the sky's actually the limitation in regards to purchasing car speakers. There are scores of manufactures and models, sizes and power levels to select from.
Columbus Car Audio & Accessories offers three types of automobile speakers to pick from: complete array speakers, component speakers along with coaxial speakers.
• Total range speakers arrive with a tweeter to make to your high-pitched sounds along with a woofer for those lows. This option offers a number of different sizes.
• Unit speakers, nonetheless, include separate tweeters and woofers.
• Coaxial speakers arrive with a tweeter plus motorist.
When you've selected a type of automobile speaker, you are going to want to determine how many you desire. Cook states some cars arrive with as little as just two speakers, whereas bigger, luxury vehicles might have too many 32. He adds a normal sedan generally has four. What are The Speaker Sizes in My Car | Speaker Size for My Car
"It simply depends if you would like to replace all of these," Cook says. "I would advise doing all of four. If you are budget-minded, I'd begin with the ones at the front. That is where you are at. And you are likely to be at the automobile 100 percent of their moment."
Subwoofers are designed to reproduce low bass frequencies also may be included with new speakers or could be added separately to existing car speakers.
"Many speakers can not play down low in these frequencies such as a subwoofer may," Cook says.
Related Article
Wondering about speakers? Below are a few techniques to establish a home entertainment experience whatever your budget.
A speaker update might charge as little as $100 up to a few million dollars depending on the scope of job and type of speaker.
Cook states that the price of a subwoofer can operate as low as $37. Columbus Car Audio & Accessories sells a subewoofer bundle that includes an amplifier and a enclosure for about $ 299.
To get a set of automobile speakers, Columbus Car Audio & Accessories begin prices at $39, with an average price tag of about $70 for setup. Adding an anti-vibrator into a set of speakers prices an additional $25.
Nevitt, meanwhile, fees as little as $99 to get a set of "some good speakers." The price of one hour of installion, that is typically how long it takes to put in a set of speakers, is 67.
However, most customers spend far more.
"Paying a total amount of 800 to $1000 isn't from this world of possibility," Nevitt states. "A price somewhere in the center could be $400 or $500."
Cook says several vehicle speaker technicians began with DIY projects and adds there is nothing wrong with trying to set up car speakers all on your own. But you are going to want the correct tools for your job along with just a little understand. Installing speakers requires carrying out your car door.
See Also: https://www.scoop.it/t/how-to-choose-best-car-speakers-6x9-inch-6-5-inch-6x8-inch-4-inch
Choosing a professional to set up speakers ensures that the job is done correctly.
"If you do it yourself, then you might wind up breaking something. That is some thing we do everyday. I am not planning to inform you we will not violate something. But we will look after it if we perform. We all do so with being honest and up front with people."
If you are getting speakers set up, experts say to expect to place an appointment to the setup. …
DP ($$$ aside), GC, and Grasshopper. Arthur’s original question is very important
and the exact question (and hopefully answer) I was hoping to find on a
forum.
“How to take intelligent 3D parametric generative design models (scripting, etc.) into 2D documents?" Or, deliver the 3D design for evaluation, bid, construction, etc.
I am intrigued by Jon’s comments in the same thread and would like to know how I can learn more about the process (and
pitfalls) of turning over a 3D digital generative models to a contractor/fabricator.
Are there any industry guidelines established I could use as a reference to guide our firm through this type of uncharted territory?
Arthur’s question is very reminiscent of 10 years ago when I was frustrated with the amount of time spent on the development of a 3D model design (physical and/or virtual) only to have to wipe the table clean and start the process all over again in 2D in order to document the project for delivery. From this I jumped head first into BIM and Revit, vowing never to go back to unintelligent 2D line work. I am now working on Bentley software (v8i: Microstation and Bentley Architecture) with the access and desire to venture into Generative Components. I am very intrigued by Rhino/Grasshopper primarily with the apparent ease of use and available resources assisting in the learning process – something not really available with Bentley.
In hindsight, as I am doing my software research I think the current use of Revit and BA (Bentley Architecture) are more of a “bridge”
between the past (decades of digital 2D work, i.e. AutoCAD) and where hopefully
we all will be someday in the near future (100% 3D modeling, i.e. Digital
Project??). Without having the experience
it would appear that DP/CATIA (PLM software) are closer to this than any other
type of software. As complicated as the
industry standards are for the automobile and airline industry, I feel we
(architectural industry and others) are heading in a similar direction with
total understanding (PLM/ Evidence Based Design) of a design (a whole other topic). If anything I think the market will begin to
demand it sooner or later.
Gehry (DP) article NY Times:
http://www.nytimes.com/2009/02/11/business/11gehry.html
I know these type of broad discussions (software vs. software) can be blown out of proportion on forums, but I am would like to read
the pulse of those who are already in the trenches (using Grasshopper, CATIA, Digital Project, Generative Components, others??) and hear your thoughts. Just as valuable would be other threads,
industry articles/reviews of 3D parametric generative design software.
Thanks,
Boyd…
.
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
…
This blog post is a rough approximation of the lecture I gave at the AAG10 conference in Vienna on September 21st 2010. Naturally it will be quite a different experience as the medium is quite…
Added by David Rutten at 3:27pm on September 24, 2010