---
Product: Aspose.3D
Platform: java
Page Type: reference
Canonical URL: https://reference.aspose.org/3d/java/linearextrusion
---

# LinearExtrusion

## Overview

`LinearExtrusion` is a class in Aspose.3D FOSS for Java.
Inherits from: `Entity`.

Linear extrusion takes a 2D shape as input and extends the shape in the 3rd dimension.

This class provides 38 methods for working with LinearExtrusion objects in Java programs.
Available methods include: `A3DObject`, `Entity`, `LinearExtrusion`, `SceneObject`, `findProperty`, `getBoundingBox`, `getCenter`, `getDirection`, `getEntityRendererKey`, `getExcluded`, `getHeight`, `getName`, and 22 additional methods.
All public members are accessible to any Java application after installing the Aspose.3D FOSS for Java package.
Properties: `boundingBox`, `center`, `direction`, `entityRendererKey`, `excluded`, `height`, and 9 more.

## Properties

| Name | Type | Access | Description |
|------|------|--------|-------------|
| `shape` | `Profile` | Read/Write | The base shape to be extruded. |
| `direction` | `Vector3` | Read/Write | The direction of extrusion, default value is (0, 0, 1). |
| `height` | `double` | Read/Write | The height of the extruded geometry, default value is 1.0. |
| `slices` | `int` | Read/Write | The slices of the twisted extruded geometry, default value is 1. |
| `center` | `boolean` | Read/Write | If this value is false, the linear extrusion Z range is from 0 to height, otherwise the range is from -height/2 to height/2. |
| `twistOffset` | `Vector3` | Read/Write | The offset that used in twisting, default value is (0, 0, 0). |
| `twist` | `double` | Read/Write | The number of degrees of through which the shape is extruded. |
| `parentNode` | `Node` | Read/Write | Gets or sets the parent node. |
| `parentNodes` | `ArrayList<Node>` | Read | Gets the parent nodes. |
| `excluded` | `boolean` | Read/Write | Gets or sets the excluded. |
| `boundingBox` | `BoundingBox` | Read | Gets the bounding box. |
| `entityRendererKey` | `EntityRendererKey` | Read | Gets the entity renderer key. |
| `scene` | `Scene` | Read | Gets the scene. |
| `name` | `String` | Read/Write | Gets or sets the name. |
| `properties` | `PropertyCollection` | Read | Gets the properties. |

## Methods

| Signature | Description |
|-----------|-------------|
| `LinearExtrusion()` | Constructor of instance. |
| `LinearExtrusion(shape: Profile, height: double)` | Constructor of instance. |
| `getShape()` → `Profile` | The base shape to be extruded. |
| `setShape(value: Profile)` | The base shape to be extruded. |
| `getDirection()` → `Vector3` | The direction of extrusion, default value is (0, 0, 1). |
| `setDirection(value: Vector3)` | The direction of extrusion, default value is (0, 0, 1). |
| `getHeight()` → `double` | The height of the extruded geometry, default value is 1.0. |
| `setHeight(value: double)` | The height of the extruded geometry, default value is 1.0. |
| `getSlices()` → `int` | The slices of the twisted extruded geometry, default value is 1. |
| `setSlices(value: int)` | The slices of the twisted extruded geometry, default value is 1. |
| `getCenter()` → `boolean` | If this value is false, the linear extrusion Z range is from 0 to height, otherwise the range is from -height/2 to height/2. |
| `setCenter(value: boolean)` | If this value is false, the linear extrusion Z range is from 0 to height, otherwise the range is from -height/2 to height/2. |
| `getTwistOffset()` → `Vector3` | The offset that used in twisting, default value is (0, 0, 0). |
| `setTwistOffset(value: Vector3)` | The offset that used in twisting, default value is (0, 0, 0). |
| `getTwist()` → `double` | The number of degrees of through which the shape is extruded. |
| `setTwist(value: double)` | The number of degrees of through which the shape is extruded. |
| `toMesh()` → `Mesh` | **Not implemented in the FOSS edition — throws at runtime.** Convert the extrusion to mesh. |
| `Entity(name: String)` | Calls Entity(name) on this LinearExtrusion instance. |
| `getParentNode()` → `Node` | Constructor of instance. |
| `setParentNode(value: Node)` | Sets the parent node value. |
| `getParentNodes()` → `ArrayList<Node>` | Returns the parent nodes. |
| `getExcluded()` → `boolean` | Returns the excluded. |
| `setExcluded(value: boolean)` | Sets the excluded value. |
| `getBoundingBox()` → `BoundingBox` | Returns the bounding box. |
| `getEntityRendererKey()` → `EntityRendererKey` | Returns the entity renderer key. |
| `SceneObject()` | Linear extrusion takes a 2D shape as input and extends the shape in the 3rd dimension. |
| `SceneObject(name: String)` | Calls SceneObject(name) on this LinearExtrusion instance. |
| `getScene()` → `Scene` | Returns the scene. |
| `A3DObject()` | Calls A3DObject on this LinearExtrusion instance. |
| `A3DObject(name: String)` | Calls A3DObject(name) on this LinearExtrusion instance. |
| `getName()` → `String` | Returns the name. |
| `setName(name: String)` | Sets the name value. |
| `getProperties()` → `PropertyCollection` | Returns the properties. |
| `findProperty(name: String)` → `Property` | Calls findProperty(name) on this LinearExtrusion instance. |
| `getProperty(name: String)` → `Object` | Calls getProperty(name) on this LinearExtrusion instance. |
| `setProperty(name: String, value: Object)` | Constructor of instance. |
| `removeProperty(name: String)` → `boolean` | Calls removeProperty(name) on this LinearExtrusion instance. |
| `removeProperty(property: Property)` → `boolean` | Calls removeProperty(property) on this LinearExtrusion instance. |

## See Also
- [Aspose.3D for Java — Enterprise API Reference](https://reference.aspose.com/3d/java/com.aspose.threed/linearextrusion/)