Export a block diagram as a 3D model (glTF/GLB): ground with the map draped on it, walls and base
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 30/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- rust
- Domain
- computer-graphics
Research direction
Start by reading the existing block implementation in #1914, the mesh work in #2017 and #2084, and the glTF writer used by share.webScene; compare these with imagery.mesh. Define how the command reuses those paths to export the settled block view, then implement and validate geometry, textures, and the no-block error. Done means the four listed tests pass and the result reports the file size and omitted view elements.
Written by the indexing model from the issue text.
Description
Today: a block diagram (map.terrain with "block", #1914) can only be exported as a picture (PNG, PDF) or an orbit (#1916). imagery.mesh writes a DEM as an uncoloured OBJ, and share.webScene writes extruded polygons as glTF, but neither gives the block as it's drawn. A 3D file of the block would open in Blender, PowerPoint, a web viewer or a 3D printer's slicer, and could be turned in class.
Proposal
A new command, map.exportBlock, for a map whose terrain has a block:
map.exportBlock={"path": "pedra_azul.glb", "texture": 4096}
- Geometry: the ground as the settled view draws it (the same mesh, #2017/#2084, cut to the block), the walls along the block's sides with their top meeting the ground, and the base as a flat quad. The terrain's exaggeration applies; units are metres from the block's south-west corner, with y up as glTF defines.
- Ground colour: the map drawn top-down over the block's box, at
"texture"pixels on the long side (default 4096, at most 8192), as the ground's texture: the same layers, symbology, water (#1915) and labels the map shows, without the relief's light (the 3D viewer lights it). - Walls: vertex colours for plain walls; a texture strip per wall when the walls carry a polygon layer's classes and hatches (#1914), drawn as the wall draws them in the map.
- Format:
.glb(binary glTF, one file);.gltfwrites the JSON with the buffers and textures embedded. Reuse the glTF writer ofshare.webScene. - Size: the ground's triangles are those of the mesh, at most what the export mesh has; the file's size is given in the result.
- Notices: what isn't in the model: fog and sky, the relief's shading, labels standing up in screen space (they're in the texture flat instead), the legend and other layout elements.
Tests
- A block over a small DEM exports a
.glbthat a glTF validator accepts, with three meshes (ground, walls, base) and a texture. - The ground's vertex heights at the corners match the DEM's heights × exaggeration.
- The walls' top vertices are the ground's edge vertices (no gap).
- A map with no block is refused with a message.
Choices in this proposal
- glTF/GLB, not OBJ: one file with textures, read by Blender, PowerPoint, Windows' 3D Viewer and web viewers. OBJ needs a material file and a texture beside it.
- The map as a texture, unlit: the viewer lights the model, so baking the hillshade in would light it twice.
- A command of its own: the block is a view setting, not a layer, so it doesn't fit
share.webScene's per-layer extrusions; the writer is shared. - Related: #1914, #1916, #2017, #2084,
imagery.mesh,share.webScene.
- Dominant language
- Rust
- Stars
- 1.9k
- Forks
- 268
- Avg merge
- 11h 1m
- Merged PRs (30d)
- 942
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from opengeos/RustGIS
-
[Bug]: layer.move to the place a layer already has fails and stops a script; with several layers it leaves an empty undo stepPossibly taken @jgregoriorincon claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
opengeos/RustGIS#2621 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 61/100
opengeos/RustGIS#1446 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 52/100
Maintainers usually reply within 1 day
All issues in opengeos/RustGIS
Similar issues
-
postgresql-rules / queue-rules: implicit KEY SHARE before a parent key update, and job self-overlapOpen
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
jonathanong/no-mistakes#3879 ·
Maintainers usually reply within 1 day
-
area:index v0.35.0
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
nautechsystems/nautilus_trader#5741 ·
Maintainers usually reply within 1 day
-
RunPlugin derives Hash over all fields while PartialEq compares only location and configurationOpen
Difficulty 1/5 Under an hour Newbie friendliness 86/100
zellij-org/zellij#5969 ·
Maintainers usually reply within 1 day
-
eth_get_proof reports another account's fields for an absent accountPossibly taken @Indian-boult claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day