Pharma Tube

Boxshot allows you to render tubes for toothpaste or creme with adjustable parameters and various caps. The “Tube” section of the settings panel controls the main part of the shape:

  • Length - defines the length of the whole tube.
  • Diameter - defines the diameter.
  • Fit to images - the button allows you to resize the shape automatically accroding to the images.
  • Bottom length - defines the length of the bottom part of the tube which is glued together.
  • Head height - defines the size of the head part that closes the other side of the tube.
  • Volume - controls how flat is the tube.

The “Cap” section allows to select a cap and adjust its parameters:

  • Type - the drop-down control allows you to pick a cap shape for the tube.
  • Cap height - controls the height of the cap. Cap shapes are really different, so you will probably need to adjust this parameter for each type.
  • Neck diameter - this parameter also controls the diameter of the cap. Both Neck Diameter and Cap Height parameter make possible to adjust the cap size.
  • Neck length - helps you put the cap on its place, right from the head of the tube.


Here’s how to create a 3d toothpaste tube from script:

var m = scene.root.addMesh("gusseted", "generator.pharma.Tube");
var g = m.generator;

g.length = 15;
g.diameter = 3;
g.bottomLength = 0.7;
g.headHeight = 0.2;
g.volume = 0.7;

g.capType = "flip-top-small-open";
g.capHeight = 1.4;
g.neckDiameter = 0.8;
g.neckLength = 0.3;