# createTube

#### createTube

Creates a tube (hollow cylinder) primitive and adds it to the scene.

#### Signature

```typescript
createTube(options?: CreatePrimitiveOptions): Promise<SceneObject>
```

#### Parameters

<table><thead><tr><th width="141.68359375">Parameter</th><th width="218.48828125">Type</th><th width="85.69140625">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>options</code></td><td><a href="/pages/RZyW5ho4Rsef15nPuwB4#createprimitiveoptions"><mark style="color:blue;"><code>CreatePrimitiveOptions</code></mark></a></td><td>No</td><td>Transform and primitive-specific settings</td></tr></tbody></table>

#### PrimitiveTubeSettings fields

<table><thead><tr><th width="258.2890625">Field</th><th width="143.0078125">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>tubeRadiusIn</code></td><td><code>number</code></td><td>Inner radius</td></tr><tr><td><code>tubeRadiusOut</code></td><td><code>number</code></td><td>Outer radius</td></tr><tr><td><code>tubeHeight</code></td><td><code>number</code></td><td>Height</td></tr><tr><td><code>tubeRadiusSegments</code></td><td><code>number</code></td><td>Radial segments</td></tr><tr><td><code>tubeHeightSegments</code></td><td><code>number</code></td><td>Height segments</td></tr><tr><td><code>tubeSideSegments</code></td><td><code>number</code></td><td>Side segments (wall thickness)</td></tr><tr><td><code>roundnessEnabled</code></td><td><code>boolean</code></td><td>Enable edge roundness</td></tr><tr><td><code>roundnessRadius</code></td><td><code>number</code></td><td>Roundness radius</td></tr><tr><td><code>roundnessRadiusSegments</code></td><td><code>number</code></td><td>Segments for roundness</td></tr><tr><td><code>computeNormals</code></td><td><code>boolean</code></td><td>Recompute normals</td></tr></tbody></table>

#### Returns

`Promise<SceneObject>` - the created object.

#### Examples

```javascript
const tube = await api.createTube({
  primitiveSettings: {
    tubeRadiusIn: 0.5,
    tubeRadiusOut: 1,
    tubeHeight: 3,
  },
});
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.vectary.com/api/model-api/api-reference/createtube.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
