build-dxf 0.0.39 → 0.0.41
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 +26 -24
- package/package.json +1 -1
- package/src/build.js +561 -566
- package/src/index.css +1 -1
- package/src/index3.js +377 -378
- package/src/utils/CommandManager/CommandManager.d.ts +1 -0
- package/src/utils/DxfSystem/components/Dxf.d.ts +11 -2
- package/src/utils/DxfSystem/utils/originalDataToLineData.d.ts +7 -0
- package/src/utils/Quadtree/LineSegment.d.ts +1 -0
package/README.md
CHANGED
|
@@ -21,39 +21,41 @@ dxfSystem.usePlugin(ModelDataPlugin)
|
|
|
21
21
|
const whiteModel = dxfSystem.findComponentByType(components.WhiteModel)
|
|
22
22
|
// 获取详情点数据生成组件
|
|
23
23
|
const detailsPoint = dxfSystem.findComponentByType(components.DetailsPoint)
|
|
24
|
-
|
|
25
24
|
const threeVJia = dxfSystem.findComponentByName("ThreeVJia")
|
|
26
25
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
26
|
+
dxfSystem.Dxf.set(path).then(()=> {
|
|
27
|
+
// 监听详情点数据处理完成
|
|
28
|
+
detailsPoint.addEventListener("handleSuccess", () => {
|
|
29
|
+
// 下载dxf文件
|
|
30
|
+
dxfSystem.Dxf.download("01.dxf")
|
|
31
|
+
// 下载白模,obj格式
|
|
32
|
+
whiteModel.downloadOBJ("001.obj")
|
|
33
|
+
// 下载白模,gltf或glb格式, 第二个参数为true时是glb,默认为true
|
|
34
|
+
whiteModel.downloadGltf("001.glb", true)
|
|
31
35
|
|
|
32
|
-
//
|
|
33
|
-
|
|
34
|
-
// 下载dxf文件
|
|
35
|
-
dxfSystem.Dxf.download("01.dxf")
|
|
36
|
-
// 下载白模,obj格式
|
|
37
|
-
whiteModel.downloadOBJ("001.obj")
|
|
38
|
-
// 下载白模,gltf或glb格式, 第二个参数为true时是glb,默认为true
|
|
39
|
-
whiteModel.downloadGltf("001.glb", true)
|
|
36
|
+
// 下载三维家 json
|
|
37
|
+
threeVJia.download("json.json")
|
|
40
38
|
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
// 下载为图片
|
|
40
|
+
dxfSystem.AngleCorrectionDxf.downloadImage("001.jpg")
|
|
43
41
|
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
// 下载新json
|
|
43
|
+
dxfSystem.Dxf.downloadOriginalData("data.json")
|
|
46
44
|
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
// desPoints 为射线点集合,根据需要使用
|
|
46
|
+
console.log("handleSuccess", detailsPoint.desPoints)
|
|
47
|
+
})
|
|
49
48
|
|
|
50
|
-
//
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
// trajectory222为轨迹文件数据
|
|
50
|
+
dxfSystem.Dxf.addEventListener("preprocessing", ({ setData, data }) => {
|
|
51
|
+
setData( utils.BoundExt.boundExtbyTraj.call(dxfSystem.Dxf, data, trajectory222 ) )
|
|
52
|
+
}, { once: true })
|
|
53
53
|
|
|
54
|
-
dxfSystem.Dxf.
|
|
55
|
-
|
|
54
|
+
dxfSystem.Dxf.axisAlignCorr({ groupMethod: "cross", fittingMethod: "max", crossAxistThreshold: 0.08 })
|
|
55
|
+
dxfSystem.Dxf.lineOffset()
|
|
56
56
|
|
|
57
|
+
detailsPoint.set("./json/dp8.json")
|
|
58
|
+
})
|
|
57
59
|
```
|
|
58
60
|
|
|
59
61
|
# 浏览器编辑功能使用示例
|