Skip to content

Add batch processing support to MeshDenoiser#2

Merged
lanxinger merged 5 commits into
mainfrom
claude/meshdenoiser-review-011CUs34Px5ptyMUMZsNjghj
Nov 6, 2025
Merged

Add batch processing support to MeshDenoiser#2
lanxinger merged 5 commits into
mainfrom
claude/meshdenoiser-review-011CUs34Px5ptyMUMZsNjghj

Conversation

@lanxinger

Copy link
Copy Markdown
Owner

Add batch processing support to MeshDenoiser
Implements batch processing feature that allows processing multiple mesh
files at once by providing directories instead of individual files.

Key features:

  • Automatic discovery of all supported mesh files in input directory
  • Creates output directory if it doesn't exist
  • Preserves original filenames in output
  • Progress tracking with file count (e.g., [1/5] Processing: file.obj)
  • Error handling - continues processing if one file fails
  • Summary report showing success/failure counts

Usage:
MeshDenoiser options.txt input_dir/ output_dir/

Changes:

  • Added filesystem support with C++17 std::filesystem and fallbacks
  • Refactored single-file processing into reusable function
  • Added directory detection and file listing utilities
  • Updated CMakeLists.txt to use C++17 standard
  • Updated README with batch processing documentation and examples

The implementation is cross-platform compatible with proper fallbacks
for systems without C++17 filesystem support (Windows, Linux, macOS).

Implements batch processing feature that allows processing multiple mesh
files at once by providing directories instead of individual files.

Key features:
- Automatic discovery of all supported mesh files in input directory
- Creates output directory if it doesn't exist
- Preserves original filenames in output
- Progress tracking with file count (e.g., [1/5] Processing: file.obj)
- Error handling - continues processing if one file fails
- Summary report showing success/failure counts

Usage:
  MeshDenoiser options.txt input_dir/ output_dir/

Changes:
- Added filesystem support with C++17 std::filesystem and fallbacks
- Refactored single-file processing into reusable function
- Added directory detection and file listing utilities
- Updated CMakeLists.txt to use C++17 standard
- Updated README with batch processing documentation and examples

The implementation is cross-platform compatible with proper fallbacks
for systems without C++17 filesystem support (Windows, Linux, macOS).

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread overrides/MeshSDFilter/MeshDenoiser.cpp Outdated
Comment thread overrides/MeshSDFilter/MeshDenoiser.cpp Outdated
…stem

MSVC's std::experimental::filesystem has an incomplete API that
causes build errors. Switch to using the Windows native API fallback
for MSVC builds, which is more reliable and compatible.

This fixes compilation errors on Windows CI builds where functions
like is_directory, directory_iterator, exists, and create_directories
were not found in std::experimental::filesystem.
The previous logic checked if output was a directory before entering
batch mode, preventing the documented auto-creation of output dirs.
This meant users couldn't run batch processing with a new output path.

New logic:
- If input is a directory, enter batch mode
- Only error if output is an existing regular file
- Allow non-existent output paths (will be created by process_batch)
- For single file mode, only error if output is an existing directory

This now matches the documented behavior:
  'Creates output directory if it doesn't exist'

Added is_regular_file() helper for proper path type detection.
Implements animated progress indicators with spinners, elapsed time,
and detailed feedback for long-running operations.

Features:
- ProgressIndicator class with terminal animation support
- Spinner animation (|/-\) with real-time elapsed time display
- Detects TTY to enable/disable animation (falls back to dots in pipes)
- Shows mesh statistics (vertex/face counts) after loading
- Displays timing for each processing stage
- Cross-platform support (Windows/Unix)

Single file mode:
- Loading mesh: shows spinner + mesh stats on completion
- Denoising mesh: shows spinner with elapsed time
- Saving mesh: shows quick spinner
- Total elapsed time displayed at end

Batch mode enhancements:
- Individual file progress with indented output
- Total batch processing time in summary
- Average time per file calculation
- Improved readability with cleaner output format

Example output:
  Loading mesh | (2s)
  Loaded mesh (12543 vertices, 25086 faces) (0.12s)
  Complete (2.45s)

Updated README with new progress indicator documentation and
improved output examples showing the enhanced feedback.
@lanxinger lanxinger merged commit 756e2b5 into main Nov 6, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants