Bounding Wireframe - Complete Documentation¶
PLACE IMAGE OF THE WIREFRAME CUBE CONTAINING SELECTED OBJECTS IN THE VIEWPORT HERE
The "Bounding Wireframe" tool in DAMTools allows you to create a world-aligned wireframe cube that contains all selected objects, regardless of their position, rotation, or scale. It's ideal for visualizing the space occupied by a group of objects or delimiting work areas.
Index¶
- What is Bounding Wireframe?
- Workflow
- Shortcuts and Access
- Functionality Explanation
- Key Code Snippets
What is Bounding Wireframe?¶
It allows you to create a wireframe cube (visible only in the viewport, not renderable) that completely contains all selected objects, aligned with the world axes. The cube automatically adjusts its size in all three axes to encompass the entire selection, regardless of the number of objects or their transformations.
PLACE IMAGE OF OBJECTS BEFORE AND AFTER CREATING THE BOUNDING WIREFRAME HERE
Workflow¶
- Select one or more objects in the scene.
- Open the DAMTools pie menu (Shift+W by default).
- In the TRANSFORM section, click on "Bounding Wireframe".
- A wireframe cube will be created that contains all selected objects.
PLACE GIF OR IMAGE SEQUENCE OF THE USAGE WORKFLOW HERE
Shortcuts and Access¶
- DAMTools Pie Menu (Shift+W): "Bounding Wireframe" option in the TRANSFORM section.
- Operator:
DAMTools.create_bounding_wireframe
Functionality Explanation¶
- The generated cube:
- Has no material assigned.
- Is not renderable (only visible in the viewport).
- Is displayed only as a wireframe.
- Is always aligned with the world axes.
- Its size automatically adjusts to contain all selected objects.
- The cube does not affect the original selection and can be deleted manually if no longer needed.
- The size buffer can be adjusted in the code to define the margin between the objects and the cube.
Key Code Snippets¶
Operator Execution¶
center = (min_bounds + max_bounds) / 2
bpy.ops.mesh.primitive_cube_add(size=2, enter_editmode=False, align='WORLD', location=center)
cube = context.active_object
cube.scale.x = dimensions.x / 2
cube.scale.y = dimensions.y / 2
cube.scale.z = dimensions.z / 2
For technical details and explanation of each file, see the technical documentation in the [DOCUMENTATION] folder.