Grasshopper

algorithmic modeling for Rhino

Rhino imported geometry indeces into Grasshopper

Hi,

I imported a .dwg drawing in Rhino with closed polylines that I need to reference in Grasshopper. The catch is that I need to reference them with the same order(index) they are in the original file so I can match attributes to each. (sample file attached)`

I am trying to access ID information from  Rhino to Grasshopper. The file is composed of multiple closed polylines.

The part of the ID that I require is the specific list order the geometry file was saved in (which is saved in Rhino next to the ID within a bracket in the following format;

curve 
ID: 5a5b1eec-e3cc-42c6-9478-9144b970848f (16112)
Layer name: Unknown_Area_Type
Render Material: 
source = from layer
index = -1
Geometry:
Valid curve.
Closed polyline with 4 points.
(465592,3.96395e+06,2662), (466220,3.96396e+06,2662), ..., (465592,3.96395e+06,2662)
domain = 0 to 4
Geometry UserData:
UserData ID: 3B7FB506-437C-431e-B1D7-93C4CBFF417F
Plug-in: Rhino
description: Gumball grip frame
saved in file: yes
copy count: 1

I need to extract (this) number or else be able to select all geometry in the rhino file with the same order they are saved in Rhino.

Am I right in assuming the geometry order matches the order of the original file if I have not removed/added Geometry?

Any help with this will be greatly appreciated!

Views: 1351

Attachments:

Replies to This Discussion

Hello Kane,

this probably won't help, but the [Guid] component can provide you with the actual ID of each object (not the number inside the parenthesis you are after).

But I noticed in your file that if you select everything with one single selection window and reference them in GH then the objects will be sorted based on this number:

I am not sure this is always the case but maybe you can look into it some more....

ps. also noticed that if you select everything with Ctrl+A then they are sorted the oposite way (from higher to lower number)...

Thanks, was thinking that index is floating. Will test your observation, and let you know, after all I only need it to work one time, so I can link attributes to geometry. Thanks for you help!

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service