|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
import { Geom3 } from '@jscad/modeling/src/geometries/types';
|
|
|
|
|
import Flatbush from 'flatbush';
|
|
|
|
|
import { Box3, BoxGeometry, BufferGeometry, ExtrudeGeometry, ExtrudeGeometryOptions, Float32BufferAttribute, FrontSide, Frustum, Geometry, Group, InstancedInterleavedBuffer, InterleavedBufferAttribute, LineSegments, Matrix3, Matrix4, Mesh, Object3D, Line as TLine, UVGenerator, Vector3 } from "three";
|
|
|
|
|
import { Box3, BoxGeometry, BufferGeometry, ExtrudeGeometry, ExtrudeGeometryOptions, Float32BufferAttribute, FrontSide, Frustum, Geometry, Group, InstancedInterleavedBuffer, InterleavedBufferAttribute, LineSegments, Material, Matrix3, Matrix4, Mesh, Object3D, Line as TLine, UVGenerator, Vector3 } from "three";
|
|
|
|
|
import { Line2 } from "three/examples/jsm/lines/Line2";
|
|
|
|
|
import { LineGeometry } from "three/examples/jsm/lines/LineGeometry";
|
|
|
|
|
import { arrayClone, arrayLast, arrayPushArray, arrayRemoveIf, arrayRemoveOnce, arraySortByNumber, arraySum } from "../../Common/ArrayExt";
|
|
|
|
@ -1692,7 +1692,7 @@ export class ExtrudeSolid extends Entity
|
|
|
|
|
else if (renderType === RenderType.Conceptual)
|
|
|
|
|
{
|
|
|
|
|
return new Object3D().add(
|
|
|
|
|
new Mesh(this.MeshGeometry, ColorMaterial.GetConceptualMaterial(this.DrawColorIndex, FrontSide, true, this.Freeze)),
|
|
|
|
|
new Mesh(this.MeshGeometry, this.GetConceptualMaterial()),
|
|
|
|
|
new LineSegments(this.EdgeGeometry, ColorMaterial.GetConceptualEdgeMaterial())
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
@ -2130,7 +2130,7 @@ export class ExtrudeSolid extends Entity
|
|
|
|
|
else if (renderType === RenderType.Conceptual)
|
|
|
|
|
{
|
|
|
|
|
return obj.add(
|
|
|
|
|
new Mesh(this.MeshGeometry, ColorMaterial.GetConceptualMaterial(this.DrawColorIndex, FrontSide, true, this.Freeze)),
|
|
|
|
|
new Mesh(this.MeshGeometry, this.GetConceptualMaterial()),
|
|
|
|
|
new LineSegments(this.EdgeGeometry, ColorMaterial.GetConceptualEdgeMaterial())
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
@ -2185,7 +2185,7 @@ export class ExtrudeSolid extends Entity
|
|
|
|
|
else if (renderType === RenderType.Conceptual)
|
|
|
|
|
{
|
|
|
|
|
let mesh = obj.children[0] as Mesh;
|
|
|
|
|
mesh.material = ColorMaterial.GetConceptualMaterial(this.DrawColorIndex, FrontSide, true, this.Freeze);
|
|
|
|
|
mesh.material = this.GetConceptualMaterial();
|
|
|
|
|
}
|
|
|
|
|
else if (renderType === RenderType.Physical2)
|
|
|
|
|
{
|
|
|
|
@ -2198,6 +2198,18 @@ export class ExtrudeSolid extends Entity
|
|
|
|
|
mesh.material = this.MeshMaterial;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//获取概念视图材质 冻结状态使用257色号 半透明
|
|
|
|
|
private GetConceptualMaterial()
|
|
|
|
|
{
|
|
|
|
|
let mtl: Material;
|
|
|
|
|
if (this.Freeze)
|
|
|
|
|
mtl = ColorMaterial.GetBasicMaterialTransparent2(257, 0.5);
|
|
|
|
|
else
|
|
|
|
|
mtl = ColorMaterial.GetConceptualMaterial(this.DrawColorIndex, FrontSide, true);
|
|
|
|
|
|
|
|
|
|
return mtl;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private GetModelGroove()
|
|
|
|
|
{
|
|
|
|
|
const grooves: ExtrudeSolid[] = [];
|
|
|
|
@ -2218,7 +2230,7 @@ export class ExtrudeSolid extends Entity
|
|
|
|
|
|
|
|
|
|
const meshGeo = grooveClone.MeshGeometry;
|
|
|
|
|
meshGeo.applyMatrix4(mtx);
|
|
|
|
|
const mesh = new Mesh(meshGeo, ColorMaterial.GetConceptualMaterial(1, FrontSide, true, this.Freeze, 0.6));
|
|
|
|
|
const mesh = new Mesh(meshGeo, ColorMaterial.GetConceptualMaterial(1, 0.6));
|
|
|
|
|
group.add(mesh, line);
|
|
|
|
|
}
|
|
|
|
|
return group;
|
|
|
|
|