Divide different geometry from import geometry

I imported different geometries from a 3dm.file (mesh, curve, points).
7 points within one layer called “points7”
1 mesh
1 curve
2 points within an other layer called “ver”
2 points within an ohter layer called “hor”

I’d like to divide these different geometries to a mesh and a curve. I did it by list-number!s
I’d like to divide 7 points with the same layer-name to the geometry “point”
I’d like to divide 2 points with the same layer-name to an other geometry “point”
I’d like to divide 2 points with the same layer-name to an other geometry" point"

  1. I do not know how to select specific points from one layer-name to the geometry “point”
  2. If the geometries are in a other way sorted, i can not work by list-numbers!

I’m not sure if this is what you want or not, but it’s an attempt…

And here’s the grasshopper file. I used an IronPython2 component, but you could use a Python3 component, too, I’m sure.
layer_filter.gh (7.0 KB)

Hi @Martin_Burger, when importing with the ShapeDiver import component, you can get all the attributes that are attached to the geometry (layer, name, color, etc.) by using the Extract Attributes component.

Here is a complete written documentation of how to use the attributes system: Attributes

If you need further help, please let me know.

Hello @edsahergom.
I got the idea with attributes to inject and deconstruct. But how do I do with multiple geometries in 1 3dm-file to differantiate them to specific geometries (mesh, points, curves) by layer? I’d like to work on with these geometries on there own?

Or in other words: I like to load only one 3dm-file (with different geometries; seperated by layers). Then I like to seperate these by the layer, because the order of these geometries are not always the same order). Then I like to process each geometrie in that specific layer)

Best Regards
Martin

I just tested this and, as far as I can see, the Import Geometry component is already returning different tree branches for different layers of the imported 3dm file:

So theoretically, you would not have to do anything. But for the sake of the demonstration, let’s assume you are getting a non-sorted list of geometry belonging to various layers.

Case 1: You want to retrieve all the geometry belong to a specific layer, and you know the name of the layer in question.

Use the components suggested by Edwin above andfind all objects whose layer attribute matches the one you want:

Case 2: You have an undisclosed number of layers with unknown names and you want to separate them.

You could make a set and match the pattern for all individual layers. In Rhino 8, the filter components might help make this simpler:

Attached below the Grasshopper definition and 3dm file.

240514_GeometryByLayer.gh (10.9 KB)
GeometryByLayer.3dm (72.9 KB)

Case 1 works really fine for me!

The behavour of changing values in shapediver altered! It was asynchron. Now it is synchron! Could I change ist in my shapediver properties?

Thanks Mathieu

I am not sure I understand the issue and what you are trying to do. Could you explain further and possibly share an example?

Sorry! shapediver - general settings - “disable parameters during updates” was disabled!