<!--
{
  "availability" : [
    "iOS: 8.0.0 - 26.0.0",
    "iPadOS: 8.0.0 - 26.0.0",
    "macCatalyst: 13.1.0 - 26.0.0",
    "macOS: 10.8.0 - 26.0.0",
    "tvOS: 9.0.0 - 26.0.0",
    "visionOS: 1.0.0 - 26.0.0",
    "watchOS: 3.0.0 - 26.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "SceneKit",
  "identifier" : "/documentation/SceneKit/SCNTube",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "SceneKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SCNTube"
  },
  "title" : "SCNTube"
}
-->

# SCNTube

A tube or pipe geometry—a right circular cylinder with a circular hole along its central axis.

```
class SCNTube
```

## Overview

![](images/com.apple.scenekit/media-2929815@2x.png)

The outer surface of a tube is a cylinder. Define the size of the cylinder’s cross section in the x- and z-axis dimensions of its local coordinate space with the [`outerRadius`](/documentation/SceneKit/SCNTube/outerRadius) property, and its extent in the y-axis dimension with the [`height`](/documentation/SceneKit/SCNTube/height) property. A cylinder becomes a tube through the subtraction of a cylindrical volume along its central axis. Define the size of this circular hole using the tube’s [`innerRadius`](/documentation/SceneKit/SCNTube/innerRadius) property. To position and orient a tube in a scene, attach it to the [`geometry`](/documentation/SceneKit/SCNNode/geometry) property of an [`SCNNode`](/documentation/SceneKit/SCNNode) object.

Control the level of detail with the [`radialSegmentCount`](/documentation/SceneKit/SCNTube/radialSegmentCount) and [`heightSegmentCount`](/documentation/SceneKit/SCNTube/heightSegmentCount) properties. A higher radial segment count creates a smoother curve for the tube’s circular inner and outer surfaces. A higher segment count in either direction produces more vertices, which can improve rendering quality for certain lighting models or custom shader effects, but at a cost to rendering performance.

A tube contains four [`SCNGeometryElement`](/documentation/SceneKit/SCNGeometryElement) objects: one each for its base and top, one that wraps around its outer surface, and one that wraps around its inner surface. SceneKit can render each element using a different material. For details, see the [`materials`](/documentation/SceneKit/SCNGeometry/materials) property in [`SCNGeometry`](/documentation/SceneKit/SCNGeometry).

## Topics

### Creating a Tube

[`init(innerRadius:outerRadius:height:)`](/documentation/SceneKit/SCNTube/init(innerRadius:outerRadius:height:))

Creates a tube geometry with the specified inner radius, outer radius, and height.

### Adjusting a Tube’s Dimensions

[`outerRadius`](/documentation/SceneKit/SCNTube/outerRadius)

The radius of the tube’s outer circular cross section. Animatable.

[`innerRadius`](/documentation/SceneKit/SCNTube/innerRadius)

The radius of the circular hole through the tube. Animatable.

[`height`](/documentation/SceneKit/SCNTube/height)

The extent of the tube along its y-axis. Animatable.

### Adjusting Geometric Detail

[`radialSegmentCount`](/documentation/SceneKit/SCNTube/radialSegmentCount)

The number of subdivisions around the circumference of the tube. Animatable.

[`heightSegmentCount`](/documentation/SceneKit/SCNTube/heightSegmentCount)

The number of subdivisions in the inner and outer surfaces of the tube along its y-axis. Animatable.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)