@eturnity/eturnity_3d 6.44.1 → 6.46.0

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.
package/dist/vite.svg ADDED
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@eturnity/eturnity_3d",
3
3
  "private": false,
4
- "version": "6.44.1",
4
+ "version": "6.46.0",
5
5
  "main": "dist/main.js",
6
6
  "scripts": {
7
7
  "dev": "vue-cli-service serve --skip-plugins @vue/cli-plugin-eslint",
@@ -69,6 +69,7 @@ export default {
69
69
  },
70
70
  mixins: [renderMixin, threeMixin, materialMixin],
71
71
  async mounted() {
72
+ console.info('6.43.0-EPDM-8438.4')
72
73
  await this.hydrateData(this.geometryData)
73
74
  this.renderer.domElement.style.width = '100%'
74
75
  this.renderer.domElement.style.height = '100%'
@@ -145,7 +146,6 @@ export default {
145
146
  hydrateData: 'hydrateData'
146
147
  }),
147
148
  ...mapMutations({
148
- setModuleTextureVersionId: 'mutate_moduleTextureVersionId',
149
149
  setSelectedMapLayer: 'mutate_selectedMapLayer'
150
150
  }),
151
151
  hideMesh(mesh) {
@@ -30,15 +30,14 @@ export function UpdateRoofModuleFieldRelations(state) {
30
30
 
31
31
  for (let k in moduleFieldPolygons) {
32
32
  const moduleField = moduleFieldPolygons[k]
33
- const moduleFieldArea = calculateArea(moduleField.outline)
34
33
  //check if everypoint is in the same roof and if they are not too far from the flat surface.(at least above)
35
34
  let roofPolygonCandidates = roofPolygons.filter((roof) => {
36
35
  const intersection = intersectOutlines(moduleField.outline, roof.outline)
37
36
  if (intersection.length == 0) return false
38
37
  const intersectionArea = calculateArea(intersection[0])
39
- return intersectionArea > 0.9 * moduleFieldArea
38
+ return intersectionArea > 100
40
39
  })
41
- //roofs on roof can lead to multiple roof under a point. moduleField is in the smallest
40
+ //roofs on roof can lead to multiple roof under a point. moduleField is on the smallest
42
41
  let smallestRoof = null
43
42
  for (let roof of roofPolygonCandidates) {
44
43
  if (!smallestRoof || smallestRoof.area > roof.area) {
@@ -58,7 +57,6 @@ export function UpdateRoofModuleFieldRelations(state) {
58
57
  p.roof = roofPolygon
59
58
  }
60
59
  })
61
- //}
62
60
  }
63
61
 
64
62
  let newPolygons = state.polygons.map((p) => {
@@ -61,16 +61,16 @@ export default {
61
61
  if (panelPolygon.moduleField.data.number_of_panels_override) {
62
62
  return
63
63
  }
64
- let materialId = 'default_' + this.moduleTextureVersionId
64
+ const moduleTextureId = panelPolygon.moduleField.pvData.hasOwnProperty(
65
+ 'module_texture_version_id'
66
+ )
67
+ ? panelPolygon.moduleField.pvData.module_texture_version_id
68
+ : 0
69
+ let materialId = 'default_' + moduleTextureId
65
70
  let material = this.material.panel[materialId]
66
71
  material.transparent = true
67
72
  material.opacity = this.panelOpacity
68
- if (panelPolygon.moduleField.pvData) {
69
- if (this.material.panel[panelPolygon.moduleField.pvData.id]) {
70
- materialId = panelPolygon.moduleField.pvData.id
71
- material = this.material.panel[materialId]
72
- }
73
- } else if (panelPolygon.moduleField.data) {
73
+ if (panelPolygon.moduleField.data) {
74
74
  if (
75
75
  this.material.panel[
76
76
  panelPolygon.moduleField.data.component_id_pv_module
@@ -79,6 +79,11 @@ export default {
79
79
  materialId = panelPolygon.moduleField.data.component_id_pv_module
80
80
  material = this.material.panel[materialId]
81
81
  }
82
+ } else if (panelPolygon.moduleField.pvData) {
83
+ if (this.material.panel[panelPolygon.moduleField.pvData.id]) {
84
+ materialId = panelPolygon.moduleField.pvData.id
85
+ material = this.material.panel[materialId]
86
+ }
82
87
  }
83
88
  if (
84
89
  !this.meshes.panelsMeshes[panelPolygon.id + '_top'] ||
@@ -28,8 +28,6 @@ export default {
28
28
  created() {},
29
29
  computed: {
30
30
  ...mapState({
31
- moduleTextureVersionId: (state) =>
32
- state.threeDModule.moduleTextureVersionId,
33
31
  wallColor: (state) => state.threeDModule.wallColor,
34
32
  selectedMapLayer: (state) => state.threeDModule.selectedMapLayer,
35
33
  panelOpacity: (state) => state.threeDModule.panelOpacity,
@@ -50,9 +50,7 @@ export async function hydrateData({ state, commit }, data) {
50
50
 
51
51
  if (!!layoutSettingResponse) {
52
52
  const layoutSetting = layoutSettingResponse
53
- const moduleTextureVersionId = layoutSetting.module_texture_version_id || 0
54
53
  commit('mutate_layoutSettings', layoutSetting)
55
- commit('mutate_moduleTextureVersionId', moduleTextureVersionId)
56
54
  commit('mutate_wallColor', layoutSetting.wall_color)
57
55
 
58
56
  //end of layoutSetting correction
@@ -120,6 +118,10 @@ export async function hydrateData({ state, commit }, data) {
120
118
 
121
119
  let moduleField = new Polygon(module_field_outline, 'moduleField')
122
120
  moduleField.id = moduleFieldResp.module_field_uuid
121
+ // add moduleField pvData
122
+ moduleField.pvData = {}
123
+ moduleField.pvData.module_texture_version_id =
124
+ moduleFieldResp.module_texture_version_id
123
125
  moduleField.data = {}
124
126
  moduleField.data.texture_img_url = moduleFieldResp.texture_img_url
125
127
  moduleField.data.col_spacing_mm = moduleFieldResp.col_spacing_mm
@@ -28,7 +28,6 @@ const init_state = {
28
28
  //useless state for viewer
29
29
  pvDataMemo: [],
30
30
  mountingDataMemo: [],
31
- moduleTextureVersionId: 0,
32
31
  wallColor: '#454545',
33
32
  panelOpacity: 1,
34
33
  selectedMapLayer: null,
@@ -149,9 +148,6 @@ const mutations = {
149
148
  mutate_buildingLocation(state, value) {
150
149
  state.buildingLocation = value
151
150
  },
152
- mutate_moduleTextureVersionId(state, value) {
153
- state.moduleTextureVersionId = value
154
- },
155
151
  mutate_wallColor(state, value) {
156
152
  state.wallColor = value
157
153
  },