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![],
})
}
}
+1
View File
@@ -136,6 +136,7 @@ impl CadCommand for AttdefCommand {
aabb: WireModel::UNBOUNDED_AABB,
plinegen: true,
vp_scissor: None,
fill_tris: vec![],
})
}
}
+1
View File
@@ -529,5 +529,6 @@ fn line_wire(from: Vec3, to: Vec3) -> WireModel {
aabb: WireModel::UNBOUNDED_AABB,
plinegen: true,
vp_scissor: None,
fill_tris: vec![],
}
}
+1
View File
@@ -90,6 +90,7 @@ impl CadCommand for LineCommand {
aabb: WireModel::UNBOUNDED_AABB,
plinegen: true,
vp_scissor: None,
fill_tris: vec![],
})
}
}
+1
View File
@@ -115,6 +115,7 @@ impl CadCommand for MlineCommand {
aabb: WireModel::UNBOUNDED_AABB,
plinegen: true,
vp_scissor: None,
fill_tris: vec![],
})
}
}
+1
View File
@@ -114,6 +114,7 @@ impl CadCommand for ImageCommand {
aabb: WireModel::UNBOUNDED_AABB,
plinegen: true,
vp_scissor: None,
fill_tris: vec![],
})
}
}
+2
View File
@@ -88,6 +88,7 @@ impl CadCommand for RayCommand {
aabb: WireModel::UNBOUNDED_AABB,
plinegen: true,
vp_scissor: None,
fill_tris: vec![],
})
}
}
@@ -168,6 +169,7 @@ impl CadCommand for XLineCommand {
aabb: WireModel::UNBOUNDED_AABB,
plinegen: true,
vp_scissor: None,
fill_tris: vec![],
})
}
}
+1
View File
@@ -85,6 +85,7 @@ impl CadCommand for RevCloudCommand {
aabb: WireModel::UNBOUNDED_AABB,
plinegen: true,
vp_scissor: None,
fill_tris: vec![],
})
}
}
+2
View File
@@ -121,6 +121,7 @@ impl CadCommand for WipeoutCommand {
aabb: WireModel::UNBOUNDED_AABB,
plinegen: true,
vp_scissor: None,
fill_tris: vec![],
})
}
WipeoutMode::Polygonal => {
@@ -144,6 +145,7 @@ impl CadCommand for WipeoutCommand {
aabb: WireModel::UNBOUNDED_AABB,
plinegen: true,
vp_scissor: None,
fill_tris: vec![],
})
}
}
+1
View File
@@ -78,6 +78,7 @@ impl CadCommand for AreaCommand {
aabb: WireModel::UNBOUNDED_AABB,
plinegen: true,
vp_scissor: None,
fill_tris: vec![],
})
}
}
+1
View File
@@ -73,6 +73,7 @@ impl CadCommand for DistCommand {
aabb: WireModel::UNBOUNDED_AABB,
plinegen: true,
vp_scissor: None,
fill_tris: vec![],
})
}
}
+1
View File
@@ -136,6 +136,7 @@ impl CadCommand for StretchCommand {
aabb: WireModel::UNBOUNDED_AABB,
plinegen: true,
vp_scissor: None,
fill_tris: vec![],
})
}
_ => None,
+1
View File
@@ -100,6 +100,7 @@ impl CadCommand for MviewCommand {
aabb: WireModel::UNBOUNDED_AABB,
plinegen: true,
vp_scissor: None,
fill_tris: vec![],
})
}
}
+1
View File
@@ -65,6 +65,7 @@ impl CadCommand for PlotWindowCommand {
aabb: WireModel::UNBOUNDED_AABB,
plinegen: true,
vp_scissor: None,
fill_tris: vec![],
})
}
}
+1
View File
@@ -71,6 +71,7 @@ impl CadCommand for ZoomWindowCommand {
aabb: WireModel::UNBOUNDED_AABB,
plinegen: true,
vp_scissor: None,
fill_tris: vec![],
})
}
}