Compare commits

...

4 Commits

Author SHA1 Message Date
xief
f60054ca19 修改自定义编号判断 2023-07-31 17:57:16 +08:00
xief
a55986761e 修复autocad显示错误 2023-07-27 11:22:48 +08:00
xief
e5b944539e 修复双面编号问题 2023-07-18 09:19:03 +08:00
xief
27dd548309 替换问题数据源 2023-07-17 16:17:32 +08:00
4 changed files with 177 additions and 592 deletions

View File

@ -1,5 +1,5 @@
import * as THREE from 'three';
import { LineBasicMaterial, MeshBasicMaterial, Color } from 'three';
import { Color, LineBasicMaterial, MeshBasicMaterial } from 'three';
const ColorPalette = [
[255, 0, 0, 255], //----- 0 - lets make it red for an example
//[255, 255, 255, 255],//----- 0 - ByBlock - White
@ -284,7 +284,7 @@ export class ColorMaterial
{
if (this.m_BasicMaterialMap.has(index))
return this.m_BasicMaterialMap.get(index);
let mat = new MeshBasicMaterial({ color: this.GetColor(index) });
let mat = new MeshBasicMaterial({ color: this.GetColor(index), side: THREE.DoubleSide });
this.m_BasicMaterialMap.set(index, mat);
return mat;
}

View File

@ -89,8 +89,8 @@ export class SimpleBoard
pts.push(new Vector2(0, 0),
new Vector2(this.width, 0),
new Vector2(this.width, length),
new Vector2(0, length),
new Vector2(this.width, this.height),
new Vector2(0, this.height),
new Vector2(0, 0)
);
buls.push(0, 0, 0, 0, 0);
@ -178,7 +178,7 @@ export class SimpleBoard
text.applyMatrix4(new Matrix4().setPosition(position));
}
text.CreateDoubleMesh(this._BoardType === BoardType.Layer);
// text.CreateDoubleMesh(this._BoardType === BoardType.Layer);
return text;
}

View File

@ -1,62 +1,197 @@
[
{
"L": 875,
"W": 560,
"H": 18.5,
"CabName": "客厅",
"BoardName": "左侧板",
"DataID": 3996018,
"OrderNo": 20230727027642,
"L": 800,
"W": 600,
"H": 18,
"BoardName": "层板",
"Grain": 0,
"BoardType": 0,
"CustomNumber": "",
"BasePoint": {
"x": 6154.77834988623,
"y": 224.38394523692736,
"z": 1399.4464813779712
"x": 1877.02062480031,
"y": -1.77635683940025e-13,
"z": 823.651271182857
},
"XVec": {
"x": 0,
"x": 2.22044604925031e-16,
"y": 1,
"z": 0
},
"YVec": {
"x": -1,
"y": 2.22044604925031e-16,
"z": 0
},
"ZVec": {
"x": 0,
"y": 0,
"z": 1
},
"Pts": [],
"Buls": [],
"SubBoardLocal": [],
"SubBoardAssoc": [],
"Drillings": [
{
"x": 50,
"y": 766,
"r": 7.5,
"h": 13.5,
"f": 0
},
{
"x": 300,
"y": 766,
"r": 7.5,
"h": 13.5,
"f": 0
},
{
"x": 550,
"y": 766,
"r": 7.5,
"h": 13.5,
"f": 0
},
{
"x": 550,
"y": 34,
"r": 7.5,
"h": 13.5,
"f": 0
},
{
"x": 300,
"y": 34,
"r": 7.5,
"h": 13.5,
"f": 0
},
{
"x": 50,
"y": 34,
"r": 7.5,
"h": 13.5,
"f": 0
}
]
},
{
"DataID": 3996019,
"OrderNo": 20230727027642,
"L": 1200,
"W": 600,
"H": 18,
"BoardName": "右侧板",
"Grain": 0,
"BoardType": 0,
"CustomNumber": "",
"BasePoint": {
"x": 1895.02062480031,
"y": 0,
"z": 214.651271182857
},
"XVec": {
"x": 4.93038065763132e-32,
"y": 1,
"z": -2.22044604925031e-16
},
"YVec": {
"x": -2.22044604925031e-16,
"y": 2.22044604925031e-16,
"z": 1
},
"ZVec": {
"x": 1,
"y": 0,
"z": 0
"z": 2.22044604925031e-16
},
"Pts": [
"Pts": [],
"Buls": [],
"SubBoardLocal": [],
"SubBoardAssoc": [],
"Drillings": [
{
"x": 0,
"y": 0
"x": 550,
"y": 600,
"r": 5,
"h": 13.5,
"f": 1
},
{
"x": 560,
"y": 0
"x": 300,
"y": 600,
"r": 5,
"h": 13.5,
"f": 1
},
{
"x": 560,
"y": 875
},
{
"x": 0,
"y": 875
},
{
"x": 0,
"y": 0
"x": 50,
"y": 600,
"r": 5,
"h": 13.5,
"f": 1
}
],
"Buls": [
0,
0,
0,
0,
0
],
"DataID": 3988993,
"Drillings": [],
"BoardType": 1,
"CustomNumber": 1
]
},
{
"DataID": 3996020,
"OrderNo": 20230727027642,
"L": 1200,
"W": 600,
"H": 18,
"BoardName": "左侧板",
"Grain": 0,
"BoardType": 0,
"CustomNumber": "",
"BasePoint": {
"x": 1077.02062480031,
"y": 0,
"z": 214.651271182857
},
"XVec": {
"x": 4.93038065763132e-32,
"y": 1,
"z": -2.22044604925031e-16
},
"YVec": {
"x": -2.22044604925031e-16,
"y": 2.22044604925031e-16,
"z": 1
},
"ZVec": {
"x": 1,
"y": 0,
"z": 2.22044604925031e-16
},
"Pts": [],
"Buls": [],
"SubBoardLocal": [],
"SubBoardAssoc": [],
"Drillings": [
{
"x": 50,
"y": 600,
"r": 5,
"h": 13.5,
"f": 0
},
{
"x": 300,
"y": 600,
"r": 5,
"h": 13.5,
"f": 0
},
{
"x": 550,
"y": 600,
"r": 5,
"h": 13.5,
"f": 0
}
]
}
]

View File

@ -1,550 +0,0 @@
export var data =
[
{
"L": 100.0,
"W": 800.0,
"H": 18.0,
"BasePoint": {
"x": 2076.407626150509,
"y": 1942.2104819571228,
"z": 1882.0
},
"XVec": {
"x": 1.0,
"y": 4.930380657631324e-32,
"z": -2.220446049250313e-16
},
"YVec": {
"x": 2.220446049250313e-16,
"y": 2.220446049250313e-16,
"z": 1.0
},
"ZVec": {
"x": 9.860761315262648e-32,
"y": -1.0,
"z": 2.220446049250313e-16
},
"Pts": [
{
"x": 2076.407626150509,
"y": 1942.2104819571228,
"z": 1882.0
},
{
"x": 2876.407626150509,
"y": 1942.2104819571228,
"z": 1881.9999999999998
},
{
"x": 2876.407626150509,
"y": 1942.2104819571228,
"z": 1981.9999999999998
},
{
"x": 2076.407626150509,
"y": 1942.2104819571228,
"z": 1982.0
},
{
"x": 2076.407626150509,
"y": 1942.2104819571228,
"z": 1882.0
}
],
"Buls": [
0.0,
0.0,
0.0,
0.0,
0.0
],
"SubBoardLocal": [],
"SubBoardAssoc": []
},
{
"L": 800.0,
"W": 100.00000000000068,
"H": 18.0,
"MaterialId": "EE",
"BasePoint": {
"x": 2876.407626150509,
"y": 1960.2104819571226,
"z": 1900.0000000000005
},
"XVec": {
"x": 4.440892098500626e-16,
"y": 1.0,
"z": 2.2204460492503124e-16
},
"YVec": {
"x": -1.0,
"y": 4.440892098500626e-16,
"z": 2.220446049250314e-16
},
"ZVec": {
"x": 2.220446049250313e-16,
"y": -2.220446049250313e-16,
"z": 1.0
},
"Handle": "293",
"CabName": "1.标准柜上梁1",
"BoardName": "",
"Grain": 0,
"Pts": [
{
"x": 2876.407626150509,
"y": 1960.2104819571228,
"z": 1900.0000000000005
},
{
"x": 2876.407626150509,
"y": 2060.210481957123,
"z": 1900.0000000000005
},
{
"x": 2076.407626150509,
"y": 2060.210481957123,
"z": 1900.0000000000005
},
{
"x": 2076.407626150509,
"y": 1960.210481957123,
"z": 1900.0000000000005
},
{
"x": 2876.407626150509,
"y": 1960.2104819571228,
"z": 1900.0000000000005
}
],
"Buls": [
0.0,
0.0,
0.0,
0.0,
0.0
],
"SubBoardLocal": [],
"SubBoardAssoc": []
},
{
"L": 1899.9999999999998,
"W": 800.0,
"H": 18.0,
"MaterialId": "EE",
"BasePoint": {
"x": 2076.407626150509,
"y": 2060.2104819571225,
"z": -1.816324868286756e-13
},
"XVec": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"YVec": {
"x": 0.0,
"y": 4.440892098500626e-16,
"z": 1.0
},
"ZVec": {
"x": 0.0,
"y": -1.0,
"z": 4.440892098500626e-16
},
"Handle": "291",
"CabName": "1.标准柜上梁1",
"BoardName": "背板",
"Grain": 0,
"Pts": [
{
"x": 2076.407626150509,
"y": 2060.2104819571225,
"z": -1.021405182655144e-13
},
{
"x": 2876.407626150509,
"y": 2060.2104819571225,
"z": -1.816324868286756e-13
},
{
"x": 2876.407626150509,
"y": 2060.210481957123,
"z": 1899.9999999999996
},
{
"x": 2076.407626150509,
"y": 2060.210481957123,
"z": 1899.9999999999998
},
{
"x": 2076.407626150509,
"y": 2060.2104819571225,
"z": -1.021405182655144e-13
}
],
"Buls": [
0.0,
0.0,
0.0,
0.0,
0.0
],
"SubBoardLocal": [],
"SubBoardAssoc": []
},
{
"L": 800.0,
"W": 482.0000000000002,
"H": 18.0,
"MaterialId": "EE",
"BasePoint": {
"x": 2876.407626150509,
"y": 1578.210481957122,
"z": 97.99999999999999
},
"XVec": {
"x": 4.440892098500626e-16,
"y": 1.0,
"z": 0.0
},
"YVec": {
"x": -1.0,
"y": 4.440892098500626e-16,
"z": 0.0
},
"ZVec": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"Handle": "290",
"CabName": "1.标准柜上梁1",
"BoardName": "底板",
"Grain": 0,
"Pts": [
{
"x": 2876.407626150509,
"y": 1578.210481957122,
"z": 97.99999999999999
},
{
"x": 2876.407626150509,
"y": 2060.2104819571225,
"z": 97.99999999999999
},
{
"x": 2076.407626150509,
"y": 2060.2104819571225,
"z": 97.99999999999999
},
{
"x": 2076.407626150509,
"y": 1578.2104819571226,
"z": 97.99999999999999
},
{
"x": 2876.407626150509,
"y": 1578.210481957122,
"z": 97.99999999999999
}
],
"Buls": [
0.0,
0.0,
0.0,
0.0,
0.0
],
"SubBoardLocal": [],
"SubBoardAssoc": []
},
{
"L": 80.0,
"W": 800.0,
"H": 18.0,
"MaterialId": "EE",
"BasePoint": {
"x": 2076.407626150509,
"y": 1578.2104819571223,
"z": 0.0
},
"XVec": {
"x": 1.0,
"y": 0.0,
"z": 0.0
},
"YVec": {
"x": 0.0,
"y": 4.440892098500626e-16,
"z": 1.0
},
"ZVec": {
"x": 0.0,
"y": -1.0,
"z": 4.440892098500626e-16
},
"Handle": "28E",
"CabName": "1.标准柜上梁1",
"BoardName": "地脚线",
"Grain": 1,
"Pts": [
{
"x": 2076.407626150509,
"y": 1578.2104819571223,
"z": 0.0
},
{
"x": 2876.407626150509,
"y": 1578.2104819571223,
"z": 0.0
},
{
"x": 2876.407626150509,
"y": 1578.2104819571223,
"z": 80.0
},
{
"x": 2076.407626150509,
"y": 1578.2104819571223,
"z": 80.0
},
{
"x": 2076.407626150509,
"y": 1578.2104819571223,
"z": 0.0
}
],
"Buls": [
0.0,
0.0,
0.0,
0.0,
0.0
],
"SubBoardLocal": [],
"SubBoardAssoc": []
},
{
"L": 800.0,
"W": 482.0,
"H": 18.0,
"MaterialId": "EE",
"BasePoint": {
"x": 2876.4076261505085,
"y": 1478.210481957122,
"z": 1999.9999999999996
},
"XVec": {
"x": 4.440892098500626e-16,
"y": 1.0,
"z": 0.0
},
"YVec": {
"x": -1.0,
"y": 4.440892098500626e-16,
"z": 0.0
},
"ZVec": {
"x": 0.0,
"y": 0.0,
"z": 1.0
},
"Handle": "28C",
"CabName": "1.标准柜上梁1",
"BoardName": "顶板",
"Grain": 0,
"Pts": [
{
"x": 2076.407626150509,
"y": 1960.2104819571223,
"z": 1999.9999999999996
},
{
"x": 2076.407626150509,
"y": 1478.2104819571226,
"z": 1999.9999999999996
},
{
"x": 2876.407626150509,
"y": 1478.210481957122,
"z": 1999.9999999999996
},
{
"x": 2876.4076261505085,
"y": 1960.210481957122,
"z": 1999.9999999999996
},
{
"x": 2076.407626150509,
"y": 1960.2104819571223,
"z": 1999.9999999999996
}
],
"Buls": [
0.0,
0.0,
0.0,
0.0,
0.0
],
"SubBoardLocal": [],
"SubBoardAssoc": []
},
{
"L": 1999.9999999999996,
"W": 600.0,
"H": 18.0,
"MaterialId": "EE",
"BasePoint": {
"x": 2894.4076261505094,
"y": 1478.2104819571223,
"z": -2.2737367544323197e-13
},
"XVec": {
"x": 4.930380657631324e-32,
"y": 1.0,
"z": -2.220446049250313e-16
},
"YVec": {
"x": -2.220446049250313e-16,
"y": 2.220446049250313e-16,
"z": 1.0
},
"ZVec": {
"x": 1.0,
"y": 0.0,
"z": 2.220446049250313e-16
},
"Handle": "28B",
"CabName": "1.标准柜上梁1",
"BoardName": "右侧板",
"Grain": 0,
"Pts": [
{
"x": 2894.407626150509,
"y": 1960.2104819571228,
"z": 1899.9999999999989
},
{
"x": 2894.407626150509,
"y": 1960.2104819571228,
"z": 1999.9999999999994
},
{
"x": 2894.407626150509,
"y": 1478.2104819571228,
"z": 1999.9999999999994
},
{
"x": 2894.4076261505094,
"y": 1478.2104819571223,
"z": -1.816324868286755e-13
},
{
"x": 2894.4076261505094,
"y": 2078.2104819571225,
"z": -6.274980535181384e-13
},
{
"x": 2894.407626150509,
"y": 2078.2104819571229,
"z": 1899.9999999999973
},
{
"x": 2894.407626150509,
"y": 1960.2104819571228,
"z": 1899.9999999999989
}
],
"Buls": [
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0
],
"SubBoardLocal": [],
"SubBoardAssoc": []
},
{
"L": 1999.9999999999996,
"W": 600.0,
"H": 18.0,
"MaterialId": "EE",
"BasePoint": {
"x": 2076.4076261505094,
"y": 1478.2104819571223,
"z": 1.0097419586828951e-28
},
"XVec": {
"x": 4.930380657631324e-32,
"y": 1.0,
"z": -2.220446049250313e-16
},
"YVec": {
"x": -2.220446049250313e-16,
"y": 2.220446049250313e-16,
"z": 1.0
},
"ZVec": {
"x": 1.0,
"y": 0.0,
"z": 2.220446049250313e-16
},
"Handle": "288",
"CabName": "1.标准柜上梁1",
"BoardName": "左侧板",
"Grain": 0,
"Pts": [
{
"x": 2076.407626150509,
"y": 1960.2104819571228,
"z": 1899.999999999999
},
{
"x": 2076.407626150509,
"y": 1960.2104819571228,
"z": 1999.9999999999996
},
{
"x": 2076.407626150509,
"y": 1478.2104819571228,
"z": 1999.9999999999996
},
{
"x": 2076.4076261505094,
"y": 1478.2104819571223,
"z": 1.0097419586828951e-28
},
{
"x": 2076.4076261505094,
"y": 2078.2104819571225,
"z": -4.4586556668946279e-13
},
{
"x": 2076.407626150509,
"y": 2078.2104819571229,
"z": 1899.9999999999978
},
{
"x": 2076.407626150509,
"y": 1960.2104819571228,
"z": 1899.999999999999
}
],
"Buls": [
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0
],
"SubBoardLocal": [],
"SubBoardAssoc": []
}
]