Revolve(Operation, BaseObject, Axis, Direction, Angle, Angle2, Walled, Thin1, Thin2)
Arguments
Note that some combinations of arguments may not be valid. The restrictions are the same as when creating a Revolve 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 objectAxis
: An existing plane axis, 2D line, or 3D lineDirection
: Which way, or ways to revolveagc.DirNormal
agc.DirReversed
agc.DirSymmetric
agc.DirAsymmetric
Angle
: Primary revolve angle in degrees. This is used for both directions if Direction is agc.DirSymmetric.Angle2
: Secondary revolve angle in degrees. This is only used if Direction is agc.DirAsymmetric.Walled
: Switch for thin solids or surfacesagc.Yes
agc.No
Thin1
: Thickness inside profileThin2
: 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 Revolve.
Name
Operation
Direction
Angle
Angle2
Walled
Thin1
Thin2
MergeTopology (This is set to agc.Yes by default)
Functions
PutBaseObject (BaseObject)
: Allows you to change the base object of the revolve. The base object should be an existing sketch, plane outline, or named selection.PutAxis (Axis)
: Allows you to change the axis of the revolve. The axis should be an existing plane axis, 2D line, or 3D line.
Example
//Create Revolve of Sketch1, 90 degrees about the X Axis var rev1 = agb.Revolve(agc.Add, ps1.Sk1, ps1.XAxis, agc.DirNormal, 90.0, 0.0, agc.No, 0.0, 0.0); agb.Regen(); //To insure model validity //Now make some changes to the Revolve //Change to Sketch2 as the base object, and revolve about Line Ln10 rev1.PutBaseObject(ps1.Sketch2); rev1.PutAxis(ps1.Ln10); //Now Name it and change the rotation angle to 45 degrees rev1.Name = "OvalRevolve"; rev1.Angle = 45; //Next, Add a 90 degree rotation in the opposite direction rev1.Direction = agc.DirAsymmetric; rev1.Angle2 = 90; //Finally, make it a walled solid with a thickness of 4 units, 3 to the inside and 1 outside rev1.Walled = agc.Yes; rev1.Thin1 = 3.0; rev1.Thin2 = 1.0; agb.Regen(); //To process the changes and insure model validity