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

Plane surface creation. #291

Merged
merged 1 commit into from
Apr 14, 2022
Merged

Plane surface creation. #291

merged 1 commit into from
Apr 14, 2022

Conversation

ajain-work
Copy link
Contributor

@ajain-work ajain-work commented Apr 8, 2022

Added plane surface creation.
Also refactored code and moved surface api commands i.e. create/delete surface under class SurfaceApi.

Plane surface creation example

from ansys.fluent.post.pyvista import  Graphics
#get the graphics objects for the session
graphics_session1 = Graphics(session)

# surface
surface1 = graphics_session1.Surfaces["surface-1"]
surface1.surface.type = "plane-surface"
surface1.surface.plane_surface.creation_method = "xy-plane"
surface1.surface.plane_surface.xy_plane.z =0

surface2 = graphics_session1.Surfaces["surface-2"]
surface2.surface.type = "plane-surface"
surface2.surface.plane_surface.creation_method = "yz-plane"
surface2.surface.plane_surface.yz_plane.x =0

@ajain-work ajain-work force-pushed the feat/plane_surface branch from 620acd3 to 2bcc225 Compare April 8, 2022 09:16
@dnwillia-work
Copy link
Collaborator

@ajain-work Is there an issue with a description for what this feature is about?

@@ -9,13 +9,82 @@


class LocalObjectDataExtractor:
class _SurfaceAPI:
Copy link
Contributor Author

@ajain-work ajain-work Apr 8, 2022

Choose a reason for hiding this comment

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

Class provides surface APIs i.e. create/delete surface.

return self.creation_method() == "yz-plane"
if name == "zx_plane":
return self.creation_method() == "zx-plane"
return True
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Plane surface creation.

def surface_name_in_server(cls, local_surface_name):
return "_dummy_surface_for_pyfluent:" + local_surface_name

def _get_api_handle(self):
Copy link
Contributor Author

@ajain-work ajain-work Apr 8, 2022

Choose a reason for hiding this comment

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

Switch from tui to settings API can be made here in future.

@ajain-work ajain-work force-pushed the feat/plane_surface branch 3 times, most recently from db1782a to e7365c2 Compare April 8, 2022 10:07
@ajain-work ajain-work changed the title Plane surface. Plane surface creation. Apr 8, 2022
@ajain-work ajain-work closed this Apr 8, 2022
@ajain-work ajain-work reopened this Apr 8, 2022
@ajain-work ajain-work force-pushed the feat/plane_surface branch from e7365c2 to ea27f6c Compare April 8, 2022 10:36
@ajain-work ajain-work marked this pull request as ready for review April 8, 2022 10:41
@dnwillia-work dnwillia-work self-requested a review April 8, 2022 20:29
Copy link
Collaborator

@dnwillia-work dnwillia-work left a comment

Choose a reason for hiding this comment

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

Make sure to add documentation of this feature.

@akaszynski
Copy link
Contributor

I would really like to see unit/integration testing added concurrently with features.

@ajain-work ajain-work merged commit 1f8180d into main Apr 14, 2022
@ajain-work ajain-work deleted the feat/plane_surface branch April 14, 2022 04:35
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.

4 participants