# Splitting curves where they intersect the surface

**URL:** <https://discourse.mcneel.com/t/splitting-curves-where-they-intersect-the-surface/192933>\
**Category:** Grasshopper\
**Tags:** windows\
**Created:** [October 13, 2024, 1:36pm UTC](https://discourse.mcneel.com/t/splitting-curves-where-they-intersect-the-surface/192933 "2024-10-13T13:36:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlgoRitmo](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/algoritmo/32/660097_2.png) [@AlgoRitmo](https://discourse.mcneel.com/u/AlgoRitmo)\
**Post date:** [October 13, 2024, 1:36pm UTC](https://discourse.mcneel.com/t/splitting-curves-where-they-intersect-the-surface/192933/1 "2024-10-13T13:36:30Z")

</div>

I have some curves that intersect with a surface, and I only want to keep the parts of the curves that are above the surface. I don’t know how to proceed after extracting the intersection points. Thank you.

 ![Pregunta1](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/7/b/2/7b2e15a4acd6e5dbf7985183f9aa9a54cbe4a57f.jpeg)  
 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/5/f/1/5f1f2ab15c9c3ee4d8774384f71226b54c55e847.png)

---

<div class="post-metadata">

**Author:** ![Gijs](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/gijs/32/481553_2.png) [@Gijs](https://discourse.mcneel.com/u/Gijs)\
**Post date:** [October 13, 2024, 1:46pm UTC](https://discourse.mcneel.com/t/splitting-curves-where-they-intersect-the-surface/192933/2 "2024-10-13T13:46:26Z")

</div>

Shatter the curves using the intersection points. Then for each curve segment, check if their midpoint has a Z height \> the plane’s height, assuming the plane is parallel to the WorldXY:

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/2/3/1/2319d11d0ee2cd49ee98035a1f7d5aee7d482fa6.png)

---

<div class="post-metadata">

**Author:** ![AlgoRitmo](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/algoritmo/32/660097_2.png) [@AlgoRitmo](https://discourse.mcneel.com/u/AlgoRitmo)\
**Post date:** [October 13, 2024, 2:07pm UTC](https://discourse.mcneel.com/t/splitting-curves-where-they-intersect-the-surface/192933/3 "2024-10-13T14:07:08Z")

</div>

Thank you very much. It worked 🙂
