Create the DlxSolid object.

syntaxSyntax:
new DlxSolid(shape, style)

Parameters

Parameter Description
shape A DlxFigure object with the basic shape to be extruded.
style A Dlx3DStyle object or the index of the style. There are 10 styles available with indexes from 0 to 9.

Remarks

You can add holes with AddHole. To finish the construction of the surface, call: ExtrudeXY, ExtrudeXZ, ExtrudeYZ.

Example

  Copy codeCopy code
function OnBuild3DModel()
{
  var ctx = FWiz.Get3DModelCtx();
  var style = FWiz.Get3DStyle(0);
  style.SetStyle("gold");

  var shape = new DlxFigure();
  shape.SetRectangle(0, 0, 20, 20, -25, -25, 30, 30);
  shape.EndShape();

  var hole = new DlxFigure();
  hole.AddArc(new DlxPoint(0, 0), 5);
  hole.EndShape();

  var obj = new DlxSolid(shape, style);
  obj.AddHole(hole);
  obj.ExtrudeXY(-5, 10);
  ctx.Add(obj);
}

See also