Grasshopper

generative modeling for Rhino

Dave Johnson
  • Male
  • San Francisco, CA
  • United States
Share on Facebook
Share Twitter

Dave Johnson's Friends

  • Arlen Abraham
  • Andrew Heumann
  • Danny Boyes

Dave Johnson's Groups

Dave Johnson's Discussions

How to flip a curve's direction?
3 Replies

I'm trying to reverse the direction of a curve in code. The curve is a real one, in the document, and I want the reversal to "stick" in the document. That is, I want to reverse the direction of the…Continue

Started this discussion. Last reply by Dave Johnson Sep 25, 2012.

GUIDs and object names and...
6 Replies

This recent discussion clearly states that once an object (a curve in my case) enters a…Continue

Started this discussion. Last reply by Dave Johnson Sep 11, 2012.

I want to combine several data trees into one, with a branch for each
11 Replies

Like Entwine, but without flattening (I want each branch to maintain its original tree structure).It seems like there should be a straightforward way to do this for the general case, but I can't seem…Continue

Started this discussion. Last reply by David Stasiuk Aug 28, 2012.

Creating an empty tree
5 Replies

I need to create an empty data tree, and the only way I've found so far is to create the tree with dummy data, and then call ClearData() on the tree (to remove the data while preserving branch…Continue

Started this discussion. Last reply by David Rutten Aug 10, 2012.

 

Dave Johnson's Page

Latest Activity

Melissa replied to Dave Johnson's discussion Getting spring tension out of Kangaroo in the group Kangaroo
"I have a question regarding the stress colors mapping. I am trying to do something similar to this with a mesh. I would like to find a way to map the stresses throughout my mesh but when I try and apply this technique with the color gradient tool…"
Monday
Dave Johnson replied to Dave Johnson's discussion How to flip a curve's direction?
"Thank you David! That did it. I had a feeling I needed to either get a reference to the real thing and operate on that, or somehow tell the document to keep the changes that I made on "my" copy. For posterity, this seems to work well…"
Sep 25, 2012
ryles replied to Dave Johnson's discussion How to flip a curve's direction?
"i've tried several time to do it with components, to get all the input curves to run counter clockwise but could never get it to work."
Sep 25, 2012
David Rutten replied to Dave Johnson's discussion How to flip a curve's direction?
"You need to put the curve back into the document. Getting a curve out of a document means you'll get a copy, as objects inside the document cannot be modified.  Have a look at RhinoDoc.Objects.Replace() -- David…"
Sep 25, 2012
Dave Johnson posted a discussion

How to flip a curve's direction?

I'm trying to reverse the direction of a curve in code. The curve is a real one, in the document, and I want the reversal to "stick" in the document. That is, I want to reverse the direction of the the curve in the file. So I'm getting the curve by Guid (necessary?), and calling Reverse on its Geometry, but it ain't working.The subroutine looks like this (pardon lack of formatting):void SetCurveDirectionFrom(Guid cableID, Point3d startPoint){// Find the object from its id…See More
Sep 24, 2012
Dave Johnson replied to Dave Johnson's discussion GUIDs and object names and...
"D'oh! Of course! Silly me...thanks so much for the brain bump. I'm well on the way, examples of getting lists of guids abound. If I run into trouble I'll yell. "
Sep 11, 2012
Andrew Heumann replied to Dave Johnson's discussion GUIDs and object names and...
"Whatever part of that script is doing the "finding" can easily access the Guids at the same time, no? If you are willing to post (or send me) the script I'd be happy to give you more precise suggestions - but deadlines are deadlines,…"
Sep 11, 2012
Dave Johnson replied to Dave Johnson's discussion GUIDs and object names and...
"The only input to the first script is a string: the script finds all curves in the document whose name contains that string. It then constructs several output trees containing the various curves (other parts of the name identify the curve's…"
Sep 11, 2012
Andrew Heumann replied to Dave Johnson's discussion GUIDs and object names and...
"Can you edit the first script? I can't see any reason why you'd need to derive the name from the object's position - but maybe I'm missing some complexity of this problem."
Sep 11, 2012
Dave Johnson replied to Dave Johnson's discussion GUIDs and object names and...
"Thanks, Andrew. It does make sense, but alas, in my case the source of all the curves is another script, one that searches through all objects in the document to find curves with particular names :-) Whoops! I'm beginning to think that my…"
Sep 10, 2012
Andrew Heumann replied to Dave Johnson's discussion GUIDs and object names and...
"You could accept a list of Guids (or names) and output a parallel tree of Guids at the same time you're structuring your tree of curves - does that make sense?"
Sep 10, 2012
Dave Johnson posted a discussion

GUIDs and object names and...

This recent discussion clearly states that once an object (a curve in my case) enters a script, then the GUID is <poof!> gone. Does that mean I can never find the name of an object that is output from a script?I have a C# component that painstakingly finds intersections between sets of curves, and outputs a tree where each branch contains curves that intersect. That's fine so far.…See More
Sep 10, 2012
David Stasiuk replied to Dave Johnson's discussion I want to combine several data trees into one, with a branch for each
"Well...here's a way that, while still inelegant in that you have run each branch through, it may streamline your process a bit.  I have the same issue often...I wrote a little vb script to extract a variety of data elements from a data…"
Aug 28, 2012
Dave Johnson replied to Dave Johnson's discussion I want to combine several data trees into one, with a branch for each
"I'm confused: doesn't Entwine always flatten the inputs? So for instance, Tree 1 above gets flattened into a simple list of 6 items. Nothing you do after that can restore its structure... Unless it's different in 9.x...I'm still…"
Aug 28, 2012
Dave Johnson replied to Dave Johnson's discussion I want to combine several data trees into one, with a branch for each
"Yeesh...let's leave the hacks out of it. Earlier today I started scripting something, mostly as an exercise, and I just had a separate input for each tree (limiting the number of trees, of course). That doesn't require hacks, right? I can…"
Aug 28, 2012
David Rutten replied to Dave Johnson's discussion I want to combine several data trees into one, with a branch for each
"I don't think this is possible for an arbitrary number of trees without scripting. Even with scripting you need some pretty nasty hacks (see attached). -- David Rutten david@mcneel.com Poprad, Slovakia"
Aug 28, 2012

Comment Wall (4 comments)

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

Join Grasshopper

At 12:56pm on August 23, 2012, djordje said…

Ok. Thank you David. You are doing some work there.
I wish you all the best!

At 11:43am on August 23, 2012, djordje said…

So you are only engineer in the company?

btw impressive list of skill you have !!

At 11:41am on August 23, 2012, djordje said…

Thank you for the reply!

At 7:36pm on August 22, 2012, djordje said…

Dave I took a look at your profile image, and got interested in that sheet project.

It looks interesting.

Can you tell us more about it? Maybe post some images?

Sorry for disturbance.

Thank you.

Profile Information

Company, School, or Organization
The Exploratorium
 
 
 

Translate

Search Grasshopper

Photos

  • Add Photos
  • View All

© 2013   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service