The Add Tube Tool was initially designed to help you create automatically-routed interior channels ("tubes") through objects. An example of this behavior is shown in the video on the right. However, we have extended this tool to be useful for other modeling tasks. 

When using Add Tube, you will see green tube geometry that connects two red spheres ("handles") at the tube endpoints. If you left-click-drag on either of these spheres, you can drag them across the model surface. As you move the spheres, the green tube will dynamically update, as in the video above. Note that the green tube is just a preview, and it has quite a low sampling rate. The actual tube produced on Accept has much higher fidelity.

The property panel for the Add Tube tool is to the left. The different Tube Type options result in significantly different behavior, which is described below.

The Combine Mode option is used to determine what we do with the tube geometry when you Accept the tool. Direction Constraint controls the tube orientation in certain modes. There are sections below for these options.

The Radius is used in all modes and defines the diameter of the tube. If you would like the radius to vary over the length, you can also set the End Radius at the bottom of the panel. This value is ignored if it is zero.

The Tangent Len is used in the Spline modes, and defines the length of the tangent vectors, as described below. 

Collision RadiusLength Scale, and Solve Steps are used in the auto-routing algorithm. 



Tube Type

There are three main type categories - LineSpline, and AutoRoute. In Line mode, the tube is a cylinder (or cone) which is oriented with the line between the two handles. The only difference between Line (Outside) and Line (Inside) modes is that if you are using the Boolean combine mode, then in Outside mode the tube is Unioned while when Inside it is Subtracted.

The Spline (Outside) and Spline (Inside) modes also allow you to specify Union vs Subtract. However in addition they determine whether the spline goes "into" the surface or comes "out of" it. Given the two endpoints and their normals, we define a 3D Bezier curve by setting the Bezier tangents to the normal vectors, with Tangent Len defining the lengths of the tangents. See the second and third images below for an example of Inside and Outside modes for the same two endpoints.

AutoRoute Tube Types

The Line and Spline modes ignore the actual model geometry, beyond the endpoints and their normals. The AutoRoute modes instead try to automatically find paths through the model geometry, so that the tube only intersects the model at the endpoints.

The image below shows an example of AutoRoute Miminal on the left and AutoRoute Smooth on the right. The Minimal mode is quite simple, it is based on a simple path-finding through a voxelized version of the model, combined with some smoothing. The Collision Radius parameter defines how close the tube is allowed to get to the model surface (except at the endpoints). In the example below we have set this threshold to too high a value, which produces kinks in the minimal routing. 

In AutoRoute Smooth, we begin with the Minimal routing, but then use a physics simulation to attempt to find a minimal-curvature version of the path. The path is essentially treated as a thin rubber wire, and we allow it to relax to its smoothest state, while still enforcing our Collision Radius. 

The Length Scale parameter allows you to further relax or tighten the result, essentially by changing the length of this rubber wire. If you make it much longer than necessary, it will even coil up to be able to fit! The Solve Steps parameter determines how many iterations of the physics simulation are run. More steps takes longer but can get to smoother results. However, we must emphasize that this simulation results in some level of randomness in the result. So, when you make small changes to the endpoints or the parameters, you may see quite different interior curves if there is freedom in the solution (ie if the rubber string is too long, it will be "loose" and have lots of space to move around).

Combine Mode

The three Combine Modes are shown to the right. In Boolean mode, we either Boolean Union or Subtract the tube geometry from the model. Append mode simply adds the tube mesh triangles to the model, and as a result the new model will be self-intersecting. If you are planning to add many 'Outside' tubes, sometimes it is better to use Append mode and then do a Make Solid at the end. Finally New Object mode creates a new scene object for the tube. If Boolean mode is failing, you can try Append mode and then use the Boolean Tool, which will give you more control.

Direction Constraint

The Direction Constraint is used in the Line modes, to define the direction of the line. By default this is set to  Any Direction, in which case the line is between the two endpoints.

In the X/Y/Z Axis modes, one of the endpoints defines the line origin, and the selected axis defines the line direction. The second endpoint defines the extent of the line. This is a bit of an odd interface, because the second endpoint is free to move, but you might find that capability useful in some contexts. These modes are particularly useful for creating holes in shapes!

Finally, Face Normal mode behaves like the Axis modes, but uses the face normal instead of a fixed axis. Frankly, the use of the second dot is quite confusing in this mode, particularly on curved surfaces. The main reason to use this mode is to drill holes into flat regions that are not aligned with the XYZ axes.