# Keep surface edges planar in an undulated surface

**URL:** <https://discourse.mcneel.com/t/keep-surface-edges-planar-in-an-undulated-surface/119129>\
**Category:** Grasshopper\
**Tags:** windows\
**Created:** [February 24, 2021, 6:58am UTC](https://discourse.mcneel.com/t/keep-surface-edges-planar-in-an-undulated-surface/119129 "2021-02-24T06:58:44Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![jehgar](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/jehgar/32/345767_2.png) [@jehgar](https://discourse.mcneel.com/u/jehgar)\
**Post date:** [February 24, 2021, 6:58am UTC](https://discourse.mcneel.com/t/keep-surface-edges-planar-in-an-undulated-surface/119129/1 "2021-02-24T06:58:45Z")

</div>

I created a surface that is rippled, and even though the edges of the surface look planar, when the points are deconstructed, the Z axis shows that none of those points are actually on the ground plane. Any advice on solving this issue?

Thank you  
[PlanarTowardsEdge.gh](https://discourse.mcneel.com/uploads/short-url/g3qGhUdEq4WtGfvfBN8hAzLzeTa.gh) (15.9 KB)

 ![PlanarTowardsEdge_Front](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/8/d/1/8d19ee7b17619359c2720e154ed602b7fd87b307.jpeg) ![PlanarTowardsEdge_Persp](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/a/3/9/a39a3a9090d3fbd61bd5d44f854a0b71d0b6674d.jpeg)  
 ![PlanarTowardsEdgeDef](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/7/9/5/79546293a0c17666239066196881cd39bbf6d6a4.png)

---

<div class="post-metadata">

**Author:** ![Joseph\_Oster](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/joseph_oster/32/549124_2.png) [@Joseph\_Oster](https://discourse.mcneel.com/u/Joseph_Oster)\
**Post date:** [February 24, 2021, 11:33am UTC](https://discourse.mcneel.com/t/keep-surface-edges-planar-in-an-undulated-surface/119129/2 "2021-02-24T11:33:29Z")

</div>

> [@Undulating surface keeping edges straight](https://discourse.mcneel.com/t/undulating-surface-keeping-edges-straight/97070/19):
>
> Fillet the perimeter curve and ignore points outside of it? [undulating\_surface\_2020Feb25b.gh](https://discourse.mcneel.com/uploads/short-url/40nDzf10fZFVIFowDqfuM24irZO.gh) (23.7 KB)

[![](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/c/f/cf14ad91c411a29debba224bb0de42f8c3a6e9f2.png) ](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/c/f/cf14ad91c411a29debba224bb0de42f8c3a6e9f2.png)

---

<div class="post-metadata">

**Author:** ![jehgar](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/jehgar/32/345767_2.png) [@jehgar](https://discourse.mcneel.com/u/jehgar)\
**Post date:** [February 24, 2021, 2:46pm UTC](https://discourse.mcneel.com/t/keep-surface-edges-planar-in-an-undulated-surface/119129/3 "2021-02-24T14:46:33Z")

</div>

Thank you for the response. I looked at that definition when initially trying to work through the issue, but I want to avoid trimming off any excess part of the surface.

When I use a rectangular surface, I’m able to get the edges of the surface to be planar, but anytime I introduce a more complex curve, as in this case a circle, the surface edges tend to not be planar.

Any advice?

---

<div class="post-metadata">

**Author:** ![Joseph\_Oster](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/joseph_oster/32/549124_2.png) [@Joseph\_Oster](https://discourse.mcneel.com/u/Joseph_Oster)\
**Post date:** [February 24, 2021, 3:22pm UTC](https://discourse.mcneel.com/t/keep-surface-edges-planar-in-an-undulated-surface/119129/4 "2021-02-24T15:22:59Z")

</div>

I added a snippet of my code _(white and cyan groups)_ to yours and got a much flatter curvature graph. My code is somewhat redundant to yours with the difference being that you are getting non-zero values outside the circle while I am not, thanks to the cyan group.

 ![PlanarTowardsEdge_2021Feb24a](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/7/0/e/70e1d01feaa1d8077f6a826fc982d388e5cfe748.png)  
[PlanarTowardsEdge\_2021Feb24a.gh](https://discourse.mcneel.com/uploads/short-url/1WY3rXbGPq3rzvYnViJ0PxpLHhX.gh) (30.7 KB)

Not sure why it shows any at all though? When I increase my ‘Range’ slider value to 0.335 it gets flatter but above that value gets rippley again.

 ![PlanarTowardsEdge_2021Feb24a2](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/0/2/a/02a35cc864961396731a0540388979b49f6e852c.png)

---

<div class="post-metadata">

**Author:** ![Joseph\_Oster](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/joseph_oster/32/549124_2.png) [@Joseph\_Oster](https://discourse.mcneel.com/u/Joseph_Oster)\
**Post date:** [February 24, 2021, 7:19pm UTC](https://discourse.mcneel.com/t/keep-surface-edges-planar-in-an-undulated-surface/119129/5 "2021-02-24T19:19:32Z")

</div>

> [@jehgar](#):
>
> I want to avoid trimming off any excess part of the surface.

I don’t see how to create a circular untrimmed surface from SrfGrid?  
And I don’t see how to make linear ripples on RevSrf? _(Untrimmed Surface)_

---

<div class="post-metadata">

**Author:** ![jehgar](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/jehgar/32/345767_2.png) [@jehgar](https://discourse.mcneel.com/u/jehgar)\
**Post date:** [February 24, 2021, 7:53pm UTC](https://discourse.mcneel.com/t/keep-surface-edges-planar-in-an-undulated-surface/119129/6 "2021-02-24T19:53:19Z")

</div>

I was using a circle as example geometry, in reality the shape is less uniform. The snippet you added helps. But if one was to zoom in closely in a right or front view, you can see the curvature graph is not planar. Because the curvature graph says the edges are not planar (even though the curve panel does?), any time I increase the height of the ripples, the curvature graph also exponentially gets larger which leaves me little room to play around with the surface. Thank you for the help so far, if you have any more advice that would be greatly appreciated.

[PlanarTowardsEdge\_v2.gh](https://discourse.mcneel.com/uploads/short-url/mgDluqw2TVfIbRpmjqyc85sSvPt.gh) (23.0 KB)

 ![PlanarTowardsEdgeDef_v2](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/6/d/4/6d4420510078a69eee2569599e169fcf8f6952f9.png) ![PTE_Front](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/c/2/e/c2e4ccaa971f3b82866bd8d03d57d855f3cde3c1.jpeg) ![PTE_Persp](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/1/c/7/1c71d63e45545d934281f0f673d3a1970f675d61.jpeg)

---

<div class="post-metadata">

**Author:** ![Joseph\_Oster](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/joseph_oster/32/549124_2.png) [@Joseph\_Oster](https://discourse.mcneel.com/u/Joseph_Oster)\
**Post date:** [February 24, 2021, 8:23pm UTC](https://discourse.mcneel.com/t/keep-surface-edges-planar-in-an-undulated-surface/119129/7 "2021-02-24T20:23:22Z")

</div>

Is this important?

![missing](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/8/f/0/8f0c873b52fd879fba5fe5c24a5d7a72dba4f8a2.png)

You missed a detail in transposing my contribution _(or just ignored it?)_ since you have ripples outside of your curve. And you lost the ‘Range’ slider. I added those bits back and see a smoother curvature graph, though it still has a few very small vertical anomalies. Most of the graph is measuring the project/split results rather than vertical displacement.

 ![PlanarTowardsEdge_2021Feb24b](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/5/a/c/5ac9bcd311825e387ecda0672fd69d8b5655622d.png)  
[PlanarTowardsEdge\_2021Feb24b.gh](https://discourse.mcneel.com/uploads/short-url/bU8j39J2baCPhllQzpyGkMqcim2.gh) (34.3 KB)

---

<div class="post-metadata">

**Author:** ![jehgar](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/jehgar/32/345767_2.png) [@jehgar](https://discourse.mcneel.com/u/jehgar)\
**Post date:** [February 24, 2021, 8:53pm UTC](https://discourse.mcneel.com/t/keep-surface-edges-planar-in-an-undulated-surface/119129/8 "2021-02-24T20:53:01Z")

</div>

Thank you for the response, the lunch box component is not important.

I originally had that extra range slider that you provided in the definition, and although it did smooth out the curvature a bit, the edge of the surface wasn’t completely planar so I ended up removing it to try something else. I am just stumped at the issue at hand. When I divide the surface edge in the and get the Z height of those points, although they are incredibly small, they still are not 0. Nonetheless, thank you for the help.

 ![PTE_ZHeight](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/4/0/4/40484cb307df2a08778d9ce327d09abbccc9d300.png)
