You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

问询:3D扫描PLY网格孔隙结构最长轴方向角度量化方法

Quantifying Pore Orientation: Longest Axis Angle for Disconnected Mesh Components

Hey Mathieu, great question—measuring the orientation of pore structures is super valuable for fields like materials science, geotechnics, and porous media research. I’ve got practical methods to do this with your current tool (MeshLab) plus some alternatives that offer more flexibility for batch processing or custom workflows.

Using MeshLab (Your Current Tool)

MeshLab can handle this with a few built-in filters, though you’ll need to split your mesh into individual connected components first, then compute orientation metrics for each.

Step 1: Split Mesh into Connected Components

First, separate your single pore mesh into its disconnected parts:

  • Go to Filters > Remeshing, Simplification and Reconstruction > Split Mesh into Connected Components
  • This will automatically create a new mesh layer for each isolated pore component in your workspace.

Step 2: Compute Principal Axes (Longest Axis) for Each Component

For each component layer:

  1. Select the component mesh in the Layer dialog.
  2. Run Filters > Quality Measures and Computations > Compute Geometric Measures
  3. In the output log (bottom pane of MeshLab), look for the Inertia Tensor section. The longest axis corresponds to the eigenvector associated with the largest eigenvalue. MeshLab will output the eigenvectors as three 3D vectors (e.g., Eigenvector 0: (x,y,z) which is the longest axis).

Step 3: Convert Vector to Angle

To get the angle of the longest axis relative to a reference (like the X/Y/Z axis), use basic trigonometry. For example, the angle between the longest axis vector (vx, vy, vz) and the X-axis is:

angle_x = arccos(vx) * (180/π)

You can calculate this manually or use a quick spreadsheet script for batch processing.

Batch Processing Tip

If you have hundreds of components, manual processing is tedious. Use MeshLab’s MLX scripting to automate the workflow:

  1. Record a macro of the split + compute steps.
  2. Save it as an .mlx file, then modify it to loop through all components and export results to a text file.

Alternative Tools for More Flexibility

If you need to scale up or customize the analysis, these tools are great options:

Open3D (Python)

Perfect for code-driven batch processing. You can load your PLY mesh, split components, and compute principal axes in just a few lines:

import open3d as o3d
import numpy as np

# Load your pore mesh
mesh = o3d.io.read_triangle_mesh("your_pores.ply")

# Split into connected components
cluster_labels = mesh.cluster_connected_triangles()[0]
unique_components = np.unique(cluster_labels)

# Iterate through each component
for idx, label in enumerate(unique_components):
    # Extract the component mesh
    component_triangles = np.where(cluster_labels == label)[0]
    component = mesh.select_by_index(component_triangles)
    
    # Compute principal axes (longest axis is first eigenvector)
    pca_results = component.compute_principal_components()
    longest_axis = pca_results.principal_components[:, 0]
    
    # Calculate angle relative to X-axis (convert radians to degrees)
    angle_with_x = np.arccos(np.dot(longest_axis, [1, 0, 0])) * 180 / np.pi
    print(f"Component {idx}: Longest axis angle (X-axis): {angle_with_x:.2f}°")

CloudCompare

A user-friendly GUI tool with strong mesh analysis features:

  1. Load your PLY mesh.
  2. Use Edit > Split > Split mesh into connected components to separate pores.
  3. For each component, run Tools > Analysis > Compute geometric features—this will directly output principal axis orientations and even angle metrics relative to the coordinate system. You can export all results to a CSV file for further analysis.

MATLAB

If you’re familiar with MATLAB, you can convert your mesh to a point cloud and use built-in functions:

  • Use readply to load the mesh, then convert to a point cloud with pointCloud.
  • Use regionprops3 to identify connected components and compute their principal axes. The Orientation property gives the angles of the principal axes relative to the coordinate system.

Key Notes

  • Clean Your Mesh First: Remove tiny noise components with MeshLab’s Filters > Cleaning and Repairing > Remove Isolated Pieces to avoid skewing your orientation data.
  • Coordinate System Alignment: Make sure your mesh’s coordinate system matches the real-world orientation of your sample. If not, use Filters > Transformation > Rotate in MeshLab to adjust it before analysis.

内容的提问来源于stack exchange,提问作者Mathieu Leclerc

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.29 07:51:34