function generatePointCloudGeometry_Job() {
const geometry = new THREE.BufferGeometry();
const numPoints = job_data_coordinate.length;
const positions = new Float32Array( numPoints * 3 );
const colors = new Float32Array( numPoints * 3 );
let k = 0;
for(let i = 0; i < numPoints; i++){
positions[ 3 * k ] = job_data_coordinate[i].x;
positions[ 3 * k + 1 ] = job_data_coordinate[i].y;
positions[ 3 * k + 2 ] = job_data_coordinate[i].z;
let scale;
if( `${value_type.value}` == "Thermal" ){
const thermal = job_data_coordinate[i].thermal
scale = d3.interpolatePuRd(scaleThermal(thermal))
}else{
const power = job_data_coordinate[i].power
scale = new THREE.Color(d3.interpolatePuRd(scalePower(power)))
}
const color = new THREE.Color(scale)
colors[ 3 * k ] = color.r;
colors[ 3 * k + 1 ] = color.g;
colors[ 3 * k + 2 ] = color.b;
k++;
}
geometry.setAttribute( 'position', new THREE.BufferAttribute( positions, 3 ) );
geometry.setAttribute( 'color', new THREE.BufferAttribute( colors, 3 ) );
geometry.computeBoundingBox();
return geometry;
}