@geode/opengeodeweb-front 10.22.1 → 10.23.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/app/components/Viewer/Generic/Model/BlocksOptions.vue +256 -0
  2. package/app/components/Viewer/Generic/Model/CornersOptions.vue +187 -0
  3. package/app/components/Viewer/Generic/Model/LinesOptions.vue +252 -0
  4. package/app/components/Viewer/Generic/Model/ModelStyleCard.vue +72 -132
  5. package/app/components/Viewer/Generic/Model/SurfacesOptions.vue +260 -0
  6. package/app/components/Viewer/Options/AttributeSelector.vue +15 -2
  7. package/app/components/Viewer/Options/ColoringTypeSelector.vue +53 -11
  8. package/app/stores/hybrid_viewer.js +21 -2
  9. package/app/utils/default_styles/constants.js +57 -0
  10. package/app/utils/default_styles/index.js +54 -0
  11. package/app/utils/default_styles/meshes.js +185 -0
  12. package/app/utils/default_styles/models.js +192 -0
  13. package/internal/stores/data_style/model/blocks/color.js +10 -1
  14. package/internal/stores/data_style/model/blocks/index.js +60 -4
  15. package/internal/stores/data_style/model/blocks/polyhedron.js +144 -0
  16. package/internal/stores/data_style/model/blocks/vertex.js +141 -0
  17. package/internal/stores/data_style/model/color.js +119 -12
  18. package/internal/stores/data_style/model/common.js +18 -21
  19. package/internal/stores/data_style/model/corners/color.js +10 -1
  20. package/internal/stores/data_style/model/corners/index.js +48 -4
  21. package/internal/stores/data_style/model/corners/vertex.js +144 -0
  22. package/internal/stores/data_style/model/lines/color.js +10 -1
  23. package/internal/stores/data_style/model/lines/edge.js +138 -0
  24. package/internal/stores/data_style/model/lines/index.js +58 -4
  25. package/internal/stores/data_style/model/lines/vertex.js +138 -0
  26. package/internal/stores/data_style/model/selection.js +50 -29
  27. package/internal/stores/data_style/model/surfaces/color.js +16 -1
  28. package/internal/stores/data_style/model/surfaces/index.js +60 -4
  29. package/internal/stores/data_style/model/surfaces/polygon.js +144 -0
  30. package/internal/stores/data_style/model/surfaces/vertex.js +144 -0
  31. package/internal/stores/data_style/model/visibility.js +17 -4
  32. package/internal/stores/data_style/state.js +101 -21
  33. package/package.json +3 -3
  34. package/tests/integration/stores/data_style/model/blocks.nuxt.test.js +72 -0
  35. package/tests/integration/stores/data_style/model/corners.nuxt.test.js +33 -0
  36. package/tests/integration/stores/data_style/model/lines.nuxt.test.js +66 -0
  37. package/tests/integration/stores/data_style/model/surfaces.nuxt.test.js +72 -0
  38. package/app/utils/default_styles.js +0 -327
@@ -90,6 +90,78 @@ describe("model blocks", () => {
90
90
  expect(viewerStore.status).toBe(Status.CONNECTED);
91
91
  });
92
92
  });
93
+ describe("blocks vertex attribute", () => {
94
+ test("coloring vertex attribute", async () => {
95
+ const dataStyleStore = useDataStyleStore();
96
+ const viewerStore = useViewerStore();
97
+ const dataStore = useDataStore();
98
+ const block_ids = await dataStore.getBlocksGeodeIds(id);
99
+ const block_viewer_ids = await dataStore.getMeshComponentsViewerIds(id, block_ids);
100
+ const spy = vi.spyOn(viewerStore, "request");
101
+ spy.mockClear();
102
+ const result = dataStyleStore.setModelBlocksVertexAttributeName(id, block_ids, "points");
103
+ expect(result).toBeInstanceOf(Promise);
104
+ await result;
105
+ await sleep(SLEEP_MS);
106
+ expect(spy).toHaveBeenCalledWith(
107
+ {
108
+ schema: model_blocks_schemas.attribute.vertex.name,
109
+ params: {
110
+ id,
111
+ block_ids: block_viewer_ids,
112
+ name: "points",
113
+ },
114
+ },
115
+ {
116
+ response_function: expect.any(Function),
117
+ },
118
+ );
119
+ for (const block_id of block_ids) {
120
+ expect(dataStyleStore.modelBlocksVertexAttributeName(id, block_id)).toBe("points");
121
+ }
122
+ expect(viewerStore.status).toBe(Status.CONNECTED);
123
+ });
124
+ });
125
+
126
+ describe("blocks polyhedron attribute", () => {
127
+ test("coloring polyhedron attribute", async () => {
128
+ const dataStyleStore = useDataStyleStore();
129
+ const viewerStore = useViewerStore();
130
+ const dataStore = useDataStore();
131
+ const block_ids = await dataStore.getBlocksGeodeIds(id);
132
+ const block_viewer_ids = await dataStore.getMeshComponentsViewerIds(id, block_ids);
133
+ const spy = vi.spyOn(viewerStore, "request");
134
+ spy.mockClear();
135
+ const result = dataStyleStore.setModelBlocksPolyhedronAttributeName(
136
+ id,
137
+ block_ids,
138
+ "test_attribute",
139
+ );
140
+ expect(result).toBeInstanceOf(Promise);
141
+ await result;
142
+ await sleep(SLEEP_MS);
143
+ expect(spy).toHaveBeenCalledWith(
144
+ {
145
+ schema: model_blocks_schemas.attribute.polyhedron.name,
146
+ params: {
147
+ id,
148
+ block_ids: block_viewer_ids,
149
+ name: "test_attribute",
150
+ },
151
+ },
152
+ {
153
+ response_function: expect.any(Function),
154
+ },
155
+ );
156
+ for (const block_id of block_ids) {
157
+ expect(dataStyleStore.modelBlocksPolyhedronAttributeName(id, block_id)).toBe(
158
+ "test_attribute",
159
+ );
160
+ }
161
+ expect(viewerStore.status).toBe(Status.CONNECTED);
162
+ });
163
+ });
164
+
93
165
  describe("blocks style", () => {
94
166
  test("blocks apply style", async () => {
95
167
  const dataStyleStore = useDataStyleStore();
@@ -94,6 +94,39 @@ describe("model corners", () => {
94
94
  });
95
95
  });
96
96
 
97
+ describe("corners vertex attribute", () => {
98
+ test("coloring vertex attribute", async () => {
99
+ const dataStyleStore = useDataStyleStore();
100
+ const viewerStore = useViewerStore();
101
+ const dataStore = useDataStore();
102
+ const corner_ids = await dataStore.getCornersGeodeIds(id);
103
+ const corner_viewer_ids = await dataStore.getMeshComponentsViewerIds(id, corner_ids);
104
+ const spy = vi.spyOn(viewerStore, "request");
105
+ spy.mockClear();
106
+ const result = dataStyleStore.setModelCornersVertexAttributeName(id, corner_ids, "points");
107
+ expect(result).toBeInstanceOf(Promise);
108
+ await result;
109
+ await sleep(SLEEP_MS);
110
+ expect(spy).toHaveBeenCalledWith(
111
+ {
112
+ schema: model_corners_schemas.attribute.vertex.name,
113
+ params: {
114
+ id,
115
+ block_ids: corner_viewer_ids,
116
+ name: "points",
117
+ },
118
+ },
119
+ {
120
+ response_function: expect.any(Function),
121
+ },
122
+ );
123
+ for (const corner_id of corner_ids) {
124
+ expect(dataStyleStore.modelCornersVertexAttributeName(id, corner_id)).toBe("points");
125
+ }
126
+ expect(viewerStore.status).toBe(Status.CONNECTED);
127
+ });
128
+ });
129
+
97
130
  describe("corner style", () => {
98
131
  test("corners apply style", async () => {
99
132
  const dataStyleStore = useDataStyleStore();
@@ -94,6 +94,72 @@ describe("model lines", () => {
94
94
  expect(viewerStore.status).toBe(Status.CONNECTED);
95
95
  });
96
96
  });
97
+ describe("lines vertex attribute", () => {
98
+ test("coloring vertex attribute", async () => {
99
+ const dataStyleStore = useDataStyleStore();
100
+ const viewerStore = useViewerStore();
101
+ const dataStore = useDataStore();
102
+ const line_ids = await dataStore.getLinesGeodeIds(id);
103
+ const lines_viewer_ids = await dataStore.getMeshComponentsViewerIds(id, line_ids);
104
+ const spy = vi.spyOn(viewerStore, "request");
105
+ spy.mockClear();
106
+ const result = dataStyleStore.setModelLinesVertexAttributeName(id, line_ids, "points");
107
+ expect(result).toBeInstanceOf(Promise);
108
+ await result;
109
+ await sleep(SLEEP_MS);
110
+ expect(spy).toHaveBeenCalledWith(
111
+ {
112
+ schema: model_lines_schemas.attribute.vertex.name,
113
+ params: {
114
+ id,
115
+ block_ids: lines_viewer_ids,
116
+ name: "points",
117
+ },
118
+ },
119
+ {
120
+ response_function: expect.any(Function),
121
+ },
122
+ );
123
+ for (const line_id of line_ids) {
124
+ expect(dataStyleStore.modelLinesVertexAttributeName(id, line_id)).toBe("points");
125
+ }
126
+ expect(viewerStore.status).toBe(Status.CONNECTED);
127
+ });
128
+ });
129
+
130
+ describe("lines edge attribute", () => {
131
+ test("coloring edge attribute", async () => {
132
+ const dataStyleStore = useDataStyleStore();
133
+ const viewerStore = useViewerStore();
134
+ const dataStore = useDataStore();
135
+ const line_ids = await dataStore.getLinesGeodeIds(id);
136
+ const lines_viewer_ids = await dataStore.getMeshComponentsViewerIds(id, line_ids);
137
+ const spy = vi.spyOn(viewerStore, "request");
138
+ spy.mockClear();
139
+ const result = dataStyleStore.setModelLinesEdgeAttributeName(id, line_ids, "test_attribute");
140
+ expect(result).toBeInstanceOf(Promise);
141
+ await result;
142
+ await sleep(SLEEP_MS);
143
+ expect(spy).toHaveBeenCalledWith(
144
+ {
145
+ schema: model_lines_schemas.attribute.edge.name,
146
+ params: {
147
+ id,
148
+ block_ids: lines_viewer_ids,
149
+ name: "test_attribute",
150
+ },
151
+ },
152
+ {
153
+ response_function: expect.any(Function),
154
+ },
155
+ );
156
+ for (const line_id of line_ids) {
157
+ expect(dataStyleStore.modelLinesEdgeAttributeName(id, line_id)).toBe("test_attribute");
158
+ }
159
+ expect(viewerStore.status).toBe(Status.CONNECTED);
160
+ });
161
+ });
162
+
97
163
  describe("lines style", () => {
98
164
  test("lines apply style", async () => {
99
165
  const dataStyleStore = useDataStyleStore();
@@ -92,6 +92,78 @@ describe("model surfaces", () => {
92
92
  expect(viewerStore.status).toBe(Status.CONNECTED);
93
93
  });
94
94
  });
95
+ describe("surfaces vertex attribute", () => {
96
+ test("coloring vertex attribute", async () => {
97
+ const dataStyleStore = useDataStyleStore();
98
+ const viewerStore = useViewerStore();
99
+ const dataStore = useDataStore();
100
+ const surface_ids = await dataStore.getSurfacesGeodeIds(id);
101
+ const surface_viewer_ids = await dataStore.getMeshComponentsViewerIds(id, surface_ids);
102
+ const spy = vi.spyOn(viewerStore, "request");
103
+ spy.mockClear();
104
+ const result = dataStyleStore.setModelSurfacesVertexAttributeName(id, surface_ids, "points");
105
+ expect(result).toBeInstanceOf(Promise);
106
+ await result;
107
+ await sleep(SLEEP_MS);
108
+ expect(spy).toHaveBeenCalledWith(
109
+ {
110
+ schema: model_surfaces_schemas.attribute.vertex.name,
111
+ params: {
112
+ id,
113
+ block_ids: surface_viewer_ids,
114
+ name: "points",
115
+ },
116
+ },
117
+ {
118
+ response_function: expect.any(Function),
119
+ },
120
+ );
121
+ for (const surface_id of surface_ids) {
122
+ expect(dataStyleStore.modelSurfacesVertexAttributeName(id, surface_id)).toBe("points");
123
+ }
124
+ expect(viewerStore.status).toBe(Status.CONNECTED);
125
+ });
126
+ });
127
+
128
+ describe("surfaces polygon attribute", () => {
129
+ test("coloring polygon attribute", async () => {
130
+ const dataStyleStore = useDataStyleStore();
131
+ const viewerStore = useViewerStore();
132
+ const dataStore = useDataStore();
133
+ const surface_ids = await dataStore.getSurfacesGeodeIds(id);
134
+ const surface_viewer_ids = await dataStore.getMeshComponentsViewerIds(id, surface_ids);
135
+ const spy = vi.spyOn(viewerStore, "request");
136
+ spy.mockClear();
137
+ const result = dataStyleStore.setModelSurfacesPolygonAttributeName(
138
+ id,
139
+ surface_ids,
140
+ "test_attribute",
141
+ );
142
+ expect(result).toBeInstanceOf(Promise);
143
+ await result;
144
+ await sleep(SLEEP_MS);
145
+ expect(spy).toHaveBeenCalledWith(
146
+ {
147
+ schema: model_surfaces_schemas.attribute.polygon.name,
148
+ params: {
149
+ id,
150
+ block_ids: surface_viewer_ids,
151
+ name: "test_attribute",
152
+ },
153
+ },
154
+ {
155
+ response_function: expect.any(Function),
156
+ },
157
+ );
158
+ for (const surface_id of surface_ids) {
159
+ expect(dataStyleStore.modelSurfacesPolygonAttributeName(id, surface_id)).toBe(
160
+ "test_attribute",
161
+ );
162
+ }
163
+ expect(viewerStore.status).toBe(Status.CONNECTED);
164
+ });
165
+ });
166
+
95
167
  describe("surfaces style", () => {
96
168
  test("surfaces apply style", async () => {
97
169
  const dataStyleStore = useDataStyleStore();
@@ -1,327 +0,0 @@
1
- // Global variables
2
- const points_defaultVisibility = true;
3
- const edges_defaultVisibility = true;
4
- const cells_defaultVisibility = true;
5
- const polygons_defaultVisibility = true;
6
- const polyhedra_defaultVisibility = true;
7
- const points_defaultSize = 10;
8
- const points_defaultColor = { red: 20, green: 20, blue: 20, alpha: 1 };
9
- const edges_defaultWidth = 2;
10
- const edges_defaultColor = { red: 20, green: 20, blue: 20, alpha: 1 };
11
- const cells_defaultColor = { red: 255, green: 255, blue: 255, alpha: 1 };
12
- const polygons_defaultColor = { red: 255, green: 255, blue: 255, alpha: 1 };
13
- const polyhedra_defaultColor = { red: 255, green: 255, blue: 255, alpha: 1 };
14
-
15
- const corners_defaultVisibility = true;
16
- const corners_defaultColor = { red: 20, green: 20, blue: 20, alpha: 1 };
17
- const lines_defaultVisibility = true;
18
- const lines_defaultColor = { red: 20, green: 20, blue: 20, alpha: 1 };
19
- const surfaces_defaultVisibility = true;
20
- const surfaces_defaultColor = { red: 255, green: 255, blue: 255, alpha: 1 };
21
- const blocks_defaultVisibility = true;
22
- const blocks_defaultColor = { red: 255, green: 255, blue: 255, alpha: 1 };
23
-
24
- const DEFAULT_MODEL_COMPONENT_TYPE_COLORS = {
25
- Corner: corners_defaultColor,
26
- Line: lines_defaultColor,
27
- Surface: surfaces_defaultColor,
28
- Block: blocks_defaultColor,
29
- };
30
-
31
- const MESH_TYPES = ["Corner", "Line", "Surface", "Block"];
32
-
33
- // Mesh functions
34
- function meshPointsDefaultStyle(
35
- visibility = points_defaultVisibility,
36
- size = points_defaultSize,
37
- color = points_defaultColor,
38
- ) {
39
- return {
40
- visibility,
41
- coloring: {
42
- active: "color",
43
- color,
44
- vertex: {
45
- name: undefined,
46
- storedConfigs: {},
47
- },
48
- },
49
- size,
50
- };
51
- }
52
-
53
- function meshEdgesDefaultStyle(
54
- visibility = edges_defaultVisibility,
55
- width = edges_defaultWidth,
56
- color = edges_defaultColor,
57
- ) {
58
- return {
59
- visibility,
60
- coloring: {
61
- active: "color",
62
- color,
63
- edge: {
64
- name: undefined,
65
- storedConfigs: {},
66
- },
67
- vertex: {
68
- name: undefined,
69
- storedConfigs: {},
70
- },
71
- },
72
- width,
73
- };
74
- }
75
-
76
- function meshCellsDefaultStyle(visibility = cells_defaultVisibility, color = cells_defaultColor) {
77
- return {
78
- visibility,
79
- coloring: {
80
- active: "color",
81
- cell: {
82
- name: undefined,
83
- storedConfigs: {},
84
- },
85
- color,
86
- textures: undefined,
87
- vertex: {
88
- name: undefined,
89
- storedConfigs: {},
90
- },
91
- },
92
- };
93
- }
94
-
95
- function meshPolygonsDefaultStyle(
96
- visibility = polygons_defaultVisibility,
97
- color = polygons_defaultColor,
98
- ) {
99
- return {
100
- visibility,
101
- coloring: {
102
- active: "color",
103
- color,
104
- textures: undefined,
105
- polygon: {
106
- name: undefined,
107
- storedConfigs: {},
108
- },
109
- vertex: {
110
- name: undefined,
111
- storedConfigs: {},
112
- },
113
- },
114
- };
115
- }
116
-
117
- function meshPolyhedraDefaultStyle(
118
- visibility = polyhedra_defaultVisibility,
119
- color = polyhedra_defaultColor,
120
- ) {
121
- return {
122
- visibility,
123
- coloring: {
124
- active: "color",
125
- color,
126
- polyhedron: {
127
- name: undefined,
128
- storedConfigs: {},
129
- },
130
- vertex: {
131
- name: undefined,
132
- storedConfigs: {},
133
- },
134
- },
135
- };
136
- }
137
-
138
- function pointSet_defaultStyle() {
139
- return {
140
- visibility: true,
141
- points: meshPointsDefaultStyle(),
142
- };
143
- }
144
-
145
- function edgedCurve_defaultStyle() {
146
- return {
147
- visibility: true,
148
- points: meshPointsDefaultStyle(),
149
- edges: meshEdgesDefaultStyle(),
150
- };
151
- }
152
-
153
- function grid2d_defaultStyle() {
154
- return {
155
- visibility: true,
156
- points: meshPointsDefaultStyle(false),
157
- edges: meshEdgesDefaultStyle(false),
158
- cells: meshCellsDefaultStyle(),
159
- };
160
- }
161
-
162
- function grid3d_defaultStyle() {
163
- return {
164
- visibility: true,
165
- points: meshPointsDefaultStyle(false),
166
- edges: meshEdgesDefaultStyle(false),
167
- cells: meshCellsDefaultStyle(),
168
- polyhedra: meshPolyhedraDefaultStyle(),
169
- };
170
- }
171
- function surface_defaultStyle() {
172
- return {
173
- visibility: true,
174
- points: meshPointsDefaultStyle(false),
175
- edges: meshEdgesDefaultStyle(false),
176
- polygons: meshPolygonsDefaultStyle(),
177
- };
178
- }
179
-
180
- function solid_defaultStyle() {
181
- return {
182
- visibility: true,
183
- points: meshPointsDefaultStyle(false),
184
- edges: meshEdgesDefaultStyle(false),
185
- polygons: meshPolygonsDefaultStyle(),
186
- polyhedra: meshPolyhedraDefaultStyle(),
187
- };
188
- }
189
-
190
- // Model functions
191
- function modelCornersDefaultStyle(
192
- visibility = corners_defaultVisibility,
193
- color = corners_defaultColor,
194
- ) {
195
- return { visibility, color };
196
- }
197
-
198
- function modelLinesDefaultStyle(visibility = lines_defaultVisibility, color = lines_defaultColor) {
199
- return { visibility, color };
200
- }
201
-
202
- function modelSurfacesDefaultStyle(
203
- visibility = surfaces_defaultVisibility,
204
- color = surfaces_defaultColor,
205
- ) {
206
- return { visibility, color };
207
- }
208
-
209
- function modelBlocksDefaultStyle(
210
- visibility = blocks_defaultVisibility,
211
- color = blocks_defaultColor,
212
- ) {
213
- return { visibility, color };
214
- }
215
-
216
- function modelPointsDefaultStyle(visibility = points_defaultVisibility, size = points_defaultSize) {
217
- return { visibility, size };
218
- }
219
-
220
- function modelEdgesDefaultStyle(visibility = edges_defaultVisibility, width = edges_defaultWidth) {
221
- return { visibility, width };
222
- }
223
-
224
- function brep_defaultStyle() {
225
- return {
226
- visibility: true,
227
- corners: modelCornersDefaultStyle(),
228
- lines: modelLinesDefaultStyle(),
229
- surfaces: modelSurfacesDefaultStyle(),
230
- blocks: modelBlocksDefaultStyle(),
231
- points: modelPointsDefaultStyle(false, points_defaultSize),
232
- edges: modelEdgesDefaultStyle(false, edges_defaultWidth),
233
- };
234
- }
235
-
236
- function crossSection_defaultStyle() {
237
- return {
238
- visibility: true,
239
- corners: modelCornersDefaultStyle(),
240
- lines: modelLinesDefaultStyle(),
241
- surfaces: modelSurfacesDefaultStyle(),
242
- points: modelPointsDefaultStyle(false, points_defaultSize),
243
- edges: modelEdgesDefaultStyle(false, edges_defaultWidth),
244
- };
245
- }
246
-
247
- function structuralModel_defaultStyle() {
248
- return {
249
- visibility: true,
250
- corners: modelCornersDefaultStyle(),
251
- lines: modelLinesDefaultStyle(),
252
- surfaces: modelSurfacesDefaultStyle(),
253
- blocks: modelBlocksDefaultStyle(),
254
- points: modelPointsDefaultStyle(false, points_defaultSize),
255
- edges: modelEdgesDefaultStyle(false, edges_defaultWidth),
256
- };
257
- }
258
-
259
- function section_defaultStyle() {
260
- return {
261
- visibility: true,
262
- corners: modelCornersDefaultStyle(),
263
- lines: modelLinesDefaultStyle(),
264
- surfaces: modelSurfacesDefaultStyle(),
265
- points: modelPointsDefaultStyle(false, points_defaultSize),
266
- edges: modelEdgesDefaultStyle(false, edges_defaultWidth),
267
- };
268
- }
269
-
270
- function implicitCrossSection_defaultStyle() {
271
- return {
272
- visibility: true,
273
- corners: modelCornersDefaultStyle(),
274
- lines: modelLinesDefaultStyle(),
275
- surfaces: modelSurfacesDefaultStyle(),
276
- points: modelPointsDefaultStyle(false, points_defaultSize),
277
- edges: modelEdgesDefaultStyle(false, edges_defaultWidth),
278
- };
279
- }
280
-
281
- function implicitStructuralModel_defaultStyle() {
282
- return {
283
- visibility: true,
284
- corners: modelCornersDefaultStyle(),
285
- lines: modelLinesDefaultStyle(),
286
- surfaces: modelSurfacesDefaultStyle(),
287
- blocks: modelBlocksDefaultStyle(),
288
- points: modelPointsDefaultStyle(false, points_defaultSize),
289
- edges: modelEdgesDefaultStyle(false, edges_defaultWidth),
290
- };
291
- }
292
-
293
- function default_styles() {
294
- return {
295
- BRep: brep_defaultStyle(),
296
- CrossSection: crossSection_defaultStyle(),
297
- EdgedCurve2D: edgedCurve_defaultStyle(),
298
- EdgedCurve3D: edgedCurve_defaultStyle(),
299
- Graph: {},
300
- HybridSolid3D: solid_defaultStyle(),
301
- ImplicitCrossSection: implicitCrossSection_defaultStyle(),
302
- ImplicitStructuralModel: implicitStructuralModel_defaultStyle(),
303
- LightRegularGrid2D: grid2d_defaultStyle(),
304
- LightRegularGrid3D: grid3d_defaultStyle(),
305
- PointSet2D: pointSet_defaultStyle(),
306
- PointSet3D: pointSet_defaultStyle(),
307
- PolygonalSurface2D: surface_defaultStyle(),
308
- PolygonalSurface3D: surface_defaultStyle(),
309
- PolyhedralSolid3D: solid_defaultStyle(),
310
- RasterImage2D: {},
311
- RasterImage3D: {},
312
- RegularGrid2D: grid2d_defaultStyle(),
313
- RegularGrid3D: grid3d_defaultStyle(),
314
- Section: section_defaultStyle(),
315
- StructuralModel: structuralModel_defaultStyle(),
316
- TetrahedralSolid3D: solid_defaultStyle(),
317
- TriangulatedSurface2D: surface_defaultStyle(),
318
- TriangulatedSurface3D: surface_defaultStyle(),
319
- VertexSet: {},
320
- };
321
- }
322
-
323
- function getDefaultStyle(type) {
324
- return default_styles()[type];
325
- }
326
-
327
- export { getDefaultStyle, DEFAULT_MODEL_COMPONENT_TYPE_COLORS, MESH_TYPES };