Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Add mesh extraction module using marching cubes algorithm #1005

Merged
merged 3 commits into from
Mar 23, 2025

Conversation

Leguark
Copy link
Member

@Leguark Leguark commented Mar 22, 2025

TODO: Needs new version of gempy viewer

Description

Added a new module for mesh extraction using the marching cubes algorithm. The implementation provides a clean way to extract meshes for all structural elements in a geological model.

The new mesh_extraction module contains functions to:

  • Extract meshes for all structural elements in a model
  • Process individual elements with proper coordinate transformations
  • Handle the conversion from scalar fields to 3D meshes

Refactored the test_marching_cubes.py to use the new module, significantly simplifying the test code by removing the manual implementation that was previously used.

Relates to #mesh-extraction-enhancement

Checklist

  • My code uses type hinting for function and method arguments and return values.
  • I have created tests which cover my code.
  • The test code either 1. demonstrates at least one valuable use case (e.g. integration tests)
    or 2. verifies that outputs are as expected for given inputs (e.g. unit tests).
  • New tests pass locally with my changes.

Copy link
Member Author

Leguark commented Mar 22, 2025

@Leguark Leguark changed the title Adding mc [FEATURE] Add mesh extraction module using marching cubes algorithm Mar 22, 2025
@Leguark Leguark self-assigned this Mar 22, 2025
@Leguark Leguark marked this pull request as ready for review March 22, 2025 15:23
@Leguark Leguark requested a review from a team March 23, 2025 07:59
Copy link
Member Author

Leguark commented Mar 23, 2025

Merge activity

  • Mar 23, 4:11 AM EDT: A user started a stack merge that includes this pull request via Graphite.
  • Mar 23, 4:13 AM EDT: Graphite rebased this pull request as part of a merge.
  • Mar 23, 4:19 AM EDT: A user merged this pull request with Graphite.

@Leguark Leguark changed the base branch from adding_marching_cubes to graphite-base/1005 March 23, 2025 08:11
@Leguark Leguark changed the base branch from graphite-base/1005 to main March 23, 2025 08:11
@Leguark Leguark merged commit 901dbed into main Mar 23, 2025
2 of 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.

1 participant