Create a fence from two 2D shapes.

syntaxSyntax:
DlxFence.DShape(backShape, frontShape, zMin, height, bBrightinside)

Parameters

Parameter Description
backShape A DlxFigure object with the shape.
frontShape A DlxFigure object with the shape.
zMin Value of the Z coordinate of extrusion start.
height Height of the extruded surface.
bBrightinside Specify true if the bright face is the inner face.

Return Value

If the operation ends correctly it returns true otherwise it returns false.

Example

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

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

  var shape1 = new DlxFigure();
  shape1.SetZ(10);
  shape1.SetRectangle(0, 0, 10, 10, -25, -25, 30, 30);
  shape1.EndShape();

  var obj = new DlxFence(style);
  obj.DShape(shape, shape1, -5, 10, false);
  ctx.Add(obj);
}

See also