### From BlenderWiki

# Final Report

# Improved Extrusion

## Improved Extrusion

In all previous Blender releases, one would set the "Extrude" value for a curve and the resulting object would have twice that height.

In order to address this, I added two new options: "Unidirectional Extrude" and its counterpart "Reverse Extrude Direction". These do what they are meant to do.

This patch can be combined with Bevel.

(text copied form the midterm report)

# Modelling Tools

I implemented the following tools

- Extend tool (CtrlE)
- Batch Extend tool (Ctrl⇧ ShiftE)
- Trim tool (Ctrl⇧ ShiftT)
- Offset tool (⇧ ShiftO)
- Chamfer tool (Ctrl⇧ ShiftC)
- Fillet tool (CtrlF)

All tools can be found in three ways. Either from space bar search, the tool shelf, or the specials menu.

## Extend tool

### Description

The Extend tool allows you to extend the selected spline endpoint(s) to the nearest intersection. It combines Extend functionality with Intersect one. The implementation of this tool was based on a previously existing add-on [1].

Some of the details of the implementation of this tool can be found on [2].

[2] https://wiki.blender.org/index.php/User:Genio84/gsoc2016/Extend_progress

### User Documentation

- If one spline is selected
- If the two endpoints are selected, intersect them (if possible)
- If only one endpoint is selected, extend it

- Else, if two splines are selected
- Extend both endpoints up to intersection (if possible)

Extention makes more sense for curves on the same plane. However, since this will rarely be the case, I opted to keep the approach used on the original add-on, where the z-coordinate is ignored for the extention calculation. This has the obvious shortcoming that for curves drawn on the XZ or YZ plane the operator will not work. However, if the user performs all rotations on Object mode, and does not apply them, then the curve in editmode will still be on the XY plane, and therefore there will be no problems.

The shortcut to access this operator is CtrlE.

To use the operator follow these steps:

#### Extend one endpoint

- Select the endpoint.
- Run the operator.

The result is

#### Intersect two endpoints

- Select the endpoints.
- Run the operator.

#### Property extrapolation

The Extend operator has the option to extrapolate vertex properties (radius, tilt and weight).

## Batch Extend tool

### Description

The Batch Extend tool allows you to extend all the selected vertices. This helps to save time since without it a user would have to select and extend each vertex individually.

### User Documentation

The batch extend tool extends all the selected vertices to the nearest intersection. The operator has the option to extrapolate vertex properties, namely radius, tilt and weight.

The shortcut to access this operator is Ctrl⇧ ShiftE.

To use the operator follow these steps:

- Select all the points you would like to extend.
- Run the operator.

The final result is

## Trim tool

### Description

The Trim tool allows you to trim the selected spline vertex/vertices. There are three trim modes: endpoints, middle points and cyclic splines.

### User Documentation

Only one point can (currently) be selected at a time. Given this point, there are three use cases:

- Start point (point, or set of points, before the first intersection)
- End point (point, or set of points, after the last intersection)
- Middle point (point, or set of points, in between two intersections)

The trim tool will remove those points and leave a spline (or splines) with the exact (or approximate) shape of the one just trimmed. The operator has an option to interpolate vertex properties, namely radius, tilt and weight.

The shortcut to access this operator is Ctrl⇧ ShiftT.

To use the operator follow these steps:

#### Trim one point

- Select the point.
- Start or end point

- Middle point

- Cyclic spline

- Spline with multiple intersections

- Run the operator.
- Start or end point

- Middle point

- Cyclic spline

- Spline with multiple intersections

#### Interpolate properties

The trim tool has an option to interpolate vertex properties (radius, tilt and weight).

## Offset tool

### Description

The Offset tool allows you to offset the selected spline. Due to the mathematical details of Bezier curves, true mathematical curve offset (i. e. where the distance between every point in the curve and its offset is equal) is not possible. This tool offers an approximation based on the <insert name in here> algorithm. Offset distance can be inputted in three different ways (mouse, keyboard and tool shelf).

### User Documentation

The offset tool will add a new spline where each control point is at a fixed distance from the original one. It is not possible to offset line segments.

Depending on how the function is called, the offset distance can be controlled by mouse and tool shelf, or by tool shelf alone.

The shortcut to access this operator is ⇧ ShiftO.

To use the operator follow these steps:

#### Offset a curve

- Select any point on a spline (can be all, can be only one, can be a handle point, can be a control point,.... can be anything as long as the spline is selected).
- Run the operator.

## Chamfer tool

### Description

The Chamfer tool allows you to chamfer the selected point. Chamfers have two parameters: angle and length. These are currently controlled in the tool shelf, after the operator is called. Due to obvious reasons, lines cannot be chamfered.

### User Documentation

The chamfer tool will chamfer/bevel the selected points. The chamfer radius and length are specified in the tool shelf.

The shortcut to access this operator is Ctrl⇧ ShiftC.

To use the operator follow these steps:

- Select points on a spline.
- Run the operator.

## Fillet tool

### Description

The fillet tool allows the user to fillet the selected points. A fillet means approximating the point locally as a circle. Due to obvious reasons, lines cannot be filleted.

### User Documentation

The fillet tool will fillet the selected points with the radius specified by the user.

The radius is specified on the tool shelf.

The shortcut to access this operator is CtrlF.

To use the operator follow these steps:

- Select points on a spline.
- Run the operator.