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

Point cloud editing fixes #60237

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

uclaros
Copy link
Contributor

@uclaros uclaros commented Jan 23, 2025

Description

This PR fixes point selection for the following cases:

  • Skips points outside the view frustum / behind the near plane
  • Skips points outside the 3d view's 2d clipping extent
  • Skips points with no classification category on the 3d renderer
  • Skips points filtered out by the layer's filter
  • Properly select points when layer has elevation properties scale and/or offset

@github-actions github-actions bot added this to the 3.42.0 milestone Jan 23, 2025
@uclaros uclaros force-pushed the point-cloud-editing-tidyup branch from 8b0cdfe to 395652a Compare January 23, 2025 10:47
Copy link

github-actions bot commented Jan 23, 2025

🪟 Windows builds

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

🪟 Windows Qt6 builds

Download Windows Qt6 builds of this PR for testing.
(Built from commit 395652a)

@uclaros uclaros added 3D Relates to QGIS' 3D engine or rendering Point Clouds labels Jan 23, 2025
Copy link
Member

@wonder-sk wonder-sk left a comment

Choose a reason for hiding this comment

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

Could you please add auto test for the ignoreIndexFilter flag, and for change attribute value API when there's a subset string applied?

@@ -44,6 +44,7 @@ QgsPointCloudEditingIndex::QgsPointCloudEditingIndex( QgsPointCloudLayer *layer
mZMax = mIndex.zMax();
mRootBounds = mIndex.rootNodeBounds();
mSpan = mIndex.span();
mFilterExpression = mIndex.subsetString();
Copy link
Member

Choose a reason for hiding this comment

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

what if the filter expression changes while we're in editing mode - is this going to be refreshed? I would prefer not to have mFilterExpression here and rather get it when needed from mIndex

@@ -166,7 +166,7 @@ std::unique_ptr<QgsPointCloudBlock> QgsCopcPointCloudIndex::nodeData( const QgsP
// we need to create a copy of the expression to pass to the decoder
// as the same QgsPointCloudExpression object mighgt be concurrently
// used on another thread, for example in a 3d view
QgsPointCloudExpression filterExpression = mFilterExpression;
QgsPointCloudExpression filterExpression = request.ignoreIndexFilterEnabled() ? QgsPointCloudExpression() : mFilterExpression;
Copy link
Member

Choose a reason for hiding this comment

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

let's implement this for ept point cloud index (just to be sure it respects the api)

// TODO: apply filtering (if any)
request.setAttributes( pcIndex.attributes() );
request.setAttributes( attributes );
request.setIgnoreIndexFilterEnabled( true );
Copy link
Member

Choose a reason for hiding this comment

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

could you please add a comment why we are ignoring the index filter? to get all points so we have the correct point indexes within the node (and it could also go to docstring for setIgnoreIndexFilterEnabled() to clarify when one would want to use it)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3D Relates to QGIS' 3D engine or rendering Point Clouds
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants