Brep Slicer Quick Help


Brep Slicer Parameters Rollout
The Brep Slicer Parameters rollout.

The Brep Slicer tool is intended to provide a streamlined workflow for cross-sectioning Breps and highlighting the cross-section faces and edges. It uses Brep Boolean technology to slice user-specified collections of base shapes with one of several available slicing primitive shapes.

Once a Brep Slicer object is created the following options become available via the main Power Slice Parameters rollout:

  1. Slice
  2. Translate/Rotate
  3. Flip Slice Direction
  4. Configure Slicer
  5. Alignment Options
  6. Display Options

Creating a Brep Slicer

A Brep Slicer can be applied to a single Brep Object or to a selection set containing multiple Brep Objects. The Brep Slicer does not currently work with Assembly objects. Every object in the selection set needs to be a solid for the Slicer to work properly. Currently base shapes can only be added at creation time by being in the initial selection set when the Brep Slicer is created (more can be added indirectly, by using Extract Operands and creating a new Slicer). Once all the desired base Brep Objects are selected, the Brep Slicer can be created. Note that no actual slicing occurs until the Slice option is activated.

Activate Slice

The Slice button is a switch that controls whether or not the Slicing operation is being executed and updated. Because slicing does a Boolean on every base shape, it can be a very computationally expensive (i.e., slow!) operation. This switch allows the user to disable slicing to improve interactivity while changing options or positioning the slicer, and then calculate the result in one shot. This switch is disabled by default, as it is expected that the user will want to do some preliminary configuration.

Quick Translate/Rotate

The Translate and Rotate buttons are shortcut buttons for positioning the slicer. They switch the Brep Slicer to Modify mode (if it isn't already in Modify), activate the appropriate tool (either Translate or Rotate), switch the transformation space to 'Local', and select the slicing shape sub-operand. The 'local' space is used because the local slicing shape transformation gizmo is tied to the shape itself (see: Plane, Box, Cylinder, Sphere).

For performance reasons, when working with very complicated sets of base shapes, it is recommended to turn off the Slice button.

There is a known issue when using the Quick Translate or Rotate options on a freshly created Brep Slicer object when there are multiple base shapes. Because the old nodes the base shapes came from are not all deselected, the current selection set contains objects other than the Brep Slicer. Going to the Modify tab does not display any rollouts if multiple different object types are selected. Thus, if the user uses either of these shortcut buttons with a multi-selection, no UI will appear. The user must manually select just the Brep Slicer object, and go to the Modify panel, before these options will work properly.

Flip Slice Direction

The Flip Slice Direction button is a slicing object positioning tool that flips the rotational orientation of the slicing shape. More specifically, slicing shapes are oriented primarily by their local Z-Axis. The Flip Slice Direction option will reverse this local Z-Axis by rotating it 180 degrees. Doing a second Flip will generally (approximately) reverse the first Flip.

Configure Slicer

The Configure Slicer Dialog is used to configure the shape and dimensions of the slicer. The slicer can take the form of a plane, box, cylinder, or sphere. When the slicer is a plane, some additional options are available. The "Use Infinite Plane" option makes the plane automatically dimension itself such that it is at least big enough to slice completely through all the base objects. This option is on by default, and must be disabled if the user wishes to manually dimension the plane. The other plane option, "Split Only", prevents the plane from removing any faces. It only creates sliced edges on the result where the plane intersected the base operands (this is like the Imprinting option on the Boolean tool).

Alignment Options

The Alignment Options Dialog provides some additional tools to help with positioning the slicing shape. The shape can be aligned to the X, Y, Z axes, the viewport, or to a surface normal picked off the current result Brep. It can also be re-centered, or reset. There is also a Fit option which dimensions the slicing shape based on the base shape bounding boxes.

Display Options

The Display Options Dialog allows the user to configure the appearance of the intersection edges and faces, as well as the slicing shape itself. Colors for all three can be quickly set. The cross-section faces can be mapped to custom material IDs. The display of the slicing shape and the cross-section edges can be disabled in the viewport or for renders. The thickness of cross-section edges and the opacity of the slicing shape can also be modified.

Positioning the Slicer

There are a variety of ways to modify the position of the slicing shape relative to the base shapes.

The Quick Translate/Rotate buttons and the Flip Slice Direction button are the most direct ways to manually maneuver the slicing shape. Alternatively, the usual sub-operand selection method (i.e., through the Operator Parameters rollout) can be used in conjuction with the Max transformation tools to position the slicing shape or any of the base shapes.

The Alignment Options dialog contains various tools for quickly changing the slicer orientation. For example, the slicer can be aligned to the viewport in one click from this dialog.

There are minor differences in how each slicing shape type is anchored to the slicing transform gizmo. To see how the slicing types and dimensions interact, please visit the individual sections for each slicing primitive (Plane, Box, Cylinder, Sphere).

Note that the position/orientation of sub-operands of a Brep Object can be animated. This means the slicing shape can be animated moving through the base shapes, achieving a 'moving cross-section' effect.

Controlling the Visual Appearance

The Display Options dialog is the primary way to change the colors, material mappings, etc., of the intersection edges/faces and the slicing shape. However, some additional points of interest are described below.

A newly created slicer will generally default to the Plane slicer type. Also, backface culling for the Brep Slicer node will generally be on. This means that depending on the initial viewing angle, the plane might not be visible in the viewport (rotating the viewport around the base shapes will make the plane visible if this is the case). The user may wish to disable backface culling (in the 3ds Max Display taskbar) so that the plane is visible from both sides. However, it is usually a good idea to re-enable backface culling before doing a render, to prevent the 'tearing' effect that occurs when coplanar intersecting polygons are rendered.

If the user's video card supports it, enabling 3ds Max's Hardware Lighting mode can improve the visual appearance of transparent slicing shapes in the viewport.

When it is first created, the Brep Slicer creates some materials for internal use. These materials are added as sub-materials to the node's material after all the base shapes' materials are added in, and the material offset to the first of these is stored as an internal parameter. The names of these internal materials are slicerMatSlice, slicerMatFaces, slicerMatEdges. An advanced user may sometimes wish to modify these materials directly, or even use MaxScript to change the internal offset. Changing this offset will change which sub-materials the Brep Slicer associates with cut edges/faces and slicer faces.

Slicer Performance Tips

Disabling Slicing when positioning and configuring the slicer is highly recommended for all but simplest models (in fact, slicing is disabled by default). Doing so will result in an initial pause while an 'unsliced' result is calculated and cached, but further changes that would normally trigger a slicing recalculation should be much more interactive afterwards. Many of the display options do NOT trigger this recalculation, so they can be modified fairly quickly even when Slicing is enabled.

For particularly complex slices, switching to a single viewport, going to wireframe mode, and utilizing adaptive degradation may further increase performance while preparing the slice. Note that in these cases, when Slicing is eventually activated, a long wait can be expected.

Known Limitations and Bugs

Currently known issues are listed below. This list is not guaranteed to be complete or up-to-date.

Using MaxScript with the Brep Slicer

Currently, MaxScript exposure of Brep Slicer functionality is limited to auto-published properties like parameters and references. Since the slicing shape transform can be changed through the reference to its Controller, and most other slicing features are stored in parameters, this should already provide a decent variety of scripting possibilities (use showProperties($) while the slicer is selected to see what is available). One thing that could be a little tricky is creating a new Brep Slicer programmatically, as the script may have to manually set up the sub-operand references. Attempting this would definitely be an "at the user's own risk" sort of operation.

Document last updated: April 2010 (nPower version 7.0). Tested with Firefox 3.6.3, Internet Explorer 7.0.6002.