Grasshopper

algorithmic modeling for Rhino

I'm trying to get rid of all tree paths with this mask: {*;0;*} with Split, but for some reason the component is culling {0;*;*} instead! Just before this, I Split using the mask {*;*;0} which seems to work fine. Is this a bug?

Views: 5967

Attachments:

Replies to This Discussion

Here's the definition: of the above

Attachments:

Solved this myself with a wild stab in the dark.

Looks like using {?;0;*} got the result I wanted, which is counter-intuitive, since I thought "?" only applied to single digits. In all the searches I made for proper mask syntax, this was non-obvious.

The * is for any pattern which includes none

for example {*;0;*} can return {0;1;1}, {1;0;1} and  {1;1;0}

Yup, if you want to ensure exactly one digit before any zero, then you can use {?;0;...

If you want to ensure at least one digit before the zero, then you have to use {?;*;0;...

--

David Rutten

david@mcneel.com

Tirol, Austria

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service