-
Notifications
You must be signed in to change notification settings - Fork 1
Publish Synergy 2027 Python API changes #62
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
Merged
+2,105
−73
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
7b38ba7
Fix return types and color band range (#5)
osinjoku cb5f8d1
point to pypi (#3)
osinjoku de531bf
Bring relevant changes to the v26 release branch (#24)
osinjoku c8e0789
Fix readme links on pypi release 26 (#28)
osinjoku 86035b8
Expose GeomType enum in package __init__.py and Enum Value correction…
sankalps0549 a999607
Fix cad_mesh_grading_factor to accept float values and remove incorre…
Copilot 9fb0b05
Introduce Sphinx Versioning (#58)
sankalps0549 a2a423e
Updating publish workflow (#59)
sankalps0549 48ec7ad
Support local builds for a single version and redirect root to latest…
sankalps0549 6db44da
Squashed internal changes from origin/internal/main into public/main\…
60f6630
fix version
osinjoku 3ebf9f2
docs: Update CHANGELOG for PR #62 — document removal of GradingFactor…
osinjoku 67c63c7
docs: Expand Unreleased changelog to reflect all changes in PR #62
osinjoku a1a202f
docs: Restore original changelog section headings and organize new en…
osinjoku 0c5986d
docs: Add deprecations from PRs 110 and 97 to Unreleased section
osinjoku 5856076
update cl
osinjoku 3a1a512
docs version
osinjoku 059c76a
docs: Normalize CHANGELOG after merge with release/26
osinjoku 907378b
docs: Normalize CHANGELOG (remove duplicated block after merge with r…
osinjoku 50ec64f
docs: Fix CHANGELOG duplication and indentation
osinjoku f44b819
docs: Tidy CHANGELOG formatting
osinjoku 79d3d5b
normalise deprecations
osinjoku c171a1a
Update CHANGELOG.md
osinjoku 3e31cc8
Remove duplicate CHANGELOG entry from Unreleased section (#63)
Copilot b6da6d5
Update src/moldflow/helper.py
osinjoku 54a963b
Update src/moldflow/mesh_editor.py
osinjoku 78fc0ef
remove changelog duplicates
osinjoku 07bebb7
Merge branch 'internal/publish/20260119T083059Z' of https://github.co…
osinjoku File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| CaptureModes | ||
| ============ | ||
|
|
||
| .. autoclass:: moldflow.common::CaptureModes |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| AnimationExportOptions | ||
| ====================== | ||
|
|
||
| .. automodule:: moldflow.animation_export_options |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| CADDiagnostic | ||
| ============= | ||
|
|
||
| .. automodule:: moldflow.cad_diagnostic |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| ImageExportOptions | ||
| ================== | ||
|
|
||
| .. automodule:: moldflow.image_export_options |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,198 @@ | ||
| """ | ||
| Usage: | ||
| AnimationExportOptions Class API Wrapper | ||
| """ | ||
|
|
||
| from .logger import process_log, LogMessage | ||
| from .helper import ( | ||
| check_type, | ||
| check_is_non_negative, | ||
| get_enum_value, | ||
| check_range, | ||
| check_file_extension, | ||
| ) | ||
| from .common import AnimationSpeed, CaptureModes | ||
| from .constants import MP4_FILE_EXT, GIF_FILE_EXT, ANIMATION_SPEED_CONVERTER | ||
|
|
||
|
|
||
| class AnimationExportOptions: | ||
| """ | ||
| Wrapper for AnimationExportOptions class of Moldflow Synergy. | ||
| """ | ||
|
|
||
| def __init__(self, _animation_export_options): | ||
| """ | ||
| Initialize the AnimationExportOptions with a AnimationExportOptions instance from COM. | ||
|
|
||
| Args: | ||
| _animation_export_options: The AnimationExportOptions instance. | ||
| """ | ||
| process_log(__name__, LogMessage.CLASS_INIT, locals(), name="AnimationExportOptions") | ||
| self.animation_export_options = _animation_export_options | ||
|
|
||
| @property | ||
| def file_name(self) -> str: | ||
| """ | ||
| The file name. | ||
|
|
||
| :getter: Get the file name. | ||
| :setter: Set the file name. | ||
| :type: str | ||
| """ | ||
| process_log(__name__, LogMessage.PROPERTY_GET, locals(), name="file_name") | ||
| return self.animation_export_options.FileName | ||
|
|
||
| @file_name.setter | ||
| def file_name(self, value: str) -> None: | ||
| """ | ||
| Set the file name. | ||
|
|
||
| Args: | ||
| value (str): The file name to set. | ||
| """ | ||
| process_log(__name__, LogMessage.PROPERTY_SET, locals(), name="file_name", value=value) | ||
| check_type(value, str) | ||
| value = check_file_extension(value, (MP4_FILE_EXT, GIF_FILE_EXT)) | ||
| self.animation_export_options.FileName = value | ||
|
|
||
| # Remove the function when legacy support is removed. | ||
| def _convert_animation_speed(self, speed: AnimationSpeed | int | str) -> str: | ||
| """ | ||
| Convert animation speed to string for legacy support. | ||
| """ | ||
| speed = get_enum_value(speed, AnimationSpeed) | ||
| return ANIMATION_SPEED_CONVERTER[speed] | ||
|
|
||
| @property | ||
| def animation_speed(self) -> int: | ||
| """ | ||
| Animation speed (Slow=0, Medium=1, Fast=2). | ||
|
|
||
| :default: Medium(1) | ||
| :getter: Get the animation speed. | ||
| :setter: Set the animation speed. | ||
| :type: int | ||
| """ | ||
| process_log(__name__, LogMessage.PROPERTY_GET, locals(), name="animation_speed") | ||
| return self.animation_export_options.AnimationSpeed | ||
|
|
||
| @animation_speed.setter | ||
| def animation_speed(self, value: AnimationSpeed | int) -> None: | ||
| """ | ||
| The animation speed. | ||
|
|
||
| Args: | ||
| value (int): The animation speed to set. | ||
| """ | ||
| process_log( | ||
| __name__, LogMessage.PROPERTY_SET, locals(), name="animation_speed", value=value | ||
| ) | ||
| if isinstance(value, AnimationSpeed): | ||
| value = self._convert_animation_speed(value) | ||
| else: | ||
| check_type(value, int) | ||
| check_range(value, 0, 2, True, True) | ||
| self.animation_export_options.AnimationSpeed = value | ||
|
|
||
| @property | ||
| def show_prompts(self) -> bool: | ||
| """ | ||
| Whether to show prompts during the export process. | ||
|
|
||
| :default: True | ||
| :getter: Get show_prompts. | ||
| :setter: Set show_prompts. | ||
| :type: bool | ||
| """ | ||
| process_log(__name__, LogMessage.PROPERTY_GET, locals(), name="show_prompts") | ||
| return self.animation_export_options.ShowPrompts | ||
|
|
||
| @show_prompts.setter | ||
| def show_prompts(self, value: bool) -> None: | ||
| """ | ||
| Set whether to show prompts during the export process. | ||
|
|
||
| Args: | ||
| value (bool): Show prompts or not. | ||
| """ | ||
| process_log(__name__, LogMessage.PROPERTY_SET, locals(), name="show_prompts", value=value) | ||
| check_type(value, bool) | ||
| self.animation_export_options.ShowPrompts = value | ||
|
|
||
| @property | ||
| def size_x(self) -> int: | ||
| """ | ||
| The X size (width) of the image. | ||
|
|
||
| :default: 800 | ||
| :getter: Get the X size. | ||
| :setter: Set the X size. | ||
| :type: int (positive) | ||
| """ | ||
| process_log(__name__, LogMessage.PROPERTY_GET, locals(), name="size_x") | ||
| return self.animation_export_options.SizeX | ||
|
|
||
| @size_x.setter | ||
| def size_x(self, value: int) -> None: | ||
| """ | ||
| Set the X size (width) of the image. | ||
|
|
||
| Args: | ||
| value (int): The X size to set (must be positive). | ||
| """ | ||
| process_log(__name__, LogMessage.PROPERTY_SET, locals(), name="size_x", value=value) | ||
| check_type(value, int) | ||
| check_is_non_negative(value) | ||
| self.animation_export_options.SizeX = value | ||
|
|
||
| @property | ||
| def size_y(self) -> int: | ||
| """ | ||
| The Y size (height) of the image. | ||
|
|
||
| :default: 600 | ||
| :getter: Get the Y size. | ||
| :setter: Set the Y size. | ||
| :type: int (positive) | ||
| """ | ||
| process_log(__name__, LogMessage.PROPERTY_GET, locals(), name="size_y") | ||
| return self.animation_export_options.SizeY | ||
|
|
||
| @size_y.setter | ||
| def size_y(self, value: int) -> None: | ||
| """ | ||
| Set the Y size (height) of the image. | ||
|
|
||
| Args: | ||
| value (int): The Y size to set (must be positive). | ||
| """ | ||
| process_log(__name__, LogMessage.PROPERTY_SET, locals(), name="size_y", value=value) | ||
| check_type(value, int) | ||
| check_is_non_negative(value) | ||
| self.animation_export_options.SizeY = value | ||
|
|
||
| @property | ||
| def capture_mode(self) -> int: | ||
| """ | ||
| The capture mode. | ||
|
|
||
| :default: Active View(0) | ||
| :getter: Get the capture mode. | ||
| :setter: Set the capture mode. | ||
| :type: int | ||
| """ | ||
| process_log(__name__, LogMessage.PROPERTY_GET, locals(), name="capture_mode") | ||
| return self.animation_export_options.CaptureMode | ||
|
|
||
| @capture_mode.setter | ||
| def capture_mode(self, value: CaptureModes | int) -> None: | ||
| """ | ||
| Set the capture mode. | ||
|
|
||
| Args: | ||
| value (CaptureModes | int): Capture mode to set. | ||
| """ | ||
| process_log(__name__, LogMessage.PROPERTY_SET, locals(), name="capture_mode", value=value) | ||
| value = get_enum_value(value, CaptureModes) | ||
| check_range(value, 0, 2, True, True) | ||
| self.animation_export_options.CaptureMode = value |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.