|
@@ -8,6 +8,7 @@ import com.fdkankan.dxf.fdjson.vo.FdPoints;
|
|
import com.fdkankan.dxf.fdjson.vo.FdWalls;
|
|
import com.fdkankan.dxf.fdjson.vo.FdWalls;
|
|
import com.fdkankan.dxf.generate.DxfDocWriter;
|
|
import com.fdkankan.dxf.generate.DxfDocWriter;
|
|
import com.fdkankan.dxf.generate.Vector3;
|
|
import com.fdkankan.dxf.generate.Vector3;
|
|
|
|
+import com.fdkankan.dxf.generate.enums.LineWidthEnum;
|
|
import com.fdkankan.dxf.generate.model.DxfLine;
|
|
import com.fdkankan.dxf.generate.model.DxfLine;
|
|
import com.fdkankan.dxf.generate.model.base.Color;
|
|
import com.fdkankan.dxf.generate.model.base.Color;
|
|
import com.fdkankan.dxf.parse.ParseDXF;
|
|
import com.fdkankan.dxf.parse.ParseDXF;
|
|
@@ -84,20 +85,21 @@ public class FdJsonToDxfUtil {
|
|
JSONObject wall = walls.getJSONObject(key);
|
|
JSONObject wall = walls.getJSONObject(key);
|
|
String start = wall.getString("start");
|
|
String start = wall.getString("start");
|
|
String end = wall.getString("end");
|
|
String end = wall.getString("end");
|
|
- drawLinePoint(filePath,wallMap.get(start),wallMap.get(end),dxfDocWriter);
|
|
|
|
|
|
+ Boolean out = wall.getBoolean("out");
|
|
|
|
+ drawLinePoint(filePath,wallMap.get(start),wallMap.get(end),dxfDocWriter,out);
|
|
}
|
|
}
|
|
dxfDocWriter.save(filePath, true);
|
|
dxfDocWriter.save(filePath, true);
|
|
}
|
|
}
|
|
|
|
|
|
- public static void drawLinePoint(String filePath,FdPoints point,FdPoints point2,DxfDocWriter dxfDocWriter){
|
|
|
|
-
|
|
|
|
|
|
+ public static void drawLinePoint(String filePath,FdPoints point,FdPoints point2,DxfDocWriter dxfDocWriter,Boolean out){
|
|
DxfLine dxfLine = new DxfLine();
|
|
DxfLine dxfLine = new DxfLine();
|
|
dxfLine.setStartPoint(new Vector3(point.getX(), point.getY(), 0));
|
|
dxfLine.setStartPoint(new Vector3(point.getX(), point.getY(), 0));
|
|
dxfLine.setEndPoint(new Vector3(point2.getX(), point2.getY(), 0));
|
|
dxfLine.setEndPoint(new Vector3(point2.getX(), point2.getY(), 0));
|
|
- dxfLine.setColor(Color.GREEN);
|
|
|
|
|
|
+ dxfLine.setColor(new Color(0, 180, 64));
|
|
|
|
+ if(out){
|
|
|
|
+ dxfLine.setColor(new Color(0, 255, 0));
|
|
|
|
+ }
|
|
dxfDocWriter.addEntity(dxfLine);
|
|
dxfDocWriter.addEntity(dxfLine);
|
|
-
|
|
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|