Skip to content

add 3D details methods#5

Merged
rdmiller merged 6 commits into
masterfrom
rm-add-details-method
Dec 7, 2025
Merged

add 3D details methods#5
rdmiller merged 6 commits into
masterfrom
rm-add-details-method

Conversation

@rdmiller
Copy link
Copy Markdown

@rdmiller rdmiller commented Dec 7, 2025

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds detailed path information methods (getDetailedPaths()) for both 2D and 3D beam tracing implementations. These methods return comprehensive reflection data including incidence/reflection angles, surface normals, segment lengths, cumulative distances, and grazing incidence detection. This enhancement enables acoustic analysis applications to access detailed geometric information about each reflection point in a path.

Key Changes

  • Added new TypeScript interfaces for detailed path representations (DetailedReflectionPath, DetailedReflectionPath3D, ReflectionDetail, ReflectionDetail3D, SegmentDetail, SegmentDetail3D)
  • Implemented getDetailedPaths() methods in both 2D (Solver class) and 3D (OptimizedSolver3D and Solver3D classes) that convert simple paths to detailed paths with full reflection information
  • Added comprehensive test coverage (340+ test cases) covering functionality, edge cases, and numerical correctness

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/core/types.ts Added detailed reflection type definitions for 3D with proper type imports
src/solver/solver3d.ts Implemented getDetailedPaths() method and helper functions (calculateIncidenceAngle3D, getOrientedNormal3D, convertToDetailedPath3D) for 3D reflection analysis
src/beamtrace2d.ts Implemented getDetailedPaths() method and helper functions for 2D reflection analysis, including wall position calculation
src/beamtrace3d.ts Exported new types and functions, added getDetailedPaths() wrapper method to Solver3D class
src/__tests__/solver3d.test.ts Added 370+ lines of comprehensive tests for 3D detailed paths functionality
src/__tests__/beamtrace2d.test.ts Added 540+ lines of comprehensive tests for 2D detailed paths functionality
README.md Updated documentation with API reference for new types, methods, and usage examples
.gitignore Added entries for dist files (with one duplicate entry)
.eslintrc.json Added *.js pattern to ignore list

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/beamtrace2d.ts Outdated
Comment thread src/__tests__/solver3d.test.ts
@rdmiller rdmiller merged commit 2b0e8dd into master Dec 7, 2025
1 check passed
@rdmiller rdmiller deleted the rm-add-details-method branch December 7, 2025 22:23
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