Skip to content

[3D] Add extrusion support#7629

Open
MidnightCoder-m wants to merge 9 commits into
masterfrom
3d-extrusion
Open

[3D] Add extrusion support#7629
MidnightCoder-m wants to merge 9 commits into
masterfrom
3d-extrusion

Conversation

@MidnightCoder-m

@MidnightCoder-m MidnightCoder-m commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

🚀 Description

Adds optional polygon extrusion to the 3D feature selection highlight. When a selected polygon's layer carries a height attribute, the highlight is rendered as a volumetric solid (vertical walls + a roof cap) instead of a flat fill, with
the height taken per-feature from that attribute.

image

✨ Key Changes

  • Quick3DGeometryUtils: add generatePolygonWalls().
  • Quick3DGeometry: new extrusionHeight property.
  • MultiFeatureListModel / LayerUtils : new extrusionHeight model role, backed by LayerUtils::guessFriendlyHeightField().

ℹ️ How the extrusion height is determined

LayerUtils::guessFriendlyHeightField() scans the layer's numeric fields for a name matching candidate list (extrusion, height). The model role returns that field's value for each feature. When no suitable field exists it returns 0, so polygons keep rendering flat exactly as before.

🐛 A bug Fix: Terrain sampling (independent fix in this branch)

Quick3DTerrainProvider now rejects gross low DEM outliers: extreme low samples are marked as missing so isolated DEMspikes no longer drag down the computed height range.

Demo

Screencast.From.2026-06-24.20-37-40.mp4

@MidnightCoder-m MidnightCoder-m changed the title 3Add extrusion support 3D Add extrusion support Jun 24, 2026
@MidnightCoder-m MidnightCoder-m changed the title 3D Add extrusion support [3D] Add extrusion support Jun 24, 2026
@MidnightCoder-m MidnightCoder-m self-assigned this Jun 24, 2026
@qfield-fairy

qfield-fairy commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

🍎 MacOS DMG universal builds

Download a MacOS DMG universal build of this PR for testing.
(Built from commit 6c73111)

📱 Android builds

Download an Android arm64 build of this PR for testing.
(Built from commit 6c73111)

Other Android architectures

🪟 Windows builds

Download a Windows build of this PR for testing and for arm64.

(Built from commit 6c73111)

🐧 Linux AppImage builds

Download a Linux AppImage build of this PR for testing.
(Built from commit 6c73111)

@MidnightCoder-m
MidnightCoder-m marked this pull request as ready for review June 25, 2026 11:36
Comment thread src/core/multifeaturelistmodelbase.cpp Outdated
Comment thread src/core/multifeaturelistmodelbase.cpp Outdated
Comment thread src/core/utils/layerutils.cpp
Comment thread src/core/utils/layerutils.cpp
Comment thread src/core/3d/quick3dterrainprovider.cpp
Comment thread src/core/3d/quick3dgeometry.h Outdated
@MidnightCoder-m
MidnightCoder-m force-pushed the 3d-extrusion branch 2 times, most recently from 7328796 to a2740ad Compare July 8, 2026 21:43
@nirvn nirvn closed this Jul 9, 2026
@nirvn nirvn reopened this Jul 9, 2026
Comment thread src/core/utils/layerutils.cpp Outdated

@beanzmo beanzmo left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

my first commit :)

Comment thread src/core/utils/layerutils.cpp Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants