Skip to content

FIX: Observe specified output path for saving extension results (and minor improvements) - #6459

Merged
Samuelopez-ansys merged 27 commits into
mainfrom
fix/output-file-name-point-cloud-extension
Sep 3, 2025
Merged

Samuelopez-ansys merged 27 commits into
mainfrom
fix/output-file-name-point-cloud-extension

Conversation

@ecoussoux-ansys

@ecoussoux-ansys ecoussoux-ansys commented Jul 23, 2025 •

Copy link
Copy Markdown
Contributor

This PR addresses the bug reported in #6450: Currently, the file generated by the point cloud extension does not observe the specified output name. Instead, the point coordinates for the selected objects (and not all of them) are saved in a file named "Model_AllObjs_AllMats.pts" (in the appropriate directory), which adds extra confusion to the user since it may be assumed that the selection of objects to be processed has not been respected.

This bug is fixed by the present changes and a few minor improvements are also introduced:

  • The .obj and .mtl files generated alongside the expected .pts file are deleted,
  • The .pts file generated when using the "Preview" button of the extension is deleted,
  • The text field containing the user-defined output file path is cleared each time the "Save as" button is clicked. In addition, this text field is made read-only to force the use of the "Save as" button when specifying an output file for the generated point cloud: This is enforced in order to make the data provided for this more reliable and thus prevent undefined behavior in case of unexpected inputs, since a proper formatting can be assumed,
  • From an implementation perspective, the double underscore syntax is introduced, with __ used to prefix the name of attributes and methods of the PointsCloudExtension we want to make private.

On top of these points, this PR is also used as an opportunity to rework the extension's GUI, in order to make it more in line with that of other extensions of the project. Notably, the layout of text fields and buttons, as well as the padding around them is standardized. A horizontal scrollbar is also added conditionally to the listbox displaying the objects and surfaces available in the design, in case some of their names are too long to fit in the box.

To avoid any impact on the rest of the project, modifications are kept to the points_cloud.py file (the extension's unit and system tests are updated accordingly).

Close #6450

@ecoussoux-ansys ecoussoux-ansys self-assigned this Jul 23, 2025
@ecoussoux-ansys
ecoussoux-ansys requested a review from a team as a code owner July 23, 2025 12:54
@ecoussoux-ansys ecoussoux-ansys added the bug Something isn't working label Jul 23, 2025
@codecov

codecov Bot commented Jul 23, 2025 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.61905% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.98%. Comparing base (908f123) to head (26099b2).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6459      +/-   ##
==========================================
+ Coverage   81.96%   81.98%   +0.02%     
==========================================
  Files         243      243              
  Lines       76175    76196      +21     
==========================================
+ Hits        62436    62472      +36     
+ Misses      13739    13724      -15     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread src/ansys/aedt/core/extensions/project/points_cloud.py Outdated
@ecoussoux-ansys
ecoussoux-ansys marked this pull request as draft July 25, 2025 14:37
@ecoussoux-ansys

Copy link
Copy Markdown
Contributor Author

@SMoraisAnsys, as per our discussion, I performed a refactoring of the extension's GUI together with the other minor changes (__ syntax and text field for user-defined output file path as read-only) we agreed on. I updated the PR description accordingly.
To facilitate your review of the GUI changes, you can see below screenshots of the extension before (bottom) and after (top) the changes (with an example where the new horizontal scrollbar is added due to a very long object name).
Feel free to refactor further if I missed some aspects you wanted to see implemented.

image

@ecoussoux-ansys
ecoussoux-ansys marked this pull request as ready for review August 14, 2025 12:08

@Samuelopez-ansys Samuelopez-ansys left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

SMoraisAnsys
SMoraisAnsys previously approved these changes Aug 29, 2025

@SMoraisAnsys SMoraisAnsys left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM, I left minor comments

Comment thread src/ansys/aedt/core/extensions/project/points_cloud.py Outdated
Comment thread src/ansys/aedt/core/extensions/project/points_cloud.py Outdated

@Samuelopez-ansys Samuelopez-ansys left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

SMoraisAnsys
SMoraisAnsys previously approved these changes Sep 3, 2025
@Samuelopez-ansys
Samuelopez-ansys dismissed stale reviews from SMoraisAnsys and themself September 3, 2025 10:00

All good

@Samuelopez-ansys
Samuelopez-ansys merged commit 55a959e into main Sep 3, 2025
38 checks passed
@Samuelopez-ansys
Samuelopez-ansys deleted the fix/output-file-name-point-cloud-extension branch September 3, 2025 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug located in Point Cloud Generator extension

4 participants