!2291 优化:自定义编号视觉下,隐藏排钻

pull/2296/head
林三 1 year ago committed by ChenX
parent 3f90b4ced3
commit fe3c36047e

@ -1,4 +1,4 @@
import { BufferGeometry, CylinderBufferGeometry, Float32BufferAttribute, LineSegments, Matrix3, Matrix4, Mesh, Object3D, Shape as TShape, Vector3 } from "three";
import { BufferGeometry, CylinderBufferGeometry, Float32BufferAttribute, FrontSide, LineSegments, Matrix3, Matrix4, Mesh, Object3D, Shape as TShape, Vector3 } from "three";
import { ColorMaterial } from '../../Common/ColorPalette';
import { DisposeThreeObj, Object3DRemoveAll } from '../../Common/Dispose';
import { FixIndex } from "../../Common/Utils";
@ -170,6 +170,9 @@ export class CylinderHole extends Hole
{
if (renderType === RenderType.Wireframe)
return new LineSegments(this.EdgeGeometry, ColorMaterial.GetLineMaterial(this.ColorIndex));
else if (renderType === RenderType.CustomNumber)
return;//不绘制了
// return new Mesh(this.MeshGeometry, ColorMaterial.GetConceptualMaterial(this.ColorIndex, FrontSide, true));
else
return new Mesh(this.MeshGeometry, ColorMaterial.GetConceptualMaterial(this.ColorIndex));
}
@ -191,7 +194,10 @@ export class CylinderHole extends Hole
else
{
let mesh = obj as Mesh;
mesh.material = ColorMaterial.GetConceptualMaterial(this.ColorIndex);
if (type === RenderType.CustomNumber)
mesh.material = ColorMaterial.GetConceptualMaterial(this.ColorIndex, FrontSide, true);
else
mesh.material = ColorMaterial.GetConceptualMaterial(this.ColorIndex);
}
}

Loading…
Cancel
Save