# Joining class

Namespace: [Grasshopper2.Geometry.Surface](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.geometry.surface.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
public static class Joining
```

## Methods

- [JoinSurfaces](https://developer.rhino3d.com/api/gh2/type/grasshopper2.geometry.surface.joining/joinsurfaces.md): (static) Join surface-like objects into as few outputs as possible. Each input is resolved in the following order, most-specific first:Sphere, Box — closed primitives, always pass through unchanged. Already-solid inputs are never broken apart or re-joined.; Tube, Triangle — GH2 shape types, joinable.; SubD — joined among themselves via SubD.JoinSubDs, remain SubDs.; Surface, Brep — RhinoCommon base types, joinable.; SurfaceBroker.CastOrConvert — catch-all for any other registered surface type. The broker may yield a Surface, Brep, or SubD which is then bucketed accordingly.Joinable types (Tube, Triangle, Surface, Brep, and broker results) are temporarily converted to Brep so that Brep.JoinBreps can find shared edges. Inputs that did not actually join with anything are restored to their original type, so a lone Tube stays a Tube, not a Brep. Only manifold joins are produced. If three surfaces meet at the same edge, only two will join along that edge; the third stays separate. The function never produces disjoint Breps (multiple disconnected shells in one Brep) or non-manifold geometry. Each output represents a single connected component. Output order follows the position of the earliest input in each group.
