Skip to content

fix(ui): Add triangular meshes and line support [FLOW-DEV-18]#1969

Draft
billcookie wants to merge 7 commits into
mainfrom
FLOW-FE-417
Draft

fix(ui): Add triangular meshes and line support [FLOW-DEV-18]#1969
billcookie wants to merge 7 commits into
mainfrom
FLOW-FE-417

Conversation

@billcookie
Copy link
Copy Markdown
Contributor

@billcookie billcookie commented Mar 9, 2026

Overview

This PR adds Cesium rendering support for a new FlowGeometry3D geometry type that includes triangular meshes and line segments. It creates a new utility for converting FlowGeometry3D features into Cesium Primitives, a new React component to manage their lifecycle, and integrates triangular mesh support into the existing CityGML rendering pipeline.

What I've done

  • New flowGeometry3DToPrimitives.ts utility and FlowGeometry3DData.tsx component to handle FlowGeometry3D features with triangular meshes and line segments as batched Cesium Primitives.
  • Extended cityGmlGeometryToPrimitives.ts and CityGmlData.tsx to support triangularMesh geometry within CityGML features (for both known 3D types and unknown types), including a new meshPrimitive draw call.
  • Fixed dataSources iteration in hooks.ts to use indexed access (.get(i)) instead of for...of, which is required by CesiumJS's DataSourceCollection API.

What I haven't done

How I tested

Screenshot

Which point I want you to review particularly

Memo

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 9, 2026

🚀 Cloud Run Preview Deployed

🔗 Click here to open the preview in a new tab

@billcookie billcookie marked this pull request as ready for review March 9, 2026 04:58
@billcookie billcookie requested a review from KaWaite as a code owner March 9, 2026 04:58
Copilot AI review requested due to automatic review settings March 9, 2026 04:58
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds Cesium rendering support for a new FlowGeometry3D geometry type that includes triangular meshes and line segments. It creates a new utility for converting FlowGeometry3D features into Cesium Primitives, a new React component to manage their lifecycle, and integrates triangular mesh support into the existing CityGML rendering pipeline.

Changes:

  • New flowGeometry3DToPrimitives.ts utility and FlowGeometry3DData.tsx component to handle FlowGeometry3D features with triangular meshes and line segments as batched Cesium Primitives.
  • Extended cityGmlGeometryToPrimitives.ts and CityGmlData.tsx to support triangularMesh geometry within CityGML features (for both known 3D types and unknown types), including a new meshPrimitive draw call.
  • Fixed dataSources iteration in hooks.ts to use indexed access (.get(i)) instead of for...of, which is required by CesiumJS's DataSourceCollection API.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
ui/src/components/visualizations/Cesium/utils/flowGeometry3DToPrimitives.ts New utility: types, helpers, and main function to convert FlowGeometry3D features into batched mesh/line Cesium Primitives
ui/src/components/visualizations/Cesium/FlowGeometry3DData.tsx New React component managing FlowGeometry3D primitive lifecycle, visibility, and cleanup
ui/src/components/visualizations/Cesium/utils/cityGmlGeometryToPrimitives.ts Added meshPrimitive output, TriangularMesh handling in 3D types, unknown types, and LOD upgrade paths; reuses shared helpers
ui/src/components/visualizations/Cesium/CityGmlData.tsx Integrated meshPrimitiveRef for add/remove/visibility of the new mesh primitive alongside existing absolute/ground primitives
ui/src/components/visualizations/Cesium/index.tsx Added FlowGeometry3D feature filtering and FlowGeometry3DData component rendering
ui/src/features/Editor/components/OverlayUI/components/DebugPanel/hooks.ts Fixed dataSources iteration to use indexed .get(i) instead of for...of

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ui/src/components/visualizations/Cesium/utils/cityGmlGeometryToPrimitives.ts Outdated
Comment thread ui/src/components/visualizations/Cesium/utils/cityGmlGeometryToPrimitives.ts Outdated
Comment thread ui/src/components/visualizations/Cesium/FlowGeometry3DData.tsx Outdated
@KaWaite KaWaite changed the title fix(ui): Add Cesium Support for FlowGeometry3D (Triangular Meshes and Line) [FLOW-FE-417] fix(ui): Add triangular meshes and line support for FlowGeometry3D [FLOW-FE-417] Mar 12, 2026
@KaWaite KaWaite changed the title fix(ui): Add triangular meshes and line support for FlowGeometry3D [FLOW-FE-417] fix(ui): Add triangular meshes and line support [FLOW-FE-417] Mar 12, 2026
Comment on lines +285 to +286
for (let i = 0; i < cesiumViewer.dataSources.length; i++) {
const dataSource = cesiumViewer.dataSources.get(i);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Any reason for this change? 🤔

@billcookie billcookie changed the title fix(ui): Add triangular meshes and line support [FLOW-FE-417] fix(ui): Add triangular meshes and line support [FLOW-DEV-18] Mar 29, 2026
@KaWaite KaWaite marked this pull request as draft May 8, 2026 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants