# Trim Mesh with Curve

**URL:** <https://discourse.mcneel.com/t/trim-mesh-with-curve/11951>\
**Category:** Rhino Developer\
**Created:** [September 26, 2014, 9:30am UTC](https://discourse.mcneel.com/t/trim-mesh-with-curve/11951 "2014-09-26T09:30:20Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jordy1989](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/jordy1989/32/282567_2.png) [@jordy1989](https://discourse.mcneel.com/u/jordy1989)\
**Post date:** [September 26, 2014, 9:30am UTC](https://discourse.mcneel.com/t/trim-mesh-with-curve/11951/1 "2014-09-26T09:30:20Z")

</div>

Hi,

How can I trim a Mesh with a curve?

Explanation of Mesh.Split = a Mesh or Plane or Array of Meshes.

---

<div class="post-metadata">

**Author:** ![dale](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/dale/32/772741_2.png) [@dale](https://discourse.mcneel.com/u/dale)\
**Post date:** [September 26, 2014, 3:47pm UTC](https://discourse.mcneel.com/t/trim-mesh-with-curve/11951/2 "2014-09-26T15:47:01Z")

</div>

There is no function in the SDK to trim a mesh with a curve. I’ll see to adding a wish list item.

What you can do is extrude the curve so is fully extends through the mesh. Then create a mesh from the extrusion. Then spit the target mesh with the new mesh using `Rhino.Geometry.Mesh.Split`. You will need to figure what piece to throw away what pieces to keep.

---

<div class="post-metadata">

**Author:** ![jordy1989](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/jordy1989/32/282567_2.png) [@jordy1989](https://discourse.mcneel.com/u/jordy1989)\
**Post date:** [September 26, 2014, 4:03pm UTC](https://discourse.mcneel.com/t/trim-mesh-with-curve/11951/3 "2014-09-26T16:03:56Z")

</div>

Oke thanks. That’s what I am doing at the moment. Thought of using the curve directly but couldn’t find the function.

Thanks for the reply.

---

<div class="post-metadata">

**Author:** ![bmartin](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/bmartin/32/514301_2.png) [@bmartin](https://discourse.mcneel.com/u/bmartin)\
**Post date:** [August 21, 2015, 5:15pm UTC](https://discourse.mcneel.com/t/trim-mesh-with-curve/11951/4 "2015-08-21T17:15:04Z")

</div>

Funny, I was just looking for the same stuff. Do we know if this feature has been implemented in Rhino yet?

---

<div class="post-metadata">

**Author:** ![dale](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/dale/32/772741_2.png) [@dale](https://discourse.mcneel.com/u/dale)\
**Post date:** [August 24, 2015, 5:19pm UTC](https://discourse.mcneel.com/t/trim-mesh-with-curve/11951/5 "2015-08-24T17:19:34Z")

</div>

No, not yet.

[http://mcneel.myjetbrains.com/youtrack/issue/RH-28813](http://mcneel.myjetbrains.com/youtrack/issue/RH-28813)

---

<div class="post-metadata">

**Author:** ![SergeyK](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/sergeyk/32/151264_2.png) [@SergeyK](https://discourse.mcneel.com/u/SergeyK)\
**Post date:** [April 25, 2019, 2:28pm UTC](https://discourse.mcneel.com/t/trim-mesh-with-curve/11951/6 "2019-04-25T14:28:04Z")

</div>

Hi.  
I’ve used the Rhino 6 and found ‘SplitMeshWithCurve’ command in the console, but I can’t understand how to use it in my C# plugin.

Best regards.

---

<div class="post-metadata">

**Author:** ![dale](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/dale/32/772741_2.png) [@dale](https://discourse.mcneel.com/u/dale)\
**Post date:** [April 25, 2019, 6:19pm UTC](https://discourse.mcneel.com/t/trim-mesh-with-curve/11951/7 "2019-04-25T18:19:28Z")

</div>

Hi @SergeyK,

RhinoCommon does not contain a method that will split a mesh with a curve. The best you can do, currently, is to script the `SplitMeshWithCurve` command using `RhinoApp.RunScript`.

> **[Run a Rhino command from a Plugin](https://developer.rhino3d.com/guides/rhinocommon/run-rhino-command-from-plugin/)**
>
> This guide covers the proper techniques when running a Rhino command from within the context of a plugin command.

– Dale
