# PRIM_TYPE_BOX

*LSL constant*

```lsl
integer PRIM_TYPE_BOX = 0;
```

Constant groups: [PrimType](/constants/groups/PrimType/)

`PRIM_TYPE_BOX` is a parameter of [PRIM_TYPE](/constants/PRIM_TYPE/) used to make prim into a box and to change specific properties that define the shape of that box.

## Caveats

- **z_taper** and client values are different, the ranges do not line up, conversion is required. This simple equation can be used: `answer = 1.0 - value`. See [top_size Explained](#top-size-explained) for more information.

## Examples

<details open>
<summary>Example 1</summary>

```lsl
llSetPrimitiveParams([PRIM_TYPE,
                        PRIM_TYPE_BOX,
                            PRIM_HOLE_DEFAULT,  // hole_shape
                            <0.00, 1.0, 0.0>,   // cut
                            0.0,                // hollow
                            <0.0, 0.0, 0.0>,    // twist
                            <1.0, 1.0, 0.0>,    // top_size
                            <0.0, 0.0, 0.0>     // top_Shear
                      ]);
```

</details>

## Deep notes

<table>
	<caption>[PRIM_TYPE](/constants/PRIM_TYPE/) **top_size** and client taper conversion</caption>
	<tr>
		<td></td>
		<th>Range</th>
		<th>Top<br />Tapered</th>
		<th>No <br />Tapering</th>
		<th>Bottom<br />Tapered</th>
	</tr>
	<tr>
		<th>Client</th>
		<td>\[-1, 1\]</td>
		<td>1.0</td>
		<td>0.0</td>
		<td>-1.0</td>
	</tr>
	<tr>
		<th>[PRIM_TYPE](/constants/PRIM_TYPE/)</th>
		<td>\[0, 2\]</td>
		<td>0.0</td>
		<td>1.0</td>
		<td>2.0</td>
	</tr>
	<tr>
		<th>[LEGACY](#prim-type-legacy)</th>
		<td>\[0, 1\]</td>
		<td>0.0</td>
		<td>1.0</td>
		<td>NA</td>
	</tr>
	<tr>
		<th>Client &lt; 1.11</th>
		<td>\[0, 1\]</td>
		<td>0.0</td>
		<td>1.0</td>
		<td>NA</td>
	</tr>
</table>

When the original [PRIM_TYPE](/constants/PRIM_TYPE/) interface was retired ([PRIM_TYPE_LEGACY](#prim-type-legacy), [SL 1.5](http://secondlife.wikia.com/wiki/Version_1.5)), the new [PRIM_TYPE](/constants/PRIM_TYPE/) interface did not yet support tapering of the bottom of the prim, this feature wasn't added until [SL 1.11](http://secondlife.wikia.com/wiki/Version_1.11) (two years later). Instead of retiring the new [PRIM_TYPE](/constants/PRIM_TYPE/) when it was added, the range of **top_size** was enlarged; meanwhile in the client they redefined the parameter and it's values. This redefinition and range enlargement resulted in two interfaces that did the same thing but achieved it through different values. Meanwhile [PRIM_TYPE_LEGACY](#prim-type-legacy)'s interface was not updated to support tapering of the bottom of the prim. Consequently all three interfaces have different ranges, making for a rather nasty caveat.

## See also

### Constants

| Constant | Type | Value | Description |
| --- | --- | --- | --- |
| [PRIM_TYPE](/constants/PRIM_TYPE/) |  |  |  |
| [CHANGED_SHAPE](/constants/CHANGED_SHAPE/) |  |  |  |

### Functions

- [llGetPrimitiveParams](/functions/llGetPrimitiveParams/)

### Events

- [changed](/events/changed/)

---

*Source: [PRIM TYPE BOX](https://wiki.secondlife.com/wiki/PRIM_TYPE_BOX) on the Second Life Wiki. Content from the Second Life Wiki article PRIM TYPE BOX (revision 1194697, 2015-01-24), CC BY-SA 3.0.*

---

From lsl.dev: https://lsl.dev/constants/PRIM_TYPE_BOX/
