# Eliminate elements from a list

**URL:** <https://discourse.mcneel.com/t/eliminate-elements-from-a-list/136118>\
**Category:** Grasshopper\
**Tags:** windows\
**Created:** [January 11, 2022, 11:01am UTC](https://discourse.mcneel.com/t/eliminate-elements-from-a-list/136118 "2022-01-11T11:01:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![simonnpro](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/simonnpro/32/344069_2.png) [@simonnpro](https://discourse.mcneel.com/u/simonnpro)\
**Post date:** [January 11, 2022, 11:01am UTC](https://discourse.mcneel.com/t/eliminate-elements-from-a-list/136118/1 "2022-01-11T11:01:30Z")

</div>

Hi all,

I have a surface on which I am projecting squares. I want to eliminate the squares that are not fully projected on the surface. I tried to do this with a cull pattern but this doesn’t seem to work

- How can you implement an if-statement in grasshopper?
- How can you eliminate Invalid Breps (in this case) from a list?  
 ![cull pattern](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/8/0/a/80aad241ccf7edf9657155f3a5919fa6adf90e69.png)

---

<div class="post-metadata">

**Author:** ![Japhy](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/japhy/32/487647_2.png) [@Japhy](https://discourse.mcneel.com/u/Japhy)\
**Post date:** [January 11, 2022, 1:23pm UTC](https://discourse.mcneel.com/t/eliminate-elements-from-a-list/136118/2 "2022-01-11T13:23:44Z")

</div>

Cull pattern is a list a true false values. In this case (2 values searched) you can use a Cset Component or Match Text

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/d/7/3/d739c8755c663f8584022dbd7b97676096669dfd.png)
