Grasshopper

generative modeling for Rhino

  • Blog Posts
  • Discussions (16)
  • Events
  • Groups
  • Photos
  • Photo Albums
  • Videos

Daniel Gebreiter's Discussions

Tree - list - tree
2 Replies

Started this discussion. Last reply by David Rutten May 8.

GUID of an object
2 Replies

Started this discussion. Last reply by Matthew Owens Sep 12, 2012.

Preview geometry from custom class
2 Replies

Started this discussion. Last reply by Daniel Gebreiter Apr 1, 2012.

 

Daniel Gebreiter's Page

Latest Activity

David Rutten replied to Daniel Gebreiter's discussion Tree - list - tree
"You could also maybe create a shallow duplicate of the tree. That'll be a lot faster if the tree contains things that take a long time to duplicate like Meshes or Breps. -- David Rutten david@mcneel.com Poprad, Slovakia"
May 8
Daniel Gebreiter replied to Daniel Gebreiter's discussion Tree - list - tree
"ah, I think I've found a way of doing it (not particularly neat, as a whole copy of the first tree is made), but I guess for now it will do the job...   public GH_Structure<IGH_Goo> ListToTree(List<IGH_Goo> items,…"
May 8
Daniel Gebreiter posted a discussion

Tree - list - tree

Hello all, I'm trying to write a little method which should map a list of objects onto an existing tree structure.Basically, I would like to take a tree and flatten it into a list List<IGH_Goo> treeList = tree.FlattenData();I would then like to modify the items in the list, and map the individual items into a new tree which has the same topology as the original tree. Each modified item should take the same place as it had in the original tree.I'm doing this as I have a lot of legacy…See More
May 8
Daniel Gebreiter replied to David Rutten's discussion Need ideas for an icon
"Lovely discussion! I haven't got any tools to draw nice icons, but here's another idea in case there's no clear winner yet (tough I quite like the stump and little twig from earlier): flatten turns the tree into a plank- um,…"
Mar 19
Matthew Owens replied to Daniel Gebreiter's discussion GUID of an object
Sep 12, 2012
Florian Frank replied to Daniel Gebreiter's discussion GUID of an object
"Hi Daniel, The guid is a property on every RhinoObject. Every RhinoObject has another Property "Geometry" that is assigned with GeometryBase information. In your case a Point3d Type information. Once you reference a geometry to GH you can…"
Sep 12, 2012
Daniel Gebreiter posted a discussion

GUID of an object

Hello all,this might be a silly question, but is there a quick and easy way to retrieve the GUID of an object in Rhinocommon? A curve or a point for example?I guess they are only assigned once added to the document? But does the geometry store its GUID? Is there a simple way of determining it I'm not seeing, something like... Point3d pt;Guid guid = pt.Id;//points have no .Id property! How else can I get the guid of an object? Many thanks for any pointers!DSee More
Sep 12, 2012
Daniel Gebreiter replied to Daniel Gebreiter's discussion Preview geometry from custom class
"oh I see, cool. It seems to work! Nice, simple, magic. Thanks, David! public class CustomClass: GH_Goo<object>, IGH_PreviewData{ BoundingBox IGH_PreviewData.ClippingBox{get { return BoundingBox; }} void…"
Apr 1, 2012
David Rutten replied to Daniel Gebreiter's discussion Preview geometry from custom class
"Hi Daniel, IGH_PreviewObject is for things like Components and Parameters, IGH_PreviewData is for IGH_Goo derived types. If you put a class that implements IGH_Goo and IGH_PreviewData inside a Generic parameter, it will display. If you make your…"
Apr 1, 2012
Daniel Gebreiter posted a discussion

Preview geometry from custom class

Hi, I’m trying to preview data from a custom class I’ve written. However, as soon as I include it in my code, Grasshopper just freezes up (it goes pale white, similar to the behavior when calling an infinite loop). Here’s what I’m doing:The custom class I derive from GH_Goo<object> and I make it inherit from IGH_PreviewObject. I override IsPreviewCapable, ClippingBox, Hidden, DrawViewportWires and I create some PreviewArgs from some lines created by the class, as shown in the code…See More
Apr 1, 2012
Daniel Gebreiter replied to Daniel Gebreiter's discussion multiple type input/output from custom components
"thanks for your help, both of two! I tried lists and classes, foreach's and the behaviour you describe was what I was hoping for, but it seems I'm getting issues with grasshopper wrapping the objects or list of objects in…"
Dec 21, 2011
michael sprinzl replied to Daniel Gebreiter's discussion multiple type input/output from custom components
"may try List instead of arrays.. much more easy to work with..... and make you own class.... you have to provide the class in both components public class line_and_length_para { public int; public Line; } this you simply have to cast in the second…"
Dec 21, 2011
Sridevi Koonath replied to Daniel Gebreiter's discussion multiple type input/output from custom components
"That's odd. The code works for me. What if you try using the foreach loop? Something along the lines of -> int index = 0; foreach(object output in objects) {       DA.SetData(index, output);      …"
Dec 20, 2011
Daniel Gebreiter replied to Daniel Gebreiter's discussion multiple type input/output from custom components
"hmm, thanks Sridevi, but I'm not sure this solves my issue. Does it work with you? I can't even use .ElementAt(i) as you suggested to retrieve the "objects" item. "objects[i]" doesn't work either. I'll…"
Dec 20, 2011
Sridevi Koonath replied to Daniel Gebreiter's discussion multiple type input/output from custom components
"Hi Daniel, Hope this helps. Regards, Sridevi"
Dec 20, 2011
Daniel Gebreiter posted a discussion

multiple type input/output from custom components

 Hello there,I’m trying to pass an array of object arrays which contain different data types between two grasshopper components. Not sure if I should be doing this at all, but I thought I'd try! COMPONENT 1: - the user inputs a line (curve) and a length (double). It stores the start point of the curve and the length in an object[]Input parameters:pManager.Register_CurveParam( "Line", "Line", "Line to get start point of"); pManager.Register_DoubleParam("Length", "Line Length", "Length of Line to…See More
Dec 20, 2011

Comment Wall

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

Join Grasshopper

  • No comments yet!
 
 
 

Translate

Search Grasshopper

Photos

  • Add Photos
  • View All

© 2013   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service