修复:二维刀路在二维线框模式下更新问题 fix #I7RJ39

pull/2356/MERGE
ChenX 1 year ago
parent 1cbd4ee182
commit a065e5b0be

@ -1360,6 +1360,8 @@ export class Board extends ExtrudeSolid
} }
//#endregion //#endregion
protected get Has2DPath() { return this._2DModelingList.length > 0; }
//二维刀路切割后返回几何体 //二维刀路切割后返回几何体
override UpdateMeshGeom(geo: Geometry): BufferGeometry override UpdateMeshGeom(geo: Geometry): BufferGeometry
{ {

@ -1978,6 +1978,8 @@ export class ExtrudeSolid extends Entity
return geo as BufferGeometry; return geo as BufferGeometry;
} }
protected get Has2DPath() { return false; }
protected _EdgeGeometry: EdgesGeometry | BufferGeometry; protected _EdgeGeometry: EdgesGeometry | BufferGeometry;
get EdgeGeometry() get EdgeGeometry()
{ {
@ -1991,7 +1993,7 @@ export class ExtrudeSolid extends Entity
return this._EdgeGeometry; return this._EdgeGeometry;
//这里我们超过100就用这个,为了性能 和MaxDrawGrooveCount不一致 //这里我们超过100就用这个,为了性能 和MaxDrawGrooveCount不一致
if (this.grooves.length > 100 || this.grooves.every(g => equaln(g.thickness, this.thickness)) || this.grooves.length === 0) if (this.grooves.length > 100 || this.grooves.every(g => equaln(g.thickness, this.thickness)) || (this.grooves.length === 0 && !this.Has2DPath))
{ {
let coords = FastExtrudeEdgeGeometry(this, this.ColorIndex, 12, true); let coords = FastExtrudeEdgeGeometry(this, this.ColorIndex, 12, true);
let edgeGeo = new BufferGeometry(); let edgeGeo = new BufferGeometry();

Loading…
Cancel
Save