Adds a hole to the 3D surface.

syntaxSyntax:
DlxSurface.AddHole(shape)

Parameters

Parameter Description
shape A DlxFigure object with the shape of the hole.

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.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 DlxSurface(shape, style);
  obj.AddHole(hole);
  obj.End();
  obj.Rotate(0, 45, 0);
  ctx.Add(obj);
}

See also