diff --git a/app/assets/geode_objects.ts b/app/assets/geode_objects.ts index 515ed45b5..a2c158bc0 100644 --- a/app/assets/geode_objects.ts +++ b/app/assets/geode_objects.ts @@ -1,8 +1,12 @@ +// oxlint-disable import/max-dependencies -- one icon import per geode object type +import type { GeodeObjectType } from "@geode/opengeodeweb-microservice/data_types"; + import BRep from "@ogw_front/assets/img/geode_objects/BRep.svg"; import CrossSection from "@ogw_front/assets/img/geode_objects/CrossSection.svg"; import EdgedCurve2D from "@ogw_front/assets/img/geode_objects/EdgedCurve2D.svg"; import EdgedCurve3D from "@ogw_front/assets/img/geode_objects/EdgedCurve3D.svg"; import Graph from "@ogw_front/assets/img/geode_objects/Graph.svg"; +import HorizonStack3D from "@ogw_front/assets/img/geode_objects/HorizonStack3D.svg"; import HybridSolid3D from "@ogw_front/assets/img/geode_objects/HybridSolid3D.svg"; import ImplicitCrossSection from "@ogw_front/assets/img/geode_objects/ImplicitCrossSection.svg"; import ImplicitStructuralModel from "@ogw_front/assets/img/geode_objects/ImplicitStructuralModel.svg"; @@ -13,7 +17,6 @@ import PointSet3D from "@ogw_front/assets/img/geode_objects/PointSet3D.svg"; import PolygonalSurface2D from "@ogw_front/assets/img/geode_objects/PolygonalSurface2D.svg"; import PolygonalSurface3D from "@ogw_front/assets/img/geode_objects/PolygonalSurface3D.svg"; import PolyhedralSolid3D from "@ogw_front/assets/img/geode_objects/PolyhedralSolid3D.svg"; -// oxlint-disable-next-line import/max-dependencies -- one icon import per geode object. import RasterImage2D from "@ogw_front/assets/img/geode_objects/RasterImage2D.svg"; import RasterImage3D from "@ogw_front/assets/img/geode_objects/RasterImage3D.svg"; import RegularGrid2D from "@ogw_front/assets/img/geode_objects/RegularGrid2D.svg"; @@ -25,112 +28,38 @@ import TriangulatedSurface2D from "@ogw_front/assets/img/geode_objects/Triangula import TriangulatedSurface3D from "@ogw_front/assets/img/geode_objects/TriangulatedSurface3D.svg"; import VertexSet from "@ogw_front/assets/img/geode_objects/VertexSet.svg"; -interface GeodeObject { - tooltip: string; - image: string; -} - -const geode_objects: Record = { - BRep: { - tooltip: "BRep", - image: BRep, - }, - CrossSection: { - tooltip: "CrossSection", - image: CrossSection, - }, - EdgedCurve2D: { - tooltip: "EdgedCurve2D", - image: EdgedCurve2D, - }, - EdgedCurve3D: { - tooltip: "EdgedCurve3D", - image: EdgedCurve3D, - }, - Graph: { - tooltip: "Graph", - image: Graph, - }, - HybridSolid3D: { - tooltip: "HybridSolid3D", - image: HybridSolid3D, - }, - ImplicitCrossSection: { - tooltip: "ImplicitCrossSection", - image: ImplicitCrossSection, - }, - ImplicitStructuralModel: { - tooltip: "ImplicitStructuralModel", - image: ImplicitStructuralModel, - }, - LightRegularGrid2D: { - tooltip: "LightRegularGrid2D", - image: LightRegularGrid2D, - }, - LightRegularGrid3D: { - tooltip: "LightRegularGrid3D", - image: LightRegularGrid3D, - }, - PointSet2D: { - tooltip: "PointSet2D", - image: PointSet2D, - }, - PointSet3D: { - tooltip: "PointSet3D", - image: PointSet3D, - }, - PolygonalSurface2D: { - tooltip: "PolygonalSurface2D", - image: PolygonalSurface2D, - }, - PolygonalSurface3D: { - tooltip: "PolygonalSurface3D", - image: PolygonalSurface3D, - }, - PolyhedralSolid3D: { - tooltip: "PolyhedralSolid3D", - image: PolyhedralSolid3D, - }, - RasterImage2D: { - tooltip: "RasterImage2D", - image: RasterImage2D, - }, - RasterImage3D: { - tooltip: "RasterImage3D", - image: RasterImage3D, - }, - RegularGrid2D: { - tooltip: "RegularGrid2D", - image: RegularGrid2D, - }, - RegularGrid3D: { - tooltip: "RegularGrid3D", - image: RegularGrid3D, - }, - Section: { - tooltip: "Section", - image: Section, - }, - StructuralModel: { - tooltip: "StructuralModel", - image: StructuralModel, - }, - TetrahedralSolid3D: { - tooltip: "TetrahedralSolid3D", - image: TetrahedralSolid3D, - }, - TriangulatedSurface2D: { - tooltip: "TriangulatedSurface2D", - image: TriangulatedSurface2D, - }, - TriangulatedSurface3D: { - tooltip: "TriangulatedSurface3D", - image: TriangulatedSurface3D, - }, - VertexSet: { - tooltip: "VertexSet", - image: VertexSet, - }, +// Icon of each geode object type: every type of data_types.py must have one +const geodeObjectImages: Record = { + BRep, + CrossSection, + EdgedCurve2D, + EdgedCurve3D, + Graph, + HorizonStack3D, + HybridSolid3D, + ImplicitCrossSection, + ImplicitStructuralModel, + LightRegularGrid2D, + LightRegularGrid3D, + PointSet2D, + PointSet3D, + PolygonalSurface2D, + PolygonalSurface3D, + PolyhedralSolid3D, + RasterImage2D, + RasterImage3D, + RegularGrid2D, + RegularGrid3D, + Section, + StructuralModel, + TetrahedralSolid3D, + TriangulatedSurface2D, + TriangulatedSurface3D, + VertexSet, }; -export { geode_objects }; +function geodeObjectImage(geodeObjectType: GeodeObjectType): string { + return geodeObjectImages[geodeObjectType]; +} + +export { geodeObjectImage }; diff --git a/app/assets/img/geode_objects/HorizonStack3D.svg b/app/assets/img/geode_objects/HorizonStack3D.svg new file mode 100644 index 000000000..9941339e1 --- /dev/null +++ b/app/assets/img/geode_objects/HorizonStack3D.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/app/components/CrsSelector.vue b/app/components/CrsSelector.vue index c895a4a1f..43c5072ae 100644 --- a/app/components/CrsSelector.vue +++ b/app/components/CrsSelector.vue @@ -1,6 +1,6 @@