feat(render): solid fill for PolyfaceMesh and PolygonMesh entities

PolyfaceMesh and PolygonMesh were wireframe-only. They now render with
the same flat-color solid fill as Face3D entities.

- Add fill_tris: Vec<[f32;3]> to TruckEntity and WireModel
- PolyfaceMesh: fan-triangulate each face into fill_tris
- PolygonMesh: triangulate each grid quad into fill_tris
- tessellate.rs Lines branch: apply world_offset to fill_tris
- Face3DGpu::from_wires: collect fill_tris from all wires in addition
  to Face3D key_vertices quads
- upload_face3d: pass all_wires so fill_tris are batched into one draw call
This commit is contained in:
Hakan Seven committed 2026-05-06 23:24:26 +03:00
1 parent ca9ec8f47d
commit 048bb41aef
61 files changed
+151 -21

No files matched your search

+2
View File
@@ -104,6 +104,7 @@ impl CadCommand for AlignedDimensionCommand {
aabb: WireModel::UNBOUNDED_AABB,
plinegen: true,
vp_scissor: None,
fill_tris: vec![],
})
}
}
@@ -140,5 +141,6 @@ fn preview_aligned(p1: Vec3, p2: Vec3, dim_pt: Vec3) -> WireModel {
aabb: WireModel::UNBOUNDED_AABB,
plinegen: true,
vp_scissor: None,
fill_tris: vec![],
}
}
+1
View File
@@ -127,6 +127,7 @@ fn preview_wire(points: Vec<Vec3>) -> WireModel {
aabb: WireModel::UNBOUNDED_AABB,
plinegen: true,
vp_scissor: None,
fill_tris: vec![],
}
}
+1
View File
@@ -103,5 +103,6 @@ fn preview_line(a: Vec3, b: Vec3) -> WireModel {
aabb: WireModel::UNBOUNDED_AABB,
plinegen: true,
vp_scissor: None,
fill_tris: vec![],
}
}
+1
View File
@@ -145,6 +145,7 @@ impl CadCommand for DimBaselineCommand {
aabb: WireModel::UNBOUNDED_AABB,
plinegen: true,
vp_scissor: None,
fill_tris: vec![],
})
}
}
+1
View File
@@ -142,6 +142,7 @@ impl CadCommand for DimContinueCommand {
aabb: WireModel::UNBOUNDED_AABB,
plinegen: true,
vp_scissor: None,
fill_tris: vec![],
})
}
}
+1
View File
@@ -96,6 +96,7 @@ impl CadCommand for DimJogLineCommand {
aabb: WireModel::UNBOUNDED_AABB,
plinegen: true,
vp_scissor: None,
fill_tris: vec![],
})
}
}
+1
View File
@@ -104,6 +104,7 @@ impl CadCommand for DimTeditCommand {
aabb: WireModel::UNBOUNDED_AABB,
plinegen: true,
vp_scissor: None,
fill_tris: vec![],
})
}
+1
View File
@@ -204,6 +204,7 @@ fn preview_wire(pts: &[Vec3]) -> WireModel {
aabb: WireModel::UNBOUNDED_AABB,
plinegen: true,
vp_scissor: None,
fill_tris: vec![],
}
}
+1
View File
@@ -115,6 +115,7 @@ fn preview_wire(points: Vec<Vec3>) -> WireModel {
aabb: WireModel::UNBOUNDED_AABB,
plinegen: true,
vp_scissor: None,
fill_tris: vec![],
}
}
+1
View File
@@ -157,6 +157,7 @@ fn preview_wire(pts: &[Vec3]) -> WireModel {
aabb: WireModel::UNBOUNDED_AABB,
plinegen: true,
vp_scissor: None,
fill_tris: vec![],
}
}
+1
View File
@@ -368,6 +368,7 @@ fn preview_wire(pts: &[Vec3]) -> WireModel {
aabb: WireModel::UNBOUNDED_AABB,
plinegen: true,
vp_scissor: None,
fill_tris: vec![],
}
}
+1
View File
@@ -101,6 +101,7 @@ impl CadCommand for QdimCommand {
aabb: WireModel::UNBOUNDED_AABB,
plinegen: true,
vp_scissor: None,
fill_tris: vec![],
})
}
}
+1
View File
@@ -114,5 +114,6 @@ fn preview_wire(points: Vec<Vec3>) -> WireModel {
aabb: WireModel::UNBOUNDED_AABB,
plinegen: true,
vp_scissor: None,
fill_tris: vec![],
}
}
+1
View File
@@ -147,6 +147,7 @@ impl CadCommand for TableCommand {
aabb: WireModel::UNBOUNDED_AABB,
plinegen: true,
vp_scissor: None,
fill_tris: vec![],
})
} else {
None
+1
View File
@@ -100,6 +100,7 @@ impl CadCommand for ToleranceCommand {
aabb: WireModel::UNBOUNDED_AABB,
plinegen: true,
vp_scissor: None,
fill_tris: vec![],
})
}
}