|
@@ -65,46 +65,33 @@ export default class Load {
|
|
text.setDisplay(dataLocal.texts[key].display);
|
|
text.setDisplay(dataLocal.texts[key].display);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- // if (data3d.baseLines) {
|
|
|
|
- // for (let i = 0; i < data3d.baseLines.length; ++i) {
|
|
|
|
- // //理论上基准线只能有一条
|
|
|
|
- // lineService.create(
|
|
|
|
- // data3d.baseLines[i][0],
|
|
|
|
- // data3d.baseLines[i][1],
|
|
|
|
- // VectorCategory.Line.BaseLine
|
|
|
|
- // );
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
- // if (data3d.measures) {
|
|
|
|
- // for (let i = 0; i < data3d.measures.length; ++i) {
|
|
|
|
- // //理论上基准线只能有一条
|
|
|
|
- // lineService.create(
|
|
|
|
- // data3d.measures[i][0],
|
|
|
|
- // data3d.measures[i][1],
|
|
|
|
- // VectorCategory.Line.MeasureLine
|
|
|
|
- // );
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
- // if (data3d.basePoints) {
|
|
|
|
- // for (let i = 0; i < data3d.basePoints.length; ++i) {
|
|
|
|
- // let point = pointService.create(
|
|
|
|
- // data3d.basePoints[i],
|
|
|
|
- // data3d.basePoints[i].category,
|
|
|
|
- // data3d.basePoints[i].vectorId
|
|
|
|
- // );
|
|
|
|
- // point.setParent(data3d.basePoints[i].parent);
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
- // if (data3d.fixPoints) {
|
|
|
|
- // for (let i = 0; i < data3d.fixPoints.length; ++i) {
|
|
|
|
- // let point = pointService.create(
|
|
|
|
- // data3d.fixPoints[i],
|
|
|
|
- // data3d.fixPoints[i].category,
|
|
|
|
- // data3d.fixPoints[i].vectorId
|
|
|
|
- // );
|
|
|
|
- // point.setParent(data3d.fixPoints[i].parent);
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
|
|
+ if (dataLocal.points) {
|
|
|
|
+ for (let key in dataLocal.points) {
|
|
|
|
+ let point = pointService.create(
|
|
|
|
+ { x: dataLocal.points[key].x, y: dataLocal.points[key].y },
|
|
|
|
+ dataLocal.points[key].category,
|
|
|
|
+ key
|
|
|
|
+ );
|
|
|
|
+ point.setParent(
|
|
|
|
+ JSON.parse(JSON.stringify(dataLocal.points[key].parent))
|
|
|
|
+ );
|
|
|
|
+ point.setDisplay(dataLocal.points[key].display);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (dataLocal.lines) {
|
|
|
|
+ for (let key in dataLocal.lines) {
|
|
|
|
+ let line = lineService.createByPointId(
|
|
|
|
+ dataLocal.lines[key].startId,
|
|
|
|
+ dataLocal.lines[key].endId,
|
|
|
|
+ dataLocal.lines[key].category,
|
|
|
|
+ key
|
|
|
|
+ );
|
|
|
|
+ if (dataLocal.lines[key].arrowColor) {
|
|
|
|
+ line.setArrowColor(dataLocal.lines[key].arrowColor);
|
|
|
|
+ }
|
|
|
|
+ line.setDisplay(dataLocal.lines[key].display);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
if (data3d) {
|
|
if (data3d) {
|
|
if (data3d.backImage) {
|
|
if (data3d.backImage) {
|