# Variable offset / thickness

**URL:** <https://discourse.mcneel.com/t/variable-offset-thickness/164200>\
**Category:** Grasshopper\
**Tags:** windows\
**Created:** [August 16, 2023, 10:58am UTC](https://discourse.mcneel.com/t/variable-offset-thickness/164200 "2023-08-16T10:58:50Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aaron\_Borin](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/aaron_borin/32/480744_2.png) [@Aaron\_Borin](https://discourse.mcneel.com/u/Aaron_Borin)\
**Post date:** [August 16, 2023, 10:58am UTC](https://discourse.mcneel.com/t/variable-offset-thickness/164200/1 "2023-08-16T10:58:50Z")

</div>

Hello All,

I would like to have a parametric offsetted surface with different values, starting from a given one (please check the file attached).  
It will be great to have a good control all over the surface, adjusting the values in certain areas (for example 15mm of thickness in the border / red area, 20mm in the yellow one and 10mm in the blue area).

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/5/0/b/50b789403d9149cdb93383d167f545725cc823cf.jpeg)

I’ve found this topic, which is a good example, but I woul like to have more control.

> [@Variable Thickness for Surface Offset](https://discourse.mcneel.com/t/variable-thickness-for-surface-offset/103979):
>
> I’m wondering if there is a way to offset a surface with variable distances along the surface? I want the offset to be tapered, thick on one end and thin on the other. I’ve attached my grasshopper definition so far which offsets a surface the same distance everywhere but I’m stuck on what to do next to get a variable offset. Many thanks for any help in advance! [surface\_thickness\_basic.gh](https://discourse.mcneel.com/uploads/short-url/74yuQ4KVjZD95ujFSmRHGOsQcY4.gh) (15.9 KB)

Any suggestion?  
Thank you

---

<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:** [August 16, 2023, 11:02am UTC](https://discourse.mcneel.com/t/variable-offset-thickness/164200/2 "2023-08-16T11:02:24Z")

</div>

Sure, simple. But you didn’t post a GH file. ☹

> [@Help Us Help You](https://discourse.mcneel.com/t/help-us-help-you/50034):
>
> Asking questions and getting answers is what this forum is all about. Although people are generally very helpful, there are things you can do to improve your chances of getting good and quick answers. Below you will find some suggestions, but don’t think of them as rules and especially don’t think of them as guarantees. 1. Choose a descriptive title for your post Don’t title your question Help! or I have a problem or Deadline tonight!, but actually describe the problem you are having. 2. Be s…

> **3. Attach minimal versions of all the relevant files**

---

<div class="post-metadata">

**Author:** ![Aaron\_Borin](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/aaron_borin/32/480744_2.png) [@Aaron\_Borin](https://discourse.mcneel.com/u/Aaron_Borin)\
**Post date:** [August 16, 2023, 11:03am UTC](https://discourse.mcneel.com/t/variable-offset-thickness/164200/3 "2023-08-16T11:03:51Z")

</div>

Sorry Joseph, You’re right.  
Here’s the file  
[Test1.3dm](https://discourse.mcneel.com/uploads/short-url/646DxUPRvIq1JBH4DqiJBefoipO.3dm) (123.8 KB)

---

<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:** [August 16, 2023, 11:06am UTC](https://discourse.mcneel.com/t/variable-offset-thickness/164200/4 "2023-08-16T11:06:59Z")

</div>

Your Rhino file doesn’t contain the red, blue and yellow curves. Is the red curve really necessary? How far is the transition between offset values?

---

<div class="post-metadata">

**Author:** ![martinsiegrist](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/martinsiegrist/32/772775_2.png) [@martinsiegrist](https://discourse.mcneel.com/u/martinsiegrist)\
**Post date:** [August 16, 2023, 11:08am UTC](https://discourse.mcneel.com/t/variable-offset-thickness/164200/5 "2023-08-16T11:08:28Z")

</div>

![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/c/7/8/c783de48cca9d84aeb6910628420f5865cb1ba8e.jpeg)

You can use Weaverbird to thicken the mesh.

Hovering the input shows the relevant info: One distance / vertex

[wb\_thicken\_mesh.gh](https://discourse.mcneel.com/uploads/short-url/cBYYMqfu5pvQsHU1iQqbAaXcH4d.gh) (10.4 KB)

PS: I thought this looks like a SubD, hence the mesh workflow.

---

<div class="post-metadata">

**Author:** ![Aaron\_Borin](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/aaron_borin/32/480744_2.png) [@Aaron\_Borin](https://discourse.mcneel.com/u/Aaron_Borin)\
**Post date:** [August 16, 2023, 11:14am UTC](https://discourse.mcneel.com/t/variable-offset-thickness/164200/6 "2023-08-16T11:14:09Z")

</div>

Yes, I need to keep an even offset on the boundary of the surface.  
This curves can be fine, I cannot share my current file, so I made a rough surface as an example.  
[Test1b.3dm](https://discourse.mcneel.com/uploads/short-url/fuSryLLP6SttGrr1eiLmVACrFbL.3dm) (164.9 KB)

---

<div class="post-metadata">

**Author:** ![Aaron\_Borin](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/aaron_borin/32/480744_2.png) [@Aaron\_Borin](https://discourse.mcneel.com/u/Aaron_Borin)\
**Post date:** [August 16, 2023, 11:23am UTC](https://discourse.mcneel.com/t/variable-offset-thickness/164200/7 "2023-08-16T11:23:52Z")

</div>

Hello.  
Yes, it was a SubD since it’s usually easier for me to adjust the basic surfaces in Rhino, but when I start working in GH i transform the SubD into Nurbs (the final output would be a iges/stp).  
WB seems to be powerful for my needs, is it possible to work with nurbs too?

---

<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:** [August 16, 2023, 11:24am UTC](https://discourse.mcneel.com/t/variable-offset-thickness/164200/8 "2023-08-16T11:24:24Z")

</div>

I’m not convinced that the red curve is necessary since it isn’t clear what difference it makes?

But your SubD is not a surface _(it’s a polysurface)_ so the method I had in mind won’t work.

---

<div class="post-metadata">

**Author:** ![martinsiegrist](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/martinsiegrist/32/772775_2.png) [@martinsiegrist](https://discourse.mcneel.com/u/martinsiegrist)\
**Post date:** [August 16, 2023, 11:25am UTC](https://discourse.mcneel.com/t/variable-offset-thickness/164200/9 "2023-08-16T11:25:19Z")

</div>

Instead of converting the SubD to Nurbs in Grasshopper, convert it to a mesh and then after all the manipulation back to SubD and then to Nurbs so you can export it as \*.step

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/6/e/6/6e678db0bc909cb79b337cb4675c00c01620c017.png)

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/b/0/5/b0535503242ba2ee1a25d46515bde613bf1c5b04.png)

[wb\_thicken\_subd.gh](https://discourse.mcneel.com/uploads/short-url/5tIcnGvHYafxMPMYTo9vN3IapQI.gh) (10.1 KB)

---

<div class="post-metadata">

**Author:** ![Aaron\_Borin](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/aaron_borin/32/480744_2.png) [@Aaron\_Borin](https://discourse.mcneel.com/u/Aaron_Borin)\
**Post date:** [August 16, 2023, 11:46am UTC](https://discourse.mcneel.com/t/variable-offset-thickness/164200/10 "2023-08-16T11:46:39Z")

</div>

I can convert the SubD into a Surface with this Flexibility plugin command, so your idea can be helpful.

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/6/d/f/6df7f16c6bdd7a172b7d372d7a420156550e43b7.png)  
But you can use the attached file too.  
[Test1c.3dm](https://discourse.mcneel.com/uploads/short-url/hLND4ndifBRX71pUZWf4pZK0ybg.3dm) (131.2 KB)

For my example, let’s say I want to have 15mm of thickness all around, except on the blue area, where the thickness should increase and the yellow one, where it should decrease.

---

<div class="post-metadata">

**Author:** ![Aaron\_Borin](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/aaron_borin/32/480744_2.png) [@Aaron\_Borin](https://discourse.mcneel.com/u/Aaron_Borin)\
**Post date:** [August 16, 2023, 11:53am UTC](https://discourse.mcneel.com/t/variable-offset-thickness/164200/11 "2023-08-16T11:53:18Z")

</div>

I guess I need to keep two separate nurbs, the “starting” surface and the “variable offsetted” surface, since after that I need to make several nurbs commands (trims, fillets, etc). The first will be the inner skin of the product that I’m modelling and the second will be the outer skin (it’s basically a shield, with holes, profiles and so on).

---

<div class="post-metadata">

**Author:** ![martinsiegrist](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/martinsiegrist/32/772775_2.png) [@martinsiegrist](https://discourse.mcneel.com/u/martinsiegrist)\
**Post date:** [August 16, 2023, 11:55am UTC](https://discourse.mcneel.com/t/variable-offset-thickness/164200/12 "2023-08-16T11:55:16Z")

</div>

In that case you’d use Weaverbird offset instead of thicken.

---

<div class="post-metadata">

**Author:** ![Aaron\_Borin](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/aaron_borin/32/480744_2.png) [@Aaron\_Borin](https://discourse.mcneel.com/u/Aaron_Borin)\
**Post date:** [August 16, 2023, 11:58am UTC](https://discourse.mcneel.com/t/variable-offset-thickness/164200/14 "2023-08-16T11:58:24Z")

</div>

Ok, cool! I’ll try.  
Thank you.

---

<div class="post-metadata">

**Author:** ![Aaron\_Borin](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/aaron_borin/32/480744_2.png) [@Aaron\_Borin](https://discourse.mcneel.com/u/Aaron_Borin)\
**Post date:** [August 16, 2023, 12:13pm UTC](https://discourse.mcneel.com/t/variable-offset-thickness/164200/15 "2023-08-16T12:13:00Z")

</div>

Is it possible to have a surface instead of a brep as a final output?  
In addition, what if I want to have smoother transition between the thickness variation?

Thanks

---

<div class="post-metadata">

**Author:** ![martinsiegrist](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/martinsiegrist/32/772775_2.png) [@martinsiegrist](https://discourse.mcneel.com/u/martinsiegrist)\
**Post date:** [August 16, 2023, 12:39pm UTC](https://discourse.mcneel.com/t/variable-offset-thickness/164200/16 "2023-08-16T12:39:59Z")

</div>

To create a surface from a mesh, the Warp Weft component can be used to extract two lists of mesh edges. These edges need to be joined into polylines and converted to curves and sorted ascending in X and Y to create a network surface.

The easiest way to create a smoother transition is to smoothen the mesh. You could also use some sort of an attractor or remap the numbers based on distance to the curve but that’s more complicated.

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

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/8/d/0/8d08ee7f0e78cb46ea1fe2cc3e6ec58a9f94bdea.jpeg)

[wb\_thicken\_subd\_to\_surface.gh](https://discourse.mcneel.com/uploads/short-url/2JcpfJhvk1HzXG1uD0MC9dCdkOj.gh) (31.7 KB)

---

<div class="post-metadata">

**Author:** ![Aaron\_Borin](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/aaron_borin/32/480744_2.png) [@Aaron\_Borin](https://discourse.mcneel.com/u/Aaron_Borin)\
**Post date:** [August 16, 2023, 1:22pm UTC](https://discourse.mcneel.com/t/variable-offset-thickness/164200/17 "2023-08-16T13:22:08Z")

</div>

Nice. Thank you so much!

---

<div class="post-metadata">

**Author:** ![lander](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/lander/32/511244_2.png) [@lander](https://discourse.mcneel.com/u/lander)\
**Post date:** [August 16, 2023, 5:27pm UTC](https://discourse.mcneel.com/t/variable-offset-thickness/164200/18 "2023-08-16T17:27:05Z")

</div>

> [@martinsiegrist](#):
>
> Instead of converting the SubD to Nurbs in Grasshopper, convert it to a mesh and then after all the manipulation back to SubD and then to Nurbs so you can export it as \*.step

> [@martinsiegrist](#):
>
> To create a surface from a mesh, the Warp Weft component can be used to extract two lists of mesh edges. These edges need to be joined into polylines and converted to curves and sorted ascending in X and Y to create a network surface.

This blows my mind.. Very amazing. This means Rhino is secretly a mesh master program 🤔 💭 🤯

wait ‘netwrksrf’ 🤯

Rhino pretty much capable of automating mesh to nurbs now 🤯, basically a reverse engineering program…

---

<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:** [August 16, 2023, 6:06pm UTC](https://discourse.mcneel.com/t/variable-offset-thickness/164200/19 "2023-08-16T18:06:20Z")

</div>

> [@Aaron\_Borin](#):
>
> For my example, let’s say I want to have 15mm of thickness all around, except on the blue area, where the thickness should increase and the yellow one, **where it should decrease**.

**Doh!** After doing the work, I noticed the bold part… more work. ☹  
Wait, -20 pushes the offset below the default 15 :exclamation, which looks wrong. ❗ ❓

Version ‘a’ is what I had in mind. It will be smoother if you increase ‘U Count’ slider input to SDivide, but it gets slow. Be patient.

 ![variable_offset_2023_Aug16a](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/b/a/b/bab91faccf1a31a2749c7fa7cbc321fd8e172f3b.png)  
[variable\_offset\_2023\_Aug16a.gh](https://discourse.mcneel.com/uploads/short-url/34O3wP1vO1dJsQfz2Jf67c7i0de.gh) (14.4 KB)

Version ‘b’ changes the ‘offY’ slider range to -40 to 40 so you can use -20 if you want.  
[variable\_offset\_2023\_Aug16b.gh](https://discourse.mcneel.com/uploads/short-url/zUuy9stbp9dYhoq9LIakPA6sFq0.gh) (18.7 KB)

**P.S.** You didn’t mention a transition range outside the curves so I ignored that part.

**P.P.S.** I could have used surface normals instead of Z to move points but it looks weird at the edges.

 ![variable_offset_2023_Aug16c](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/2/5/4/25498ea00d38664e1af9a0cbc153d010e5846a4c.png)  
[variable\_offset\_2023\_Aug16c.gh](https://discourse.mcneel.com/uploads/short-url/4VHsY2p2ZP3OAaqwBiFuLkNhlGd.gh) (15.3 KB)

---

<div class="post-metadata">

**Author:** ![Aaron\_Borin](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/aaron_borin/32/480744_2.png) [@Aaron\_Borin](https://discourse.mcneel.com/u/Aaron_Borin)\
**Post date:** [August 17, 2023, 7:27am UTC](https://discourse.mcneel.com/t/variable-offset-thickness/164200/20 "2023-08-17T07:27:49Z")

</div>

Thanks for your solution. I’ll try it with the normals instead the Z on the surface that I’m working on now.  
Which is the smartest way to have a transition range (so some smoothness) outside of an area?  
As shown in the image below, with the max thickness (let’s say 20mm) inside the yellow area, the transition between the yellow and the blue and the min thickness outside. My aim here is to have a really smooth transition, better if the areas are not visible and the surface doesn’t shows “bumps”.

Thank you!

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/b/1/c/b1c53653b24af9a1a96d5b49dd9d1b7cc7648a25.jpeg)  
[Test1d.3dm](https://discourse.mcneel.com/uploads/short-url/cpLowAiYgvJ6r0sQtYaXB8KOHiy.3dm) (183.4 KB)

---

<div class="post-metadata">

**Author:** ![martinsiegrist](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/martinsiegrist/32/772775_2.png) [@martinsiegrist](https://discourse.mcneel.com/u/martinsiegrist)\
**Post date:** [August 17, 2023, 7:53am UTC](https://discourse.mcneel.com/t/variable-offset-thickness/164200/21 "2023-08-17T07:53:52Z")

</div>

![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/3/0/e/30e431639480c9dde89451663ce1e2bcf2c51d9a.png)

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

Here’s another option:

The offset is created on a planar surface instead of a modified surface.

BlendSrf can be used to create a smooth transition. Alternatively the transition could also be created with Sweep2.

FlowAlongSrf is used to morph the Nurbs from a planar base surface to a modified, three dimensional surface.

[Test1d.3dm](https://discourse.mcneel.com/uploads/short-url/pEAptdsVyYr05p5kcNo7UU0GuXK.3dm) (443.1 KB)

[Next page](https://discourse.mcneel.com/t/variable-offset-thickness/164200.md?page=2)
