liuqiao 1 ay önce
ebeveyn
işleme
52c14e54de
2 değiştirilmiş dosya ile 21 ekleme ve 10 silme
  1. 17 6
      src/control/vtkModel.js
  2. 4 4
      src/view/components/InfoDisaster.vue

+ 17 - 6
src/control/vtkModel.js

@@ -622,15 +622,19 @@ deljc() {
     if(this.actorpipsites.length==0){
       const  actorpipsite= vtkActor.newInstance();
       //管道位置数据
-      const sphereSource = vtkSphereSource.newInstance({
-        center: [0, 0, 0],
-        radius: 6.0,
-      });
+      // const sphereSource = vtkSphereSource.newInstance({
+      //   center: [0, 0, 0],
+      //   radius: 6.0,
+      // });
       const pipsiteMapper = vtkMapper.newInstance();
-      pipsiteMapper.setInputConnection(sphereSource.getOutputPort());
+      // pipsiteMapper.setInputConnection(sphereSource.getOutputPort());
+      pipsiteMapper.setInputConnection(this.soureReader.getOutputPort());
       actorpipsite.setMapper(pipsiteMapper);
+      actorpipsite.rotateZ(90);
+      actorpipsite.setScale(0.1,0.1,0.1);//放大
       actorpipsite.getProperty().setColor(GRAY);
       this.actorpipsites.push(actorpipsite);
+     
     }
     const actorpipsite =this.actorpipsites[0];  
     let point1 = this.pointByPipeNodeId(pipe.snId);
@@ -660,10 +664,17 @@ deljc() {
         radius: 4.0,
       });
       const pipsiteMapper = vtkMapper.newInstance();
-      pipsiteMapper.setInputConnection(sphereSource.getOutputPort());
+      pipsiteMapper.setInputConnection(this.soureReader.getOutputPort());
       actorpipsite.setMapper(pipsiteMapper);
+      actorpipsite.rotateZ(90);
+      actorpipsite.setScale(0.1,0.1,0.1);//放大
       actorpipsite.getProperty().setColor(GRAY);
       this.actorpipsites.push(actorpipsite);
+      // const pipsiteMapper = vtkMapper.newInstance();
+      // pipsiteMapper.setInputConnection(sphereSource.getOutputPort());
+      // actorpipsite.setMapper(pipsiteMapper);
+      // actorpipsite.getProperty().setColor(GRAY);
+      // this.actorpipsites.push(actorpipsite);
     }
     const actorpipsite =this.actorpipsites[1];  
     let point1 = this.pointByPipeNodeId(pipe.snId);

+ 4 - 4
src/view/components/InfoDisaster.vue

@@ -741,7 +741,7 @@
           <el-button type="primary" @click="Dclick('ws')">3D巷道选择</el-button>
         </div>
       </div>
-      <!-- <div class="input">
+      <div class="input">
         <el-form-item label="开始位置" :label-width="formLabelWidth6">
           <el-input-number
             v-model="yiweiobj.ssite"
@@ -770,7 +770,7 @@
             @change="ywgess2"
           />
         </el-form-item>
-      </div> -->
+      </div>
       <el-form-item label="位置" :label-width="formLabelWidth6">
         <el-input
           v-model="yiweiobj.siteremark"
@@ -924,7 +924,7 @@
           <el-button type="primary" @click="Dclick('ws')">3D巷道选择</el-button>
         </div>
       </div>
-      <!-- <div class="input">
+      <div class="input">
         <el-form-item label="开始位置" :label-width="formLabelWidth5">
           <el-input-number
             v-model="wasi.ssite"
@@ -950,7 +950,7 @@
             @change="gessanum2"
           />
         </el-form-item>
-      </div> -->
+      </div>
       <el-form-item label="位置" :label-width="formLabelWidth5">
         <el-input
           v-model="wasi.siteremark"