|
|
|
@ -1,9 +1,9 @@
|
|
|
|
|
import { Face3, Geometry, Matrix4, Mesh, MeshNormalMaterial, Object3D, ShapeUtils, Vector2, Vector3 } from "three";
|
|
|
|
|
import { Box3, Face3, Geometry, Matrix4, Mesh, MeshNormalMaterial, Object3D, ShapeUtils, Vector2, Vector3 } from "three";
|
|
|
|
|
import { ColorMaterial } from "../../Common/ColorPalette";
|
|
|
|
|
import { Object3DRemoveAll } from "../../Common/Dispose";
|
|
|
|
|
import { clamp, FixIndex } from "../../Common/Utils";
|
|
|
|
|
import { ObjectSnapMode } from "../../Editor/ObjectSnapMode";
|
|
|
|
|
import { angle, AsVector2, equaln, equalv3, ZeroVec, YAxis, isParallelTo } from "../../Geometry/GeUtils";
|
|
|
|
|
import { angle, AsVector2, equaln, equalv3, isParallelTo, YAxis, ZeroVec } from "../../Geometry/GeUtils";
|
|
|
|
|
import { Matrix2 } from "../../Geometry/Matrix2";
|
|
|
|
|
import { Orbit } from "../../Geometry/Orbit";
|
|
|
|
|
import { RenderType } from "../../GraphicsSystem/RenderType";
|
|
|
|
@ -147,6 +147,22 @@ export class RevolveSolid extends Entity
|
|
|
|
|
|
|
|
|
|
private _MeshGeometry: Geometry;
|
|
|
|
|
|
|
|
|
|
get BoundingBox()
|
|
|
|
|
{
|
|
|
|
|
let geom = this.MeshGeometry;
|
|
|
|
|
|
|
|
|
|
if (!geom)
|
|
|
|
|
{
|
|
|
|
|
console.error("RevolveSolid无法建模");
|
|
|
|
|
return new Box3;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!geom.boundingBox)
|
|
|
|
|
geom.computeBoundingBox();
|
|
|
|
|
|
|
|
|
|
return geom.boundingBox.clone().applyMatrix4(this._Matrix);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private _CacheContourPoints: Vector2[];//轮廓2D点
|
|
|
|
|
private _CacheContourPoints3D: Vector3[];//轮廓3D点
|
|
|
|
|
|
|
|
|
|