Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sticky id #5

Open
soerensenkarl opened this issue Jan 8, 2024 · 2 comments
Open

Sticky id #5

soerensenkarl opened this issue Jan 8, 2024 · 2 comments

Comments

@soerensenkarl
Copy link
Collaborator

I had this idea that once an object is created, it should get an id (from the sheet or elsewhere) and that this id should stick to the object no matter what you do with it in the rest of the definition. A nice way to integrate it would be in two ways:

  1. whenever an object is previewed in the rhino viewport, there is also a little number tag on it. So you can always visually see what object in your inventory it is.
  2. If you want to extract the id's in the same tree structure as the objects you can connect ObjProps and one of the outputs is the id.

btw I'm aaaaalmost done with my first C# component! The sheets reader. I'll show you tomorrow.

image

@soerensenkarl
Copy link
Collaborator Author

I've started with a solid csv reader, as I think that is the most important and should be an option if the livelink falters anyway. I'm making it so it reads a sheet that's organized like the attached with an id per unique geometry, it's dimensions and quantity. The component then outputs GH_Geo for every item, as well as its id and dimensions. This geo can then be fed into your object components for further manipulation.

@keithjlee
Copy link
Owner

Cool, looking forward to it.

If we work with IDs, it needs to come from upstream of Grasshopper, as there is no persistent data in GH. IE if the Object component generates an ID for each input geometry, when you close and reopen the script, it won't be the same IDs.

In Rhino, however, you can get unique IDs. That's how I handled updating the geometry to the solved positions in FDMremote.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants