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

Docs/imported solid model #697

Merged
merged 19 commits into from
Nov 27, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions src/ansys/acp/core/_tree_objects/imported_solid_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,9 +354,14 @@
layup_mapping_object_pb2_grpc.ObjectServiceStub,
)

def refresh(self, path: _PATH, format: SolidModelImportFormat) -> None: # type: ignore
"""Re-import the solid model from the external file."""
self.format = format
def refresh(self, path: _PATH, format: SolidModelImportFormat | None = None) -> None: # type: ignore
"""
Re-import the solid model from the external file.

The ``format`` parameter is only used to switch it. Otherwise, the current value is used.
roosre marked this conversation as resolved.
Show resolved Hide resolved
"""
if format is not None:
self.format = format

Check warning on line 364 in src/ansys/acp/core/_tree_objects/imported_solid_model.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/acp/core/_tree_objects/imported_solid_model.py#L364

Added line #L364 was not covered by tests
roosre marked this conversation as resolved.
Show resolved Hide resolved
self.external_path = self._server_wrapper.auto_upload(path)
with wrap_grpc_errors():
self._get_stub().Refresh( # type: ignore
Expand Down
Loading