Skip to main content

Automated Wall Thickness Analysis in Volvicon: From Segmentation to Results

· 6 min read
Volvicon Team
Volvicon Development Team

Wall thickness is one of the most directly actionable measurements in volumetric CT analysis. Whether assessing compliance with geometric tolerances, identifying thin-wall failure risks in a casting, or validating a printed polymer part against a nominal CAD model, the underlying measurement task is the same: determine the shortest material distance from every point on the outer surface to the opposing inner boundary. This post demonstrates how to automate the complete pipeline in Volvicon — from raw volume data through to a statistical report — using the Python Scripting API.

Overview

The workflow consists of four stages:

  1. Threshold segmentation: Extract the material region from the volumetric grayscale data as a binary mask.
  2. Surface generation and cleanup: Convert the mask to a triangle mesh surface, apply remeshing and geometric repairs.
  3. Wall thickness analysis: Run the ray-casting analysis on the surface to compute per-vertex thickness values.
  4. Results export and visualisation: Write statistics to disk and configure colour-mapped display.

This pipeline is well-suited to batch processing scenarios — for instance, comparing wall thickness distributions across multiple production parts scanned in the same session.

Threshold Segmentation

The first step isolates the material from the background by applying an intensity threshold to the grayscale volume. The segmentation quality at this stage directly affects the accuracy of the subsequent surface and therefore the wall thickness values. Thresholds that include background noise will inflate surface area and generate erroneous thin-wall regions at the part boundary.

threshold_params = api.ThresholdParams()
threshold_params.lower_threshold = 31724.617
threshold_params.upper_threshold = 65156
threshold_params.fill_cavities = True
threshold_params.filter_regions = True
threshold_params.keep_largest = True

Key parameter choices:

  • fill_cavities: Fills enclosed interior voids in the binary mask, ensuring the segmented object represents the full material region rather than a hollow shell. Disable this only if interior void geometry is relevant to the analysis.
  • keep_largest: Retains only the largest connected component, discarding small background fragments or debris that fall within the threshold range.
  • filter_regions: Removes disconnected region noise below a minimum size.
Threshold selection

If the volume has been reconstructed from cone beam CT projections, beam hardening artefacts may produce a non-uniform intensity distribution across the part. In this case, a fixed global threshold may be insufficient. Consider cropping the volume to the region of interest or applying a beam hardening correction before segmentation.

Surface Generation and Cleanup

Once the mask is created, it is converted to a triangle mesh surface for analysis:

mask_to_surface_params = api.MaskToSurfaceParams()
mask_to_surface_params.resolution_reduction = True
mask_to_surface_params.xy_resolution_reduction = 2
mask_to_surface_params.smoothing = True
mask_to_surface_params.smooth_iterations = 50
mask_to_surface_params.triangle_reduction = True
mask_to_surface_params.triangle_reduction_percent = 90

The triangle_reduction_percent value of 90 reduces the triangle count by 90%, which is appropriate for smooth, industrial parts where the mesh detail is well above the scale of the wall thickness variation of interest. For more geometrically complex parts with fine features, reduce this value to preserve surface fidelity.

After mesh extraction, two additional cleanup steps are applied:

Remeshing (surface_operations.remesh) regularises element size and improves mesh uniformity. This reduces artefacts in the wall thickness analysis caused by highly irregular triangulations, where very elongated triangles can produce sampling bias.

Surface diagnostics and repair (surface_operations.fix_surface) corrects common mesh pathologies: non-manifold edges, self-intersections, degenerate triangles, and open boundaries. The wall thickness ray-casting algorithm assumes a closed, manifold surface. Unrepaired mesh defects in these regions produce undefined or outlier thickness values.

warning

Surface repair is a best-effort operation. For parts with complex internal geometry or fine features near the CT resolution limit, some mesh defects may persist. Inspect the mesh in the 3D view before proceeding to analysis, and compare the repaired mesh against 2D slice views to confirm that no material has been inadvertently added or removed.

Wall Thickness Analysis

With a clean, closed surface, the wall thickness analysis can proceed. The ray-casting method is used here:

wall_thickness_params = api.WallThicknessParams()
wall_thickness_params.method = api.WallThicknessMethod.RayCasting
wall_thickness_params.max_wall_thickness = 20.0
wall_thickness_params.search_angle = 20.0

Ray Casting vs. Shrinking Sphere

The ray casting method fires a ray from each surface vertex along its outward normal (and inward normal) and records the distance to the first opposing surface intersection. This is fast and accurate for parts where inner and outer surfaces are roughly parallel — sheet metal, extrusions, simple castings, and similar geometry.

The shrinking sphere method instead finds the largest inscribed sphere centred on the normal axis that contacts both surfaces. This yields more physically meaningful results for curved walls and organic geometries where ray casting may underestimate thickness on the concave side of a curved section. The trade-off is substantially higher computation time.

For most industrial CT workflows, ray casting is the appropriate first choice. Switch to shrinking sphere when ray casting produces visible artefacts (typically seen as anomalously thin regions at corners or curved transitions).

Search angle tuning

The search_angle parameter defines a cone half-angle around the surface normal within which the algorithm searches for an opposing surface. A value of 20° is a practical default:

  • Too small (< 5°): May miss opposing surfaces on coarse or irregular meshes.
  • Too large (> 30°): May find oblique surfaces that are not geometrically opposing, inflating thickness values at part edges and thin ribs.

Setting the Maximum Wall Thickness

The max_wall_thickness limit constrains the search distance. Setting this to a value slightly above the known nominal wall thickness improves performance without excluding any physically valid measurements. For parts with unknown thickness range, set it to 0 (unlimited) for the first run, observe the maximum value from the resulting statistics, and then re-run with a constrained value for batch processing.

Results and Visualisation

On completion, the analysis returns a full statistical summary:

results = analysis_operations.get_wall_thickness_analysis_results(wt_name)
print(f"Mean wall thickness: {results.statistics.mean_value:.3f} mm")

The colour-mapped surface display uses a lookup table to map thickness values to colour. The configuration below uses a reverse rainbow scale with custom colours for out-of-range regions, which is effective for immediately identifying both critically thin regions (below the min range) and excess material (above the max range):

analysis_display_settings.lookup_table_type = api.LookupTableType.ReverseRainbow
analysis_display_settings.range = [1.0, 20.0]
analysis_display_settings.below_min_range_color = [0.6, 0.0, 1.0] # Violet for thin regions
analysis_display_settings.above_max_range_color = [1.0, 0.6, 0.6] # Light red for thick regions

Statistical results are written to disk for reporting or further analysis:

analysis_operations.write_wall_thickness_results_to_disk(
results,
r'C:\Samples\wall_thickness.txt'
)
Interactive analysis via the UI

The scripting interface returns aggregate statistics. For interactive analysis — point picking, histogram brushing, identifying specific thin-wall locations by clicking in the 3D view, or generating a 3D PDF report — use the Wall Thickness Analysis tool in the Analyze ribbon tab. The scripting and UI analysis objects are compatible; a project saved after scripting analysis can be opened interactively for further inspection.

Video Tutorial

The complete workflow is demonstrated in the video below: