!982 优化:增强板件捕捉

* fixes #I1FL9G
pull/982/MERGE
ZoeLeeFZ 4 years ago committed by ChenX
parent ea0707c402
commit 63e7511c80

@ -1,4 +1,4 @@
import { BoxGeometry, BufferGeometry, ExtrudeGeometry, ExtrudeGeometryOptions, Line, LineSegments, Matrix3, Matrix4, Mesh, Object3D, Path, Vector3 } from "three";
import { BoxGeometry, BufferGeometry, ExtrudeGeometry, ExtrudeGeometryOptions, LineSegments, Matrix3, Matrix4, Mesh, Object3D, Path, Vector3, Line as TLine } from "three";
import { Line2 } from "three/examples/jsm/lines/Line2";
import { arrayClone, arrayLast, arrayRemoveIf, arraySortByNumber, arraySum } from "../../Common/ArrayExt";
import { ColorMaterial } from "../../Common/ColorPalette";
@ -37,6 +37,7 @@ import { Ellipse } from "./Ellipse";
import { Entity } from "./Entity";
import { Polyline } from "./Polyline";
import { Region } from "./Region";
import { Line } from "./Line";
export type ExtureContourCurve = Polyline | Circle;
export type ExtureContour = Polyline | Circle | ExtrudeSolid | Region;
@ -597,7 +598,15 @@ export class ExtrudeSolid extends Entity
pts.push(
...contour.GetObjectSnapPoints(snapMode, pickPoint, lastPoint, viewXform)
);
let ps = this.contourCurve.GetStretchPoints();
for (let p of ps)
{
let l = new Line(p, p.clone().setZ(this.thickness));
l.ApplyMatrix(this.OCS);
pts.push(
...l.GetObjectSnapPoints(snapMode, pickPoint, lastPoint, viewXform)
);
}
for (let g of this.grooves)
pts.push(...g.GetObjectSnapPoints(snapMode, pickPoint, lastPoint, viewXform));
@ -1608,7 +1617,7 @@ export class ExtrudeSolid extends Entity
{
if (renderType === RenderType.Wireframe)
{
let l = obj as Line;
let l = obj as TLine;
l.material = ColorMaterial.GetLineMaterial(this.ColorIndex);
}
else if (renderType === RenderType.Conceptual)

Loading…
Cancel
Save