Grasshopper

algorithmic modeling for Rhino

Benjamin Felbrich
  • Male
  • Stuttgart, Germany
  • Germany
Share on Facebook
Share

Benjamin Felbrich's Friends

  • AS  AbhishekShinde
  • anisul Islam
  • Pascale Lacroix
  • Matous Stieber
  • Annie Locke Scherer
  • C.Render
  • Maria Chiara Virgili
  • Matt Stewart
  • Manuel Muehlbauer
  • Ale Reboredo
  • Antonio Turiello
  • Shridhar Mamidalaa
  • Ramzi
  • Amaury THOMAS
  • Gene Kao

Benjamin Felbrich's Groups

Benjamin Felbrich's Discussions

Does DA.GetData make a copy?
8 Replies

Hello forum,I seek some knowledge about what is going on in the Grasshopper components.Specifically:Does DA.GetData() (or DA.GetDataList() or DA.GetDataTree()) reference an existing object or does it…Continue

Tags: I/O, C#

Started this discussion. Last reply by Benjamin Felbrich May 18.

1. Invalid cast: ObjectWrapper » MyClass

Hey guys,I wrote some components between which i want to exchange custom classes.It all works fine until I update my code, an insert the new .gha again. I always get this error"1. Invalid cast:…Continue

Started Aug 12, 2014

Matrix Solver / Optimizer

Hi guys,I'm working on rigid folding in origami style.In used this paper to approach the issue.By…Continue

Tags: solver, optimization, matrix, C#, folding

Started Nov 25, 2013

Set Difference - Bug?
6 Replies

Hi all,I've just came across some incident in the "Set Difference"-component which I can't explain.The Set Difference of Integers doesn't work, strangely it only occurs in Branches ending with…Continue

Tags: difference, Set

Started this discussion. Last reply by Benjamin Felbrich Nov 4, 2013.

 

Benjamin Felbrich's Page

Latest Activity

liuwen liked Benjamin Felbrich's video
May 23
liuwen liked Benjamin Felbrich's video
May 23
Benjamin Felbrich replied to Benjamin Felbrich's discussion Does DA.GetData make a copy?
"Sorry I made a different mistake here:My problem was that in the second component I initialized another instance of myClass before assigning it. Like this:MyClass instance = new MyClass(); DA.GetData(0, ref instance); ..this instance created…"
May 18
Benjamin Felbrich replied to Benjamin Felbrich's discussion Does DA.GetData make a copy?
"Okay so for custom classes my best bet would be Tom's suggestion to link and refer to my instance in the global document scope, correct?"
May 18
Tom Jankowski replied to Benjamin Felbrich's discussion Does DA.GetData make a copy?
"Oh okay, I was wrong here. I never was in need of creating an own parameter object types deriving from the interface IGH_Goo. I also always retrieved information from my input and implement my own datatypes, so I never come into the…"
May 18
David Rutten replied to Benjamin Felbrich's discussion Does DA.GetData make a copy?
"GH_ObjectWrapper is a last resort type which is used to encapsulate data for which no suitable IGH_Goo implementation can be found. GH_ObjectWrappers do not know how to do anything with the data they contain (read it, write it, copy it, transform…"
May 18
Benjamin Felbrich replied to Benjamin Felbrich's discussion Does DA.GetData make a copy?
"Hello David,thanks a lot for the reply. And for custom classes I'd use GH_ObjectWrapper??I'm thinking of something like: ...to point me to the original instance. That'd be very neat..BestBen"
May 18
David Rutten replied to Benjamin Felbrich's discussion Does DA.GetData make a copy?
"If you ask for the IGH_Goo type, then you always get the original data: also gives you a reference to the actual brep that is inside the GH_Brep instance, again no copying. When you use VB/C# script components, then you always get a safe instance…"
May 18
Benjamin Felbrich replied to Benjamin Felbrich's discussion Does DA.GetData make a copy?
"Thanks a lot Tom!I see, that was my assumption. I was thinking about passing pointers as well, but since myClass is a reference type I can not use pointers in C# (apparently C# only supports pointers for value types and structs of such).Your idea of…"
May 18
Tom Jankowski replied to Benjamin Felbrich's discussion Does DA.GetData make a copy?
"Hello, usually classes, compared to structs or primitive datatypes, are passed by reference. However Grasshopper needs to copy them, because otherwise you couldn't have two different states of an class instance being existent at the same time.…"
May 18
Benjamin Felbrich posted a discussion

Does DA.GetData make a copy?

Hello forum,I seek some knowledge about what is going on in the Grasshopper components.Specifically:Does DA.GetData() (or DA.GetDataList() or DA.GetDataTree()) reference an existing object or does it create a local copy of the input?Say I need to pass an object around in different components but need to have only one instance of that class, since clones or copies will crash my program.BestBenjaminSee More
May 17
O Loos liked Benjamin Felbrich's video
May 17
vhoang liked Benjamin Felbrich's video
May 16
Pedro Giachini liked Benjamin Felbrich's video
May 16
Riccardo Majewski liked Benjamin Felbrich's video
May 15
Weishun Xu liked Benjamin Felbrich's video
May 15

Profile Information

Company, School, or Organization
Institute for Computational Design (ICD)
Web or Blog
http://www.felbrich.com

Benjamin Felbrich's Photos

Loading…
  • Add Photos
  • View All

Benjamin Felbrich's Videos

  • Add Videos
  • View All

Comment Wall (1 comment)

You need to be a member of Grasshopper to add comments!

Join Grasshopper

At 10:16am on January 5, 2012, Carlos Castro said…

Thanks Benjamin, you can download  that information from this link:

http://www.megaupload.com/?d=I1PDPZK3 , it's the Sigradi 2011 Presentation.

Tell me what you think.

 
 
 

Translate

Search Grasshopper

Photos

  • Add Photos
  • View All

© 2017   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service