Sweep(Operation, Profile, Path, Alignment, Scale, Turns, Walled, Thin1, Thin2)
Arguments
Note that some combinations of arguments may not be valid. The restrictions are the same as when creating a Sweep interactively.
Operation: This is also referred to as Material Types. It refers to the desired operationagc.Addagc.Cutagc.Sliceagc.Imprintagc.FrozenProfile: An existing sketch, plane outline, or named selectionPath: An existing sketch, plane outline, or named selectionAlignment: Sweep Alignmentagc.AlignGlobalagc.AlignTangentScale: Determines the size of the end of the sweep relative to the original profileTurns: Number of rotations about the path. A positive value rotates Counterclockwise while a negative value rotates Clockwise. If this argument is zero, "Twist Specification" property is set to "No Twist". If it is non-zero, "Twist Specification" value is set to "Turns", and Turns property will have the same value.Walled: Switch for thin solids or surfacesagc.Yesagc.NoThin1: 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 Sweep.
NameOperationAlignmentScaleTwistSpecification: Twist can be specified either through Turns or Pitch. This property should be used to input the twist specification. It can have three values:agc.NoTwist(default value)agc.Turnsagc.PitchTurns(TwistSpecificationshould be set toagc.Turnsto use this property)Pitch(TwistSpecificationshould be set toagc.Pitchto use this property) Pitch is the length of the path for one full rotation. A positive value rotates Counterclockwise while a negative value rotates Clockwise.WalledThin1Thin2MergeTopology(This is set toagc.Noby default)
Note: TwistSpecification and Pitch must be set as properties if you want to use Pitch.
Functions
PutSweepProfile (Profile): Allows you to change the profile of the sweep. The profile should be an existing sketch, plane outline, or named selection.PutSweepPath (Path): Allows you to change the path of the sweep. The path should be a sketch, plane outline, or named selection and not the same as the profile.
Example
//Create Sweep of sketch1 along the path defined by sketch2 (from a different plane) var sweep1 = agb.Sweep(agc.Add, ps1.Sk1, ps2.Sketch2, agc.AlignTangent, 1.0, 0.0, agc.No, 0.0, 0.0); agb.Regen(); //To insure model validity //Now make some changes to the Sweep //Change its name, ending scale, do a full turn and make it walled sweep1.Name = "OvalSweep"; sweep1.Scale = 0.1; sweep1.Turns = 1.0; sweep1.Walled = agc.Yes; sweep1.Thin1 = 0.0; sweep1.Thin2 = 1.0; agb.Regen(); //To process the changes and insure model validity