Creates a 3D solid by extruding a closed 2D shape along the X-Y plane.

syntaxSyntax:
DlxSolid.ExtrudeXY(zMin, height, mode=0, frontShape=null)

Parameters

Parameter Description
zMin Value of the Z coordinate of extrusion start.
height Height of the extruded solid.
mode It can be a combination of the following values:
FWiz.SOLID_SKIPFENCE The faces, of the solid, parallel to the Z axis are omitted.
FWiz.SOLID_SKIPFRONTFACE The front face of the solid is omitted.
FWiz.SOLID_SKIPBACKFACE The back face of the solid is omitted.
frontShape A DlxFigure object with the final shape of the extrusion. This shape must consist of the same number of points as the basic shape. If this shape is not specified the basic shape specified in the constructor is used.

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 hole = new DlxFigure();
  hole.AddArc(new DlxPoint(0, 0), 3);
  hole.EndShape();

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

See also