# Offset Polysurface problem

**URL:** <https://discourse.mcneel.com/t/offset-polysurface-problem/143197>\
**Category:** Scripting\
**Tags:** windows, developer\
**Created:** [May 30, 2022, 8:51am UTC](https://discourse.mcneel.com/t/offset-polysurface-problem/143197 "2022-05-30T08:51:24Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![ahmedwael.si](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/ahmedwael.si/32/765296_2.png) [@ahmedwael.si](https://discourse.mcneel.com/u/ahmedwael.si)\
**Post date:** [May 30, 2022, 8:51am UTC](https://discourse.mcneel.com/t/offset-polysurface-problem/143197/1 "2022-05-30T08:51:24Z")

</div>

Hello,  
Is there an equivalent function to Grasshopper’s Cap Holes Ex in RhinoCommon? I only found Brep.CapPlanarholes.  
I am trying to create a solid offsetted Brep using a GH custom component, calling the Brep. CreateOffsetBrep method, choosing true for solid. The result is an open Brep. When I plug it into Cap Holes ex, it produces an invalid Brep.  
This is why I was looking for the equivalent method in RhinoCommon to try to debug it, or else see if there could be another way to Debug this?  
Thanks a lot in advance!

---

<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:** [May 30, 2022, 8:58am UTC](https://discourse.mcneel.com/t/offset-polysurface-problem/143197/2 "2022-05-30T08:58:01Z")

</div>

You might want to post your Rhino file so someone can take a look at your object…

---

<div class="post-metadata">

**Author:** ![ahmedwael.si](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/ahmedwael.si/32/765296_2.png) [@ahmedwael.si](https://discourse.mcneel.com/u/ahmedwael.si)\
**Post date:** [May 30, 2022, 9:11am UTC](https://discourse.mcneel.com/t/offset-polysurface-problem/143197/3 "2022-05-30T09:11:41Z")

</div>

Thank you Martin, for reply.  
Here it is the Rhino Model I am trying to solid-offset  
[Model before offset.3dm](https://discourse.mcneel.com/uploads/short-url/eYhkonmSJ6PcBHxcOWzgmt2CfAl.3dm) (305.5 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:** [May 30, 2022, 9:18am UTC](https://discourse.mcneel.com/t/offset-polysurface-problem/143197/4 "2022-05-30T09:18:03Z")

</div>

How much and in which direction? The attached file contains a closed polysurface with two problems. It might make sense to offset before applying the fillets.

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

[offset.3dm](https://discourse.mcneel.com/uploads/short-url/ekQJvfULI4jY0FlScMTc7Au7XZ.3dm) (1.2 MB)

---

<div class="post-metadata">

**Author:** ![ahmedwael.si](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/ahmedwael.si/32/765296_2.png) [@ahmedwael.si](https://discourse.mcneel.com/u/ahmedwael.si)\
**Post date:** [May 30, 2022, 9:30am UTC](https://discourse.mcneel.com/t/offset-polysurface-problem/143197/5 "2022-05-30T09:30:38Z")

</div>

Thank you for the file ! The rhino command does a better job than using grasshopper for solid offsetting.  
In my case, I was trying to do it in the upper direction with a distance of 0.02 (meters).  
Could you please elaborate on what you mean by offset before applying the fillets? I am not sure I get it.

---

<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:** [May 30, 2022, 9:39am UTC](https://discourse.mcneel.com/t/offset-polysurface-problem/143197/6 "2022-05-30T09:39:06Z")

</div>

Fillets often cause offsets to fail. A model without fillets is generally simpler and easier to edit.

But, 0.02 upwards works fine with this script… Sorry I lost track and I do not know in which topic I found the script.

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

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

[c\_brep\_offset.gh](https://discourse.mcneel.com/uploads/short-url/1NGDFqYyGJAKv1XQORpRdINKXtx.gh) (148.9 KB)

PS: I think you should rename the topic into something like “Offset polysurface problem”

---

<div class="post-metadata">

**Author:** ![ahmedwael.si](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/ahmedwael.si/32/765296_2.png) [@ahmedwael.si](https://discourse.mcneel.com/u/ahmedwael.si)\
**Post date:** [May 30, 2022, 9:47am UTC](https://discourse.mcneel.com/t/offset-polysurface-problem/143197/7 "2022-05-30T09:47:34Z")

</div>

Thank you so much ! I renamed the subject as suggested.  
Have a great day !

---

<div class="post-metadata">

**Author:** ![lopez](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/lopez/32/771582_2.png) [@lopez](https://discourse.mcneel.com/u/lopez)\
**Post date:** [April 8, 2024, 6:11pm UTC](https://discourse.mcneel.com/t/offset-polysurface-problem/143197/8 "2024-04-08T18:11:37Z")

</div>

WOAUW!  
Thanks a lot!  
Do You have an Updated version ( old component in grasshopper rhino 8 Mac, but it works!)?  
Is it possible to do the same with Python 3?  
Roy

---

<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:** [April 9, 2024, 4:55am UTC](https://discourse.mcneel.com/t/offset-polysurface-problem/143197/9 "2024-04-09T04:55:08Z")

</div>

I don’t know how to do that in python. It works fine in c#…
