Vue AutoCad vds文件 渲染、操作
依据 VectorDraw 封装的提示:这里可以添加系列文章的所有文章的目录,目录需要自己手动添加例如:第一章 Python 机器学习入门之pandas的使用提示:写完文章后,目录可以自动生成,如何生成可参考右边的帮助文档文章目录依据 VectorDraw 封装的前言增加元素 AddEntity增加图片 AddImage后续可以继续增加前言点击跳转 npm或 npm i cad-project -
·
依据 VectorDraw 封装的
需要在 public/index.html 中引入 js 点击跳转
前言
点击跳转 npm
或 npm i cad-project --save
增加元素 AddEntity
<auto-cad ref="autoCad" path="data/testcad.vds" :ids="example" />
data() {
return {
//Id是元素Id -> AutoCad 里面的 HandleId
// Type : undo 变换为红色 done 绿色 doing 黄色
example: [
{ Id: 12695, Type: "undo" },
{ Id: 12724, Type: "done" },
{ Id: 12789, Type: "doing" },
],
};
},
/**
* eEntityType : circle、triangle、square、pentagram
* ptPosition : [0, 0]
* dCircumcircleRadius : 1
* aColor : "255,255,0"
* bHatch : 是否填充 bool
* type_str : 类型名称 用于区分
*/
this.$refs.autoCad.AddEntity(...args)
增加图片 AddImage
/**
* name_id : 名称唯一
* base_str :图片base64字符串
* position :经纬度[x,y,0]
* type_str : 类型名称 '摄像头' '风险源' 等
*/
var entity = this.$refs.autoCad.AddImage(name_id, base_str, position, type_str)
后续可以继续增加
更多推荐
所有评论(0)