> For the complete documentation index, see [llms.txt](https://help.vectary.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.vectary.com/api/model-api/api-reference/createtube.md).

# 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="/api/model-api/api-reference.md#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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
