Import Content Layer Filter?

The layer name filter does not seem to filter the objects according to the layer and just outputs all objects found in the file.

Am I doing something wrong

How is this supposed to work?

import_content_layer_filter_problem.gh (21.2 KB)

geometry_in_two_layers_and_a_block.3dm (93.6 KB)

Hi Martin,

It looks to me like each filter is intended to filter only its own entity type. There is no association between objects and layers, say.

Regards
Jeremy

But you’d also say something’s wrong with this component?

No, I think it is doing what the designer intended. If you are looking to filter imported objects by layer then you need to use a filter rule, like this:


(Note that the K input option has to be set appropriately; the available options depend on what is plugged into C.)

import_content_layer_filter_problem J1.gh (35.6 KB)
(You’ll need to change the file location back to yours)

HTH
Jeremy

1 Like

Interesting.

What does the layer input on the import content component do?

It is a name filter which controls which layers get imported and appear at the Layer output. Affects nothing else.

What would you do with just the layer information?

I don’t really understand the benefit of having the layer filter but still have the whole content of a file imported.

Maybe someone regularly imports models and wants to import any layers they don’t have already. Or maybe they want to reorganise layers, or delete empty layers. Or match layers named in French to layers named in Danish. Or ???

I’d like to hear from the developers what their idea is.

@AndyPayne

@martinsiegrist I believe that @jeremy5 has done a really nice job outlining our intent with the Import Model Content component, including it’s use cases. We’re always open to suggestions as to how to improve these components, but I think he’s done a great job explaining why we’ve laid it out the way we have.

2 Likes

I’m pretty sure the scenario that someone wants to import just empty layers without content would work the same way no matter what the object output shows…

Thanks @Jeremy and @AndyPayne for your replies.

I think it would be more consistent to have the object output synchronized with the layer output.

The import content component has a name filter which imports just the objects with the specified name.

I think the import content component should work basically like the query model objetcs component.

The Rhino file contains two objects with the same name (A) and two blocks (Block 01, Block 02) on two different layers.

With a name filter (A), I’d expect the import content component to just import the two objects which have this name (A) and the layer output would show just the two layers (Layer 01, Layer 02).

Likewise when I filter for Block 0*, I get Blocks 01 and Block 02.

import_content_layer_filter.gh (22.1 KB)
import_content_layer_filter.3dm (101.8 KB)

1 Like

Hi Andy,

I’d love to see filters accepting RegEx’s. That would allow us to create arbitrarily complex filters without constantly badgering you for discreet increments to the filter functionality.

Regards
Jeremy

p.s. Thanks for the kind words above.

4 Likes