!1208 优化:降低槽判断精度

pull/1208/MERGE
ZoeLeeFZ 4 years ago committed by ChenX
parent d1b689c0f4
commit 32c828df65

@ -177,7 +177,7 @@ export class ExtrudeHole extends Hole
private GeneralMeshGeometry()
{
let extrudeSettings: ExtrudeGeometryOptions = {
curveSegments: 4, //保持和板件圆孔的段数一样
curveSegments: 12,
steps: 1,
bevelEnabled: false,
depth: this.Height,

@ -1063,6 +1063,7 @@ export class ExtrudeSolid extends Entity
g1.ContourCurve.ApplyMatrix(alm);//破坏它
let box = g1.ContourCurve.BoundingBox;
let size = box.getSize(new Vector3);
if (equaln(size.x, 0, 1e-2) || equaln(size.y, 0, 1e-2)) continue;
//构造新槽
let g2 = new ExtrudeSolid().ConverToRectSolid(size.y, g1.Thickness, size.x);
@ -1087,7 +1088,7 @@ export class ExtrudeSolid extends Entity
*/
GrooveCheckPosition(target: ExtrudeSolid): Status
{
if (target.Width < 1e-3 || target.Height < 1e-3 || target.Thickness < 1e-3)
if (target.Width < 1e-2 || target.Height < 1e-2 || target.Thickness < 1e-2)
return Status.False;
let tp = target.Position.applyMatrix4(this.OCSInv);
@ -1492,8 +1493,8 @@ export class ExtrudeSolid extends Entity
meshs.push(e2.MeshGeometry.applyMatrix4(diff));
edges.push(e2.EdgeGeometry.applyMatrix4(diff));
this.__CacheVolume__ += e2.Volume;
}
}
if (output.length === 1)
{
this._MeshGeometry = tempExtrude.MeshGeometry;

Loading…
Cancel
Save