水庫大壩三維模型的開發和使用3Dmax篇

成果圖
在這里插入圖片描述
開發過程

  • 工具插件three.js
  • 先加載模型
  • 做水體銜接
  • 水位測量標尺
  • 水位標記
  • 斷面標記
  • 大壩監測點打點

上代碼,技術交流+V: bloxed

<template><div class="box w100 h100"><el-row :gutter="20"  v-loading="loading"element-loading-background="rgba(122, 122, 122, 0.8)"element-loading-text="模型加載中..."><el-col :span="24" class="h100" ref="boxRef"><div id="container" ref="container"></div></el-col></el-row></div>
</template>
<script setup lang="ts">
import * as THREE from 'three';
import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js';
import {OrbitControls} from "three/addons/controls/OrbitControls";
import { Water } from 'three/examples/jsm/objects/Water.js';
import { DRACOLoader } from 'three/examples/jsm/loaders/DRACOLoader.js';
import { FontLoader } from 'three/examples/jsm/loaders/FontLoader';
import { TextGeometry } from 'three/examples/jsm/geometries/TextGeometry';
import  TWEEN  from '@tweenjs/tween.js';
import {  CSS3DObject } from 'three/examples/jsm/renderers/CSS3DRenderer.js';
import { instrumentList,waterData,getTooltipData} from "../index.api"
const props = defineProps({damId:{type:Number,default:1},epcId:{type:String,default:""}
})
const boxRef = ref<any>(null);
const loading = ref(false);
let scene:any;
let textMesh:any;
let textMeshs:any =[];
let rectMeshs:any =[];
const camera = ref<any>(null);
let water:any;
const renderer = ref<any>(null);
const  container = ref<any>(null);
const  controls  = ref<any>(null);
const loaderT = new FontLoader();
import { useAppStore} from "@/store";
import { set } from '@vueuse/core';
const appStore = useAppStore();
//label ref
const dam_top_heightRef = ref<any>(null);
const tooltipData = ref<any>([])
//刻度尺
const acalesText = [{id:0,value:"校核洪水位:80.6m",x:-175,y:0,z:-130,color:0xFF0000},{id:0,value:"設計洪水位:80.6m",x:-175,y:-10,z:-130,color:0xFFFF00},{id:0,value:"正常水位:80.6m",x:-175,y:-20,z:-130,color:0x00FF00},{id:0,value:"當前水位:80.6m",x:-175,y:-49,z:-130,color:0xfffffff},{id:0,value:"死水位:80.6m",x:-175,y:-39,z:-130,color:0xfffffff},{id:1,value:"50",x:-224,y:-100,z:-130,color:0xfffffff},{id:2,value:"60",x:-224,y:-80,z:-130,color:0xfffffff},{id:3,value:"70",x:-224,y:-60,z:-130,color:0xfffffff},{id:4,value:"80",x:-224,y:-40,z:-130,color:0xfffffff},{id:5,value:"90",x:-224,y:-20,z:-130,color:0xfffffff},{id:6,value:"100m",x:-224,y:-0,z:-130,color:0xfffffff},
];
const  rectangles = [//壩頂高程
{id:0,width:48,height:16,x:-20,y:40,z:175,color:0x367DF9 },
//B09
{id:0,width:30,height:10,x:-30,y:0,z:80,color:0x367DF9 },
{id:0,width:30,height:10,x:-30,y:0,z:-30,color:0x367DF9 },
{id:0,width:30,height:10,x:-30,y:0,z:-100,color:0x367DF9 },//B10
{id:0,width:30,height:10,x:20,y:-20,z:80,color:0x367DF9 },
{id:0,width:30,height:10,x:20,y:-20,z:-30,color:0x367DF9 },
{id:0,width:30,height:10,x:20,y:-20,z:-100,color:0x367DF9 },//B11
{id:0,width:30,height:10,x:80,y:-30,z:80,color:0x367DF9 },
{id:0,width:30,height:10,x:80,y:-30,z:-30,color:0x367DF9 },
{id:0,width:30,height:10,x:80,y:-30,z:-100,color:0x367DF9 },
];
//label標簽
const labels = [{id:"damTop",value:"壩頂高程:98.6m",x:-20,y:40,z:175,color:0xfffffff},{id:"B09",value:"B09:0mm",x:-30,y:0,z:80,color:0xfffffff},{id:"B05",value:"B05:0mm",x:-30,y:0,z:-30,color:0xfffffff},{id:"B01",value:"B01:0mm",x:-30,y:0,z:-100,color:0xfffffff},{id:"B10",value:"B10:0mm",x:20,y:-20,z:80,color:0xfffffff},{id:"B06",value:"B06:0mm",x:20,y:-20,z:-30,color:0xfffffff},{id:"B02",value:"B02:0mm",x:20,y:-20,z:-100,color:0xfffffff},{id:"B11",value:"B11:0mm",x:80,y:-30,z:80,color:0xfffffff},{id:"B07",value:"B7:0mm",x:80,y:-30,z:-30,color:0xfffffff},{id:"B03",value:"B3:0mm",x:80,y:-30,z:-100,color:0xfffffff},//斷面{id:3,value:"斷面:B0+027",x:-80,y:-30,z:-100,color:0xfffffff},{id:3,value:"斷面:B0+050",x:-80,y:-30,z:-30,color:0xfffffff},{id:3,value:"斷面:B0+073",x:-80,y:-30,z:80,color:0xfffffff},
]
//label標簽線
const labelsLine = [{id:0,x:-10,y:35,z:175, x1:-10,y1:-50,z1:175,  color:0x00FFff},// B09{id:1,x:-30,y:0,z:80, x1:-30,y1:-50,z1:80,  color:0x00FFff},{id:2,x:-30,y:0,z:-30, x1:-30,y1:-50,z1:-30,  color:0x00FFff},{id:3,x:-22,y:0,z:-100, x1:-22,y1:-50,z1:-100,  color:0x00FFff},//B10{id:1,x:20,y:-20,z:80, x1:20,y1:-50,z1:80,  color:0x00FFff},{id:2,x:20,y:-20,z:-30, x1:20,y1:-50,z1:-30,  color:0x00FFff},{id:3,x:20,y:-20,z:-100, x1:20,y1:-50,z1:-100,  color:0x00FFff},//B11{id:4,x:80,y:-30,z:80, x1:80,y1:-80,z1:80,  color:0x00FFff},{id:5,x:80,y:-30,z:-30, x1:80,y1:-80,z1:-30,  color:0x00FFff},{id:6,x:80,y:-30,z:-100, x1:80,y1:-80,z1:-100,  color:0x00FFff},//斷面{id:7,x:-100,y:-34,z:-100, x1:-22,y1:-34,z1:-100,  color:0x00FFff},{id:7,x:-100,y:-34,z:-30, x1:-32,y1:-34,z1:-30,  color:0x00FFff},{id:7,x:-100,y:-34,z:80, x1:-32,y1:-34,z1:80,  color:0x00FFff},]
const labelTwoLines =[
{ id:0,x:-153,y:-3,z:-130,x1:-200,y1:-5,z1:-130,x2:-215,y2:-9,z2:-130,color:0xFF0000
},
{ id:0,x:-153,y:-13,z:-130,x1:-200,y1:-14,z1:-130,x2:-215,y2:-11,z2:-130,color:0xFFFF00
},
]
onMounted(() => {})const initPage = async ()=>{loading.value = true;initScene();initCamera();initRenderer();initControl();initWater();await initModel();await initLine();await addText();await addLabelLine();await addLabelTwoLine();initRectangle();flyToCamera();initAnimate();initAddClick();}// Create the sceneconst initScene = ()=>{scene = new THREE.Scene();};
// Create the cameraconst initCamera= ()=>{camera.value = new THREE.PerspectiveCamera(45,1153 / 819, 0.1, 1000);camera.value.position.set(-163,143,-508);};// Create the rendererconst initRenderer =()=>{renderer.value = new THREE.WebGLRenderer({ antialias: true });renderer.value.setSize(container.value.clientWidth, container.value.clientHeight);renderer.value.setClearColor('#03243f', 0.1);renderer.value.domElement.style.position = "absolute";renderer.value.domElement.style.top = "-160px";renderer.value.domElement.style.left = "-60px";container.value.appendChild(renderer.value.domElement);};const initControl = ()=>{controls.value = new OrbitControls(camera.value, renderer.value.domElement);controls.value.enableDamping = true;// // 最大角度controls.value.maxPolarAngle = Math.PI / 2.2;};// 創建Raycaster實例const raycaster = new THREE.Raycaster();const mouse = new THREE.Vector2();const initAnimate = ()=> {water.material.uniforms["time"].value += 1.0 / 60.0;requestAnimationFrame(initAnimate);renderer.value.render(scene, camera.value);controls.value.update();textMeshs.forEach((mesh:any)=>{mesh.lookAt(camera.value.position)})rectMeshs.forEach((mesh:any)=>{mesh.lookAt(camera.value.position)})TWEEN.update();// console.log('Camera Position:', camera.value.position);};const initWater = ()=>{const waterGeometry = new THREE.BoxGeometry(200, 280,35);water = new Water(waterGeometry,{textureWidth: 512,textureHeight: 512,waterNormals: new THREE.TextureLoader().load('/3D/water.jpeg', function (texture:any) {texture.wrapS = texture.wrapT = THREE.RepeatWrapping;}),sunDirection: new THREE.Vector3(),sunColor: 0x007FFF,waterColor: 0x007FFF,distortionScale: 3.7,});water.rotation.x = - Math.PI / 2;water.position.x = -114;water.position.y = -81.5;water.position.z = 10;scene.add(water)};const initLine = ()=>{const axisMaterial = new THREE.LineBasicMaterial({ color: 0xffffff }); // Blue for Xconst yAxisMaterial = new THREE.LineBasicMaterial({ color: 0xff0000  }); // Red for Yconst zAxisMaterial = new THREE.LineBasicMaterial({ color: 0xffff }); // Green for Z// Create the geometry for the axesconst axisGeometry = new THREE.BufferGeometry().setFromPoints([new THREE.Vector3(-110, -140, -182.2),new THREE.Vector3(-11, -140, -182.2)]);const yAxisGeometry = new THREE.BufferGeometry().setFromPoints([new THREE.Vector3(-215, 0, -130),new THREE.Vector3(-215, -100, -130)]);const zAxisGeometry = new THREE.BufferGeometry().setFromPoints([new THREE.Vector3(19, 0, -22.2),new THREE.Vector3(19, 0, 5)]);//begin 這里用作刻度線//水位使用const zAxisGeometry0 = new THREE.BufferGeometry().setFromPoints([new THREE.Vector3(-160, -60, -130),new THREE.Vector3(-214, -60, -130)]);const zAxisGeometry1 = new THREE.BufferGeometry().setFromPoints([new THREE.Vector3(-210, -100, -130),new THREE.Vector3(-215, -100, -130)]);const zAxisGeometry11 = new THREE.BufferGeometry().setFromPoints([new THREE.Vector3(-210, -90, -130),new THREE.Vector3(-215, -90, -130)]);const zAxisGeometry2 = new THREE.BufferGeometry().setFromPoints([new THREE.Vector3(-205, -80, -130),new THREE.Vector3(-215, -80, -130)]);const zAxisGeometry22 = new THREE.BufferGeometry().setFromPoints([new THREE.Vector3(-210, -70, -130),new THREE.Vector3(-215, -70, -130)]);const zAxisGeometry3 = new THREE.BufferGeometry().setFromPoints([new THREE.Vector3(-205, -50, -130),new THREE.Vector3(-215, -50, -130)]);const zAxisGeometry33 = new THREE.BufferGeometry().setFromPoints([new THREE.Vector3(-210, -40, -130),new THREE.Vector3(-215, -40, -130)]);const zAxisGeometry4 = new THREE.BufferGeometry().setFromPoints([new THREE.Vector3(-205, -30, -130),new THREE.Vector3(-215, -30, -130)]);const zAxisGeometry44 = new THREE.BufferGeometry().setFromPoints([new THREE.Vector3(-210, -20, -130),new THREE.Vector3(-215, -20, -130)]);const zAxisGeometry5 = new THREE.BufferGeometry().setFromPoints([new THREE.Vector3(-205, -10, -130),new THREE.Vector3(-215, -10, -130)]);const zAxisGeometry55 = new THREE.BufferGeometry().setFromPoints([new THREE.Vector3(-210, 0, -130),new THREE.Vector3(-215, 0, -130)]);//end // Create the line segments for the axesconst axis = new THREE.Line(axisGeometry, axisMaterial);const yAxis = new THREE.Line(yAxisGeometry, yAxisMaterial);const zAxis = new THREE.Line(zAxisGeometry, zAxisMaterial);//begin 這里用作刻度線const zAxis0 = new THREE.Line(zAxisGeometry0, axisMaterial);const zAxis1 = new THREE.Line(zAxisGeometry1, axisMaterial);const zAxis2 = new THREE.Line(zAxisGeometry2, axisMaterial);const zAxis3 = new THREE.Line(zAxisGeometry3, axisMaterial);const zAxis4 = new THREE.Line(zAxisGeometry4, axisMaterial);const zAxis11 = new THREE.Line(zAxisGeometry11, axisMaterial);const zAxis22 = new THREE.Line(zAxisGeometry22, axisMaterial);const zAxis33 = new THREE.Line(zAxisGeometry33, axisMaterial);const zAxis44 = new THREE.Line(zAxisGeometry44, axisMaterial);const zAxis5 = new THREE.Line(zAxisGeometry5, axisMaterial);const zAxis55 = new THREE.Line(zAxisGeometry55, axisMaterial);//end// scene.add(axis);scene.add(yAxis);// scene.add(zAxis);//begin 這里用作刻度線scene.add(zAxis0);scene.add(zAxis1);scene.add(zAxis2);scene.add(zAxis3);scene.add(zAxis4);scene.add(zAxis5);scene.add(zAxis11);scene.add(zAxis22);scene.add(zAxis33);scene.add(zAxis44);scene.add(zAxis55);//end}const addText =()=> {loaderT.load(// font資源URL'/3D/HONOR_Sans_CN_Regular.json',// onLoad回調function (font:any) {acalesText.forEach(item=>{const textGeometry = new TextGeometry(item.value, {font: font,size: 3.5, // 字體大小height: 10, // 擠出文本的厚度})textGeometry.center() // 居中文本const materials = new THREE.MeshBasicMaterial({color: item.color || 0xfffffff,transparent: true,opacity: 0.9,})textMesh = new THREE.Mesh(textGeometry, materials)textMesh.position.set(item.x,item.y, item.z)textMeshs.push(textMesh)scene.add(textMesh)})labels.forEach(item=>{const textGeometry = new TextGeometry(item.value, {font: font,size: 4, // 字體大小height: 10, // 擠出文本的厚度})textGeometry.center() // 居中文本const materials = new THREE.MeshBasicMaterial({color: item.color || 0xfffffff,transparent: true,opacity: 0.9,})textMesh = new THREE.Mesh(textGeometry, materials)textMesh.position.set(item.x,item.y, item.z)textMeshs.push(textMesh)scene.add(textMesh)})})
}
const addLabelLine = ()=>{labelsLine.forEach(item=>{const lineGeometry = new THREE.BufferGeometry().setFromPoints([new THREE.Vector3(item.x,item.y, item.z),new THREE.Vector3(item.x1,item.y1, item.z1)]);const lineMaterial = new THREE.LineBasicMaterial({ color: item.color || 0xfffffff });const line = new THREE.Line(lineGeometry, lineMaterial);scene.add(line)})
}
//添加拐角線
const addLabelTwoLine = ()=>{labelTwoLines.forEach(item=>{const lineGeometry = new THREE.BufferGeometry().setFromPoints([new THREE.Vector3(item.x,item.y, item.z),new THREE.Vector3(item.x1,item.y1, item.z1),new THREE.Vector3(item.x2,item.y2, item.z2)]);const lineMaterial = new THREE.LineBasicMaterial({ color: item.color || 0xfffffff });const line = new THREE.Line(lineGeometry, lineMaterial);scene.add(line)})
}const initModel = ()=>{// 加載.glb模型const loader = new GLTFLoader();const dracoLoader = new DRACOLoader();dracoLoader.setDecoderPath('/draco/'); // 指定Decoder的路徑loader.setDRACOLoader(dracoLoader);loader.load('/3D/zhuba.glb', (gltf:any) => {//解決加載進來為黑色的情況const ambientLight = new THREE.AmbientLight(0xffffff, 1); // 白光,強度為1scene.add(ambientLight);const dirLight = new THREE.DirectionalLight('rgb(253,253,253)', 5);dirLight.position.set(10, 10, 5); // 根據需要自行調整位置scene.add(dirLight);gltf.scene.name = 'dam_model'scene.add(gltf.scene);setTimeout(()=>{loading.value = false;},1100)}, undefined, (error:any) => {console.error(error);});
}
const initRectangle =() =>{rectangles.forEach(item=>{const geometry = new THREE.PlaneGeometry( item.width, item.height );const material = new THREE.MeshBasicMaterial( {color: item.color, transparent: true, opacity: 1} );const plane = new THREE.Mesh( geometry, material );plane.position.set(item.x, item.y, item.z)rectMeshs.push(plane)scene.add( plane );})
} 
const flyToCamera = ()=>{}
const initAddClick = ()=>{//點擊事件renderer.value.domElement.addEventListener('click', function (e:any) {//獲取點擊位置const mouse = new THREE.Vector2();mouse.x = (e.clientX / window.innerWidth) * 2 - 1;mouse.y = -(e.clientY / window.innerHeight) * 2 + 1;//創建射線const raycaster = new THREE.Raycaster();// 更新Raycaster的射線方向raycaster.setFromCamera(mouse, camera.value);// 假設你想要獲取與場景中所有對象的交點// 注意:intersectObjects會返回一個包含所有交點的數組const intersects = raycaster.intersectObjects(scene.children, true); // 第二個參數為true表示遞歸檢查所有子對象if (intersects.length > 0) {// 獲取最近的交點(通常是數組中的第一個元素)const intersect = intersects[0];// intersect.point就是你在3D空間中點擊的位置console.log('Clicked point in 3D space:', intersect.point);// 如果你想要獲取被點擊對象的詳細信息,可以使用intersect.objectconsole.log('Clicked object:', intersect.object);} else {console.log('No objects intersected by the ray.');}})
}
const  getwaterInfo = async()=>{const res = await waterData({epcId:appStore.epc.epcId})labels[0].value = "壩頂高程:" + res.damTop + 'm';acalesText[0].value = "校核洪水位:" + res.checkZ + 'm';acalesText[1].value = "設計洪水位:" + res.designZ + 'm';acalesText[2].value = "正常水位:" + res.normalZ + 'm';acalesText[3].value = "當前水位:" + (res.z ?? 0) + 'm';acalesText[4].value = "死水位:" + res.deadZ + 'm';
}
const getItemData = async()=>{const res = await getTooltipData({damId:props.damId,epcId:props.epcId})tooltipData.value = res;}
onMounted(async() => {await getwaterInfo();initPage();
})</script>
<style lang="scss" scoped>#container{width: 100%;height: calc(100vh - 100px);background-image: url("./bg.png");background-size: cover;}.box{overflow: hidden;height: calc(100vh - 100px);}
</style>

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/web/64018.shtml
繁體地址,請注明出處:http://hk.pswp.cn/web/64018.shtml
英文地址,請注明出處:http://en.pswp.cn/web/64018.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

【藍橋杯每日一題】分糖果——DFS

分糖果 藍橋杯每日一題 2024-12-24 分糖果 DFS 題目描述 兩種糖果分別有 9 個和 16 個&#xff0c;要全部分給 7 個小朋友&#xff0c;每個小朋友得到的糖果總數最少為 2 個最多為 5 個&#xff0c;問有多少種不同的分法。糖果必須全部分完。 只要有其中一個小朋友在兩種方案中…

計算機畢設-基于springboot的校園招聘網站的設計與實現(附源碼+lw+ppt+開題報告)

博主介紹&#xff1a;?多個項目實戰經驗、多個大型網購商城開發經驗、在某機構指導學員上千名、專注于本行業領域? 技術范圍&#xff1a;Java實戰項目、Python實戰項目、微信小程序/安卓實戰項目、爬蟲大數據實戰項目、Nodejs實戰項目、PHP實戰項目、.NET實戰項目、Golang實戰…

重生之我在異世界學編程之C語言:深入動態內存管理收尾 + 柔性數組篇

大家好&#xff0c;這里是小編的博客頻道 小編的博客&#xff1a;就愛學編程 很高興在CSDN這個大家庭與大家相識&#xff0c;希望能在這里與大家共同進步&#xff0c;共同收獲更好的自己&#xff01;&#xff01;&#xff01; 本文目錄 引言正文常見的動態內存管理錯誤&#xf…

無人直播源碼

DY無人直播系統架構設計介紹 在DY等短視頻平臺的直播中&#xff0c;無人直播系統能夠提供自動化、智能化的互動體驗&#xff0c;既減輕了主播的工作量&#xff0c;又提升了觀眾的參與感。以下是一個典型的無人直播系統架構設計&#xff0c;包含全局配置、點對點互動、產品話術、…

被裁20240927 --- 嵌入式硬件開發 前篇

前篇主要介紹一些相關的概念&#xff0c;用于常識掃盲&#xff0c;后篇開始上干貨&#xff01; 他捧著一只碗吃過百家的飯 1. 處理器芯片1.1 處理器芯片制造商一、 英特爾&#xff08;Intel&#xff09;二、 三星&#xff08;SAMSUNG&#xff09;三、 高通&#xff08;Qualcomm…

準備考試:解決大學入學考試問題

引言 在編程競賽和算法挑戰中&#xff0c;我們經常會遇到各種類型的組合問題。這些問題不僅考驗我們的邏輯思維能力&#xff0c;還要求我們熟練掌握數據結構和算法。在這篇文章中&#xff0c;我們將探討一個有趣的問題——“準備考試”&#xff0c;這個問題來自于一個虛構的情…

【Linux】進程間通信 -> 匿名管道命名管道

進程間通信的目的 數據傳輸&#xff1a;一個進程許需要將它的數據發送給另外一個進程。資源共享&#xff1a;多個進程之間共享同樣的資源。通知事件&#xff1a;一個進程需要向另一個或一組進程發送消息&#xff0c;通知它們發生了某種事件&#xff08;如進程終止時要通知父進程…

Pytorch注意力機制應用到具體網絡方法(閉眼都會版)

文章目錄 以YoloV4-tiny為例要加入的注意力機制代碼模型中插入注意力機制 以YoloV4-tiny為例 解釋一下各個部分&#xff1a; 最左邊這部分為主干提取網絡&#xff0c;功能為特征提取中間這邊部分為FPN&#xff0c;功能是加強特征提取最后一部分為yolo head&#xff0c;功能為獲…

修改el-select下拉框高度;更新:支持動態修改

文章目錄 效果動態修改&#xff1a;效果代碼固定高度版本動態修改高度版本&#xff08;2024-12-25 更新&#xff1a; 支持動態修改下拉框高度&#xff09; 效果 動態修改&#xff1a;效果 代碼 固定高度版本 注意點&#xff1a; popper-class 盡量獨一無二&#xff0c;防止影…

開關電源特點、分類、工作方式

什么叫開關電源隨著電力電子技術的發展和創新&#xff0c;使得開關電源技術也在不斷地創新。目前&#xff0c;開關電源以小型、輕量和高效率的特點被廣泛應用幾乎所有的電子設備&#xff0c;是當今電子信息產業飛速發展不可缺少的一種電源方式。 開關電源是利用現代電力電子技…

Linux應用軟件編程-文件操作(目錄io)

1.打開目錄&#xff1a; DIR *opendir(const char *name); 功能&#xff1a;打開一個目錄獲得一個目錄流指針 參數: name:目錄名 返回值&#xff1a;成功返回目錄流指針&#xff1b;失敗返回NULL 2.讀目錄&#xff1a; struct dirent *readdir(DIR *dirp); 功能&…

有哪些開發者模式?

1、單例開發模式&#xff08;Singleton Pattern&#xff09; 單例模式是一種創建型設計模式&#xff0c;目的是確保在程序運行期間&#xff0c;某個類只有一個實例&#xff0c;并提供一個全局訪問點來訪問該實例。 核心特點 唯一實例&#xff1a;一個類只能創建一個對象實例。…

如何完全剔除對Eureka的依賴,報錯Cannot execute request on any known server

【現象】 程序運行報錯如下&#xff1a; com.netflix.discovery.shared.transport.TransportException報錯Cannot execute request on any known server 【解決方案】 &#xff08;1&#xff09;在Maven工程中的pom去掉Eureka相關的引用&#xff08;注釋以下部分&#xff0…

vscode寫python,遇到問題:ModuleNotFoundError: No module named ‘pillow‘(已解決 避坑)

1 問題&#xff1a; ModuleNotFoundError: No module named pillow 2 原因&#xff1a; 原因1&#xff1a;安裝Pillow的pip命令所處的python版本與vscode調用的python解釋器版本不同。 如&#xff1a; 原因2&#xff1a;雖然用的是pillow&#xff0c;但是寫代碼的時候只能用…

Ashy的考研游記

文章目錄 摘要12.1112.2012.21 DAY1&#xff08;政治/英語&#xff09;政治英語 12.22 DAY2&#xff08;數學/專業課&#xff09;數學專業課 結束估分 摘要 在24年的12月里&#xff0c;Ashy完成了他的考研沖刺&#xff0c;順利的結束了他本年度的考研之旅。 在十二月里&#…

AIGC實踐|AI/AR助力文旅沉浸式互動體驗探索

前言&#xff1a; 本篇文章的創作靈感來源于近期熱門話題——讓文物“動起來”&#xff0c;各大博物館成為新進潮流打卡地。結合之前創作的AI文旅宣傳片良好的流量和反饋&#xff0c;外加最近比較感興趣的AR互動探索&#xff0c;想嘗試看看自己能不能把這些零碎的內容整合起來…

tcp 的三次握手與四次揮手

問1: 請你說一下tcp的三次握手一次握手兩次握手三次握手問: 為什么不四(更多)次握手? 問 2: 請說一下 tcp 的 4 次揮手一次揮手兩次揮手問題:能不能等到數據傳輸完成再返回 ack? 三次揮手四次揮手問: 為什么要等兩個最大報文存在時間? bg: tcp 是可靠的連接,如何保證 建立連…

Kubernetes(k8s)離線部署DolphinScheduler3.2.2

1.環境準備 1.1 集群規劃 本次安裝環境為&#xff1a;3臺k8s現有的postgreSql數據庫zookeeper服務 1.2 下載及介紹 DolphinScheduler-3.2.2官網&#xff1a;https://dolphinscheduler.apache.org/zh-cn/docs/3.2.2 官網安裝文檔&#xff1a;https://dolphinscheduler.apach…

C++的侵入式鏈表

非侵入式鏈表 非侵入式鏈表是一種鏈表數據結構&#xff0c;其中每個元素&#xff08;節點&#xff09;并不需要自己包含指向前后節點的指針。鏈表的結構和節點的存儲是分開的&#xff0c;鏈表容器會單獨管理這些指針。 常見的非侵入式鏈表節點可以由以下所示&#xff0c;即&a…

Flutter組合動畫學習

如何使用動畫控制器和動畫來創建一個簡單的動畫效果。具體來說&#xff0c;它通過一個 AnimationController 來控制兩個動畫&#xff0c;一個用于旋轉&#xff0c;一個用于繪制。 前置知識點學習 SingleTickerProviderStateMixin SingleTickerProviderStateMixin 是 Flutter …