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

Mesh selection actions #58888

Merged
merged 6 commits into from
Nov 20, 2024
Merged

Mesh selection actions #58888

merged 6 commits into from
Nov 20, 2024

Conversation

JanCaha
Copy link
Contributor

@JanCaha JanCaha commented Sep 27, 2024

Description

Adds two new actions for selecting vertices on Mesh:

  • select isolated vertices which are not part of any face
  • select all vertices from mesh layer

396460179-cf95a517-2495-45b8-831f-e556c66641e3

@github-actions github-actions bot added this to the 3.40.0 milestone Sep 27, 2024
Copy link

github-actions bot commented Sep 27, 2024

🪟 Windows builds ready!

Windows builds of this PR are available for testing here. Debug symbols for this build are available here.

(Built from commit 2965486)

@uclaros uclaros added Frozen Feature freeze - Do not merge! Mesh Related to general mesh layer handling (not specific data formats) labels Sep 27, 2024
Comment on lines 287 to 292
QList<int> verticesIndexes;
verticesIndexes.reserve( mCurrentLayer->meshVertexCount() );
for ( int i = 0; i < mCurrentLayer->meshVertexCount(); i++ )
{
verticesIndexes.append( i );
}
Copy link
Contributor

Choose a reason for hiding this comment

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

meshVertexCount() says:

\note during mesh editing, some vertices can be void and are not included in this returned value

does that affect us?
Would it be better to maybe use mCurrentLayer->selectVerticesByExpression( true ) to get the indexes instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Seems like a good point.

We could avoid evaluating the expression by using mCurrentLayer->nativeMesh()->vertexCount(). That would skip need to use QgsExpression and its evaluation. It is what the mCurrentLayer->selectVerticesByExpression() does internally anyways.

@lbartoletti lbartoletti added the Requires Tests! Waiting on the submitter to add unit tests before eligible for merging label Oct 14, 2024
Copy link

🪟 Windows builds

Download Windows builds of this PR for testing.
Debug symbols for this build are available here.
(Built from commit 7d94fad)

@uclaros uclaros removed the Requires Tests! Waiting on the submitter to add unit tests before eligible for merging label Oct 22, 2024
@uclaros uclaros modified the milestones: 3.40.0, 3.42.0 Nov 20, 2024
@uclaros uclaros removed the Frozen Feature freeze - Do not merge! label Nov 20, 2024
@uclaros uclaros merged commit 3d92b2b into qgis:master Nov 20, 2024
27 of 28 checks passed
@JanCaha JanCaha deleted the mesh-selection-actions branch December 13, 2024 07:53
@DelazJ DelazJ added Needs Documentation When merging a labeled PR, an issue will be created in the Doc repo. Changelog Items that are queued to appear in the visual changelog - remove after harvesting labels Dec 15, 2024
@qgis-bot
Copy link
Collaborator

@JanCaha
This pull request has been tagged as requiring documentation.

A documentation ticket will be opened at https://github.com/qgis/QGIS-Documentation when this PR is merged.

Please update the description (not the comments) with helpful description and screenshot to help the work from documentors.
Also, any commit having [needs-doc] or [Needs Documentation] in will see its message pushed to the issue, so please be as verbose as you can.

Thank you!

@qgis-bot
Copy link
Collaborator

@JanCaha

This pull request has been tagged for the changelog.

  • The description will be harvested so please provide a "nearly-ready" text for the final changelog
  • If possible, add a nice illustration of the feature. Only the first one in the description will be harvested (GIF accepted as well)
  • If you can, it's better to give credits to your sponsor, see below for different formats.

You can edit the description.

Format available for credits
  • Funded by NAME
  • Funded by URL
  • Funded by NAME URL
  • Sponsored by NAME
  • Sponsored by URL
  • Sponsored by NAME URL

Thank you!

@qgis-bot
Copy link
Collaborator

@JanCaha
A documentation ticket has been opened at qgis/QGIS-Documentation#9481
It is your responsibility to visit this ticket and add as much detail as possible for the documentation team to correctly document this change.
Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog Items that are queued to appear in the visual changelog - remove after harvesting Mesh Related to general mesh layer handling (not specific data formats) Needs Documentation When merging a labeled PR, an issue will be created in the Doc repo.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants