Extrude

  • Extrude(Operation, BaseObject, Direction, Extent, Depth, Extent2, Depth2, Walled, Thin1, Thin2)

Arguments

Note that some combinations of arguments may not be valid. The restrictions are the same as when creating an Extrude interactively.

  • Operation: This is also referred to as Material Types. It refers to the desired operation

    agc.Add
    agc.Cut
    agc.Slice
    agc.Imprint
    agc.Frozen
  • BaseObject: An existing base object

  • Direction: Which way, or ways to extrude

    agc.DirNormal
    agc.DirReversed
    agc.DirSymmetric
    agc.DirAsymmetric
  • Extent: Primary extrude type

    agc.ExtentFixed
    agc.ExtentThruAll
    agc.ExtentToNext
  • Depth: Depth or distance if Extent is agc.ExtentFixed. This is used for both directions if Direction is agc.DirSymmetric.

  • Extent2: Second extrude type if Direction is agc.DirAsymmetric. Possible values are the same as Extent.

  • Depth2: Depth or distance if Direction is agc.DirAsymmetric and Extent2 is agc.ExtentFixed.

  • Walled: Switch for thin solids or surfaces

    agc.Yes
    agc.No
  • Thin1: Thickness inside profile

  • Thin2: Thickness outside profile

Properties

Note that the acceptable values for these properties are shown above. The same restrictions and argument types apply here as when creating the Extrude.

  • Name

  • Operation

  • Direction

  • Extent

  • Extent2

  • Depth

  • Depth2

  • Walled

  • Thin1

  • Thin2

  • MergeTopology (This is set to agc.Yes by default)

Functions
  • PutBaseObject (BaseObject): Allows you to change the base object of the extrude. The base object should be an existing sketch, plane outline, or named selection.

Example
//Create Extrude of Sketch1, 35 units in the +Z direction
var ext1 = agb.Extrude(agc.Add, ps1.Sk1, agc.DirNormal, agc.ExtentFixed, 35.0,
agc.ExtentFixed, 0.0, agc.No, 0.0, 0.0);
agb.Regen(); //To insure model validity

//Now, make some changes to the Extrude
//Change to Sketch2 as the base object, extrude 20 units in both directions and name it
ext1.PutBaseObject(ps1.Sketch2);
ext1.Name = "OvalExtrude";
ext1.depth = 20;
ext1.Direction = agc.DirSymmetric;
agb.Regen(); //To process the changes and insure model validity