feat: raster image render pipeline (IMAGE command + GPU textured quad)

- Add IMAGE / IMAGEATTACH / IM command with async file-picker (rfd)
- src/scene/image_model.rs: ImageModel with RGBA pixel data + quad corners
- src/scene/pipeline/image_gpu.rs: ImageGpu with wgpu texture, sampler, opacity uniform
- src/scene/pipeline/mod.rs: image render pipeline (pass 2, between hatches and meshes)
- src/scene/render.rs: include images in Primitive, call upload_images in prepare
- src/scene/mod.rs: images HashMap, populate_images_from_document, cache on add_entity
- src/modules/home/draw/raster_image.rs: ImageCommand (two-click: origin + width, aspect-correct preview)
- src/io/mod.rs: pick_image_file() async helper (file dialog + dimension decode)
- app: ImagePick / ImagePickResult messages, populate on file open and undo/redo

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Hakan SevenandClaude Sonnet 4.6 committed 2026-04-06 23:19:08 +03:00
1 parent 3d1f355a5c
commit 4312b6c3a5
39 files changed
+702 -15

No files matched your search

+3 -1
View File
@@ -87,6 +87,7 @@ impl CadCommand for AlignedDimensionCommand {
line_weight_px: 1.0,
snap_pts: vec![],
tangent_geoms: vec![],
aci: 0,
key_vertices: vec![],
})
}
@@ -119,6 +120,7 @@ fn preview_aligned(p1: Vec3, p2: Vec3, dim_pt: Vec3) -> WireModel {
line_weight_px: 1.0,
snap_pts: vec![],
tangent_geoms: vec![],
key_vertices: vec![],
aci: 0,
key_vertices: vec![],
}
}
+2 -1
View File
@@ -122,7 +122,8 @@ fn preview_wire(points: Vec<Vec3>) -> WireModel {
line_weight_px: 1.0,
snap_pts: vec![],
tangent_geoms: vec![],
key_vertices: vec![],
aci: 0,
key_vertices: vec![],
}
}
+2 -1
View File
@@ -86,6 +86,7 @@ fn preview_line(a: Vec3, b: Vec3) -> WireModel {
line_weight_px: 1.0,
snap_pts: vec![],
tangent_geoms: vec![],
key_vertices: vec![],
aci: 0,
key_vertices: vec![],
}
}
+1
View File
@@ -128,6 +128,7 @@ impl CadCommand for DimBaselineCommand {
line_weight_px: 1.0,
snap_pts: vec![],
tangent_geoms: vec![],
aci: 0,
key_vertices: vec![],
})
}
+1
View File
@@ -125,6 +125,7 @@ impl CadCommand for DimContinueCommand {
line_weight_px: 1.0,
snap_pts: vec![],
tangent_geoms: vec![],
aci: 0,
key_vertices: vec![],
})
}
+2 -1
View File
@@ -199,7 +199,8 @@ fn preview_wire(pts: &[Vec3]) -> WireModel {
line_weight_px: 1.0,
snap_pts: vec![],
tangent_geoms: vec![],
key_vertices: vec![],
aci: 0,
key_vertices: vec![],
}
}
+2 -1
View File
@@ -110,7 +110,8 @@ fn preview_wire(points: Vec<Vec3>) -> WireModel {
line_weight_px: 1.0,
snap_pts: vec![],
tangent_geoms: vec![],
key_vertices: vec![],
aci: 0,
key_vertices: vec![],
}
}
+2 -1
View File
@@ -152,7 +152,8 @@ fn preview_wire(pts: &[Vec3]) -> WireModel {
line_weight_px: 1.0,
snap_pts: vec![],
tangent_geoms: vec![],
key_vertices: vec![],
aci: 0,
key_vertices: vec![],
}
}
+2 -1
View File
@@ -109,6 +109,7 @@ fn preview_wire(points: Vec<Vec3>) -> WireModel {
line_weight_px: 1.0,
snap_pts: vec![],
tangent_geoms: vec![],
key_vertices: vec![],
aci: 0,
key_vertices: vec![],
}
}
+2 -1
View File
@@ -130,7 +130,8 @@ impl CadCommand for TableCommand {
line_weight_px: 1.0,
snap_pts: vec![],
tangent_geoms: vec![],
key_vertices: vec![],
aci: 0,
key_vertices: vec![],
})
} else {
None
+1
View File
@@ -83,6 +83,7 @@ impl CadCommand for ToleranceCommand {
line_weight_px: 1.0,
snap_pts: vec![],
tangent_geoms: vec![],
aci: 0,
key_vertices: vec![],
})
}