# Offset planar curve issues solved with Clipper

**URL:** <https://discourse.mcneel.com/t/offset-planar-curve-issues-solved-with-clipper/133885>\
**Category:** Grasshopper\
**Tags:** windows, mac, offset, clipper\
**Created:** [November 24, 2021, 3:47pm UTC](https://discourse.mcneel.com/t/offset-planar-curve-issues-solved-with-clipper/133885 "2021-11-24T15:47:59Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![martinsiegrist](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/martinsiegrist/32/498369_2.png) [@martinsiegrist](https://discourse.mcneel.com/u/martinsiegrist)\
**Post date:** [November 24, 2021, 3:47pm UTC](https://discourse.mcneel.com/t/offset-planar-curve-issues-solved-with-clipper/133885/1 "2021-11-24T15:47:59Z")

</div>

Does the Offset Curve component have a maximum number of control points it can handle? My curve has 6812 control points and the offset fails after a certain percentage. I can flip the curve and the problem occurs on the other end of the curve.

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

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/2/2/b/22b5c10464d7e368bc21d9df7cfef03de574ded7.png)

---

<div class="post-metadata">

**Author:** ![dfytz1](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/dfytz1/32/478701_2.png) [@dfytz1](https://discourse.mcneel.com/u/dfytz1)\
**Post date:** [November 24, 2021, 4:52pm UTC](https://discourse.mcneel.com/t/offset-planar-curve-issues-solved-with-clipper/133885/2 "2021-11-24T16:52:23Z")

</div>

Attach your file please!

---

<div class="post-metadata">

**Author:** ![martinsiegrist](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/martinsiegrist/32/498369_2.png) [@martinsiegrist](https://discourse.mcneel.com/u/martinsiegrist)\
**Post date:** [November 24, 2021, 6:48pm UTC](https://discourse.mcneel.com/t/offset-planar-curve-issues-solved-with-clipper/133885/3 "2021-11-24T18:48:52Z")

</div>

This won’t be possible. It’s much rather a question to the developers whether the command has an actual maximum number of points it is capable of processing.

---

<div class="post-metadata">

**Author:** ![jordi.arcas](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/jordi.arcas/32/575651_2.png) [@jordi.arcas](https://discourse.mcneel.com/u/jordi.arcas)\
**Post date:** [November 25, 2021, 7:29am UTC](https://discourse.mcneel.com/t/offset-planar-curve-issues-solved-with-clipper/133885/4 "2021-11-25T07:29:00Z")

</div>

Hey Martin,

I think it is not about the nº of control points but about the curve itself. I have done an intersection between a mesh and a plane, getting a sagged curve like yours and then test it.  
Here the results:

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

---

<div class="post-metadata">

**Author:** ![martinsiegrist](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/martinsiegrist/32/498369_2.png) [@martinsiegrist](https://discourse.mcneel.com/u/martinsiegrist)\
**Post date:** [November 25, 2021, 8:47am UTC](https://discourse.mcneel.com/t/offset-planar-curve-issues-solved-with-clipper/133885/5 "2021-11-25T08:47:06Z")

</div>

I attached a simplified example. Why does the offset fail on this curve?

Please note, I’m working with an interpolated curve, not a polyline.

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

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/6/0/f/60fca41ca0dd34bf44a9bd61946a1784e88f4568.png)

[21\_11\_25\_offset\_fail.gh](https://discourse.mcneel.com/uploads/short-url/abvtAcFeJVBGKJxnnl20oKCq7Hi.gh) (23.9 KB)

---

<div class="post-metadata">

**Author:** ![inno](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/inno/32/544036_2.png) [@inno](https://discourse.mcneel.com/u/inno)\
**Post date:** [November 25, 2021, 11:28am UTC](https://discourse.mcneel.com/t/offset-planar-curve-issues-solved-with-clipper/133885/6 "2021-11-25T11:28:10Z")

</div>

it definitely looks like there might be a cap somewhere

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

---

<div class="post-metadata">

**Author:** ![jordi.arcas](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/jordi.arcas/32/575651_2.png) [@jordi.arcas](https://discourse.mcneel.com/u/jordi.arcas)\
**Post date:** [November 25, 2021, 1:09pm UTC](https://discourse.mcneel.com/t/offset-planar-curve-issues-solved-with-clipper/133885/7 "2021-11-25T13:09:58Z")

</div>

Could this be a hardware cap?

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/4/6/b/46bba45ace4447d856bf728c514bfd12ce85e4f5.jpeg)

---

<div class="post-metadata">

**Author:** ![martinsiegrist](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/martinsiegrist/32/498369_2.png) [@martinsiegrist](https://discourse.mcneel.com/u/martinsiegrist)\
**Post date:** [November 25, 2021, 1:15pm UTC](https://discourse.mcneel.com/t/offset-planar-curve-issues-solved-with-clipper/133885/8 "2021-11-25T13:15:09Z")

</div>

Well Jordi, you changed the input values. And it seems you might have different tolerance settings. Or for some reason your offset curve has 20’000 something control points while mine has 37117 control points.

Below is my system info:

> **System info Martin Siegrist workstation**
>
> Rhino 7 SR13 2021-11-16 (Rhino 7, 7.13.21320.13001, Git hash:master @ e803eedb640e6d2f37b95fd3d0eac5af5532def7)  
> License type: Kommerziell, build 2021-11-16  
> License details: Cloud Zoo
> 
> Windows 10.0.19043 SR0.0 or greater (Physical RAM: 1.3e+02Gb)
> 
> Computer platform: DESKTOP
> 
> Standard graphics configuration.  
> Primary display and OpenGL: NVIDIA RTX A5000 (NVidia) Memory: 24GB, Driver date: 10-13-2021 (M-D-Y). OpenGL Ver: 4.6.0 NVIDIA 472.39  
> \> Accelerated graphics device with 4 adapter port(s)  
> - Secondary monitor attached to adapter port #0  
> - Windows Main Display attached to adapter port #1  
> - Secondary monitor attached to adapter port #2
> 
> OpenGL Settings  
> Safe mode: Off  
> Use accelerated hardware modes: On  
> Redraw scene when viewports are exposed: On  
> Graphics level being used: OpenGL 4.6 (primary GPU’s maximum)
> 
> Anti-alias mode: 4x  
> Mip Map Filtering: Linear  
> Anisotropic Filtering Mode: High
> 
> Vendor Name: NVIDIA Corporation  
> Render version: 4.6  
> Shading Language: 4.60 NVIDIA  
> Driver Date: 10-13-2021  
> Driver Version: 30.0.14.7239  
> Maximum Texture size: 32768 x 32768  
> Z-Buffer depth: 24 bits  
> Maximum Viewport size: 32768 x 32768  
> Total Video Memory: 24564 MB
> 
> Rhino plugins that do not ship with Rhino  
> C:\Users\martinsiegrist\AppData\Roaming\McNeel\Rhinoceros\7.0\Plug-ins\KeyShot9RhinoPlugin (ecfe8d1f-876a-460f-aa5e-3dd816936811)\1.4.0.0\KeyShot9RhinoPlugin\Rhino 7\KeyShot9RhinoPlugin.rhp “KeyShot9RhinoPlugin” 1.4.0.0  
> C:\Users\martinsiegrist\AppData\Roaming\McNeel\Rhinoceros\packages\7.0\EleFront\4.2.2\ElefrontProperties.rhp “ElefrontProperties” 1.0.0.0
> 
> Rhino plugins that ship with Rhino  
> C:\Program Files\Rhino 7\Plug-ins\Commands.rhp “Commands” 7.13.21320.13001  
> C:\Program Files\Rhino 7\Plug-ins\rdk.rhp “Renderer Development Kit”   
> C:\Program Files\Rhino 7\Plug-ins\RhinoRenderCycles.rhp “Rhino Render” 7.13.21320.13001  
> C:\Program Files\Rhino 7\Plug-ins\rdk\_etoui.rhp “RDK\_EtoUI” 7.13.21320.13001  
> C:\Program Files\Rhino 7\Plug-ins\rdk\_ui.rhp “Renderer Development Kit UI”   
> C:\Program Files\Rhino 7\Plug-ins\NamedSnapshots.rhp “Snapshots”   
> C:\Program Files\Rhino 7\Plug-ins\RhinoCycles.rhp “RhinoCycles” 7.13.21320.13001  
> C:\Program Files\Rhino 7\Plug-ins\Toolbars\Toolbars.rhp “Toolbars” 7.13.21320.13001  
> C:\Program Files\Rhino 7\Plug-ins\3dxrhino.rhp “3Dconnexion 3D Mouse”   
> C:\Program Files\Rhino 7\Plug-ins\Displacement.rhp “Displacement”

---

<div class="post-metadata">

**Author:** ![jordi.arcas](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/jordi.arcas/32/575651_2.png) [@jordi.arcas](https://discourse.mcneel.com/u/jordi.arcas)\
**Post date:** [November 25, 2021, 2:21pm UTC](https://discourse.mcneel.com/t/offset-planar-curve-issues-solved-with-clipper/133885/9 "2021-11-25T14:21:17Z")

</div>

Rhino 7 SR12 2021-11-9 (Rhino 7, 7.12.21313.06341)  
Windows 10.0.19043 SR0.0 or greater (Physical RAM: 30Gb)

Computer platform: DESKTOP

Standard graphics configuration.  
Primary display and OpenGL: NVIDIA GeForce GTX 1080 Ti (NVidia) Memory: 11GB, Driver date: 11-6-2020 (M-D-Y). OpenGL Ver: 4.6.0 NVIDIA 457.30  
\> Accelerated graphics device with 4 adapter port(s)  
- Secondary monitor attached to adapter port #0  
- Windows Main Display attached to adapter port #1

OpenGL Settings  
Safe mode: Off  
Use accelerated hardware modes: On  
Redraw scene when viewports are exposed: On  
Graphics level being used: OpenGL 4.6 (primary GPU’s maximum)

Anti-alias mode: 4x  
Mip Map Filtering: Linear  
Anisotropic Filtering Mode: High

Vendor Name: NVIDIA Corporation  
Render version: 4.6  
Shading Language: 4.60 NVIDIA  
Driver Date: 11-6-2020  
Driver Version: 27.21.14.5730  
Maximum Texture size: 32768 x 32768  
Z-Buffer depth: 24 bits  
Maximum Viewport size: 32768 x 32768  
Total Video Memory: 11 GB

Model Units: Milimeters  
Absolute Tolerance: 0.01 units  
Angle Tolerance:1.0 degrees

Length: 3.7524e+6  
Nº of Points: 43437

---

<div class="post-metadata">

**Author:** ![martinsiegrist](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/martinsiegrist/32/498369_2.png) [@martinsiegrist](https://discourse.mcneel.com/u/martinsiegrist)\
**Post date:** [November 25, 2021, 10:13pm UTC](https://discourse.mcneel.com/t/offset-planar-curve-issues-solved-with-clipper/133885/10 "2021-11-25T22:13:10Z")

</div>

I don’t think this has to do with hardware specs.

---

<div class="post-metadata">

**Author:** ![martinsiegrist](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/martinsiegrist/32/498369_2.png) [@martinsiegrist](https://discourse.mcneel.com/u/martinsiegrist)\
**Post date:** [December 6, 2021, 4:03pm UTC](https://discourse.mcneel.com/t/offset-planar-curve-issues-solved-with-clipper/133885/11 "2021-12-06T16:03:06Z")

</div>

While working on a much bigger curve with nearly 90’000 points, I realized that cursor tool tips decrease performance drastically. Is that a known problem / limitation.

So far my workaround for the offset fauilure is to split the curve into multiple segments but that leads to other problems again …

---

<div class="post-metadata">

**Author:** ![martinsiegrist](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/martinsiegrist/32/498369_2.png) [@martinsiegrist](https://discourse.mcneel.com/u/martinsiegrist)\
**Post date:** [February 9, 2022, 9:07pm UTC](https://discourse.mcneel.com/t/offset-planar-curve-issues-solved-with-clipper/133885/12 "2022-02-09T21:07:25Z")

</div>

Today I had enough and I downloaded Clipper.

While it takes 23 seconds to show the control points, the GH Clipper component Polyline Offset rebuilds and offsets my polyline in just 1.2 seconds and the result is a closed curve.

I’m trying to work with native components whenever possible. How does Clipper do this so quickly and perfectly right? Is there any plan to integrate what clipper does into native Rhino commands and Grasshopper components?

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

---

<div class="post-metadata">

**Author:** ![arendvw](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/arendvw/32/501322_2.png) [@arendvw](https://discourse.mcneel.com/u/arendvw)\
**Post date:** [February 14, 2022, 3:13pm UTC](https://discourse.mcneel.com/t/offset-planar-curve-issues-solved-with-clipper/133885/13 "2022-02-14T15:13:36Z")

</div>

Clipper is able to solve things by only (1) supporting polylines (not arcs, circles, etc.) (2) only supporting planar curves (3) placing all lines on a ‘bitmap’ all points are internally rounded to integer numbers, greatly simplifying the process of solving overlapping/nearly overlapping curves.
