GlobalEdgeContinuity - Flat parameter effect unpredictable

@Gijs @menno

The effect of the “Flat” parameter on the results of the current version of GlobalEdgeContinuity (9.0.26055.12305, 2026-02-24) are unpredictable.

Two simple surface with G0 and G1 continuity but not G2 continuity across the coincident edge.
GEC_CurvatureBug_DC01.3dm (204.6 KB)

With Flat less than approximately 10 GlobalEdgeContinuity claims there is perfect G2 continuity:

Flat = 14

Flat = 80 Note that while the numerical values vary across the edge, the comb is uniform height.

I removed the surfaces from GEC, then add the blue surface.

Now shows non-zero results with Flat = 0

With Flat = 0.01 or larger it shows G2 as zero everywhere along the edge:

Increase Flat to a large value such as 1000 and then reset it to a lower value
GEC behaves as described in the first part of this post.

Also the increase/decrease arrows for “Flat” do not work if the value is zero. Type in a non-zero value and the arrows work until Flat is set to zero, and then they stop working again.

I’ve spent too much time on this.

Rhino 9 SR0 2026-2-24 (Rhino WIP, 9.0.26055.12305, Git hash:master @ 9ee31a3c2831f65aa872a3f62dc11054381a7f68)
License type: Commercial, build 2026-02-24
License details: Cloud Zoo
Expires on: 2026-04-10

Windows 11 (10.0.26100 SR0.0) or greater (Physical RAM: 64GB)
.NET 9.0.13

Computer platform: DESKTOP

Standard graphics configuration using DirectX
Primary display: NVIDIA GeForce RTX 2080 Ti (NVidia) Memory: 11GB, Driver date: 12-30-2025 (M-D-Y). DirectX(11)
> Accelerated graphics device with 4 adapter port(s)
- Windows Main Display attached to adapter port 0

Secondary graphics devices.
None found.

DirectX Settings
Safe mode: Off

OpenBLAS: OpenBLAS 0.3.30 DYNAMIC_ARCH NO_AFFINITY Haswell MAX_THREADS=64.

Rhino plugins that do not ship with Rhino

Rhino plugins that ship with Rhino
C:\Program Files\Rhino 9 WIP\Plug-ins\Commands.rhp “Commands” 9.0.26055.12305
C:\Program Files\Rhino 9 WIP\Plug-ins\rdk.rhp “Renderer Development Kit”
C:\Program Files\Rhino 9 WIP\Plug-ins\UpdatesAndStatistics\UpdatesAndStatistics.rhp “UpdatesAndStatistics” 9.0.26055.12305
C:\Program Files\Rhino 9 WIP\Plug-ins\RhinoRenderCycles.rhp “Rhino Render” 9.0.26055.12305
C:\Program Files\Rhino 9 WIP\Plug-ins\rdk_etoui.rhp “RDK_EtoUI” 9.0.26055.12305
C:\Program Files\Rhino 9 WIP\Plug-ins\NamedSnapshots.rhp “Snapshots”
C:\Program Files\Rhino 9 WIP\Plug-ins\MeshCommands.rhp “MeshCommands” 9.0.26055.12305
C:\Program Files\Rhino 9 WIP\Plug-ins\RhinoCycles.rhp “RhinoCycles” 9.0.26055.12305
C:\Program Files\Rhino 9 WIP\Plug-ins\3dxrhino.rhp “3Dconnexion 3D Mouse”
C:\Program Files\Rhino 9 WIP\Plug-ins\Displacement.rhp “Displacement”
C:\Program Files\Rhino 9 WIP\Plug-ins\Calc.rhp “Calc”
C:\Program Files\Rhino 9 WIP\Plug-ins\SectionTools.rhp “SectionTools”

From what I can see it works exactly as designed/expected. But the Flat value can be a bit confusing or counter intuitive.

If you set your flat radius to something low as 13 for this example, then all curvatures of these two surfaces (measured perpenducular to the edges) are larger than that, and will therefore be treated as having 0 curvature.
As a result, since there is 0 degree tangential deviation, this basically means that there is also 0 curvature difference.
In Patch, currently higher flatness values generate more dense surfaces when matching to true flat surfaces, so there it makes sense to lower that value to avoid that.

For evaluation, and especially if you never have true flat surfaces, you can keep this value pretty high. (1E+5 / 1E+6)
More information can be found in this post

That is also correct (well almost, but the differences are hard to see), since the differences across the edge are small. Your G2 deviation is max 0.93 vs 0.889 min

That is actually a bug. It looks like 0 basically disconsiders the Flat radius.
The minium you should be able to set is RhinoMath.ZeroTolerance
RH-93498 Patch / GEC Flat radius can be set to 0

Btw @davidcockey this was a recent change, we’re still in WIP and I’m not very happy yet about this (confusing) part. There must be some indication in the viewport about this. But I have to think about a good way to do this.
Sometimes only part of a surface will be treated as flat.
In case of a selected edge this could be done in the text dots, but I’m not sure yet how to indicate it for total or partial edges.

@Gijs Thanks for the reply. I’m starting to understand the revised curvature continuity analysis.

I assumed “Flat” was a curvature value, not a radius value, based on the post you linked which I was already familar with. That post describes the parameter used to decide if a surface is flat as a curvature. Suggestion - when the Help documention for GlobalEdgeContinuity is updated it should very clearly state that Flat is a radius.

The bug with setting Flat to 0 may be responsible for some of the strange behavior I saw.

RH-93498 is fixed in Rhino WIP