Skip to content

KhoiDOO/meshinfo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

187 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mesh Analysis and Visualization for Research

A powerful 3D mesh and point cloud analysis and visualization toolkit built with ModernGL and Python. Load, inspect, and analyze 3D mesh and point cloud files with real-time rendering and comprehensive geometric analysis.

Overview

Diagnostic & Comparison

Analysis Dashboard Multi-mesh Comparison Non-manifold Detection
Analysis Dashboard Multi-mesh Comparison Non-manifold Detection

Visualization Modes

Solid & Wireframe Self-intersection Point Cloud
Solid & Wireframe Modes Self-intersection Point Cloud
Face Normals Vertex Normals Point Cloud Normals
Face Normals Vertex Normals Point Cloud Normals

Installation

Requirements

  • Python 3.7+
  • OpenGL 3.3+ capable graphics card

Setup

Running with Repo

git clone https://github.com/KhoiDOO/meshinfo.git
cd meshinfo

Create conda env

conda create -n meshviewer python=3.10
conda activate meshviewer
pip install .

Install as Python Package:

pip install git+https://github.com/KhoiDOO/meshinfo.git

Getting Started

Mesh Viewer

python main.py
# Press O to open a mesh file
# See docs/VIEWER.md for full documentation

Enable mesh intersection checking (can be expensive on large meshes):

python main.py --intersect

Enable non-manifold vertex checking:

python main.py --nonmanifold

Enable additional analysis flags:

python main.py --components --geometry --topology

Mesh Analysis API

In case you want to just analyze your mesh w/o viewing it, we provide a clean API.

import trimesh
import os
from meshinfo import MeshInfo

mesh_path = "your_mesh_file.obj"
filename = os.path.basename(mesh_path).split(".")[0]
mesh = trimesh.load(mesh_path, process=False)

mesh_info = MeshInfo(
    mesh,
    name=filename,
    check_intersection=True,
    check_components=True,
    check_nonmanifold_vertices=True,
    check_geometry=True,
    check_topology=True,
    verbose=True
)

# Export all metrics as a dictionary
mesh_dict = mesh_info.to_dict(nested=True)

Features at a Glance

Mesh Viewer (main.py)

  • Interactive Analysis Dashboard: Real-time side panel (Press G to toggle).
  • Comparison Table: Side-by-side metrics for multiple meshes.
  • Advanced Camera Calibration: Adjust FOV, Focal Length (35mm equivalent), and Clipping Planes.
  • Orbital Navigation: Intuitive 3D rotation targeting the origin (Arrow keys).
  • Dynamic Layouts: Automatically arrange multiple meshes in Grid or Line modes.
  • Topology Analysis: Detect self-intersections, non-manifold edges/vertices, and genus.
  • Visualization: Face/vertex normals, point clouds, and high-DPI screenshot export.

Point Cloud Viewer (main_pc.py)

  • ✅ Multi-cloud loading with synchronized views.
  • ✅ GPU-optimized rendering for millions of points.
  • ✅ Support for colored point clouds (RGB).
  • ✅ Adaptive point sizing and camera controls.
  • ✅ Multi-format support (XYZ, LAS, LAZ, PLY).

Documentation

Detailed documentation for each application:

  • Mesh Viewer Documentation - Full guide for main.py
    • Camera calibration and navigation
    • Keyboard controls and usage workflow
    • Topology analysis algorithms
    • Performance optimization tips

Sample Data

Both applications include sample data for testing:

  • Mesh Samples (samples/mesh)
    • Test meshes with known topology issues (self-intersections, non-manifold edges).
    • See samples/mesh/README.md.

Acknowledgement

This project is built upon several powerful open-source libraries:

License

See LICENSE file for details.

About

A Repo for Mesh Analysis and Visualization

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages