build-dxf 0.0.37 → 0.0.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -1
- package/package.json +1 -1
- package/src/build.js +1679 -1507
- package/src/index.css +1 -1
- package/src/index3.js +504 -498
- package/src/utils/DxfSystem/DxfSystem.d.ts +1 -0
- package/src/utils/DxfSystem/plugin/Editor/components/RenderManager.d.ts +2 -1
- package/src/utils/DxfSystem/plugin/RenderPlugin/pages/Dxf.vue.d.ts +1 -1
- package/src/utils/DxfSystem/type.d.ts +22 -5
- package/src/utils/DxfSystem/utils/findVerticalReference.d.ts +2 -0
- package/src/utils/DxfSystem/utils/lineSegmentClipping.d.ts +3 -2
- package/src/utils/Quadtree/LineSegment.d.ts +13 -2
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ npm i build-dxf
|
|
|
7
7
|
|
|
8
8
|
# node 使用示例
|
|
9
9
|
```typescript
|
|
10
|
-
import { DxfSystem, ModelDataPlugin, components } from "build-dxf"
|
|
10
|
+
import { DxfSystem, ModelDataPlugin, components, utils } from "build-dxf"
|
|
11
11
|
/**
|
|
12
12
|
* json 文件格式为{ start: {x: number, y: number}, end: {x: number, y: number } , insetionArr: {index: number}[] }[]
|
|
13
13
|
*/
|
|
@@ -22,6 +22,13 @@ const whiteModel = dxfSystem.findComponentByType(components.WhiteModel)
|
|
|
22
22
|
// 获取详情点数据生成组件
|
|
23
23
|
const detailsPoint = dxfSystem.findComponentByType(components.DetailsPoint)
|
|
24
24
|
|
|
25
|
+
const threeVJia = dxfSystem.findComponentByName("ThreeVJia")
|
|
26
|
+
|
|
27
|
+
// trajectory222为轨迹文件数据
|
|
28
|
+
dxfSystem.Dxf.addEventListener("preprocessing", ({ setData, data }) => {
|
|
29
|
+
setData( utils.BoundExt.boundExtbyTraj.call(dxfSystem.Dxf, data, trajectory222 ) )
|
|
30
|
+
}, { once: true })
|
|
31
|
+
|
|
25
32
|
// 监听详情点数据处理完成
|
|
26
33
|
detailsPoint.addEventListener("handleSuccess", () => {
|
|
27
34
|
// 下载dxf文件
|
|
@@ -31,6 +38,9 @@ detailsPoint.addEventListener("handleSuccess", () => {
|
|
|
31
38
|
// 下载白模,gltf或glb格式, 第二个参数为true时是glb,默认为true
|
|
32
39
|
whiteModel.downloadGltf("001.glb", true)
|
|
33
40
|
|
|
41
|
+
// 下载三维家 json
|
|
42
|
+
threeVJia.download("json.json")
|
|
43
|
+
|
|
34
44
|
// 下载为图片
|
|
35
45
|
dxfSystem.AngleCorrectionDxf.downloadImage("001.jpg")
|
|
36
46
|
|