|
@@ -11,7 +11,7 @@ import java.util.Iterator;
|
|
|
import java.util.Map;
|
|
|
|
|
|
@Slf4j
|
|
|
-public class readFloorplan {
|
|
|
+public class ReadFloorplan {
|
|
|
|
|
|
private static String filePath = "F:\\2021\\����װ\\house.json";
|
|
|
private static String version = "2.0";
|
|
@@ -24,14 +24,14 @@ public class readFloorplan {
|
|
|
public static void main(String args[]) {
|
|
|
|
|
|
try {
|
|
|
- readFloorplan m_readFloorplan = new readFloorplan();
|
|
|
+ ReadFloorplan m_readFloorplan = new ReadFloorplan();
|
|
|
JSONObject cad = m_readFloorplan.readFile(m_readFloorplan.filePath);
|
|
|
JSONArray floors = cad.getJSONArray("floors");
|
|
|
floors = m_readFloorplan.analysisCad(floors);
|
|
|
JSONObject data = new JSONObject();
|
|
|
data.put("floors", floors);
|
|
|
- data.put("version", readFloorplan.version);
|
|
|
- readFloorplan.writeFile(readFloorplan.outputPath, data.toString());
|
|
|
+ data.put("version", ReadFloorplan.version);
|
|
|
+ ReadFloorplan.writeFile(ReadFloorplan.outputPath, data.toString());
|
|
|
System.out.println();
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
@@ -43,7 +43,7 @@ public class readFloorplan {
|
|
|
JSONArray jsonArray = analysisCad(floors);
|
|
|
JSONObject V2data = new JSONObject();
|
|
|
V2data.put("floors", jsonArray);
|
|
|
- V2data.put("version", readFloorplan.version);
|
|
|
+ V2data.put("version", ReadFloorplan.version);
|
|
|
return V2data;
|
|
|
}
|
|
|
|
|
@@ -123,7 +123,7 @@ public class readFloorplan {
|
|
|
|
|
|
JSONObject V2data = new JSONObject();
|
|
|
V2data.put("floors", floors);
|
|
|
- V2data.put("version", readFloorplan.version);
|
|
|
+ V2data.put("version", ReadFloorplan.version);
|
|
|
|
|
|
return floorplan;
|
|
|
}
|
|
@@ -183,7 +183,7 @@ public class readFloorplan {
|
|
|
String wallId = wall.getString("vectorId");
|
|
|
JSONObject start = jsonPoints.getJSONObject(startPointId);
|
|
|
JSONObject end = jsonPoints.getJSONObject(endPointId);
|
|
|
- readFloorplan.log.info("watch-wallId-={},startPointId={},endPointId={}", wallId, startPointId, endPointId);
|
|
|
+ //ReadFloorplan.log.info("watch-wallId-={},startPointId={},endPointId={}", wallId, startPointId, endPointId);
|
|
|
|
|
|
|
|
|
JSONObject startParent = start.getJSONObject("parent");
|
|
@@ -191,7 +191,7 @@ public class readFloorplan {
|
|
|
if (ObjectUtil.isNotNull(startParent) && !startParent.isEmpty()) {
|
|
|
startParent.put(wallId, "start");
|
|
|
} else {
|
|
|
- readFloorplan.log.info("watch-startParent.isNull,json={}", start.toJSONString());
|
|
|
+ //ReadFloorplan.log.info("watch-startParent.isNull,json={}", start.toJSONString());
|
|
|
startParent = new JSONObject();
|
|
|
startParent.put(wallId, "start");
|
|
|
}
|
|
@@ -201,7 +201,7 @@ public class readFloorplan {
|
|
|
if (ObjectUtil.isNotNull(endParent) && !endParent.isEmpty()) {
|
|
|
endParent.put(wallId, "end");
|
|
|
} else {
|
|
|
- readFloorplan.log.info("watch-endParent.isNull,json={}", end.toJSONString());
|
|
|
+ //ReadFloorplan.log.info("watch-endParent.isNull,json={}", end.toJSONString());
|
|
|
endParent = new JSONObject();
|
|
|
endParent.put(wallId, "end");
|
|
|
}
|