This shape has a lot of parameters, allowing you to create very different bottles. The main are:
Boxshot tries to fit the label onto the bottle, so if the total height is not enough, Boxshot will increase it automatically. The same works for other shape’s parameters, so don’t be surprised.
You can do the initial setup automatically by clicking the “Fit to images” button. It adjust both heights and the diameter according to the label image you load.
The second group of options controls the cap of the bottle:
The last group of settings controls the shape of the bottle itself.
All the sliders are relative and measured in percents. Basically, the more curved surface you need, the higher value you choose.
Here’s how to create and setup a pharma bottle shape:
var m = scene.root.addMesh("bottle", "generator.pharma.Bottle"); var g = m.generator; g.diameter = 10; g.height = 20; g.labelHeight = 5; g.topHeight = 2; g.showLabel = true; g.replaceGlassWithLabel = true; g.showLiquid = true; g.liquidLevel = 3; g.capType = "plastic-1"; g.capHeight = 0.7; g.neckDiameter = 4; g.neckCurve = 0.2; g.topCurve = 0.5; g.bottomCurve = 0.9; g.fitToImages();