# Offset mesh at various distances along the normal vertices

**URL:** <https://discourse.mcneel.com/t/offset-mesh-at-various-distances-along-the-normal-vertices/96851>\
**Category:** Grasshopper Developer\
**Tags:** plugin, grasshopper, mesh, vs, offset\
**Created:** [February 21, 2020, 9:45am UTC](https://discourse.mcneel.com/t/offset-mesh-at-various-distances-along-the-normal-vertices/96851 "2020-02-21T09:45:11Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlexWer](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/alexwer/32/438356_2.png) [@AlexWer](https://discourse.mcneel.com/u/AlexWer)\
**Post date:** [February 21, 2020, 9:45am UTC](https://discourse.mcneel.com/t/offset-mesh-at-various-distances-along-the-normal-vertices/96851/1 "2020-02-21T09:45:11Z")

</div>

Hello Guys

I know that a similar topic was discussed at the old forum and there is a plug-in for various mesh offsets at different vertices

> **[How offset a Mesh with different distance](https://www.grasshopper3d.com/forum/topics/how-offset-a-mesh-with-different-distance)**
>
> Hello,
> 
> I´m searching for a method which offsets a Mesh. But not the normal way (wboffset or offset srf) the surface which shall to be offset, should be in a d…

I decided to make a similar plugin myself, but unfortunately the method does not accept a dynamic array? but only 1 value is integer or double. Please tell me how can this be fixed?

[https://developer.rhino3d.com/api/RhinoCommon/html/Overload\_Rhino\_Geometry\_Mesh\_Offset.htm](https://developer.rhino3d.com/api/RhinoCommon/html/Overload_Rhino_Geometry_Mesh_Offset.htm)

I enclose my code

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

Tell me, please, maybe there are other methods and ways to do a mesh offset by a different amount?

[OffsetMeshVariableError.cs](https://discourse.mcneel.com/uploads/short-url/mp3gdcwSR6jjc2CpeKmaMSIveOy.cs) (2.7 KB)

---

<div class="post-metadata">

**Author:** ![dsonntag](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/dsonntag/32/529361_2.png) [@dsonntag](https://discourse.mcneel.com/u/dsonntag)\
**Post date:** [February 21, 2020, 10:01am UTC](https://discourse.mcneel.com/t/offset-mesh-at-various-distances-along-the-normal-vertices/96851/2 "2020-02-21T10:01:13Z")

</div>

What is your question exactly? You’ve already pointed out that Mesh.Offset only accepts a single value and doesn’t have an overload which accepts a value for each vertex. This cannot be “fixed”, if you want this functionality you have to write it yourself?

---

<div class="post-metadata">

**Author:** ![AlexWer](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/alexwer/32/438356_2.png) [@AlexWer](https://discourse.mcneel.com/u/AlexWer)\
**Post date:** [February 21, 2020, 10:16am UTC](https://discourse.mcneel.com/t/offset-mesh-at-various-distances-along-the-normal-vertices/96851/3 "2020-02-21T10:16:01Z")

</div>

maybe there is another way and method to offset the mesh?

---

<div class="post-metadata">

**Author:** ![Michael\_Pryor](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/michael_pryor/32/489117_2.png) [@Michael\_Pryor](https://discourse.mcneel.com/u/Michael_Pryor)\
**Post date:** [February 21, 2020, 10:33am UTC](https://discourse.mcneel.com/t/offset-mesh-at-various-distances-along-the-normal-vertices/96851/4 "2020-02-21T10:33:37Z")

</div>

You should use a list of input distances equal to the amount of mesh verts. Translate each vert by its corresponding distance in the direction of each verts normal, then reconstruct the mesh. You should use welded meshes here to ensure your “connected” verts don’t offset apart. Another tricky thing to consider is how to try and point the vert movement directions so that they won’t self intersect the mesh with other parts of the offset in concave offset conditions.

[https://developer.rhino3d.com/api/RhinoCommon/html/P\_Rhino\_Geometry\_Mesh\_Normals.htm](https://developer.rhino3d.com/api/RhinoCommon/html/P_Rhino_Geometry_Mesh_Normals.htm)

---

<div class="post-metadata">

**Author:** ![daby.leon](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/daby.leon/32/203290_2.png) [@daby.leon](https://discourse.mcneel.com/u/daby.leon)\
**Post date:** [February 21, 2020, 9:19pm UTC](https://discourse.mcneel.com/t/offset-mesh-at-various-distances-along-the-normal-vertices/96851/5 "2020-02-21T21:19:22Z")

</div>

Hey, AlexWer! I’m trying to achieve this double value in a offset mesh. Can you please tell me the name of the Plug-in that makes this?

Is it possible to make this in Rhino or do I need Grasshoper ??  
Thanks!

---

<div class="post-metadata">

**Author:** ![AlexWer](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/alexwer/32/438356_2.png) [@AlexWer](https://discourse.mcneel.com/u/AlexWer)\
**Post date:** [February 26, 2020, 2:18am UTC](https://discourse.mcneel.com/t/offset-mesh-at-various-distances-along-the-normal-vertices/96851/6 "2020-02-26T02:18:15Z")

</div>

Thank you very much for the answer and the link. I’ll try to write such an option 🙂

---

<div class="post-metadata">

**Author:** ![AlexWer](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/alexwer/32/438356_2.png) [@AlexWer](https://discourse.mcneel.com/u/AlexWer)\
**Post date:** [February 26, 2020, 2:20am UTC](https://discourse.mcneel.com/t/offset-mesh-at-various-distances-along-the-normal-vertices/96851/7 "2020-02-26T02:20:43Z")

</div>

Yes, the offset function of the mesh at different distances is in the plugin PhylloMachine  
its code can even be looked at [VB.NET](http://VB.NET)

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

---

<div class="post-metadata">

**Author:** ![daby.leon](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/daby.leon/32/203290_2.png) [@daby.leon](https://discourse.mcneel.com/u/daby.leon)\
**Post date:** [February 26, 2020, 10:41pm UTC](https://discourse.mcneel.com/t/offset-mesh-at-various-distances-along-the-normal-vertices/96851/8 "2020-02-26T22:41:13Z")

</div>

Thanks a lot! I’ll check it out! 🙂
