SmartBevelModifier : Modifier

SmartBevelModifier - superclass: modifier; super-superclass:MAXWrapper - 35:0 - classID: #(2401350647L, 179152211L); creatable: true

The Smart Bevel modifier performs a procedural cutback bevel on polygon meshes. The modifier takes the edges to bevel from the incoming stack selection (or from another selection method set with .SelectionType), cuts back the adjacent surfaces by the bevel width, and fills the gap with a beveled surface whose profile is controlled by .Depth and .Segments. The input object is converted to a poly mesh. Available in 3ds Max 2027 and higher.

When you create a new Smart Bevel modifier, it loads the preset named in the SmartBevelModifierPreset key of the [Smart Bevel Modifier] section of the 3ds Max configuration file (Default if the key is not set), if a preset with that name exists. The preset values replace the default values listed below. To create modifiers with the default values instead, set SmartBevelModGlobal.UseDefaultPreset to false.

Constructor

SmartBevelModifier...

Properties

The ranges listed below are the ranges of the modifier UI controls. MAXScript does not clamp values that are set outside these ranges.

Bevel Options

<SmartBevelModifier>.Width    Float    default: 0.1   --  animatable; worldUnits

Gets/sets the bevel width in world units, that is, how far the surfaces adjacent to each beveled edge are cut back. Range: 0.0 to 10000.0. A value of 0.0 disables the bevel. When .UseSafeWidthLimit is true, the width that is applied can be clamped to a smaller value.

<SmartBevelModifier>.Segments    Integer    default: 1   --  animatable; integer

Gets/sets the number of segments across the beveled surface. Range: 1 to 500.

<SmartBevelModifier>.Depth    Float    default: 0.5   --  animatable; float

Gets/sets the depth value that defines the profile shape of the beveled surface. Range: -0.5 to 1.0.

There are four defined "reference depths" at 1.0, 0.5, 0.0, and -0.5. These are defined as follows:

Any arbitrary depth value will lie between two consecutive reference depth; the surface is then formed by linearly interpolating between the surfaces at the adjacent reference depths. For example at depth 0.25 the beveled surface is half way between the depth 0.5 and 0.0 surfaces.

Selection

<SmartBevelModifier>.SelectionType    Integer    default: 4   --  animatable; integer

Gets/sets which edges are beveled:

Note: The modifier UI drop-down list shows From Stack first, so the order of the list does not match these values.
<SmartBevelModifier>.EnableMinAngle    BooleanClass    default: false   --  animatable; boolean

Specifies whether the edges to bevel are filtered by .MinAngle.

<SmartBevelModifier>.MinAngle    Float    default: 20.0   --  animatable; float

Gets/sets the minimum angle in degrees between the faces on either side of an edge for that edge to be beveled. Edges with a smaller angle are skipped. Used only when .EnableMinAngle is true. Range: 0.0 to 180.0.

<SmartBevelModifier>.UseUnsmoothedEdges    BooleanClass    default: true   --  boolean

When set to true, only edges that are not smoothed (edges whose adjacent faces share no smoothing group) are beveled.

Bevel Width Limit

None of the width limit properties are exposed in the modifier UI.

<SmartBevelModifier>.UseSafeWidthLimit    BooleanClass    default: true   --  boolean

When set to true, the modifier computes a maximum safe width at which no two cutback curves intersect, and clamps .Width to that value multiplied by .limitPercent. When the width is clamped, the modifier UI shows an Auto-Limited indicator next to the Width spinner. Scenes saved before width limiting was added load with this property set to false, so they keep their original result.

<SmartBevelModifier>.limitPercent    Float    default: 0.98   --  float

Gets/sets the fraction of the computed safe width limit that is applied, which leaves a small margin below the limit.

<SmartBevelModifier>.UseBoundingBoxWidthLimit    BooleanClass    default: true   --  boolean

Specifies whether the safe width limit considers the bounding box of the mesh.

<SmartBevelModifier>.UseMeshBoundaryWidthLimit    BooleanClass    default: true   --  boolean

Specifies whether the safe width limit considers the outer shell of the mesh. This is more precise than the bounding box limit.

<SmartBevelModifier>.UseConvexWidthLimit    BooleanClass    default: true   --  boolean

Specifies whether the safe width limit considers convex faces.

<SmartBevelModifier>.UseHardIslandsWidthLimit    BooleanClass    default: false   --  boolean

Specifies whether the safe width limit considers islands of faces bounded by hard (unsmoothed) edges.

<SmartBevelModifier>.UseBinarySearchWidthLimit    BooleanClass    default: true   --  boolean

Specifies whether the safe width limit is refined with a binary search, which tests width values until it finds one that fails.

Cutback Relaxation

<SmartBevelModifier>.SequenceSmoothingCoefficient    Float    default: 0.0   --  animatable; float

Gets/sets the Cutback Relaxation value, which controls how much the curve formed by the beveled edges is smoothed. A value of 0.0 uses the unsmoothed curve, and 1.0 uses a fully smoothed approximation. Higher values also let smoothing continue across sharper turns between consecutive edges (up to 180 × the coefficient, in degrees). Range: 0.0 to 1.0.

Arc Removal

<SmartBevelModifier>.ArcRemoveIsolated    BooleanClass    default: true   --  boolean

When set to true, removes arcs that do not have edges connecting to the original surfaces. Corresponds to the Remove Isolated Arcs option.

<SmartBevelModifier>.ArcRemoveTolerance    Float    default: 0.0   --  float

Gets/sets the threshold for the Weld Opposing Arcs option, which merges partial arcs that would continue flow across the original surface and form a loop when welded. A value of 0.0 disables the option. Range: 0.0 to 5.0.

<SmartBevelModifier>.ArcRemoveMatchingTolerance    Float    default: 0.0   --  float

Gets/sets the threshold for welding partial arcs that connect to the same side of the bevel. A value of 0.0 disables the option. Range: 0.0 to 5.0. This property is not exposed in the modifier UI.

<SmartBevelModifier>.ArcRemoveAllTolerance    Float    default: 0.0   --  float

Gets/sets the threshold for the Weld All Arcs option, which welds all arcs within the threshold. A value of 0.0 disables the option. Range: 0.0 to 5.0.

<SmartBevelModifier>.ShortEdgeRemovalThreshold    Float    default: 0.01   --  float

Gets/sets the length below which an edge is treated as short and can be removed, as a fraction of the local edge length. Range: 0.0 to 1.0. Scenes saved in 3ds Max 2027 load with this property set to 0.0. This property is not exposed in the modifier UI. Available in 3ds Max 2027.1 and higher.

Material Output

<SmartBevelModifier>.UseMaterialOutput    BooleanClass    default: false   --  boolean

When set to true, assigns .MaterialID to the faces of the beveled surface.

<SmartBevelModifier>.MaterialID    Integer    default: 1   --  animatable; integer

Gets/sets the material ID assigned to the beveled surface when .UseMaterialOutput is true. Range: 1 to 65536.

Smoothing Output

<SmartBevelModifier>.useSmoothingOption    BooleanClass    default: true   --  boolean

Specifies whether the Smoothing Output options (.SmoothingOption, .SmoothingThreshold, and .SmoothToAdjacent) are applied.

<SmartBevelModifier>.SmoothingOption    Integer    default: 1   --  integer

Gets/sets what is smoothed when .useSmoothingOption is true:

<SmartBevelModifier>.SmoothingThreshold    Float    default: 30.0   --  animatable; float

Gets/sets the angle threshold in degrees for smoothing. Edges whose adjacent faces meet at a smaller angle are smoothed. Larger angles produce a hard edge. Range: 0.0 to 180.0. When .useSmoothingOption is false, a threshold of 30.0 is used.

<SmartBevelModifier>.SmoothToAdjacent    BooleanClass    default: true   --  boolean

When set to true, normals are smoothed across the edges between the beveled surface and the surrounding faces, unless those edges are hard according to .SmoothingThreshold. When set to false, every edge bounding the beveled surface is hard. Takes effect only when .useSmoothingOption is true and .SmoothingOption is 1.

Output Options

<SmartBevelModifier>.OutputSurfaceType    Integer    default: 0   --  integer

Gets/sets which surfaces are included in the output mesh:

The output face selection contains the faces of the beveled surface.

<SmartBevelModifier>.UVOutputType    Integer    default: 1   --  integer

Gets/sets how UV coordinates are applied to the beveled surface. This property is not exposed in the modifier UI.

<SmartBevelModifier>.OperationVersion    Integer    default: 19   --  integer

Gets/sets the version of the bevel algorithm. The default is the latest version supported by the running 3ds Max. The property stores any value that you set, but values outside the supported range are clamped when the bevel is computed. Scenes saved in 3ds Max 2027 load with the 2027 version, so they keep their original result. Changing this property can change the result. This property is not exposed in the modifier UI. Available in 3ds Max 2027.1 and higher.

SmartBevelModifier Interfaces

Interface: SmartBevelModifier

This is a mixin interface exposed by every Smart Bevel modifier instance.

Methods

<integer>version()

Returns the file version of the modifier: 2 = 3ds Max 2027, 3 = 3ds Max 2027.1 and higher (adds .OperationVersion, .ShortEdgeRemovalThreshold, and the arc removal version).

<boolean>SavePreset <string>name

Saves the current parameter values of the modifier as a preset with the given name, in the SmartBevelPresets folder of the user settings directory (getDir #userSettings). Returns true on success. A preset with the same name as a factory preset is saved as a user preset, and takes precedence over the factory preset.

Note: A preset saved with a new name cannot be loaded or deleted with LoadPreset or DeletePreset until a new Smart Bevel modifier is created, which refreshes the preset list.
<boolean>LoadPreset <string>name

Loads the named preset into the modifier and redraws the viewports. Returns false if the preset could not be loaded. name is the preset name as shown in the preset list of the modifier, not its file name. For example, the factory preset stored in Round_S_Angle.SmartBevelPreset is named "Round: S Angle". Factory preset names can be localized.

<boolean>DeletePreset <string>name

Deletes the named user preset. Returns false if no preset with that name exists, or if the preset is a factory preset (factory presets are read-only). The preset file is not removed from disk. Instead, it is renamed with a .deleted extension (.deleted1, .deleted2, and so on if that name is taken), so it no longer appears in the preset list.

FOR EXAMPLE

   -- Bevel all edges of a box with Smart Bevel
   bx = convertToPoly (Box length:40 width:40 height:40)
   b = SmartBevelModifier()
   addModifier bx b
   b.Width = 0.5
   b.Segments = 3
   bx.mesh.numfaces

   -- Save the current settings as a user preset
   b.SavePreset "MyRoundBevel"

   -- Load a factory preset; use the preset name as shown in the preset list of the modifier
   b.LoadPreset "Round: S Angle"
   #(b.Width, b.Segments)

OUTPUT:

   188        -- triangle faces after beveling (12 before)
   true       -- SavePreset
   true       -- LoadPreset
   #(0.1, 2)  -- Width and Segments from the "Round: S Angle" preset
<integer>GetArcRemovalVersion()

Returns the version of the arc removal algorithm used by this modifier. This version is saved with the scene. Scenes saved without it load with the 3ds Max 2027 version, and new modifiers use the latest version (2 in 3ds Max 2027.3). Available in 3ds Max 2027.1 and higher.

<void>SetArcRemovalVersion <integer>ver

Sets the version of the arc removal algorithm used by this modifier. The value is not validated. Available in 3ds Max 2027.1 and higher.

Interface: SmartBevelModGlobal

The SmartBevelModGlobal core interface provides global settings for the Smart Bevel modifier.