Kaynağa Gözat

阶段性地图接口

zhiyuan-007 3 ay önce
ebeveyn
işleme
cd3eea076a

+ 195 - 12
src/components/mapJK.vue

@@ -43,7 +43,12 @@ import SymbolPathPipeEvent from "../units/map/SymbolPathPipeEvent.js";
 import SymbolPointCubeEvent from "../units/map/SymbolPointCubeEvent.js";
 import AddThreeCubeEvent from "../units/map/AddThreeCubeEvent.js";
 import AddThreeNetEvent from "../units/map/AddThreeNetEvent.js";
-import {getBuildingPoint} from "../service/http.js";
+import {
+  getBuildingPoint,
+  getNoFlyPointInterface,
+  getRiverPointInterface,
+  getRoadPointInterface
+} from "../service/http.js";
 
 export default {
   name: "mapJK",
@@ -78,7 +83,7 @@ export default {
         createMap();
         $.when((MapReady).done(()=>{
           //发送消息
-          this.$bus.$emit('SendMessage',{
+          bus.emit('SendMessage',{
             action:"MapIsReady",
             data:{
               "message":"地图初始化完成"
@@ -164,6 +169,18 @@ export default {
           case "ShowThreeCube":
             showThreeCube(params);
             break;
+          case "ShowBuildingThreeCubeByInterface":
+            showBuildingThreeCubeByInterface(params);
+            break;
+          case "ShowNoFlyThreeCubeByInterface":
+            showNoFlyThreeCubeByInterface(params);
+            break;
+          case "ShowRoadThreeCubeByInterface":
+            showRoadThreeCubeByInterface(params);
+            break;
+          case "ShowRiverThreeCubeByInterface":
+            showRiverThreeCubeByInterface(params);
+            break;
           case "ShowThreeNet":
             showThreeNet(params);
             break;
@@ -465,44 +482,160 @@ export default {
           }
           return
         }
+        let size = params.size;
+        let points = params.points;
         // 初始化 AddThreeCubeEvent,暂时不启动
         addThreeCubeEvent = new AddThreeCubeEvent({
           view: m_view,
+          points:points,
+          size,
+        });
+        addThreeCubeEvent.init();
+      }
+
+
+      function showBuildingThreeCubeByInterface(params){
+        let status = params.status;
+        let size = params.size;
+        if(addThreeCubeEvent){
+          addThreeCubeEvent.clear();
+          addThreeCubeEvent = null;
+        }
+        if(status == "hide"){
+          return
+        }
+        let level = params.level;
+        // 初始化 AddThreeCubeEvent,暂时不启动
+        addThreeCubeEvent = new AddThreeCubeEvent({
+          view: m_view,
+          size,
         });
         addThreeCubeEvent.start();
         // 获取所有建筑点数据
-        getAllBuildingPoints();
+        getAllBuildingPoints(level);
+      }
+
+      function showNoFlyThreeCubeByInterface(params){
+        let status = params.status;
+        let size = params.size;
+        if(addThreeCubeEvent){
+          addThreeCubeEvent.clear();
+          addThreeCubeEvent = null;
+        }
+        if(status == "hide"){
+          return
+        }
+        let level = params.level;
+        // 初始化 AddThreeCubeEvent,暂时不启动
+        addThreeCubeEvent = new AddThreeCubeEvent({
+          view: m_view,
+          size,
+        });
+        addThreeCubeEvent.start();
+        // 获取所有建筑点数据
+        getNoFlyPoint(level);
+      }
+
+      function showRoadThreeCubeByInterface(params){
+        let status = params.status;
+        let size = params.size;
+        if(addThreeCubeEvent){
+          addThreeCubeEvent.clear();
+          addThreeCubeEvent = null;
+        }
+        if(status == "hide"){
+          return
+        }
+        let level = params.level;
+        // 初始化 AddThreeCubeEvent,暂时不启动
+        addThreeCubeEvent = new AddThreeCubeEvent({
+          view: m_view,
+          size,
+        });
+        addThreeCubeEvent.start();
+        // 获取所有建筑点数据
+        getRoadPoint(level);
+      }
+
+      function showRiverThreeCubeByInterface(params){
+        let status = params.status;
+        let size = params.size;
+        if(addThreeCubeEvent){
+          addThreeCubeEvent.clear();
+          addThreeCubeEvent = null;
+        }
+        if(status == "hide"){
+          return
+        }
+        let level = params.level;
+        // 初始化 AddThreeCubeEvent,暂时不启动
+        addThreeCubeEvent = new AddThreeCubeEvent({
+          view: m_view,
+          size,
+        });
+        addThreeCubeEvent.start();
+        // 获取所有建筑点数据
+        getRiverPoint(level);
       }
 
       function showThreeNet(params){
         let status = params.status;
+        debugger
+        if(addThreeNetEvent){
+          addThreeNetEvent.clear();
+          addThreeNetEvent = null;
+        }
         if(status == "hide"){
-          if(addThreeNetEvent){
-            addThreeNetEvent.clear();
-            addThreeNetEvent = null;
-          }
           return
         }
+        let size = params.size;
+        let origin = params.origin;
+        let buffer = params.buffer;
+        let maxHeight = params.maxHeight;
+        let minHeight = params.minHeight;
         //另一类是网加载(网只根据范围变化)
         addThreeNetEvent = new AddThreeNetEvent({
           view: m_view,
-          center: {x:8086.699067146538,y:2421.512992248397,z:20},
-          radius:1000,
+          size,
+          origin,
+          buffer,
+          maxHeight,
+          minHeight
         });
         addThreeNetEvent.start();
       }
 
       // 递归获取所有建筑点的辅助函数
-      function getAllBuildingPoints(scrollId = null) {
+      function getAllBuildingPoints(level,scrollId = null) {
         getBuildingPoint({
           x: m_view.camera.position.x,
           y: m_view.camera.position.y,
+          level: level,
+          scrollId: scrollId,
+        }).then(res =>{
+          debugger
+          if(res.data.data.list?.length >= 10000 && res.data.data.scrollId){
+            addThreeCubeEvent.addPoints(res.data.data.list);
+            getAllBuildingPoints(level,res.data.data.scrollId);
+          }else{
+            addThreeCubeEvent.addPoints(res.data.data.list);
+          }
+        })
+      }
+
+
+      // 递归获取所有建筑点的辅助函数
+      function getNoFlyPoint(level,scrollId = null) {
+        getNoFlyPointInterface({
+          x: m_view.camera.position.x,
+          y: m_view.camera.position.y,
+          level: level,
           scrollId: scrollId,
         }).then(res =>{
           debugger
           if(res.data.data.list?.length >= 10000 && res.data.data.scrollId){
             addThreeCubeEvent.addPoints(res.data.data.list);
-            getAllBuildingPoints(res.data.data.scrollId);
+            getNoFlyPoint(level,res.data.data.scrollId);
           }else{
             addThreeCubeEvent.addPoints(res.data.data.list);
           }
@@ -510,7 +643,41 @@ export default {
       }
 
 
+      // 递归获取所有道路点的辅助函数
+      function getRoadPoint(level,scrollId = null) {
+        getRoadPointInterface({
+          x: m_view.camera.position.x,
+          y: m_view.camera.position.y,
+          level: level,
+          scrollId: scrollId,
+        }).then(res =>{
+          debugger
+          if(res.data.data.list?.length >= 10000 && res.data.data.scrollId){
+            addThreeCubeEvent.addPoints(res.data.data.list);
+            getRoadPoint(level,res.data.data.scrollId);
+          }else{
+            addThreeCubeEvent.addPoints(res.data.data.list);
+          }
+        })
+      }
 
+      // 递归获取所有河流点的辅助函数
+      function getRiverPoint(level,scrollId = null) {
+        getRiverPointInterface({
+          x: m_view.camera.position.x,
+          y: m_view.camera.position.y,
+          level: level,
+          scrollId: scrollId,
+        }).then(res =>{
+          debugger
+          if(res.data.data.list?.length >= 10000 && res.data.data.scrollId){
+            addThreeCubeEvent.addPoints(res.data.data.list);
+            getRiverPoint(level,res.data.data.scrollId);
+          }else{
+            addThreeCubeEvent.addPoints(res.data.data.list);
+          }
+        })
+      }
 
       //全市格网自定义分割效果加载
       // function showLayersWithScaleEventsReturn(scaleValue){
@@ -851,10 +1018,26 @@ export default {
             hasZ
           })
         if(path){
-          addDrawEvent.update()
+          addDrawEvent.ready()
         }else{
           addDrawEvent.start();
         }
+        addDrawEvent.createListenerEvent((geometry) =>{
+          bus.emit('SendMessage',{
+            action:"DrawComplete",
+            data:{
+              "geometry":geometry
+            }
+          })
+        });
+        addDrawEvent.updateListenerEvent((geometry) =>{
+          bus.emit('SendMessage',{
+            action:"DrawComplete",
+            data:{
+              "geometry":geometry
+            }
+          })
+        });
       }
 
 

+ 197 - 44
src/config/basicTool.json

@@ -58,7 +58,7 @@
             "title":"WhiteMold",
             "visible": true,
             "opacity": 1,
-            "url": "https://cimweb.zjw.sh.cegn.cn:2008/MapServiceProxy/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MzQxNzA3MzMsImtleSI6IjA1MTk1NDE4Iiwic2VydmljZU5vIjoiRDkwMDMwMDA2MjAyMzA4MDEiLCJ1c2VybmFtZSI6InB0Z2wifQ.6KDLNwwln28-DUVpxrDn48MmlSOIqp88QvbSsETkL98",
+            "url": "https://cimweb.zjw.sh.cegn.cn:2008/MapServiceProxy/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MzQzNDAwMTAsImtleSI6IjA1MTk1NDE4Iiwic2VydmljZU5vIjoiRDkwMDMwMDA2MjAyMzA4MDEiLCJ1c2VybmFtZSI6InB0Z2wifQ.iyBVlIU3arvjSkIUy8b3K9HPgaH6cZ8tTH2tTFnn2yo",
             "token": ""
           }
         }
@@ -192,13 +192,61 @@
         }
       },
       {
-        "code": "1-25",
+        "code": "1-29",
         "title": "三维格子",
         "data": {
           "ActionName": "ShowThreeCube",
           "Parameters": {
             "status": "show",
-            "size": 50,
+            "points": [
+              {
+                "x": 0,
+                "y": 0,
+                "z": 0
+              },
+              {
+                "x": 600,
+                "y": 600,
+                "z": 600
+              }
+            ],
+            "size": {
+              "xLength":300.3056739761723293,
+              "yLength":300.851112421389189,
+              "zLength":300.3678964689243376
+            },
+            "token": ""
+          }
+        }
+      },
+      {
+        "code": "1-25",
+        "title": "三维格子_建筑接口分批加载",
+        "data": {
+          "ActionName": "ShowBuildingThreeCubeByInterface",
+          "Parameters": {
+            "status": "show",
+            "size": {
+              "xLength":3.3056739761723293,
+              "yLength":3.851112421389189,
+              "zLength":3.3678964689243376
+            },
+            "token": ""
+          }
+        }
+      },
+      {
+        "code": "1-30",
+        "title": "三维格子_禁飞区接口分批加载",
+        "data": {
+          "ActionName": "ShowNoFlyThreeCubeByInterface",
+          "Parameters": {
+            "status": "show",
+            "size": {
+              "xLength":3.3056739761723293,
+              "yLength":3.851112421389189,
+              "zLength":3.3678964689243376
+            },
             "token": ""
           }
         }
@@ -210,6 +258,18 @@
           "ActionName": "ShowThreeNet",
           "Parameters": {
             "status": "show",
+            "size": {
+              "xLength":3.3056739761723293,
+              "yLength":3.851112421389189,
+              "zLength":3.3678964689243376
+            },
+            "origin": {
+              "x":3953.936083342973,
+              "y":7134.381535752544
+            },
+            "buffer": 1000,
+            "maxHeight": 120,
+            "minHeight": 0,
             "token": ""
           }
         }
@@ -325,84 +385,148 @@
             "rings": [
               [
                 [
-                  2283.1137006787776,
-                  636.1578526852668
+                  7132.216065334513,
+                  11382.255454218257
+                ],
+                [
+                  8129.718749602853,
+                  10626.926044318767
+                ],
+                [
+                  8373.891740789455,
+                  9433.14227383127
+                ],
+                [
+                  8399.185815114024,
+                  8121.69085147119
+                ],
+                [
+                  8655.841003599004,
+                  6928.334770411076
+                ],
+                [
+                  9028.697443847948,
+                  6036.989071736839
                 ],
                 [
-                  2755.442842863678,
-                  1026.8816302796026
+                  9205.232935913475,
+                  4771.460863203845
                 ],
                 [
-                  3531.034281735133,
-                  1248.901078489329
+                  8280.945789563993,
+                  3505.2778672216746
                 ],
                 [
-                  4264.864482789166,
-                  1262.6133470962304
+                  7162.320441174459,
+                  2609.621959222928
                 ],
                 [
-                  4846.072870575944,
-                  1220.3100790217377
+                  5582.251585225118,
+                  1660.8490380955654
                 ],
                 [
-                  5349.2761417332795,
-                  1254.9545222719507
+                  4397.189184797056,
+                  1546.5132286054331
                 ],
                 [
-                  5489.116295834501,
-                  849.424842489057
+                  4317.2728986001885,
+                  2163.098398533524
                 ],
                 [
-                  5680.445379537043,
-                  447.08383557562183
+                  3948.2012227228047,
+                  2789.0527187698817
                 ],
                 [
-                  5897.983788255289,
-                  -72.23287029218955
+                  3468.4667558910273,
+                  3350.2977898234903
                 ],
                 [
-                  5353.235081713489,
-                  -314.4967403232263
+                  3356.8881513249817,
+                  4052.1234861050443
                 ],
                 [
-                  4880.7215573706435,
-                  -446.1705186078343
+                  2963.7276796226124,
+                  4462.382079412662
                 ],
                 [
-                  4419.945274186343,
-                  -620.6697712028126
+                  2364.289030103321,
+                  4802.332605094218
                 ],
                 [
-                  4022.245846137783,
-                  -798.2234781410284
+                  2480.132864640529,
+                  5664.723944653843
                 ],
                 [
-                  3588.865915776516,
-                  -1016.6756351545175
+                  2899.6661546770206,
+                  6124.503427312193
                 ],
                 [
-                  3308.344794632267,
-                  -716.4720188261422
+                  2695.052161779426,
+                  6647.810696445151
                 ],
                 [
-                  2995.5705887037257,
-                  -401.75745444376344
+                  1723.0054997161483,
+                  6639.911597545944
                 ],
                 [
-                  2660.6207445233986,
-                  -59.444218653938606
+                  1418.7607236426948,
+                  7458.6848122954325
                 ],
                 [
-                  2377.4465865885672,
-                  212.6415896605945
+                  1348.0740941853883,
+                  8284.291562692524
                 ],
                 [
-                  2272.8639529375205,
-                  442.8097125262784
+                  1555.9198454623042,
+                  8504.84767462384
                 ],
                 [
-                  2283.1137006787776,
-                  636.1578526852668
+                  1929.5589359582032,
+                  8612.81219307864
+                ],
+                [
+                  2294.2341860344595,
+                  8859.534394427768
+                ],
+                [
+                  2332.1551900911727,
+                  9465.198045008068
+                ],
+                [
+                  2358.2971354090955,
+                  10019.660932710696
+                ],
+                [
+                  2163.4097970779667,
+                  10662.215704257127
+                ],
+                [
+                  2239.966254509224,
+                  11076.752622329417
+                ],
+                [
+                  2751.1096560949304,
+                  11731.394771540045
+                ],
+                [
+                  3181.568505193197,
+                  12466.264492140359
+                ],
+                [
+                  3906.4246560278307,
+                  12120.938860901526
+                ],
+                [
+                  4699.939126395945,
+                  11927.996204202973
+                ],
+                [
+                  5886.717669247649,
+                  11848.035582424087
+                ],
+                [
+                  7132.216065334513,
+                  11382.255454218257
                 ]
               ]
             ],
@@ -589,7 +713,7 @@
           "ActionName": "FlyGLTF",
           "Parameters": {
             "status": "show",
-            "paths":    [
+            "paths": [
               [
                 4419.489284,
                 7361.3196348,
@@ -646,6 +770,35 @@
           }
         }
       },
+      {
+        "code": "1-28",
+        "title": "绘制_球点",
+        "data": {
+          "ActionName": "Draw",
+          "Parameters": {
+            "type": "point",
+            "hasZ": true,
+            "status":"show",
+            "point": [
+              3499.5782683948523,
+              7252.273350408689,
+              0
+            ],
+            "symbol": {
+              "type": "point-3d",
+              "symbolLayers": [{
+                "type": "object",
+                "width": 5,
+                "height": 10,
+                "depth": 15,
+                "resource": { "primitive": "cube" },
+                "material": { "color": [0, 255, 0,0.3] }
+              }]
+            },
+            "token": ""
+          }
+        }
+      },
       {
         "code": "1-20",
         "title": "绘制_管道",

+ 81 - 1
src/service/http.js

@@ -1,7 +1,7 @@
 import {requestGet,requestPost} from "./index.js";
 
 
-//查询服务列表
+//查询建筑
 export function getBuildingPoint(params){
     return requestPost({
         url:'/LowAltitudeGrid/LowAltitudeGridFw/queryPageList',
@@ -26,3 +26,83 @@ export function getBuildingPoint(params){
     })
 }
 
+
+//查询禁飞区
+export function getNoFlyPointInterface(params){
+    return requestPost({
+        url:'/LowAltitudeGrid/no_fly_zone/queryPageList',
+        data:{
+            "locationPoint": {
+                "mapX":  params.x,
+                "mapY": params.y
+            },
+            "radiusInMeters": 100000,
+            "minZ": 0,
+            "maxZ": 300,
+            "routes": [
+                //  "G001133223-031112-303001.1|000000000000000000000001"
+            ],
+            "level":params.level,
+            "fields":["gridCode","x","y","z"],
+            "scrollPage": {
+                "pageIndex": 1,
+                "pageSize": 10000,
+                "scrollId": params.scrollId
+            }
+        }
+    })
+}
+
+
+//查询道路
+export function getRoadPointInterface(params){
+    return requestPost({
+        url:'/LowAltitudeGrid/road/queryPageList',
+        data:{
+            "locationPoint": {
+                "mapX":  params.x,
+                "mapY": params.y
+            },
+            "radiusInMeters": 100000,
+            "minZ": 0,
+            "maxZ": 300,
+            "routes": [
+                //  "G001133223-031112-303001.1|000000000000000000000001"
+            ],
+            "level":params.level,
+            "fields":["gridCode","x","y","z"],
+            "scrollPage": {
+                "pageIndex": 1,
+                "pageSize": 10000,
+                "scrollId": params.scrollId
+            }
+        }
+    })
+}
+
+
+//查询河流
+export function getRiverPointInterface(params){
+    return requestPost({
+        url:'/LowAltitudeGrid/river/queryPageList',
+        data:{
+            "locationPoint": {
+                "mapX":  params.x,
+                "mapY": params.y
+            },
+            "radiusInMeters": 100000,
+            "minZ": 0,
+            "maxZ": 300,
+            "routes": [
+                //  "G001133223-031112-303001.1|000000000000000000000001"
+            ],
+            "level":params.level,
+            "fields":["gridCode","x","y","z"],
+            "scrollPage": {
+                "pageIndex": 1,
+                "pageSize": 10000,
+                "scrollId": params.scrollId
+            }
+        }
+    })
+}

+ 24 - 0
src/units/map/AddThreeCubeEvent.js

@@ -7,8 +7,12 @@ class AddThreeCubeEvent{
     constructor(options){
         this.view = options.view;
         this.points = options.points || []; // 初始点位(可为空)
+        this.size = options.size; // 初始大小(可根据需求调整)
+        this.points = options.points || []; // 初始点位(可为空)
         this.addThreeCubeEvent = null;
     }
+
+
     start() {
         let that = this;
         if (this.addThreeCubeEvent) {
@@ -18,6 +22,7 @@ class AddThreeCubeEvent{
         this.view.when(()=>{
             this.addThreeCubeEvent = new subRenderClass({
                 view:that.view,
+                size:that.size,
                 points: [], // 初始为空,等待后续增量加载
                 webgl,
             })
@@ -35,6 +40,25 @@ class AddThreeCubeEvent{
             console.warn("addThreeCubeEvent 未初始化,无法添加新点位!");
         }
     }
+
+
+    init() {
+        let that = this;
+        if (this.addThreeCubeEvent) {
+            this.clear();
+        }
+        let subRenderClass = RenderNode.createSubclass(ThreeCubeClass);
+        this.view.when(()=>{
+            this.addThreeCubeEvent = new subRenderClass({
+                view:that.view,
+                size:that.size,
+                points: [], // 初始为空,等待后续增量加载
+                webgl,
+            });
+            this.addThreeCubeEvent.addPoints(that.points);
+        })
+    }
+
     clear(){
         if(this.addThreeCubeEvent){
             this.addThreeCubeEvent.destroy();

+ 16 - 10
src/units/map/AddThreeNetEvent.js

@@ -6,9 +6,11 @@ import {ThreeNetClass} from "../threejs/threeNet.js";
 class  AddThreeNetEvent{
     constructor(options){
         this.view = options.view;
-        this.radius = options.radius;
-        this.center = options.center;
-        this.height = null;
+        this.size = options.size;
+        this.origin = options.origin;
+        this.buffer = options.buffer;
+        this.minHeight = options.minHeight;
+        this.maxHeight = options.maxHeight;
         this.extent = {
             minX:null,
             maxX:null,
@@ -25,18 +27,22 @@ class  AddThreeNetEvent{
         if (this.addThreeNetEvent) {
             this.clear();
         }
+        debugger
         let subRenderClass = RenderNode.createSubclass(ThreeNetClass);
-        this.height = this.view.camera.position.z + 30;
-        this.extent.minX = this.center.x - this.radius;
-        this.extent.maxX = this.center.x + this.radius;
-        this.extent.minY = this.center.y - this.radius;
-        this.extent.maxY = this.center.y + this.radius;
-        this.extent.minZ = 0;
-        this.extent.maxZ =  this.center.z + 30;
+        this.extent.minX = this.origin.x;
+        this.extent.maxX = this.origin.x + Math.ceil((this.buffer/this.size.xLength)) * this.size.xLength;
+        this.extent.minY = this.origin.y;
+        this.extent.maxY = this.origin.y + Math.ceil((this.buffer/this.size.yLength)) * this.size.yLength;
+        this.extent.minZ = Math.floor(this.minHeight/this.size.zLength) * this.size.zLength;
+        this.extent.maxZ =  Math.ceil(this.maxHeight/this.size.zLength) * this.size.zLength;
+        debugger
         this.view.when(()=>{
             this.addThreeNetEvent = new subRenderClass({
                 view:that.view,
                 webgl,
+                sizeX:that.size.xLength,
+                sizeY:that.size.yLength,
+                sizeZ:that.size.zLength,
                 extent:that.extent
             })
         })

+ 1 - 1
src/units/map/FlyGLTFEvent.js

@@ -61,7 +61,7 @@ class FlyGLTFEvent{
                 const mapPosition = [
                     currentAfterPosition[0] + offsetX,
                     currentAfterPosition[1] + offsetY,
-                    currentAfterPosition[2] + 30
+                    currentAfterPosition[2] + 40
                 ];
                 this.view.camera = {
                     position:{

+ 4 - 3
src/units/threejs/threeCube.js

@@ -4,6 +4,7 @@ export const ThreeCubeClass = {
     constructor(options) {
         this.webgl = options.webgl;
         this.view = options.view;
+        this.size = options.size;
         this.points = options.points;
         this.mesh = null;
         this._camera = null;
@@ -53,14 +54,14 @@ export const ThreeCubeClass = {
 
     },
     createInstancedMesh() {
-        const geometry = new THREE.BoxGeometry(2.9144308,3.3874536,3.367898882);
+        const geometry = new THREE.BoxGeometry(this.size.zLength,this.size.xLength,this.size.yLength);
         geometry.computeVertexNormals();  //计算并更新顶点法线
         const material = new THREE.MeshPhongMaterial({
             transparent:true,
             opacity:0.5,
-            depthTest:true,
+            depthTest:false,
             side:THREE.DoubleSide,
-            depthWrite: false // 关闭深度写入
+            depthWrite: true // 关闭深度写入
         });
         // 修改材质支持 instanceColor
         material.onBeforeCompile = (shader) => {

+ 15 - 19
src/units/threejs/threeNet.js

@@ -6,9 +6,9 @@ export const ThreeNetClass = {
         this.view = options.view;
         this.extent = options.extent;
         this._camera = null;
-        this.sizeX = null;
-        this.sizeY = null;
-        this.sizeZ = null;
+        this.sizeX = options.sizeX;
+        this.sizeY = options.sizeY;
+        this.sizeZ = options.sizeZ;
     },
     initialize(){
         this.renderer = new THREE.WebGLRenderer({
@@ -43,16 +43,14 @@ export const ThreeNetClass = {
         this.createGridLines()
     },
     createGridLines(){
-        this.sizeX = 2.9144308;
-        this.sizeY = 3.3874536;
-        this.sizeZ = 3.367898882;
+        debugger
         let linePositions = [];
-        const minX = Math.ceil((this.extent.minX - 0)/this.sizeX -1) * this.sizeX;
-        const maxX = Math.floor((this.extent.maxX - 0)/this.sizeX +1) * this.sizeX;
-        const minY = Math.ceil((this.extent.minY - 0)/this.sizeY -1) * this.sizeY;
-        const maxY =  Math.floor((this.extent.maxY - 0)/this.sizeY +1) * this.sizeY;
-        const minZ = Math.ceil((this.extent.minZ - 0)/this.sizeZ -1) > 0?Math.ceil((this.extent.minZ - 0)/this.sizeZ -1):0;
-        const maxZ = Math.floor((this.extent.maxZ - 0)/this.sizeZ +1) * this.sizeY;
+        const minX = this.extent.minX;
+        const maxX = this.extent.maxX;
+        const minY = this.extent.minY;
+        const maxY = this.extent.maxY;
+        const minZ = this.extent.minZ;
+        const maxZ = this.extent.maxZ;
 
         const transformCoordinates = (x,y,z)=>{
             const renderPos = [];
@@ -78,18 +76,16 @@ export const ThreeNetClass = {
                 new THREE.Float32BufferAttribute(linePositions,3)
             );
             const lineMaterial = new THREE.LineBasicMaterial({
-                color: 0xffffff,
-                opacity:0.2,
-                lineWidth:1,
-                transparent:true
+                color: 0x3dd2ff,
+                opacity:0.5,
+                lineWidth:2,
+                transparent:true,
             });
             const lines = new THREE.LineSegments(lineGeometry, lineMaterial);
             this.scene.add(lines);
             linePositions = []; // 清空当前批次
         }
 
-        debugger
-
         // X方向的线
         for (let y = minY; y <= maxY; y += this.sizeY) {
             for (let z = minZ; z <= maxZ; z += this.sizeZ) {
@@ -110,7 +106,7 @@ export const ThreeNetClass = {
 
         // Z方向的线
         for (let x = minX; x <= maxX; x +=  this.sizeX) {
-            for (let y = minY; y <= maxY; y += this.sizeZ) {
+            for (let y = minY; y <= maxY; y += this.sizeY) {
                 const start = transformCoordinates(x, y, minZ);
                 const end = transformCoordinates(x, y, maxZ);
                 linePositions.push(...start, ...end);