Creates a 3D solid by extruding a 2D shape along a path. Specify the shape to extrude and a path defining the shape of the extrusion. The shape follows the path to create 3D solid.

syntaxSyntax:
new DlxSolidPath(shape, path, style)

Parameters

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

Example

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

  var shape = new DlxFigure();
  shape.BeginShape();
  shape.AddPoint(new DlxPoint(0, 0));
  shape.AddPoint(new DlxPoint(5, 0));
  shape.AddPoint(new DlxPoint(5, 10));
  shape.AddPoint(new DlxPoint(0, 15));
  shape.EndShape();

  var path = new DlxFigure();
  path.SetRectangle(0, 0, 10, 15, -50, -50, 25, 25);

  var obj = new DlxSolidPath(shape, path, style);
  ctx.Add(obj);
}

See also