From BlenderWiki

Jump to: navigation, search

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.

Improved extrusion1.png

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.

GSoc2016-improved extrusion2.png

GSoc2016-improved extrusion3.png

This patch can be combined with Bevel.

GSoc2016-improved extrusion4.png

(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.

GSoc2016-extend call1.png


GSoc2016-extend call2.png

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].

[1] http://blenderartists.org/forum/showthread.php?387520-Addon-Extend-Trim-Curve-CAD-Tools-for-Bezier-Splines

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

User Documentation

  1. If one spline is selected
    1. If the two endpoints are selected, intersect them (if possible)
    2. If only one endpoint is selected, extend it
  2. Else, if two splines are selected
    1. 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

  1. Select the endpoint.
    GSoc2016-extend tool tut1.png
  2. Run the operator.
    GSoc2016-extend tool tut2.png

The result is

GSoc2016-extend tool tut3.png

Intersect two endpoints

  1. Select the endpoints.
    GSoc2016-extend tool tut4.png
    GSoc2016-extend tool tut5.png
  2. Run the operator.
    GSoc2016-extend tool tut6.png
    GSoc2016-extend tool tut7.png

Property extrapolation

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

GSoc2016-extend tool tut8.png
GSoc2016-extend tool tut9.png
GSoc2016-extend tool tut10.png

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:

  1. Select all the points you would like to extend.
    GSoc2016-batch extend tool tut1.png
  2. Run the operator.
    GSoc2016-batch extend tool tut2.png

The final result is

GSoc2016-batch extend tool tut3.png

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:

  1. Start point (point, or set of points, before the first intersection)
  2. End point (point, or set of points, after the last intersection)
  3. 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

  1. Select the point.
    • Start or end point
    GSoc2016-trim tool tut1.png
    • Middle point
    GSoc2016-trim tool tut2.png
    • Cyclic spline
    GSoc2016-trim tool tut3.png
    • Spline with multiple intersections
    GSoc2016-trim tool tut4.png
  2. Run the operator.
    • Start or end point
    GSoc2016-trim tool tut5.png
    • Middle point
    GSoc2016-trim tool tut6.png
    • Cyclic spline
    GSoc2016-trim tool tut7.png
    • Spline with multiple intersections
    GSoc2016-trim tool tut8.png

Interpolate properties

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

GSoc2016-trim tool tut9.png
GSoc2016-trim tool tut10.png
GSoc2016-trim tool tut11.png

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

  1. 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).
    GSoc2016-offset tool tut1.png
  2. Run the operator.
GSoc2016-offset tool tut2.png


GSoc2016-offset tool tut3.png

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:

  1. Select points on a spline.
    GSoc2016-chamfer tool tut1.png
  2. Run the operator.
    GSoc2016-chamfer tool tut2.png


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:

  1. Select points on a spline.
    GSoc2016-chamfer tool tut1.png
  2. Run the operator.
    GSoc2016-fillet tool tut1.png