sweep - superclass: modifier; super-superclass:MAXWrapper - 18:0 - classID: #(636209254, 529015311)
The Sweep Modifier can be used to turn a spline shape into a mesh with a custom cross-section, providing both built-in and user-defined cross-section shape options.
Available in 3ds Max 8 and higher.
Constructor
Sweep ...
Properties
<sweep>.AssignCSType Integer default: 2 -- radiobtnIndex; AssignCustomSectionType
Gets/sets the Custom Section Type > Mode radio buttons' state.
Possible values are:
0 - Move
1 - Copy
2 - Instance (default)
3 - Reference
<sweep>.CurrentBuiltInShape Integer default:1-- integer; Current_Built_In_Shape
Gets/sets the Built-in Section type.
The available shapes are not hard-coded, but can be extended by editing the file \plugcfgtype\sweep.ini and adding up to 100 custom shape classes.
Current pre-defined values are:
1 - Angle
2 - Bar
3 - Channel
4 - Cylinder
5 - Half Round
6 - Pipe
7 - Quarter Round
8 - Tee
9 - Tube
10 - Wide Flange
<sweep>.CustomShape Integer default:0--integer; Custom_Shape
Gets/sets the state of the Use Built-In Selection/Use Custom Section radio buttons.
When set to 1, the Custom Section will be active.
When 0, the pre-defined Section will be active.
<sweep>.CustomShapeName UndefinedClass default: undefined -- string; Custom_Shape_Name;
Contains the name of the Custom Section object, or undefined if no custom cross-section has been picked yet.
<sweep>.Shapes ArrayParameter default: #(undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, undefined, ...) -- maxObject array; SubAnim
This is an array of 100 elements and is used to store the cross-section shapes.
All elements, but the first one are read-only.
Elements 2 to 100 are used to store the class instances defined by the Built-in types controlled by the .CurrentBuiltInShape
property and the "Built-In Section" drop-down list.
In the beginning, element 2 is assigned an instance of the class defined by the first (default) cross-section in the \plugcfg\sweep.ini file(Angle by default).Selecting other elements from the list or setting .CurrentBuiltInShape
to other values than 1 will create new shape class instances and store them in the respective .CurrentBuiltInShape
+1 elements of the array.
You can assign a new class instance of any shape to the first element of the array to make it available as a custom shape when the .CustomShape
property is set to 1.
FOR EXAMPLE
theShape = circle radius:100--create a circle theMod = sweep()--create a sweep modifier addModifier theShape theMod--add the sweep to the circle --Assign an instance of class Helix to first element of the shapes array: theMod.shapes[1] = Helix() theMod.customShape = 1 --enable the use of the custom shape
<sweep>.MirrorXZPlane BooleanClass default: false -- boolean; Mirror_On_XZ_Plane
Gets/sets the state of the Mirror on XZ plane option.
<sweep>.MirrorXYPlane BooleanClass default: false -- boolean; Mirror_On_XY_Plane
Gets/sets the state of the Mirror on XYplane option.
<sweep>.XOffset Float default: 0.0 -- animatable; float; X_Offset
Gets/sets the XOffset value.
Controls the offset of the cross-section from the path along the cross-section's X axis.
<sweep>.YOffset Float default: 0.0 -- animatable; float; Y_Offset
Gets/sets the YOffset value.
Controls the offset of the cross-section from the path along the cross-section's Y axis.
<sweep>.Angle Float default: 0.0 -- animatable; angle;
Gets/sets the Angle value.
Controls the rotation of the cross-shape around the axis of the path.
<sweep>.SmoothSection BooleanClass default: true -- boolean; Smooth_Section
Gets/sets the state of the Smooth Section option.
When set to true, assign the same smoothing group to all faces generated for a single segment of the base (path) shape, resulting in smoothing along the cross-section.
<sweep>.SmoothPath BooleanClass default: true -- boolean; Smooth_Path
Gets/sets the state of the Smooth Path option.
When set to true, assign the same smoothing group to all faces generated for a single segment of the cross-section shape for all base (path) shape's segments, resulting in smoothing along the base shape.
<sweep>.PivotAlignment Integer default: -1 -- integer; Pivot_Alignment
Gets/sets the Pivot Alignment option. Corresponds to the group of nine checkbuttons.
Possible values are:
0 - Upper Left Corner
1 - Left
2 - Bottom Left Corner
3 - Up
4 - Center
5 - Bottom
6 - Upper Right Corner
7 - Right
8 - Bottom Right Corner
-1 or any value higher than 8 - Default, no alignment
<sweep>.Banking BooleanClass default: true -- boolean
Gets/sets the state of the Banking option.
<sweep>.UnionIntersections BooleanClass default: false -- boolean; Union_Intersections
Gets/sets the state of the Union Intersection option.
<sweep>.GenerateMappingCoords BooleanClass default: false -- boolean; Generate_Mapping_Coords
Gets/sets the state of the Gen.Mapping Coordinates option.
When set to true, mapping coordinates will be generated where U goes around the cross-section and V goes along the base spline, same as with the Renderable Spline option in regular shapes.
<sweep>.RealWorldMapSize BooleanClass default: false -- boolean; Real_World_Map_Size
Gets/sets the state of the Real-World Map Size option.
<sweep>.GenMatIDs BooleanClass default: true -- boolean; Generate_Material_IDs
Gets/sets the state of the Generate Material IDs option.
<sweep>.UsePathIDs BooleanClass default: false -- boolean; Use_Path_IDs
Gets/sets the state of the UseSection IDs option.
<sweep>.UseSectionIDs BooleanClass default: true -- boolean; Use_Shape_IDs
Gets/sets the state of the Use Path IDs option.
Interface: sweepInterface
Methods:
<void>pickCustomSection()
Corresponds to pressing the Pick button in the "Custom Section Types" group of controls of the "Section Type" rollout.
<void>mergeCustomSection()
Corresponds to pressing the Merge From File button in the "Custom Section Types" group of controls of the "Section Type" rollout.
<void>extractCustomSection()
Corresponds to pressing the Extract button in the "Custom Section Types" group of controls of the "Section Type" rollout.
<void>alignPivot()
Corresponds to pressing the Align Pivot button in the "Sweep Parameters" group of controls of the "Section Type" rollout.
To provide the built-in cross-section, the Sweep modifier creates class instances of the respective shape classes and stores these class instances in the .Shapes array.
The properties displayed in the Parameters and Interpolation rollouts are taken from the ParamBlock of the class instance generated for the cross-section.
The corresponding shape classes used for the built-in cross-sections are:
Angle - Angle : Shape
Bar - Rectangle : Shape
Channel - Channel : Shape
Cylinder - Circle : Shape
Half Round - HalfRound : Shape
Pipe - Pipe:Shape
Quarter Round - QuarterRound : Shape
Tee - Tee : Shape
Tube - WalledRectangle : Shape
Wide Flange - WideFlange : Shape
The cross-section object can be accessed as the 4th indexed subAnim of the sweep modifier.
FOR EXAMPLE
theMod = sweep() --> sweep:Sweep theShape = Circle radius:100 --> $Circle:Circle001 @ [0.000000,0.000000,0.000000] addModifier theShape theMod --> OK classof theMod[4].object --> Angle theMod[4].angle_width = 50--set any property available in Angle Shape... --> 50