|  | @@ -159,18 +159,11 @@ export class VtkModel {
 | 
											
												
													
														|  |      this.sensorobj={};
 |  |      this.sensorobj={};
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | 
 |  | +    this.actorpipsites=[]; 
 | 
											
												
													
														|  | 
 |  | +    
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -    //管道位置数据
 |  | 
 | 
											
												
													
														|  | -    const sphereSource = vtkSphereSource.newInstance({
 |  | 
 | 
											
												
													
														|  | -      center: [0, 0, 0],
 |  | 
 | 
											
												
													
														|  | -      radius: 4.0,
 |  | 
 | 
											
												
													
														|  | -    });
 |  | 
 | 
											
												
													
														|  | -    const pipsiteMapper = vtkMapper.newInstance();
 |  | 
 | 
											
												
													
														|  | -    this.actorpipsite = vtkActor.newInstance();
 |  | 
 | 
											
												
													
														|  | -    pipsiteMapper.setInputConnection(sphereSource.getOutputPort());
 |  | 
 | 
											
												
													
														|  | -    this.actorpipsite.setMapper(pipsiteMapper);
 |  | 
 | 
											
												
													
														|  | -    // this.actorpipsite.setPosition(parseFloat(node.x), parseFloat(node.y), parseFloat(node.z));
 |  | 
 | 
											
												
													
														|  | -    this.actorpipsite.getProperty().setColor(WHITE);
 |  | 
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      this.jcdActors = []; //检测点数据
 |  |      this.jcdActors = []; //检测点数据
 | 
											
												
													
														|  |      this.jcreader = vtkPLYReader.newInstance();
 |  |      this.jcreader = vtkPLYReader.newInstance();
 | 
											
										
											
												
													
														|  | @@ -406,11 +399,11 @@ delSensor(){
 | 
											
												
													
														|  |    mapper.setInputConnection(this.soureReader.getOutputPort());
 |  |    mapper.setInputConnection(this.soureReader.getOutputPort());
 | 
											
												
													
														|  |    const actor = vtkActor.newInstance();
 |  |    const actor = vtkActor.newInstance();
 | 
											
												
													
														|  |    actor.setPosition(x,y,z);
 |  |    actor.setPosition(x,y,z);
 | 
											
												
													
														|  | -  actor.getProperty().setColor(SOURECOLOR);
 |  | 
 | 
											
												
													
														|  | 
 |  | +  actor.getProperty().setColor(REA);
 | 
											
												
													
														|  |    actor.setMapper(mapper);
 |  |    actor.setMapper(mapper);
 | 
											
												
													
														|  |      // 旋转actor
 |  |      // 旋转actor
 | 
											
												
													
														|  | -  actor.rotateY(45);// 绕y轴旋转
 |  | 
 | 
											
												
													
														|  | -  actor.setScale(20,20,20);//放大
 |  | 
 | 
											
												
													
														|  | 
 |  | +  actor.rotateZ(180);// 绕y轴旋转
 | 
											
												
													
														|  | 
 |  | +  actor.setScale(0.3,0.3,0.3);//放大
 | 
											
												
													
														|  |    this.soureActors.push(actor);
 |  |    this.soureActors.push(actor);
 | 
											
												
													
														|  |    // this.renderer.addActor(actor);
 |  |    // this.renderer.addActor(actor);
 | 
											
												
													
														|  |   }
 |  |   }
 | 
											
										
											
												
													
														|  | @@ -473,27 +466,72 @@ removejc(){
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |    //显示所选择巷道位置
 |  |    //显示所选择巷道位置
 | 
											
												
													
														|  |    addpipsite(pipe,site){
 |  |    addpipsite(pipe,site){
 | 
											
												
													
														|  | 
 |  | +    if(this.actorpipsites.length==0){
 | 
											
												
													
														|  | 
 |  | +      const  actorpipsite= vtkActor.newInstance();
 | 
											
												
													
														|  | 
 |  | +      //管道位置数据
 | 
											
												
													
														|  | 
 |  | +      const sphereSource = vtkSphereSource.newInstance({
 | 
											
												
													
														|  | 
 |  | +        center: [0, 0, 0],
 | 
											
												
													
														|  | 
 |  | +        radius: 4.0,
 | 
											
												
													
														|  | 
 |  | +      });
 | 
											
												
													
														|  | 
 |  | +      const pipsiteMapper = vtkMapper.newInstance();
 | 
											
												
													
														|  | 
 |  | +      pipsiteMapper.setInputConnection(sphereSource.getOutputPort());
 | 
											
												
													
														|  | 
 |  | +      actorpipsite.setMapper(pipsiteMapper);
 | 
											
												
													
														|  | 
 |  | +      actorpipsite.getProperty().setColor(WHITE);
 | 
											
												
													
														|  | 
 |  | +      this.actorpipsites.push(actorpipsite);
 | 
											
												
													
														|  | 
 |  | +    }
 | 
											
												
													
														|  | 
 |  | +    const actorpipsite =this.actorpipsites[0];  
 | 
											
												
													
														|  |      let point1 = this.pointByPipeNodeId(pipe.snId);
 |  |      let point1 = this.pointByPipeNodeId(pipe.snId);
 | 
											
												
													
														|  |      let point2 = this.pointByPipeNodeId(pipe.enId);
 |  |      let point2 = this.pointByPipeNodeId(pipe.enId);
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  |      let py = site/(1-site);
 |  |      let py = site/(1-site);
 | 
											
												
													
														|  |      let pipsite_point=[
 |  |      let pipsite_point=[
 | 
											
												
													
														|  |        (point1[0]+py*point2[0])/(1+py),
 |  |        (point1[0]+py*point2[0])/(1+py),
 | 
											
												
													
														|  |        (point1[1]+py*point2[1])/(1+py),
 |  |        (point1[1]+py*point2[1])/(1+py),
 | 
											
												
													
														|  |        (point1[2]+py*point2[2])/(1+py),
 |  |        (point1[2]+py*point2[2])/(1+py),
 | 
											
												
													
														|  |        ] 
 |  |        ] 
 | 
											
												
													
														|  | -    this.actorpipsite.setPosition(pipsite_point);
 |  | 
 | 
											
												
													
														|  | -    this.renderer.addActor(this.actorpipsite);
 |  | 
 | 
											
												
													
														|  | 
 |  | +    actorpipsite.setPosition(pipsite_point);
 | 
											
												
													
														|  | 
 |  | +    this.renderer.addActor(actorpipsite);
 | 
											
												
													
														|  |      this.renderWindow.render();
 |  |      this.renderWindow.render();
 | 
											
												
													
														|  |    }
 |  |    }
 | 
											
												
													
														|  |    
 |  |    
 | 
											
												
													
														|  | 
 |  | +  //显示所选择巷道位置
 | 
											
												
													
														|  | 
 |  | +  addpipsite2(pipe,site){
 | 
											
												
													
														|  | 
 |  | +    if(this.actorpipsites.length==0){
 | 
											
												
													
														|  | 
 |  | +      addpipsite(pipe,site);
 | 
											
												
													
														|  | 
 |  | +    }
 | 
											
												
													
														|  | 
 |  | +    if(this.actorpipsites.length==1){
 | 
											
												
													
														|  | 
 |  | +      const  actorpipsite= vtkActor.newInstance();
 | 
											
												
													
														|  | 
 |  | +      //管道位置数据
 | 
											
												
													
														|  | 
 |  | +      const sphereSource = vtkSphereSource.newInstance({
 | 
											
												
													
														|  | 
 |  | +        center: [0, 0, 0],
 | 
											
												
													
														|  | 
 |  | +        radius: 4.0,
 | 
											
												
													
														|  | 
 |  | +      });
 | 
											
												
													
														|  | 
 |  | +      const pipsiteMapper = vtkMapper.newInstance();
 | 
											
												
													
														|  | 
 |  | +      pipsiteMapper.setInputConnection(sphereSource.getOutputPort());
 | 
											
												
													
														|  | 
 |  | +      actorpipsite.setMapper(pipsiteMapper);
 | 
											
												
													
														|  | 
 |  | +      actorpipsite.getProperty().setColor(WHITE);
 | 
											
												
													
														|  | 
 |  | +      this.actorpipsites.push(actorpipsite);
 | 
											
												
													
														|  | 
 |  | +    }
 | 
											
												
													
														|  | 
 |  | +    const actorpipsite =this.actorpipsites[1];  
 | 
											
												
													
														|  | 
 |  | +    let point1 = this.pointByPipeNodeId(pipe.snId);
 | 
											
												
													
														|  | 
 |  | +    let point2 = this.pointByPipeNodeId(pipe.enId);
 | 
											
												
													
														|  | 
 |  | +    let py = site/(1-site);
 | 
											
												
													
														|  | 
 |  | +    let pipsite_point=[
 | 
											
												
													
														|  | 
 |  | +      (point1[0]+py*point2[0])/(1+py),
 | 
											
												
													
														|  | 
 |  | +      (point1[1]+py*point2[1])/(1+py),
 | 
											
												
													
														|  | 
 |  | +      (point1[2]+py*point2[2])/(1+py),
 | 
											
												
													
														|  | 
 |  | +      ] 
 | 
											
												
													
														|  | 
 |  | +    actorpipsite.setPosition(pipsite_point);
 | 
											
												
													
														|  | 
 |  | +    this.renderer.addActor(actorpipsite);
 | 
											
												
													
														|  | 
 |  | +    this.renderWindow.render();
 | 
											
												
													
														|  | 
 |  | +  }
 | 
											
												
													
														|  |    //移除所选择的巷道位置
 |  |    //移除所选择的巷道位置
 | 
											
												
													
														|  |    clearpipsite(){
 |  |    clearpipsite(){
 | 
											
												
													
														|  | -    this.renderer.removeActor(this.actorpipsite);
 |  | 
 | 
											
												
													
														|  | 
 |  | +    this.actorpipsites.forEach((actor)=>{
 | 
											
												
													
														|  | 
 |  | +      this.renderer.removeActor(actor);
 | 
											
												
													
														|  | 
 |  | +    });
 | 
											
												
													
														|  |    }
 |  |    }
 | 
											
												
													
														|  |  // 安全路径显示
 |  |  // 安全路径显示
 | 
											
												
													
														|  |  safetypath(rows){
 |  |  safetypath(rows){
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  |    this.renderWindowWith.resize();
 |  |    this.renderWindowWith.resize();
 | 
											
												
													
														|  |     this.wayspath=rows;
 |  |     this.wayspath=rows;
 | 
											
												
													
														|  |      let nodes1 = [];
 |  |      let nodes1 = [];
 |