diff --git a/app/static/app/js/vendor/potree/build/potree/potree.js b/app/static/app/js/vendor/potree/build/potree/potree.js index 5180268b8..ea2d957eb 100644 --- a/app/static/app/js/vendor/potree/build/potree/potree.js +++ b/app/static/app/js/vendor/potree/build/potree/potree.js @@ -54236,7 +54236,8 @@ { // coordinate labels let coordinateLabel = this.coordinateLabels[0]; - let msg = position.toArray().map(p => Utils.addCommas(p.toFixed(2))).join(" / "); + let positions = position.toArray(); + let msg = `${Utils.addCommas(positions[0].toFixed(3))} / ${Utils.addCommas(positions[1].toFixed(3))} / ${Utils.addCommas((positions[2] / window.viewer.lengthUnit.unitspermeter * window.viewer.lengthUnitDisplay.unitspermeter).toFixed(3))}`; coordinateLabel.setText(msg); coordinateLabel.visible = this.showCoordinates; @@ -54405,8 +54406,8 @@ const N = AC.clone().cross(AB).normalize(); const center = Potree.Utils.computeCircleCenter(A, B, C); - const radius = center.distanceTo(A); - + let radius = center.distanceTo(A); + if (isNaN(radius)) radius = 0; const scale = radius / 20; circleCenter.position.copy(center); @@ -54429,11 +54430,16 @@ circleLine.position.copy(center); circleLine.scale.set(radius, radius, radius); circleLine.lookAt(target); + + let suffix = ""; + if(this.lengthUnit != null && this.lengthUnitDisplay != null){ + radius = radius / this.lengthUnit.unitspermeter * this.lengthUnitDisplay.unitspermeter; + suffix = this.lengthUnitDisplay.code; + } circleRadiusLabel.visible = true; circleRadiusLabel.position.copy(center.clone().add(B).multiplyScalar(0.5)); - circleRadiusLabel.setText(`${radius.toFixed(3)}`); - + circleRadiusLabel.setText(`${radius.toFixed(3)} ${suffix}`); } } @@ -72569,6 +72575,8 @@ void main() { }); let headerValues = []; + const skipFields = ["intensity", "return number", "number of returns", "source id", "gpsTime"]; + for (let attribute of attributes) { let itemSize = points.data[attribute].length / points.numPoints; @@ -72580,16 +72588,17 @@ void main() { for (let i = 0; i < itemSize; i++) { headerValues.push(`${attribute}_${i}`); } - } else { + } else if (skipFields.indexOf(attribute) === -1){ headerValues.push(attribute); } } - string = headerValues.join(', ') + '\n'; + string = headerValues.join(',') + '\n'; for (let i = 0; i < points.numPoints; i++) { let values = []; for (let attribute of attributes) { + if (skipFields.indexOf(attribute) !== -1) continue; let itemSize = points.data[attribute].length / points.numPoints; let value = points.data[attribute] .subarray(itemSize * i, itemSize * i + itemSize) @@ -72597,7 +72606,7 @@ void main() { values.push(value); } - string += values.join(', ') + '\n'; + string += values.join(',') + '\n'; } return string; @@ -73116,24 +73125,20 @@ void main() { transform = value => value / scale + offset; } - - - - if (attributeName === 'position') { - let values = [...position].map(v => Utils.addCommas(v.toFixed(3))); + let values = [...position]; html += `