Browse Source

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	docs/dev/data-center/index.js
jxing 4 years ago
parent
commit
c70bd5c228

+ 18 - 10
docs/.vuepress/config.js

@@ -3,9 +3,10 @@ const revitContent = require("../revit/index");
 const databaseContent = require("../dev/database/index");
 const dataCenterContent = require("../dev/data-center/index");
 const revitCenterContent = require("../dev/revit-center/index");
+const sagaGraphyContent = require("../dev/saga-graphy/index");
 
 module.exports = {
-    title: "数字化交开发文档",
+    title: "数字化交开发文档",
     description: "上格云数字化交付开发文档",
     base: "/doc/",
     // plugins: ["@vuepress/last-updated"],
@@ -27,20 +28,19 @@ module.exports = {
             {
                 text: "开发文档",
                 items: [
-                    {text: "数据中心", link: "/dev/data-center/"},
-                    {text: "物理世界同步", link: "/dev/dataplatform-sync/"},
-                    {text: "模型管理", link: "/dev/revit-center/"},
                     {
-                        text: "数据库设计",
+                        text: "后台开发",
                         items: [
-                            { text: "数据中心", link: "/dev/database/data-center/" },
-                            { text: "系统图", link: "/dev/database/topo/" }
+
+                            {text: "数据中心", link: "/dev/data-center/"},
+                            {text: "物理世界同步", link: "/dev/dataplatform-sync/"},
+                            {text: "模型管理", link: "/dev/revit-center/"},
                         ]
                     },
                     {
                         text: "Web开发",
                         items: [
-                            { text: "TS 图形引擎", link: "http://adm.sagacloud.cn:8080/api/web/graphy/" }
+                            { text: "系统图引擎", link: "/dev/saga-graphy/" }
                         ]
                     },
                     {
@@ -48,7 +48,14 @@ module.exports = {
                         items: [
                             { text: "Android 图形引擎", link: "http://http://adm.sagacloud.cn:8080/api/android/graphy/" }
                         ]
-                    }
+                    },
+                    {
+                        text: "数据库设计",
+                        items: [
+                            { text: "数据中心", link: "/dev/database/data-center/" },
+                            { text: "系统图", link: "/dev/database/topo/" }
+                        ]
+                    },
                 ]
             },
             {
@@ -96,6 +103,7 @@ module.exports = {
             "/dev/database/" : databaseContent,
             "/dev/data-center/" : dataCenterContent,
             "/dev/revit-center/" : revitCenterContent,
+            "/dev/saga-graphy/": sagaGraphyContent,
         }
     }
-};
+};

+ 1 - 0
docs/dev/data-center/relation/README.md

@@ -0,0 +1 @@
+关系计算

+ 5 - 0
docs/dev/saga-graphy/README.md

@@ -0,0 +1,5 @@
+系统图引擎
+1,绘图引擎
+2,场景管理
+3,楼层平面图
+4,系统图

+ 1 - 0
docs/dev/saga-graphy/floor-map/README.md

@@ -0,0 +1 @@
+# 楼层平面图

+ 0 - 0
docs/dev/saga-graphy/floor-map/divide.md


+ 6 - 0
docs/dev/saga-graphy/floor-map/downloadFile.md

@@ -0,0 +1,6 @@
+
+## 手工下载楼层底图文件
+
+手工下载地址例:[http://adm.sagacloud.cn/image-service/common/file_get?systemId=revit&key=Fl11010500011b85b9eeff8211e8b8b087ac5144d0ef20191108102222bim.jsonz](http://adm.sagacloud.cn/image-service/common/file_get?systemId=revit&key=Fl11010500011b85b9eeff8211e8b8b087ac5144d0ef20191108102222bim.jsonz)
+
+下载后为无后缀压缩文件,直接打开是乱码,需手工添加zip后缀并解压方可得到json文件

BIN
docs/dev/saga-graphy/floor-map/img/equipLocation.png


BIN
docs/dev/saga-graphy/floor-map/img/liucheng.png


BIN
docs/dev/saga-graphy/floor-map/img/space.png


+ 147 - 0
docs/dev/saga-graphy/floor-map/jsonFile.md

@@ -0,0 +1,147 @@
+
+## json数据格式
+
+### 整体数据格式
+
+```
+    {
+        EntityList:[
+            Elements:{                          // 底图展示所需数据
+                Columns:[],                     // 所有柱子数据
+                Doors:[],                       // 所有门数据
+                Spaces:[],                      // 所有空间数据
+                VirtualWalls:[],                // 所有虚拟墙数据
+                Walls:[],                       // 所有墙数据
+                Windows:[],                     // 所有窗户数据
+            },
+            MBIName:'',
+            ModelId:'',
+            PlanName:''
+        ]
+    }
+```
+
+### 柱子具体数据内容
+
+```
+    Columns:[
+        {
+            Name: '',                           // 名称
+            OutLine: [
+                [{X:0,Y:0,Z:0},...],            // 外轮廓 
+                ...                             // 内轮廓
+            ],                                  // 轮廓线
+            RoomBoundary: '',                   // 房间边界
+            Location: {X:0,Y:0,Z:0},            // 位置
+            ModelId: '',                        // 模型id
+            SourceId: '',                       // 对应Revit模型id
+        },
+        ...
+    ]
+```
+
+### 门具体数据
+
+```
+    Doors:[
+        {
+            FaceDirection: {X:0,Y:0,Z:0},       // 面朝方向
+            HandDirection: {X:0,Y:0,Z:0},       // 把手方向
+            Location: {X:0,Y:0,Z:0},            // 位置
+            ModelId: '',                        // 模型id
+            Name: '',                           // 名称
+            OutLine: [
+                [{X:0,Y:0,Z:0},...],            // 外轮廓 
+                ...                             // 内轮廓
+            ],                                  // 轮廓线
+            Owner: '',                          // 拥有者的RevitId
+            SourceId: '',                       // 对应Revit模型id
+            Thick: 200,                         // 厚度
+            WallId: '',                         // 所属墙
+            Width: 200,                         // 宽度
+        },
+        ...
+    ]
+```
+
+### 空间具体数据
+
+```
+    Spaces:[
+        {
+            BoundarySegments: [[''],...],       // 轮廓线段
+            Location: {X:0,Y:0,Z:0},            // 位置
+            ModelId: '',                        // 模型id
+            Name: '',                           // 名称
+            OutLine: [
+                [{X:0,Y:0,Z:0},...],            // 外轮廓 
+                ...                             // 内轮廓
+            ],                                  // 轮廓线
+            SourceId: '',                       // 对应Revit模型id
+            Tag: '',                            // 补充信息
+            Height: 200,                        // 高度
+        },
+        ...
+    ]
+```
+
+### 虚拟墙具体数据
+
+```
+    VirtualWalls:[
+        {
+            Location: {X:0,Y:0,Z:0},            // 位置
+            ModelId: '',                        // 模型id
+            Name: '',                           // 名称
+            OutLine: [
+                [{X:0,Y:0,Z:0},...],            // 外轮廓 
+                ...                             // 内轮廓
+            ],                                  // 轮廓线
+            SourceId: '',                       // 对应Revit模型id
+        },
+        ...
+    ]
+```
+
+### 墙具体数据
+
+```
+    Walls:[
+        {
+            LevelId: '',                        // 层id
+            Location: {X:0,Y:0,Z:0},            // 位置
+            ModelId: '',                        // 模型id
+            Name: '',                           // 名称
+            OutLine: [
+                [{X:0,Y:0,Z:0},...],            // 外轮廓 
+                ...                             // 内轮廓
+            ],                                  // 轮廓线
+            SourceId: '',                       // 对应Revit模型id
+            Tag: '',                            // 补充信息
+            Width: 200,                         // 厚度
+        },
+        ...
+    ]
+```
+
+### 窗户具体数据
+
+```
+    Windows:[
+        {
+            Location: {X:0,Y:0,Z:0},            // 位置
+            ModelId: '',                        // 模型id
+            Name: '',                           // 名称
+            OutLine: [
+                [{X:0,Y:0,Z:0},...],            // 外轮廓 
+                ...                             // 内轮廓
+            ],                                  // 轮廓线
+            Owner: '',                          // 拥有者的RevitId
+            SourceId: '',                       // 对应Revit模型id
+            WallId: '',                         // 所属墙
+            Width: 200,                         // 宽度
+            Thick: 200,                         // 厚度
+        },
+        ...
+    ]
+```

+ 98 - 0
docs/dev/saga-graphy/floor-map/workLine.md

@@ -0,0 +1,98 @@
+## 下载-解析-生成 过程
+
+### 工作流程图
+
+![工作流程图](./img/liucheng.png)
+
+### 下载底图数据
+
+#### 方式1 通过楼层对象floormap信息点,直接从文件服务器获取压缩数据
+
+引擎中已封装好函数loadUrl,直接传入文件服务器路径即可;并且会将压缩数据自动解压
+
+```
+loadUrl(url: string): Promise<void> {}
+```
+
+#### 方式2 通过模型后台接口 /base-graph/query 传入模型id 直接获取未压缩数据
+引擎中已封装好函数getFloorData,直接传入模型id,url为接口地址
+
+```
+getFloorData(url: string, data: { ModelId: string }) {}
+```
+
+
+### 下载设备,业务空间数据
+
+下载设备,业务空间等的数据均需要另走查询对象接口
+
+如设备数据
+
+```
+    Equip:{
+        ...
+        BIMLocation:'0,0,0',                    // 如果设备有位置,则会在设备对象中存在此数据
+    }
+```    
+
+根据此坐标生成设备位置
+
+![工作流程图](./img/equipLocation.png)
+
+业务空间数据
+```
+    Space:{
+        ...
+        OutLine: [                              
+            [
+                [{X:0,Y:0,Z:0},...],            // 外轮廓 
+                ...                             // 内轮廓
+            ]
+        ],                                      // 轮廓线
+    }
+```
+
+根据轮廓线生成业务空间
+
+![工作流程图](./img/space.png) 
+
+### 解析
+引擎中会读取下载好的数据,按数据将不同的对象分发到引擎中各个添加对象的方法中
+
+```
+private addBaseMapItem(data: FloorData): void {
+        if (data.Walls) {
+            data.Walls.forEach((t: Wall): void => {
+                this.addWall(t);
+            });
+        }
+        if (data.Columns) {
+            data.Columns.forEach((t: Column): void => {
+                this.addColumn(t);
+            });
+        }
+        if (data.Windows) {
+            data.Windows.forEach((t: Casement): void => {
+                this.addCasement(t);
+            });
+        }
+        if (data.VirtualWalls) {
+            data.VirtualWalls.forEach((t: VirtualWall): void => {
+                this.addVirtualWall(t);
+            });
+        }
+        if (data.Doors) {
+            data.Doors.forEach((t: Door): void => {
+                this.addDoor(t);
+            });
+        }
+        if (data.Spaces) {
+            data.Spaces.forEach((t: Space): void => {
+                this.addSpace(t);
+            });
+        }
+    } // Function addBaseMapItem()
+```
+
+### 生成
+当视图监听到需要刷新时,就会触发update()方法,刷新视图,用户就可以在页面中看到相应的楼层平面图了

+ 10 - 0
docs/dev/saga-graphy/graphy-engine/README.md

@@ -0,0 +1,10 @@
+绘图引擎
+
+
+1.引擎基本结构
+2.绘制操作,特殊说明:path/image/text;画笔/画刷;字体/字号/对齐方式;案例:线/圆/矩形/多边形/饼图(实现)/椭圆/圆角矩形;
+3.颜色与过渡
+4.矩阵变换
+5.融合效果
+6.特效:投影/发光/倒影/a过渡/等
+7.实现自定义绘图引擎:如image绘图引擎

+ 35 - 0
docs/dev/saga-graphy/index.js

@@ -0,0 +1,35 @@
+const content = [
+    {
+        title: "绘图引擎",
+        path: "/dev/saga-graphy/graphy-engine/",
+        children: [
+
+        ]
+    },
+    {
+        title: "场景管理",
+        path: "/dev/saga-graphy/scene-manage/",
+        children: [
+
+        ]
+    },
+    {
+        title: "楼层平面图",
+        path: "/dev/saga-graphy/floor-map/",
+        children: [
+            ["/dev/saga-graphy/floor-map/workLine", "工作流程"],
+            ["/dev/saga-graphy/floor-map/downloadFile", "手工下载楼层底图文件"],
+            ["/dev/saga-graphy/floor-map/jsonFile", "json数据格式"],
+            ["/dev/saga-graphy/floor-map/divide", "划分"],
+        ]
+    },
+    {
+        title: "系统图",
+        path: "/dev/saga-graphy/system-diagram/",
+        children: [
+
+        ]
+    },
+];
+
+module.exports = content;

+ 11 - 0
docs/dev/saga-graphy/scene-manage/README.md

@@ -0,0 +1,11 @@
+场景管理
+
+
+1.视图-场景-对象的基本说明
+2.绘制封装,painter传递过程
+3.系统事件传递
+4.坐标换算
+5.自定义事件$emit
+6.基本操作,如放大缩小
+7.undo/redo 框架
+8.item实现案例,钟表/连线/多边形

+ 4 - 0
docs/dev/saga-graphy/system-diagram/README.md

@@ -0,0 +1,4 @@
+系统图
+
+
+数据格式