Skip to content

Split mesh creation function #329

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

gnath-aswin
Copy link

@gnath-aswin gnath-aswin commented Apr 22, 2025

Organize src/meshpy/mesh_creation_functions Folder

This PR addresses issue #319 of organizing the src/meshpy/mesh_creation_functions folder.

Changes Made

  1. Moved all application-style beam mesh modules to mesh_creation_functions/applications:

    • beam_stent.py
    • beam_honeycomb.py
    • beam_fibers_in_rectangle.py
    • beam_wire.py
  2. Split basic functionalities from beam_basic_geometry.py into new modules:

    • beam_line.py:
      Contains create_beam_mesh_line and create_beam_mesh_line_continuation
    • beam_arc.py:
      Contains create_beam_mesh_arc_segment_via_rotation, create_beam_mesh_arc_segment_via_axis,
      create_beam_mesh_arc_segment_2d, and create_beam_mesh_arc_at_node
    • beam_helix.py: contains create_beam_mesh_helix
  3. Left beam_basic_geometry.py with a deprecation warning:

    • Exposes the new functions using internal aliases
  4. Renamed modules for clarity:

    • beam_curve.pybeam_parametric_curve.py
    • beam_nurbs.pybeam_from_nurbs_curve.py

…ry to beam_line, beam_arc and beam_helix

setup pre-commit

setup pre-commit

modified examples folder

Clean notebook metadata using nbstripout

revert example folder
Copy link
Collaborator

@davidrudlstorfer davidrudlstorfer left a comment

Choose a reason for hiding this comment

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

@gnath-aswin thanks for your first contribution!

This PR is already looking really good. I have a few points for discussion:

  • I think we can remove the deprecation stage and just switch to the new layout. MeshPy only has a very small number of active users/developers and, therefore, we can simply switch.

  • Should we directly update the docstrings in the touched files to align with our new style?

  • Should we directly split up the tests to reflect the src code files?

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