How do you use Contour Filter?

Does anyone know where to find documentation for the “Filter” feature of the Contour operation? It sounds useful, but I am not sure what the purpose of the feature is or how to use it.

1 Like

good question. given the following simple contour, notice there are 35 contour lines.

add a filter like this:

{
  slices(slice, index) {
    return index > 10 && index < 25
  }
}

and you will get a result like this:

1 Like

Thanks so much, and yes, very useful.

1 Like

the filter function gives you access to the internal Slice object, so it is theoretically possible to alter the contour lines as well. but that’s a deep read of the code situation. I want to add user pluggable functions as some point so that you can further augment KM functionality in profiles.