Skip to content

feat: meshing update#5118

Draft
mayankansys wants to merge 18 commits into
mainfrom
feat/meshing_workflow_5112
Draft

feat: meshing update#5118
mayankansys wants to merge 18 commits into
mainfrom
feat/meshing_workflow_5112

Conversation

@mayankansys

@mayankansys mayankansys commented May 11, 2026

Copy link
Copy Markdown
Collaborator

Context

Previously, meshing workflows could only be created via session methods like meshing.watertight(), which was not intuitive. The underlying classes were not designed for direct user interaction.

Change Summary

  • Meshing workflows can now be constructed directly, for example: WatertightMeshing(session=meshing).
  • Short, user-friendly aliases like WatertightMeshing were added and exported to the top-level ansys.fluent.core package for easy import.
  • The session's active workflow (meshing.current_workflow) is now correctly updated when a workflow is constructed directly.

Impact

  • User API: A new, more intuitive method for creating meshing workflows is now available.
  • Backward Compatibility: The existing session-based methods (e.g., meshing.watertight()) remain fully functional.

@codacy-production

codacy-production Bot commented May 11, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Copilot AI review requested due to automatic review settings May 18, 2026 10:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 direct construction support for enhanced meshing workflows and exposes user-facing workflow classes from the top-level ansys.fluent.core package.

Changes:

  • Added direct session-based constructors for meshing workflow classes.
  • Updated meshing session workflow factory methods to use the new constructors.
  • Added server workflow tests and a changelog fragment for the new API.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/ansys/fluent/core/meshing/meshing_workflow_new.py Adds direct-construction constructors and public aliases.
src/ansys/fluent/core/session_base_meshing.py Updates meshing workflow creation to use direct constructors.
src/ansys/fluent/core/__init__.py Exports workflow classes and aliases from the top-level package.
tests/test_server_meshing_workflow.py Adds direct-construction workflow tests.
doc/changelog.d/5118.added.md Adds a changelog entry.

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

Comment on lines 323 to 327
def __init__(
self,
workflow: PyMenu,
meshing: PyMenu,
fluent_version: FluentVersion,
session: "PureMeshing | Meshing ",
file_path: PathType = None,
initialize: bool = True,
Comment thread src/ansys/fluent/core/meshing/meshing_workflow_new.py
Comment thread doc/changelog.d/5118.added.md
Comment on lines 402 to +405
self._current_workflow = LoadWorkflow(
_make_datamodel_module(self, root_module),
self.meshing,
self.get_fluent_version(),
os.fspath(file_path),
initialize,
session=self,
file_path=os.fspath(file_path),
initialize=initialize,
Comment on lines +65 to +66
LoadWorkflow,
TopologyBasedMeshing,
Comment thread src/ansys/fluent/core/meshing/meshing_workflow_new.py
Comment on lines +377 to +381
self._meshing = meshing_root
self._base_meshing = base
if initialize:
self._create_workflow()
base._current_workflow = self
Copilot AI review requested due to automatic review settings May 20, 2026 10:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.

Comment thread src/ansys/fluent/core/meshing/meshing_workflow_new.py Outdated
Comment on lines +372 to +378
fluent_version=fluent_version,
)
self._meshing = meshing
self._meshing = meshing_root
self._base_meshing = base
if initialize:
self._create_workflow()
base._current_workflow = self
Comment on lines 320 to 325
def __init__(
self,
workflow: PyMenu,
meshing: PyMenu,
fluent_version: FluentVersion,
session: "PureMeshing | Meshing ",
file_path: PathType = None,
initialize: bool = True,
) -> None:
Comment on lines +40 to +47
def _get_base_meshing(session) -> "BaseMeshing":
"""Extract a ``BaseMeshing`` instance from a session object.

Parameters
----------
session : PureMeshing | Meshing
A meshing session or its internal ``BaseMeshing`` helper.

Comment on lines 32 to +36
from ansys.fluent.core.services.datamodel_se import PyMenu
from ansys.fluent.core.utils.fluent_version import FluentVersion
from ansys.fluent.core.session_base_meshing import BaseMeshing
from ansys.fluent.core.session_meshing import Meshing
from ansys.fluent.core.session_pure_meshing import PureMeshing
from ansys.fluent.core.session_shared import _make_datamodel_module
Comment thread doc/changelog.d/5118.added.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT]: Make meshing workflow types directly constructible based on server context.

3 participants