刀路冗余优化
This commit is contained in:
parent
79f0351ae8
commit
ed08696189
99
api.cjs.js
99
api.cjs.js
@ -144,6 +144,7 @@ var RenderType;
|
||||
RenderType[RenderType["PlaceFace"] = 8] = "PlaceFace";
|
||||
RenderType[RenderType["BigHoleFace"] = 81] = "BigHoleFace";
|
||||
RenderType[RenderType["CustomNumber"] = 9] = "CustomNumber";
|
||||
RenderType[RenderType["ModelGroove"] = 10] = "ModelGroove";
|
||||
/******************************************** 在视口时的渲染模式 */
|
||||
/**
|
||||
* 线框模式
|
||||
@ -3160,7 +3161,7 @@ class ColorMaterial {
|
||||
this._BasicDoubleSideMaterialMap.set(color, mtl);
|
||||
return mtl;
|
||||
}
|
||||
static GetConceptualMaterial(color, side = three.FrontSide, enableTransparent = false, freeze = false) {
|
||||
static GetConceptualMaterial(color, side = three.FrontSide, enableTransparent = false, freeze = false, opacity) {
|
||||
if (freeze)
|
||||
color = 257;
|
||||
let key = `${color},${side},${enableTransparent ? 1 : 0}`;
|
||||
@ -3173,7 +3174,14 @@ class ColorMaterial {
|
||||
get: () => mtl.uniforms.opacity.value !== 1
|
||||
});
|
||||
Object.defineProperty(mtl.uniforms.opacity, "value", {
|
||||
get: () => freeze ? 0.5 : HostApplicationServices.ConceptualOpacity
|
||||
get: () => {
|
||||
let conceptualOpacity = HostApplicationServices.ConceptualOpacity;
|
||||
if (freeze)
|
||||
conceptualOpacity = 0.5;
|
||||
else if (opacity)
|
||||
conceptualOpacity = opacity;
|
||||
return conceptualOpacity;
|
||||
}
|
||||
});
|
||||
}
|
||||
this._ConceptualMaterial.set(key, mtl);
|
||||
@ -11876,7 +11884,7 @@ let CylinderHole = CylinderHole_1 = class CylinderHole extends Hole {
|
||||
GetObject3DByRenderType(renderType) {
|
||||
if (renderType === RenderType.Wireframe)
|
||||
return new three.LineSegments(this.EdgeGeometry, ColorMaterial.GetLineMaterial(this.ColorIndex));
|
||||
else if (renderType === RenderType.CustomNumber)
|
||||
else if (renderType === RenderType.CustomNumber || renderType === RenderType.ModelGroove)
|
||||
return; //不绘制了
|
||||
// return new Mesh(this.MeshGeometry, ColorMaterial.GetConceptualMaterial(this.ColorIndex, FrontSide, true));
|
||||
else
|
||||
@ -11894,7 +11902,7 @@ let CylinderHole = CylinderHole_1 = class CylinderHole extends Hole {
|
||||
}
|
||||
else {
|
||||
let mesh = obj;
|
||||
if (type === RenderType.CustomNumber)
|
||||
if (type === RenderType.CustomNumber || type === RenderType.ModelGroove)
|
||||
mesh.material = ColorMaterial.GetConceptualMaterial(this.ColorIndex, three.FrontSide, true);
|
||||
else
|
||||
mesh.material = ColorMaterial.GetConceptualMaterial(this.ColorIndex);
|
||||
@ -13574,6 +13582,11 @@ const DefaultChangeColorByRoomOrCabinetOption = {
|
||||
accordRoomName: true
|
||||
};
|
||||
Object.freeze(DefaultChangeColorByRoomOrCabinetOption);
|
||||
const DefaultDoorRelatesInfoOption = {
|
||||
version: 1,
|
||||
hingeOption: []
|
||||
};
|
||||
Object.freeze(DefaultDoorRelatesInfoOption);
|
||||
|
||||
/**
|
||||
* 使用轮廓和扫描路径构建扫描几何体,实现衣柜中的顶线或者地脚线之类的实体.
|
||||
@ -17616,6 +17629,12 @@ let ExtrudeSolid = ExtrudeSolid_1 = class ExtrudeSolid extends Entity {
|
||||
else if (renderType === RenderType.Conceptual) {
|
||||
return obj.add(new three.Mesh(this.MeshGeometry, ColorMaterial.GetConceptualMaterial(this.ColorIndex, three.FrontSide, true, this.Freeze)), new three.LineSegments(this.EdgeGeometry, ColorMaterial.GetConceptualEdgeMaterial()));
|
||||
}
|
||||
else if (renderType === RenderType.ModelGroove) {
|
||||
obj.add(
|
||||
// new Mesh(this.MeshGeometry, ColorMaterial.GetConceptualMaterial(9, FrontSide, true, this.Freeze)),
|
||||
new three.LineSegments(this.EdgeGeometry, ColorMaterial.GetConceptualEdgeMaterial()));
|
||||
obj.add(this.GetModelGroove());
|
||||
}
|
||||
else if (renderType === RenderType.Physical) {
|
||||
let mesh = obj;
|
||||
mesh.geometry = this.MeshGeometry;
|
||||
@ -17656,6 +17675,26 @@ let ExtrudeSolid = ExtrudeSolid_1 = class ExtrudeSolid extends Entity {
|
||||
mesh.material = this.MeshMaterial;
|
||||
}
|
||||
}
|
||||
GetModelGroove() {
|
||||
const grooves = [];
|
||||
for (const sp of this.__CacheSplitExtrudes ?? []) {
|
||||
grooves.push(...sp.grooves);
|
||||
}
|
||||
const group = new three.Group();
|
||||
for (const groove of grooves) {
|
||||
const grooveClone = groove.Clone();
|
||||
grooveClone.UpdateDrawGeometry();
|
||||
const mtx = new three.Matrix4().premultiply(grooveClone.OCSNoClone).premultiply(this.OCSInv);
|
||||
const edgeGeo = grooveClone.EdgeGeometry;
|
||||
edgeGeo.applyMatrix4(mtx);
|
||||
const line = new three.LineSegments(edgeGeo, ColorMaterial.GetLineMaterial(1, this.Freeze));
|
||||
const meshGeo = grooveClone.MeshGeometry;
|
||||
meshGeo.applyMatrix4(mtx);
|
||||
const mesh = new three.Mesh(meshGeo, ColorMaterial.GetConceptualMaterial(1, three.FrontSide, true, this.Freeze, 0.6));
|
||||
group.add(mesh, line);
|
||||
}
|
||||
return group;
|
||||
}
|
||||
UpdateJigMaterial(color = 8) {
|
||||
}
|
||||
//#endregion
|
||||
@ -17830,6 +17869,8 @@ let CompositeEntity = CompositeEntity_1 = class CompositeEntity extends Entity {
|
||||
}
|
||||
UpdateDrawObject(renderType, obj) {
|
||||
Object3DRemoveAll(obj);
|
||||
if (renderType === RenderType.ModelGroove)
|
||||
return;
|
||||
for (let e of this.Entitys) {
|
||||
e.IsEmbedEntity = true;
|
||||
// //内嵌实体在某些时候可能被清理,修复它
|
||||
@ -19473,7 +19514,7 @@ let Board = Board_1 = class Board extends ExtrudeSolid {
|
||||
this._workerCalcedGeom = null; //worker计算后,暂时存入到这里
|
||||
this._async2DPathIng = false;
|
||||
//偏移缓存
|
||||
this._OffsetPathCache = new Map();
|
||||
this.OffsetPathCache = new Map();
|
||||
this.InitBoardData();
|
||||
}
|
||||
/**
|
||||
@ -20328,7 +20369,7 @@ let Board = Board_1 = class Board extends ExtrudeSolid {
|
||||
DisposeThreeObj(this._2DPathDrawObject);
|
||||
this._2DPathDrawObject = undefined;
|
||||
}
|
||||
this._OffsetPathCache.clear();
|
||||
this.OffsetPathCache.clear();
|
||||
}
|
||||
/**
|
||||
* 这个函数生成了二维刀路的csg数组,并且同时生成了_2DPathDrawObject(二维刀路提刀线框显示对象)
|
||||
@ -20473,24 +20514,6 @@ let Board = Board_1 = class Board extends ExtrudeSolid {
|
||||
let mesh = new three.Mesh(shapeGeom, ColorMaterial.GetBasicMaterialDoubleSide(this.PlaceColor));
|
||||
return mesh;
|
||||
}
|
||||
GetOffsetPath(path, item) {
|
||||
if (item.offset === 0) {
|
||||
return path;
|
||||
}
|
||||
else {
|
||||
let cache = this._OffsetPathCache.get(path);
|
||||
if (!cache) {
|
||||
cache = {};
|
||||
this._OffsetPathCache.set(path, cache);
|
||||
}
|
||||
let tempPath = cache[item.offset.toString()];
|
||||
if (!tempPath) {
|
||||
tempPath = path.GetOffsetCurves(item.offset)[0];
|
||||
cache[item.offset.toString()] = tempPath;
|
||||
}
|
||||
return tempPath;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 根据板的信息修改绘制的实体
|
||||
* 1.非拆单板 灰色
|
||||
@ -20622,12 +20645,12 @@ let Board = Board_1 = class Board extends ExtrudeSolid {
|
||||
let pts = super.GetObjectSnapPoints(snapMode, pickPoint, lastPoint, viewXform, frustum);
|
||||
if (snapMode === ObjectSnapMode.End) {
|
||||
for (let vm of this._2DModelingList) {
|
||||
if (!this._OffsetPathCache.has(vm.path))
|
||||
if (!this.OffsetPathCache.has(vm.path))
|
||||
continue;
|
||||
for (let item of vm.items) {
|
||||
if (item.offset === 0)
|
||||
continue;
|
||||
let paths = this._OffsetPathCache.get(vm.path);
|
||||
let paths = this.OffsetPathCache.get(vm.path);
|
||||
let polyline = paths[item.offset.toString()];
|
||||
if (!polyline)
|
||||
continue; //多段线可能偏移失败
|
||||
@ -21615,8 +21638,9 @@ class FeedingToolPath extends Singleton {
|
||||
let offsetDist = 0;
|
||||
let rectInfo = IsRect(outline);
|
||||
while (true) {
|
||||
if ((!isOut || offsetDist >= knifRadius) && rectInfo)
|
||||
if ((!isOut || offsetDist >= knifRadius) && rectInfo) {
|
||||
offsetDist += knifRadius * 2 - redundancyKnif;
|
||||
}
|
||||
else
|
||||
offsetDist += knifRadius;
|
||||
//理论上最大的宽度为1220,所以2000已经是种仁慈.
|
||||
@ -21626,10 +21650,13 @@ class FeedingToolPath extends Singleton {
|
||||
let retCus = [];
|
||||
let tempOffsetCus = GetOffsetCurves(outline, offsetDist * dir, rectInfo);
|
||||
retCus.push(...tempOffsetCus);
|
||||
//最后一次内偏移如果是矩形,需在偏移一个刀半径避免没切到中心
|
||||
//最后一次内偏移如果是矩形
|
||||
if (retCus.length === 0 && rectInfo && offsetDist > knifRadius) {
|
||||
offsetDist -= knifRadius;
|
||||
retCus.push(...GetOffsetCurves(outline, offsetDist * dir, rectInfo));
|
||||
const rectMinLengthHalf = Math.min(rectInfo.size.x, rectInfo.size.y) / 2;
|
||||
//如果最后一个矩形最小边区间一半小于刀半径减去冗余值的一半,则偏移到中心处切一次
|
||||
if (!equaln$1(offsetDist, rectMinLengthHalf, 1e-5) && offsetDist - rectMinLengthHalf - 1e-5 < knifRadius - redundancyKnif / 2) {
|
||||
retCus.push(...GetOffsetCurves(outline, rectMinLengthHalf * dir, rectInfo));
|
||||
}
|
||||
}
|
||||
if (retCus.length === 0)
|
||||
break;
|
||||
@ -21705,7 +21732,7 @@ class FeedingToolPath extends Singleton {
|
||||
return offsetCus;
|
||||
}
|
||||
/**用于测试走刀路径 */
|
||||
TestCalcPath(br, isCd = false) {
|
||||
TestCalcPath(br, isCd = false, rk = 0) {
|
||||
let modelings = br.BoardModeling;
|
||||
let allModeling = GetModelingFromCustomDrill(br);
|
||||
modelings.push(...allModeling.modeling);
|
||||
@ -21718,15 +21745,15 @@ class FeedingToolPath extends Singleton {
|
||||
return true;
|
||||
return false;
|
||||
});
|
||||
return this.CalcPath(modelings, br);
|
||||
return this.CalcPath(modelings, br, rk);
|
||||
}
|
||||
/**
|
||||
* 计算走刀路径
|
||||
*/
|
||||
CalcPath(modelings, br) {
|
||||
CalcPath(modelings, br, rk = 0) {
|
||||
let cus = [];
|
||||
for (let m of modelings) {
|
||||
cus.push(...this.GetModelFeedPath(br, m));
|
||||
cus.push(...this.GetModelFeedPath(br, m, rk));
|
||||
}
|
||||
return cus;
|
||||
}
|
||||
@ -23386,8 +23413,8 @@ function IsPointInPolygon(polyPts, pt) {
|
||||
// if (equalv2(sp, pt, 1e-5) || equalv2(ep, pt, 1e-5))//在起点或者终点
|
||||
// return false;
|
||||
//点位于线上面
|
||||
if (pt.y > Math.max(sp.y, ep.y))
|
||||
continue;
|
||||
// if (pt.y > Math.max(sp.y, ep.y))
|
||||
// continue;
|
||||
//线垂直Y轴
|
||||
let derX = ep.x - sp.x;
|
||||
if (equaln$1(derX, 0, 5e-6)) {
|
||||
|
File diff suppressed because one or more lines are too long
101
api.esm.js
101
api.esm.js
@ -1,4 +1,4 @@
|
||||
import { Vector3, Matrix4, Box3, Color, FrontSide, MeshPhysicalMaterial, Object3D, MathUtils, Vector2 as Vector2$1, Quaternion, LineDashedMaterial, DoubleSide, MeshBasicMaterial, LineBasicMaterial, ShaderMaterial, BufferGeometry, Shape as Shape$1, ShapeGeometry, BufferAttribute, Line as Line$1, Plane, Line3, EllipseCurve, CatmullRomCurve3, Box2 as Box2$1, Path as Path$1, LineSegments, Mesh, CylinderBufferGeometry, Float32BufferAttribute, Geometry, InstancedInterleavedBuffer, InterleavedBufferAttribute, ShapeUtils, Face3, BoxBufferGeometry, ExtrudeGeometry, Euler } from 'three';
|
||||
import { Vector3, Matrix4, Box3, Color, FrontSide, MeshPhysicalMaterial, Object3D, MathUtils, Vector2 as Vector2$1, Quaternion, LineDashedMaterial, DoubleSide, MeshBasicMaterial, LineBasicMaterial, ShaderMaterial, BufferGeometry, Shape as Shape$1, ShapeGeometry, BufferAttribute, Line as Line$1, Plane, Line3, EllipseCurve, CatmullRomCurve3, Box2 as Box2$1, Path as Path$1, LineSegments, Mesh, CylinderBufferGeometry, Float32BufferAttribute, Geometry, InstancedInterleavedBuffer, InterleavedBufferAttribute, ShapeUtils, Face3, BoxBufferGeometry, ExtrudeGeometry, Group, Euler } from 'three';
|
||||
function iaop() { };
|
||||
import { Line2 } from 'three/examples/jsm/lines/Line2';
|
||||
import { LineGeometry } from 'three/examples/jsm/lines/LineGeometry';
|
||||
@ -135,6 +135,7 @@ var RenderType;
|
||||
RenderType[RenderType["PlaceFace"] = 8] = "PlaceFace";
|
||||
RenderType[RenderType["BigHoleFace"] = 81] = "BigHoleFace";
|
||||
RenderType[RenderType["CustomNumber"] = 9] = "CustomNumber";
|
||||
RenderType[RenderType["ModelGroove"] = 10] = "ModelGroove";
|
||||
/******************************************** 在视口时的渲染模式 */
|
||||
/**
|
||||
* 线框模式
|
||||
@ -3151,7 +3152,7 @@ class ColorMaterial {
|
||||
this._BasicDoubleSideMaterialMap.set(color, mtl);
|
||||
return mtl;
|
||||
}
|
||||
static GetConceptualMaterial(color, side = FrontSide, enableTransparent = false, freeze = false) {
|
||||
static GetConceptualMaterial(color, side = FrontSide, enableTransparent = false, freeze = false, opacity) {
|
||||
if (freeze)
|
||||
color = 257;
|
||||
let key = `${color},${side},${enableTransparent ? 1 : 0}`;
|
||||
@ -3164,7 +3165,14 @@ class ColorMaterial {
|
||||
get: () => mtl.uniforms.opacity.value !== 1
|
||||
});
|
||||
Object.defineProperty(mtl.uniforms.opacity, "value", {
|
||||
get: () => freeze ? 0.5 : HostApplicationServices.ConceptualOpacity
|
||||
get: () => {
|
||||
let conceptualOpacity = HostApplicationServices.ConceptualOpacity;
|
||||
if (freeze)
|
||||
conceptualOpacity = 0.5;
|
||||
else if (opacity)
|
||||
conceptualOpacity = opacity;
|
||||
return conceptualOpacity;
|
||||
}
|
||||
});
|
||||
}
|
||||
this._ConceptualMaterial.set(key, mtl);
|
||||
@ -11867,7 +11875,7 @@ let CylinderHole = CylinderHole_1 = class CylinderHole extends Hole {
|
||||
GetObject3DByRenderType(renderType) {
|
||||
if (renderType === RenderType.Wireframe)
|
||||
return new LineSegments(this.EdgeGeometry, ColorMaterial.GetLineMaterial(this.ColorIndex));
|
||||
else if (renderType === RenderType.CustomNumber)
|
||||
else if (renderType === RenderType.CustomNumber || renderType === RenderType.ModelGroove)
|
||||
return; //不绘制了
|
||||
// return new Mesh(this.MeshGeometry, ColorMaterial.GetConceptualMaterial(this.ColorIndex, FrontSide, true));
|
||||
else
|
||||
@ -11885,7 +11893,7 @@ let CylinderHole = CylinderHole_1 = class CylinderHole extends Hole {
|
||||
}
|
||||
else {
|
||||
let mesh = obj;
|
||||
if (type === RenderType.CustomNumber)
|
||||
if (type === RenderType.CustomNumber || type === RenderType.ModelGroove)
|
||||
mesh.material = ColorMaterial.GetConceptualMaterial(this.ColorIndex, FrontSide, true);
|
||||
else
|
||||
mesh.material = ColorMaterial.GetConceptualMaterial(this.ColorIndex);
|
||||
@ -13565,6 +13573,11 @@ const DefaultChangeColorByRoomOrCabinetOption = {
|
||||
accordRoomName: true
|
||||
};
|
||||
Object.freeze(DefaultChangeColorByRoomOrCabinetOption);
|
||||
const DefaultDoorRelatesInfoOption = {
|
||||
version: 1,
|
||||
hingeOption: []
|
||||
};
|
||||
Object.freeze(DefaultDoorRelatesInfoOption);
|
||||
|
||||
/**
|
||||
* 使用轮廓和扫描路径构建扫描几何体,实现衣柜中的顶线或者地脚线之类的实体.
|
||||
@ -17607,6 +17620,12 @@ let ExtrudeSolid = ExtrudeSolid_1 = class ExtrudeSolid extends Entity {
|
||||
else if (renderType === RenderType.Conceptual) {
|
||||
return obj.add(new Mesh(this.MeshGeometry, ColorMaterial.GetConceptualMaterial(this.ColorIndex, FrontSide, true, this.Freeze)), new LineSegments(this.EdgeGeometry, ColorMaterial.GetConceptualEdgeMaterial()));
|
||||
}
|
||||
else if (renderType === RenderType.ModelGroove) {
|
||||
obj.add(
|
||||
// new Mesh(this.MeshGeometry, ColorMaterial.GetConceptualMaterial(9, FrontSide, true, this.Freeze)),
|
||||
new LineSegments(this.EdgeGeometry, ColorMaterial.GetConceptualEdgeMaterial()));
|
||||
obj.add(this.GetModelGroove());
|
||||
}
|
||||
else if (renderType === RenderType.Physical) {
|
||||
let mesh = obj;
|
||||
mesh.geometry = this.MeshGeometry;
|
||||
@ -17647,6 +17666,26 @@ let ExtrudeSolid = ExtrudeSolid_1 = class ExtrudeSolid extends Entity {
|
||||
mesh.material = this.MeshMaterial;
|
||||
}
|
||||
}
|
||||
GetModelGroove() {
|
||||
const grooves = [];
|
||||
for (const sp of this.__CacheSplitExtrudes ?? []) {
|
||||
grooves.push(...sp.grooves);
|
||||
}
|
||||
const group = new Group();
|
||||
for (const groove of grooves) {
|
||||
const grooveClone = groove.Clone();
|
||||
grooveClone.UpdateDrawGeometry();
|
||||
const mtx = new Matrix4().premultiply(grooveClone.OCSNoClone).premultiply(this.OCSInv);
|
||||
const edgeGeo = grooveClone.EdgeGeometry;
|
||||
edgeGeo.applyMatrix4(mtx);
|
||||
const line = new LineSegments(edgeGeo, ColorMaterial.GetLineMaterial(1, this.Freeze));
|
||||
const meshGeo = grooveClone.MeshGeometry;
|
||||
meshGeo.applyMatrix4(mtx);
|
||||
const mesh = new Mesh(meshGeo, ColorMaterial.GetConceptualMaterial(1, FrontSide, true, this.Freeze, 0.6));
|
||||
group.add(mesh, line);
|
||||
}
|
||||
return group;
|
||||
}
|
||||
UpdateJigMaterial(color = 8) {
|
||||
}
|
||||
//#endregion
|
||||
@ -17821,6 +17860,8 @@ let CompositeEntity = CompositeEntity_1 = class CompositeEntity extends Entity {
|
||||
}
|
||||
UpdateDrawObject(renderType, obj) {
|
||||
Object3DRemoveAll(obj);
|
||||
if (renderType === RenderType.ModelGroove)
|
||||
return;
|
||||
for (let e of this.Entitys) {
|
||||
e.IsEmbedEntity = true;
|
||||
// //内嵌实体在某些时候可能被清理,修复它
|
||||
@ -19464,7 +19505,7 @@ let Board = Board_1 = class Board extends ExtrudeSolid {
|
||||
this._workerCalcedGeom = null; //worker计算后,暂时存入到这里
|
||||
this._async2DPathIng = false;
|
||||
//偏移缓存
|
||||
this._OffsetPathCache = new Map();
|
||||
this.OffsetPathCache = new Map();
|
||||
this.InitBoardData();
|
||||
}
|
||||
/**
|
||||
@ -20319,7 +20360,7 @@ let Board = Board_1 = class Board extends ExtrudeSolid {
|
||||
DisposeThreeObj(this._2DPathDrawObject);
|
||||
this._2DPathDrawObject = undefined;
|
||||
}
|
||||
this._OffsetPathCache.clear();
|
||||
this.OffsetPathCache.clear();
|
||||
}
|
||||
/**
|
||||
* 这个函数生成了二维刀路的csg数组,并且同时生成了_2DPathDrawObject(二维刀路提刀线框显示对象)
|
||||
@ -20464,24 +20505,6 @@ let Board = Board_1 = class Board extends ExtrudeSolid {
|
||||
let mesh = new Mesh(shapeGeom, ColorMaterial.GetBasicMaterialDoubleSide(this.PlaceColor));
|
||||
return mesh;
|
||||
}
|
||||
GetOffsetPath(path, item) {
|
||||
if (item.offset === 0) {
|
||||
return path;
|
||||
}
|
||||
else {
|
||||
let cache = this._OffsetPathCache.get(path);
|
||||
if (!cache) {
|
||||
cache = {};
|
||||
this._OffsetPathCache.set(path, cache);
|
||||
}
|
||||
let tempPath = cache[item.offset.toString()];
|
||||
if (!tempPath) {
|
||||
tempPath = path.GetOffsetCurves(item.offset)[0];
|
||||
cache[item.offset.toString()] = tempPath;
|
||||
}
|
||||
return tempPath;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 根据板的信息修改绘制的实体
|
||||
* 1.非拆单板 灰色
|
||||
@ -20613,12 +20636,12 @@ let Board = Board_1 = class Board extends ExtrudeSolid {
|
||||
let pts = super.GetObjectSnapPoints(snapMode, pickPoint, lastPoint, viewXform, frustum);
|
||||
if (snapMode === ObjectSnapMode.End) {
|
||||
for (let vm of this._2DModelingList) {
|
||||
if (!this._OffsetPathCache.has(vm.path))
|
||||
if (!this.OffsetPathCache.has(vm.path))
|
||||
continue;
|
||||
for (let item of vm.items) {
|
||||
if (item.offset === 0)
|
||||
continue;
|
||||
let paths = this._OffsetPathCache.get(vm.path);
|
||||
let paths = this.OffsetPathCache.get(vm.path);
|
||||
let polyline = paths[item.offset.toString()];
|
||||
if (!polyline)
|
||||
continue; //多段线可能偏移失败
|
||||
@ -21606,8 +21629,9 @@ class FeedingToolPath extends Singleton {
|
||||
let offsetDist = 0;
|
||||
let rectInfo = IsRect(outline);
|
||||
while (true) {
|
||||
if ((!isOut || offsetDist >= knifRadius) && rectInfo)
|
||||
if ((!isOut || offsetDist >= knifRadius) && rectInfo) {
|
||||
offsetDist += knifRadius * 2 - redundancyKnif;
|
||||
}
|
||||
else
|
||||
offsetDist += knifRadius;
|
||||
//理论上最大的宽度为1220,所以2000已经是种仁慈.
|
||||
@ -21617,10 +21641,13 @@ class FeedingToolPath extends Singleton {
|
||||
let retCus = [];
|
||||
let tempOffsetCus = GetOffsetCurves(outline, offsetDist * dir, rectInfo);
|
||||
retCus.push(...tempOffsetCus);
|
||||
//最后一次内偏移如果是矩形,需在偏移一个刀半径避免没切到中心
|
||||
//最后一次内偏移如果是矩形
|
||||
if (retCus.length === 0 && rectInfo && offsetDist > knifRadius) {
|
||||
offsetDist -= knifRadius;
|
||||
retCus.push(...GetOffsetCurves(outline, offsetDist * dir, rectInfo));
|
||||
const rectMinLengthHalf = Math.min(rectInfo.size.x, rectInfo.size.y) / 2;
|
||||
//如果最后一个矩形最小边区间一半小于刀半径减去冗余值的一半,则偏移到中心处切一次
|
||||
if (!equaln$1(offsetDist, rectMinLengthHalf, 1e-5) && offsetDist - rectMinLengthHalf - 1e-5 < knifRadius - redundancyKnif / 2) {
|
||||
retCus.push(...GetOffsetCurves(outline, rectMinLengthHalf * dir, rectInfo));
|
||||
}
|
||||
}
|
||||
if (retCus.length === 0)
|
||||
break;
|
||||
@ -21696,7 +21723,7 @@ class FeedingToolPath extends Singleton {
|
||||
return offsetCus;
|
||||
}
|
||||
/**用于测试走刀路径 */
|
||||
TestCalcPath(br, isCd = false) {
|
||||
TestCalcPath(br, isCd = false, rk = 0) {
|
||||
let modelings = br.BoardModeling;
|
||||
let allModeling = GetModelingFromCustomDrill(br);
|
||||
modelings.push(...allModeling.modeling);
|
||||
@ -21709,15 +21736,15 @@ class FeedingToolPath extends Singleton {
|
||||
return true;
|
||||
return false;
|
||||
});
|
||||
return this.CalcPath(modelings, br);
|
||||
return this.CalcPath(modelings, br, rk);
|
||||
}
|
||||
/**
|
||||
* 计算走刀路径
|
||||
*/
|
||||
CalcPath(modelings, br) {
|
||||
CalcPath(modelings, br, rk = 0) {
|
||||
let cus = [];
|
||||
for (let m of modelings) {
|
||||
cus.push(...this.GetModelFeedPath(br, m));
|
||||
cus.push(...this.GetModelFeedPath(br, m, rk));
|
||||
}
|
||||
return cus;
|
||||
}
|
||||
@ -23377,8 +23404,8 @@ function IsPointInPolygon(polyPts, pt) {
|
||||
// if (equalv2(sp, pt, 1e-5) || equalv2(ep, pt, 1e-5))//在起点或者终点
|
||||
// return false;
|
||||
//点位于线上面
|
||||
if (pt.y > Math.max(sp.y, ep.y))
|
||||
continue;
|
||||
// if (pt.y > Math.max(sp.y, ep.y))
|
||||
// continue;
|
||||
//线垂直Y轴
|
||||
let derX = ep.x - sp.x;
|
||||
if (equaln$1(derX, 0, 5e-6)) {
|
||||
|
File diff suppressed because one or more lines are too long
2
types/Common/ColorPalette.d.ts
vendored
2
types/Common/ColorPalette.d.ts
vendored
@ -14,7 +14,7 @@ export declare class ColorMaterial {
|
||||
private static _BasicDoubleSideMaterialMap;
|
||||
static GetBasicMaterialDoubleSide(color: number): MeshBasicMaterial;
|
||||
private static _ConceptualMaterial;
|
||||
static GetConceptualMaterial(color: number, side?: Side, enableTransparent?: boolean, freeze?: boolean): ShaderMaterial;
|
||||
static GetConceptualMaterial(color: number, side?: Side, enableTransparent?: boolean, freeze?: boolean, opacity?: number): ShaderMaterial;
|
||||
static UpdateConceptualMaterial(useLogBuf: boolean): void;
|
||||
private static _printConceptualMaterial;
|
||||
static GetPrintConceptualMaterial(): ShaderMaterial;
|
||||
|
@ -1 +1 @@
|
||||
{"version":3,"file":"ColorPalette.d.ts","sourceRoot":"","sources":["../../../src/Common/ColorPalette.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAyB,iBAAiB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,cAAc,EAAE,IAAI,EAAoB,MAAM,OAAO,CAAC;AACvJ,OAAO,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAIrE,eAAO,MAAM,YAAY,YAwQxB,CAAC;AAEF,eAAO,MAAM,UAAU,IAAI,CAAC;AAG5B,qBAAa,aAAa;IAEtB,OAAO;IACP,OAAO,CAAC,MAAM,CAAC,gBAAgB,CAAwC;IACvE,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAwC;IACxE,MAAM,CAAC,SAAS,UAAS;IACzB,MAAM,CAAC,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,UAAQ,GAAG,iBAAiB;IAUxE,OAAO,CAAC,MAAM,CAAC,eAAe,CAAyC;IACvE,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,kBAAkB;IAYxD,MAAM,CAAC,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,iBAAiB;IASzD,OAAO,CAAC,MAAM,CAAC,2BAA2B,CAAwC;IAClF,MAAM,CAAC,0BAA0B,CAAC,KAAK,EAAE,MAAM,GAAG,iBAAiB;IASnE,OAAO,CAAC,MAAM,CAAC,mBAAmB,CAA0C;IAC5E,MAAM,CAAC,qBAAqB,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,GAAE,IAAgB,EAAE,iBAAiB,UAAQ,EAAE,MAAM,UAAQ;IAsB7G,MAAM,CAAC,wBAAwB,CAAC,SAAS,EAAE,OAAO;IAKlD,OAAO,CAAC,MAAM,CAAC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,MAAM,CAAC,gBAAgB,eAMpB;IAGH,MAAM,CAAC,2BAA2B,oBAI/B;IAEH,MAAM,CAAC,uBAAuB,oBAG3B;CACN"}
|
9
types/DatabaseServices/Entity/Board.d.ts
vendored
9
types/DatabaseServices/Entity/Board.d.ts
vendored
@ -158,8 +158,8 @@ export declare class Board extends ExtrudeSolid {
|
||||
Clear3DPathCache(): void;
|
||||
private Get3DPathDrawObject;
|
||||
Clear2DPathCache(): void;
|
||||
private _2DPathCsgs;
|
||||
private _2DPathDrawObject;
|
||||
_2DPathCsgs: Geom3[];
|
||||
_2DPathDrawObject: Object3D;
|
||||
/**
|
||||
* 这个函数生成了二维刀路的csg数组,并且同时生成了_2DPathDrawObject(二维刀路提刀线框显示对象)
|
||||
*/
|
||||
@ -175,8 +175,9 @@ export declare class Board extends ExtrudeSolid {
|
||||
private get PlaceColor();
|
||||
private GetPlaceFace;
|
||||
private GetBigHoleFace;
|
||||
private _OffsetPathCache;
|
||||
private GetOffsetPath;
|
||||
OffsetPathCache: Map<Polyline, {
|
||||
[key: string]: Polyline;
|
||||
}>;
|
||||
/**
|
||||
* 根据板的信息修改绘制的实体
|
||||
* 1.非拆单板 灰色
|
||||
|
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
{"version":3,"file":"CompositeEntity.d.ts","sourceRoot":"","sources":["../../../../src/DatabaseServices/Entity/CompositeEntity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAK5D,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAG7D,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAA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,EAAE,cAAc,EACxB,SAAS,EAAE,OAAO,EAClB,SAAS,EAAE,OAAO,EAClB,SAAS,CAAC,EAAE,OAAO,GACpB,OAAO,EAAE;IAQZ,aAAa,IAAI,KAAK,CAAC,OAAO,CAAC;IAK/B,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,OAAO;IAMhD,gBAAgB,IAAI,KAAK,CAAC,OAAO,CAAC;IAKlC;;;;;;OAMG;IACH,iBAAiB,CAAC,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,OAAO;IAMxD,OAAO,CAAC,sBAAsB;IAU9B,OAAO,CAAC,yBAAyB;IASjC,uBAAuB,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,aAAa;IA4ClF,eAAe,CAAC,IAAI,EAAE,IAAI;IAkB1B,iBAAiB,CAAC,CAAC,EAAE,OAAO;IAS5B,SAAS,CAAC,SAAS,CAAC,IAAI,EAAE,QAAQ;IAclC,SAAS,CAAC,IAAI,EAAE,QAAQ;CAS3B"}
|
1
types/DatabaseServices/Entity/Extrude.d.ts
vendored
1
types/DatabaseServices/Entity/Extrude.d.ts
vendored
@ -216,6 +216,7 @@ export declare class ExtrudeSolid extends Entity {
|
||||
ClearDraw(): this;
|
||||
UpdateDrawObject(renderType: RenderType, obj: Object3D): Object3D;
|
||||
UpdateDrawObjectMaterial(renderType: RenderType, obj: Object3D): void;
|
||||
private GetModelGroove;
|
||||
UpdateJigMaterial(color?: number): void;
|
||||
/**
|
||||
* 简化的文件读取和写入,只写入必要的数据,没有id,没有其他版本号
|
||||
|
File diff suppressed because one or more lines are too long
3
types/Editor/DefaultConfig.d.ts
vendored
3
types/Editor/DefaultConfig.d.ts
vendored
@ -12,7 +12,7 @@ import { IBoardBatchCurtailOption } from "../UI/Store/OptionInterface/BoardBatch
|
||||
import { BoardProcessOption } from "../UI/Store/OptionInterface/BoardProcessOption";
|
||||
import { BulkheadCeilingOption } from "../UI/Store/OptionInterface/BulkheadCeilingOption";
|
||||
import { ClosingStripOption } from "../UI/Store/OptionInterface/ClosingStripOption";
|
||||
import { BehindBoardOption, ChangeColorByBoardMaterialOption, ChangeColorByRoomOrCabinetOption, CommonPanelConfigOption, DatalistConfigOption, IBatchModifyPanelOption, IDimStyleOption, LayerBoardOption, LayerNailOption, ModifyTextsConfigOption, RightPlaneLightOption, ShareBoardInfConfigurationOption, SideBoardOption, SingleBoardOption, TBBoardOption, VerticalBoardOption, WindowPanelConfigOption } from "../UI/Store/OptionInterface/IOptionInterface";
|
||||
import { BehindBoardOption, ChangeColorByBoardMaterialOption, ChangeColorByRoomOrCabinetOption, CommonPanelConfigOption, DatalistConfigOption, DoorRelatesInfoOption, IBatchModifyPanelOption, IDimStyleOption, LayerBoardOption, LayerNailOption, ModifyTextsConfigOption, RightPlaneLightOption, ShareBoardInfConfigurationOption, SideBoardOption, SingleBoardOption, TBBoardOption, VerticalBoardOption, WindowPanelConfigOption } from "../UI/Store/OptionInterface/IOptionInterface";
|
||||
import { PointLightOption, RectAreaLightOption, SpotLightOption } from "../UI/Store/OptionInterface/LightConfigOption";
|
||||
import { Viewport2ConfigOption, Viewport3ConfigOption, Viewport4ConfigOption, ViewportConfigOption } from "../UI/Store/OptionInterface/ViewportConfigOption";
|
||||
import { IWineRackOption } from "../UI/Store/WineRackInterface";
|
||||
@ -64,4 +64,5 @@ export declare const DefaultChangeColorByBoardMaterialOption: ChangeColorByBoard
|
||||
export declare const DefaultShareBoardInfConfigurationOption: ShareBoardInfConfigurationOption;
|
||||
export declare const DefaultBulkheadCeilingOption: BulkheadCeilingOption;
|
||||
export declare const DefaultChangeColorByRoomOrCabinetOption: ChangeColorByRoomOrCabinetOption;
|
||||
export declare const DefaultDoorRelatesInfoOption: DoorRelatesInfoOption;
|
||||
//# sourceMappingURL=DefaultConfig.d.ts.map
|
@ -1 +1 @@
|
||||
{"version":3,"file":"DefaultConfig.d.ts","sour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,CAAC"}
|
27
types/Geometry/BSPGroupParse.d.ts
vendored
Normal file
27
types/Geometry/BSPGroupParse.d.ts
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
import { Poly3 } from "@jscad/modeling/src/geometries/types";
|
||||
import { Vector3 } from "three";
|
||||
import { Geom3Res } from "../Common/CSGIntersect";
|
||||
/**
|
||||
* 解决 THREEBSP(CSG) 产生的结果没有办法得到分裂的个数.
|
||||
* 本类分析了THREEBSP的组合情况.
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* let topology = new BSPGroupParse(csg);
|
||||
* topology.parse();
|
||||
*/
|
||||
export declare class BSPGroupParse {
|
||||
fractionDigits: number;
|
||||
constructor(bsp?: Geom3Res, fractionDigits?: number);
|
||||
Add(poly: Poly3): void;
|
||||
/**
|
||||
* 返回组合点
|
||||
*/
|
||||
Parse(): Vector3[][];
|
||||
private map;
|
||||
private Get;
|
||||
private GetPts;
|
||||
private vecMap;
|
||||
private GenerateP;
|
||||
}
|
||||
//# sourceMappingURL=BSPGroupParse.d.ts.map
|
1
types/Geometry/BSPGroupParse.d.ts.map
Normal file
1
types/Geometry/BSPGroupParse.d.ts.map
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"BSPGroupParse.d.ts","sourceRoot":"","sources":["../../../src/Geometry/BSPGroupParse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAE7D,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAGlD;;;;;;;;GAQG;AACH,qBAAa,aAAa;IAEa,cAAc;gBAArC,GAAG,CAAC,EAAE,QAAQ,EAAS,cAAc,SAAI;IAMrD,GAAG,CAAC,IAAI,EAAE,KAAK;IAaf;;OAEG;IACH,KAAK,IAAI,OAAO,EAAE,EAAE;IAoBpB,OAAO,CAAC,GAAG,CAAkC;IAC7C,OAAO,CAAC,GAAG;IAUX,OAAO,CAAC,MAAM;IAad,OAAO,CAAC,MAAM,CAAgC;IAC9C,OAAO,CAAC,SAAS;CAMpB"}
|
1
types/GraphicsSystem/RenderType.d.ts
vendored
1
types/GraphicsSystem/RenderType.d.ts
vendored
@ -22,6 +22,7 @@ export declare enum RenderType {
|
||||
PlaceFace = 8,
|
||||
BigHoleFace = 81,
|
||||
CustomNumber = 9,
|
||||
ModelGroove = 10,
|
||||
/******************************************** 在视口时的渲染模式 */
|
||||
/**
|
||||
* 线框模式
|
||||
|
@ -1 +1 @@
|
||||
{"version":3,"file":"RenderType.d.ts","sourceRoot":"","sources":["../../../src/GraphicsSystem/RenderType.ts"],"names":[],"mappings":"AACA;;GAEG;AACH,oBAAY,UAAU;IAElB;;OAEG;IACH,SAAS,IAAI;IAEb;;OAEG;IACH,UAAU,IAAI;IAGd;;OAEG;IACH,QAAQ,IAAI;IAEZ,GAAG,IAAI;IACP,KAAK,IAAI;IACT,WAAW;IACX,SAAS,IAAI;IACb,IAAI,IAAI;IACR,SAAS,IAAI;IACb,WAAW,KAAK;IAChB,YAAY,IAAI;IAEhB,0DAA0D;IAC1D;;MAEE;IACF,cAAc,MAAM;IAEpB;;OAEG;IACH,eAAe,MAAM;IAGrB;;OAEG;IACH,aAAa,MAAM;IAEnB,QAAQ,MAAM;IACd,UAAU,MAAM;IAChB,WAAW;IACX,cAAc,MAAM;IACpB,iBAAiB,MAAM;IAEvB,qBAAqB,MAAM;CAC9B;AAED,wBAAgB,UAAU,CAAC,UAAU,EAAE,UAAU,WAGhD"}
|
||||
{"version":3,"file":"RenderType.d.ts","sourceRoot":"","sources":["../../../src/GraphicsSystem/RenderType.ts"],"names":[],"mappings":"AACA;;GAEG;AACH,oBAAY,UAAU;IAElB;;OAEG;IACH,SAAS,IAAI;IAEb;;OAEG;IACH,UAAU,IAAI;IAGd;;OAEG;IACH,QAAQ,IAAI;IAEZ,GAAG,IAAI;IACP,KAAK,IAAI;IACT,WAAW;IACX,SAAS,IAAI;IACb,IAAI,IAAI;IACR,SAAS,IAAI;IACb,WAAW,KAAK;IAChB,YAAY,IAAI;IAChB,WAAW,KAAK;IAEhB,0DAA0D;IAC1D;;MAEE;IACF,cAAc,MAAM;IAEpB;;OAEG;IACH,eAAe,MAAM;IAGrB;;OAEG;IACH,aAAa,MAAM;IAEnB,QAAQ,MAAM;IACd,UAAU,MAAM;IAChB,WAAW;IACX,cAAc,MAAM;IACpB,iBAAiB,MAAM;IAEvB,qBAAqB,MAAM;CAC9B;AAED,wBAAgB,UAAU,CAAC,UAAU,EAAE,UAAU,WAGhD"}
|
@ -16,11 +16,11 @@ export declare class FeedingToolPath extends Singleton {
|
||||
*/
|
||||
private HandleShape;
|
||||
/**用于测试走刀路径 */
|
||||
TestCalcPath(br: Board, isCd?: boolean): Curve[];
|
||||
TestCalcPath(br: Board, isCd?: boolean, rk?: number): Curve[];
|
||||
/**
|
||||
* 计算走刀路径
|
||||
*/
|
||||
CalcPath(modelings: IModeling[], br: Board): Curve[];
|
||||
CalcPath(modelings: IModeling[], br: Board, rk?: number): Curve[];
|
||||
GetModelFeedPath(br: {
|
||||
Thickness: number;
|
||||
ContourCurve: ExtrudeContourCurve;
|
||||
|
@ -1 +1 @@
|
||||
{"version":3,"file":"FeedingToolPath.d.ts","sourceRoot":"","sources":["../../../../src/GraphicsSystem/ToolPath/FeedingToolPath.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AAEzE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAC;AAEvE,OAAO,EAAE,KAAK,EAAE,MAAM,qCAAqC,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAG5E,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAYrD;;GAEG;AACH,qBAAa,eAAgB,SAAQ,SAAS;IAE1C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YAAY,CAAC,EAAE,EAAE,KAAK,EAAE,IAAI,UAAQ,EAAE,EAAE,SAAI;IAmB5C;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,SAAS,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,SAAI,GAAG,KAAK,EAAE;IAW5D,gBAAgB,CAAC,EAAE,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,mBAAmB,CAAC;KAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,cAAc,SAAI,GAAG,KAAK,EAAE;IA8CjI,OAAO,CAAC,aAAa;IA2BrB;;;;;OAKG;IACH,OAAO,CAAC,WAAW;IAuCnB,aAAa,CAAC,EAAE,EAAE,KAAK;IAkBvB,eAAe,CAAC,EAAE,EAAE,KAAK;IAsBzB,kBAAkB,CAAC,KAAK,EAAE,mBAAmB,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM;CAsInF;AAED,wBAAgB,0BAA0B,CAAC,EAAE,EAAE,KAAK;;kBAKT,WAAW;;;kBACP,WAAW;;EAyGzD"}
|
@ -272,4 +272,7 @@ export interface ChangeColorByRoomOrCabinetOption {
|
||||
accordRoomName: boolean;
|
||||
accordCabinetName: boolean;
|
||||
}
|
||||
export interface DoorRelatesInfoOption extends IBaseOption {
|
||||
hingeOption: [string, boolean][];
|
||||
}
|
||||
//# sourceMappingURL=IOptionInterface.d.ts.map
|
File diff suppressed because one or more lines are too long
25
types/csg/core/CAG.d.ts
vendored
Normal file
25
types/csg/core/CAG.d.ts
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
import { Vector3 } from "three";
|
||||
import { CSG } from "./CSG";
|
||||
import { Polygon } from "./math/Polygon3";
|
||||
import { Side } from "./math/Side";
|
||||
import { Vector2D } from "./math/Vector2";
|
||||
import { Vector3D } from "./math/Vector3";
|
||||
/**
|
||||
* Class CAG
|
||||
* Holds a solid area geometry like CSG but 2D.
|
||||
* Each area consists of a number of sides.
|
||||
* Each side is a line between 2 points.
|
||||
*/
|
||||
export declare class CAG {
|
||||
sides: Side[];
|
||||
isCanonicalized: boolean;
|
||||
constructor(sides?: Side[]);
|
||||
fromPoints(pts: Vector3[]): this;
|
||||
flipped(): CAG;
|
||||
getBounds(): Vector2D[];
|
||||
canonicalized(): CAG;
|
||||
extrude(offsetVector: Vector3D): CSG;
|
||||
private toCSGWall;
|
||||
toPolygons(bottom?: boolean): Polygon[];
|
||||
}
|
||||
//# sourceMappingURL=CAG.d.ts.map
|
1
types/csg/core/CAG.d.ts.map
Normal file
1
types/csg/core/CAG.d.ts.map
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"CAG.d.ts","sourceRoot":"","sources":["../../../../src/csg/core/CAG.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,OAAO,EAAE,MAAM,OAAO,CAAC;AAIzC,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAM1C;;;;;GAKG;AACH,qBAAa,GAAG;IAGO,KAAK,EAAE,IAAI,EAAE;IADhC,eAAe,EAAE,OAAO,CAAS;gBACd,KAAK,GAAE,IAAI,EAAO;IAIrC,UAAU,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,IAAI;IAkBhC,OAAO;IAOP,SAAS;IAkBT,aAAa,IAAI,GAAG;IAOpB,OAAO,CAAC,YAAY,EAAE,QAAQ,GAAG,GAAG;IAcpC,OAAO,CAAC,SAAS;IAMjB,UAAU,CAAC,MAAM,UAAQ,GAAG,OAAO,EAAE;CA+BxC"}
|
95
types/csg/core/CSG.d.ts
vendored
Normal file
95
types/csg/core/CSG.d.ts
vendored
Normal file
@ -0,0 +1,95 @@
|
||||
import { Matrix4 } from "three";
|
||||
import { Polygon } from "./math/Polygon3";
|
||||
import { Vector3D } from "./math/Vector3";
|
||||
/** Class CSG
|
||||
* Holds a binary space partition tree representing a 3D solid. Two solids can
|
||||
* be combined using the `union()`, `subtract()`, and `intersect()` methods.
|
||||
* @constructor
|
||||
*/
|
||||
export declare class CSG {
|
||||
polygons: Polygon[];
|
||||
/** # 是否已精简重复点 */
|
||||
isCanonicalized: boolean;
|
||||
/** # 是否已合并轮廓 */
|
||||
isRetesselated: boolean;
|
||||
cachedBoundingBox: Vector3D[];
|
||||
constructor(polygons?: Polygon[]);
|
||||
/**
|
||||
* Return a new CSG solid representing the space in either this solid or
|
||||
* in the given solids. Neither this solid nor the given solids are modified.
|
||||
* @param {CSG[]} csg - list of CSG objects
|
||||
* @returns {CSG} new CSG object
|
||||
* @example
|
||||
* let C = A.union(B)
|
||||
* @example
|
||||
* +-------+ +-------+
|
||||
* | | | |
|
||||
* | A | | |
|
||||
* | +--+----+ = | +----+
|
||||
* +----+--+ | +----+ |
|
||||
* | B | | |
|
||||
* | | | |
|
||||
* +-------+ +-------+
|
||||
*/
|
||||
union(csg: CSG | CSG[]): CSG;
|
||||
unionSub(csg: CSG, retesselate?: boolean, canonicalize?: boolean): CSG;
|
||||
unionForNonIntersecting(csg: CSG): CSG;
|
||||
/**
|
||||
* Return a new CSG solid representing space in this solid but
|
||||
* not in the given solids. Neither this solid nor the given solids are modified.
|
||||
* @returns new CSG object
|
||||
* @example
|
||||
* let C = A.subtract(B)
|
||||
* @example
|
||||
* +-------+ +-------+
|
||||
* | | | |
|
||||
* | A | | |
|
||||
* | +--+----+ = | +--+
|
||||
* +----+--+ | +----+
|
||||
* | B |
|
||||
* | |
|
||||
* +-------+
|
||||
*/
|
||||
subtract(csg: CSG | CSG[]): CSG;
|
||||
subtractSub(csg: CSG, retesselate?: boolean, canonicalize?: boolean): CSG;
|
||||
/**
|
||||
* Return a new CSG solid representing space in both this solid and
|
||||
* in the given solids. Neither this solid nor the given solids are modified.
|
||||
* let C = A.intersect(B)
|
||||
* @returns new CSG object
|
||||
* @example
|
||||
* +-------+
|
||||
* | |
|
||||
* | A |
|
||||
* | +--+----+ = +--+
|
||||
* +----+--+ | +--+
|
||||
* | B |
|
||||
* | |
|
||||
* +-------+
|
||||
*/
|
||||
intersect(csg: CSG | CSG[]): CSG;
|
||||
intersectSub(csg: CSG, retesselate?: boolean, canonicalize?: boolean): CSG;
|
||||
/**
|
||||
* Return a new CSG solid with solid and empty space switched.
|
||||
* This solid is not modified.
|
||||
*/
|
||||
invert(): CSG;
|
||||
transform1(matrix4x4: Matrix4): CSG;
|
||||
/**
|
||||
* Return a new CSG solid that is transformed using the given Matrix.
|
||||
* Several matrix transformations can be combined before transforming this solid.
|
||||
* @param {CSG.Matrix4x4} matrix4x4 - matrix to be applied
|
||||
* @returns {CSG} new CSG object
|
||||
* @example
|
||||
* var m = new CSG.Matrix4x4()
|
||||
* m = m.multiply(CSG.Matrix4x4.rotationX(40))
|
||||
* m = m.multiply(CSG.Matrix4x4.translation([-.5, 0, 0]))
|
||||
* let B = A.transform(m)
|
||||
*/
|
||||
transform(matrix4x4: Matrix4): this;
|
||||
canonicalized(): CSG;
|
||||
reTesselated(): CSG;
|
||||
mayOverlap(csg: CSG): boolean;
|
||||
toTriangles(): Polygon[];
|
||||
}
|
||||
//# sourceMappingURL=CSG.d.ts.map
|
1
types/csg/core/CSG.d.ts.map
Normal file
1
types/csg/core/CSG.d.ts.map
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"CSG.d.ts","sourceRoot":"","sources":["../../../../src/csg/core/CSG.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAGhC,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAO1C;;;;GAIG;AACH,qBAAa,GAAG;IAOO,QAAQ,EAAE,OAAO,EAAE;IALtC,iBAAiB;IACjB,eAAe,EAAE,OAAO,CAAS;IACjC,gBAAgB;IAChB,cAAc,EAAE,OAAO,CAAS;IAChC,iBAAiB,EAAE,QAAQ,EAAE,CAAC;gBACX,QAAQ,GAAE,OAAO,EAAO;IAG3C;;;;;;;;;;;;;;;;OAgBG;IACH,KAAK,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,EAAE,GAAG,GAAG;IAmB5B,QAAQ,CAAC,GAAG,EAAE,GAAG,EAAE,WAAW,UAAQ,EAAE,YAAY,UAAQ,GAAG,GAAG;IAwBlE,uBAAuB,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG;IAStC;;;;;;;;;;;;;;;OAeG;IACH,QAAQ,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,EAAE,GAAG,GAAG;IAgB/B,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE,WAAW,UAAQ,EAAE,YAAY,UAAQ,GAAG,GAAG;IAerE;;;;;;;;;;;;;;OAcG;IACH,SAAS,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,EAAE,GAAG,GAAG;IAgBhC,YAAY,CAAC,GAAG,EAAE,GAAG,EAAE,WAAW,UAAQ,EAAE,YAAY,UAAQ,GAAG,GAAG;IAiBtE;;;OAGG;IACH,MAAM,IAAI,GAAG;IAOb,UAAU,CAAC,SAAS,EAAE,OAAO;IAY7B;;;;;;;;;;OAUG;IACH,SAAS,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI;IAyCnC,aAAa;IAKb,YAAY;IAOZ,UAAU,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO;IAgB7B,WAAW,IAAI,OAAO,EAAE;CAsB3B"}
|
10
types/csg/core/FuzzyFactory2d.d.ts
vendored
Normal file
10
types/csg/core/FuzzyFactory2d.d.ts
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
import { FuzzyFactory } from "./FuzzyFactory";
|
||||
import { Side } from "./math/Side";
|
||||
import { Vertex2D } from "./math/Vertex2";
|
||||
export declare class FuzzyCAGFactory {
|
||||
vertexfactory: FuzzyFactory;
|
||||
constructor();
|
||||
getVertex(sourcevertex: Vertex2D): Vertex2D;
|
||||
getSide(sourceside: Side): Side;
|
||||
}
|
||||
//# sourceMappingURL=FuzzyFactory2d.d.ts.map
|
1
types/csg/core/FuzzyFactory2d.d.ts.map
Normal file
1
types/csg/core/FuzzyFactory2d.d.ts.map
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"FuzzyFactory2d.d.ts","sourceRoot":"","sources":["../../../../src/csg/core/FuzzyFactory2d.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,qBAAa,eAAe;IAExB,aAAa,eAA4B;;IAGzC,SAAS,CAAC,YAAY,EAAE,QAAQ;IAOhC,OAAO,CAAC,UAAU,EAAE,IAAI;CAM3B"}
|
9
types/csg/core/Geometry2CSG.d.ts
vendored
Normal file
9
types/csg/core/Geometry2CSG.d.ts
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
import { Geom3 } from "@jscad/modeling/src/geometries/geom3";
|
||||
import { BufferGeometry, Geometry } from "three";
|
||||
import { Geom3Res } from "../../Common/CSGIntersect";
|
||||
import { CSG } from "./CSG";
|
||||
export declare function Geometry2CSG(geometry: Geometry | BufferGeometry): CSG;
|
||||
export declare function CSG2Geometry(csg: CSG): Geometry;
|
||||
export declare function Geometry2CSG2(geometry: Geometry | BufferGeometry): Geom3;
|
||||
export declare function CSG2Geometry2(csg: Geom3 | Geom3Res): Geometry;
|
||||
//# sourceMappingURL=Geometry2CSG.d.ts.map
|
1
types/csg/core/Geometry2CSG.d.ts.map
Normal file
1
types/csg/core/Geometry2CSG.d.ts.map
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"Geometry2CSG.d.ts","sourceRoot":"","sources":["../../../../src/csg/core/Geometry2CSG.ts"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAC;AAIpE,OAAO,EAAE,cAAc,EAAS,QAAQ,EAA2B,MAAM,OAAO,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAErD,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAO5B,wBAAgB,YAAY,CAAC,QAAQ,EAAE,QAAQ,GAAG,cAAc,GAAG,GAAG,CAkCrE;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,GAAG,GAAG,QAAQ,CAmC/C;AAED,wBAAgB,aAAa,CAAC,QAAQ,EAAE,QAAQ,GAAG,cAAc,GAAG,KAAK,CAmBxE;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,KAAK,GAAG,QAAQ,GAAG,QAAQ,CA8B7D"}
|
15
types/csg/core/math/Line2.d.ts
vendored
Normal file
15
types/csg/core/math/Line2.d.ts
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
import { Vector2D } from "./Vector2";
|
||||
/** class Line2D
|
||||
* Represents a directional line in 2D space
|
||||
* A line is parametrized by its normal vector (perpendicular to the line, rotated 90 degrees counter clockwise)
|
||||
* and w. The line passes through the point <normal>.times(w).
|
||||
* Equation: p is on line if normal.dot(p)==w
|
||||
*/
|
||||
export declare class Line2D {
|
||||
normal: Vector2D;
|
||||
w: number;
|
||||
constructor(normal: Vector2D, w: number);
|
||||
direction(): Vector2D;
|
||||
static fromPoints(p1: Vector2D, p2: Vector2D): Line2D;
|
||||
}
|
||||
//# sourceMappingURL=Line2.d.ts.map
|
1
types/csg/core/math/Line2.d.ts.map
Normal file
1
types/csg/core/math/Line2.d.ts.map
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"Line2.d.ts","sourceRoot":"","sources":["../../../../../src/csg/core/math/Line2.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAErC;;;;;GAKG;AACH,qBAAa,MAAM;IAEf,MAAM,EAAE,QAAQ,CAAC;IACjB,CAAC,EAAE,MAAM,CAAC;gBACE,MAAM,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM;IASvC,SAAS;IAIT,MAAM,CAAC,UAAU,CAAC,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ;CAU/C"}
|
17
types/csg/core/math/OrthoNormalBasis.d.ts
vendored
Normal file
17
types/csg/core/math/OrthoNormalBasis.d.ts
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
import { Plane } from "./Plane";
|
||||
import { Vector2D } from "./Vector2";
|
||||
import { Vector3D } from "./Vector3";
|
||||
/** class OrthoNormalBasis
|
||||
* Reprojects points on a 3D plane onto a 2D plane
|
||||
* or from a 2D plane back onto the 3D plane
|
||||
*/
|
||||
export declare class OrthoNormalBasis {
|
||||
plane: Plane;
|
||||
v: Vector3D;
|
||||
u: Vector3D;
|
||||
planeorigin: Vector3D;
|
||||
constructor(plane: Plane, rightVector?: Vector3D);
|
||||
to2D(vec3: Vector3D): Vector2D;
|
||||
to3D(vec2: Vector2D): Vector3D;
|
||||
}
|
||||
//# sourceMappingURL=OrthoNormalBasis.d.ts.map
|
1
types/csg/core/math/OrthoNormalBasis.d.ts.map
Normal file
1
types/csg/core/math/OrthoNormalBasis.d.ts.map
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"OrthoNormalBasis.d.ts","sourceRoot":"","sources":["../../../../../src/csg/core/math/OrthoNormalBasis.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAErC;;;GAGG;AAEH,qBAAa,gBAAgB;IAKN,KAAK,EAAE,KAAK;IAH/B,CAAC,EAAE,QAAQ,CAAC;IACZ,CAAC,EAAE,QAAQ,CAAC;IACZ,WAAW,EAAE,QAAQ,CAAC;gBACH,KAAK,EAAE,KAAK,EAAE,WAAW,GAAE,QAAiD;IAO/F,IAAI,CAAC,IAAI,EAAE,QAAQ;IAKnB,IAAI,CAAC,IAAI,EAAE,QAAQ;CAMtB"}
|
12
types/csg/core/math/Side.d.ts
vendored
Normal file
12
types/csg/core/math/Side.d.ts
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
import { Polygon } from "./Polygon3";
|
||||
import { Vertex2D } from "./Vertex2";
|
||||
export declare class Side {
|
||||
vertex0: Vertex2D;
|
||||
vertex1: Vertex2D;
|
||||
constructor(vertex0: Vertex2D, vertex1: Vertex2D);
|
||||
toPolygon3D(z0: number, z1: number): Polygon;
|
||||
flipped(): Side;
|
||||
length(): number;
|
||||
static _fromFakePolygon(polygon: Polygon): Side;
|
||||
}
|
||||
//# sourceMappingURL=Side.d.ts.map
|
1
types/csg/core/math/Side.d.ts.map
Normal file
1
types/csg/core/math/Side.d.ts.map
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"Side.d.ts","sourceRoot":"","sources":["../../../../../src/csg/core/math/Side.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAGrC,qBAAa,IAAI;IAEM,OAAO,EAAE,QAAQ;IAAS,OAAO,EAAE,QAAQ;gBAA3C,OAAO,EAAE,QAAQ,EAAS,OAAO,EAAE,QAAQ;IAC9D,WAAW,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM;IA0BlC,OAAO;IAKP,MAAM;IAMN,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;CAuClD"}
|
9
types/csg/core/math/Vertex2.d.ts
vendored
Normal file
9
types/csg/core/math/Vertex2.d.ts
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
import { Vector2D } from "./Vector2";
|
||||
export declare class Vertex2D {
|
||||
tag: any;
|
||||
pos: Vector2D;
|
||||
constructor(pos: Vector2D);
|
||||
toString(): string;
|
||||
getTag(): any;
|
||||
}
|
||||
//# sourceMappingURL=Vertex2.d.ts.map
|
1
types/csg/core/math/Vertex2.d.ts.map
Normal file
1
types/csg/core/math/Vertex2.d.ts.map
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"Vertex2.d.ts","sourceRoot":"","sources":["../../../../../src/csg/core/math/Vertex2.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAErC,qBAAa,QAAQ;IAEjB,GAAG,EAAE,GAAG,CAAC;IACT,GAAG,EAAE,QAAQ,CAAC;gBACF,GAAG,EAAE,QAAQ;IAKzB,QAAQ;IAKR,MAAM;CAUT"}
|
3
types/csg/core/math/reTesselateCoplanarPolygons.d.ts
vendored
Normal file
3
types/csg/core/math/reTesselateCoplanarPolygons.d.ts
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
import { Polygon } from "./Polygon3";
|
||||
export declare function reTesselateCoplanarPolygons(sourcePolygons: Polygon[], destpolygons?: Polygon[]): void;
|
||||
//# sourceMappingURL=reTesselateCoplanarPolygons.d.ts.map
|
1
types/csg/core/math/reTesselateCoplanarPolygons.d.ts.map
Normal file
1
types/csg/core/math/reTesselateCoplanarPolygons.d.ts.map
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"reTesselateCoplanarPolygons.d.ts","sourceRoot":"","sources":["../../../../../src/csg/core/math/reTesselateCoplanarPolygons.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAkCrC,wBAAgB,2BAA2B,CAAC,cAAc,EAAE,OAAO,EAAE,EAAE,YAAY,GAAE,OAAO,EAAO,GAAG,IAAI,CAmazG"}
|
51
types/csg/core/trees.d.ts
vendored
Normal file
51
types/csg/core/trees.d.ts
vendored
Normal file
@ -0,0 +1,51 @@
|
||||
import { Plane } from "./math/Plane";
|
||||
import { Polygon } from "./math/Polygon3";
|
||||
import { Vector3D } from "./math/Vector3";
|
||||
declare class PolygonTreeNode {
|
||||
parent: PolygonTreeNode;
|
||||
children: PolygonTreeNode[];
|
||||
polygon: Polygon;
|
||||
removed: boolean;
|
||||
constructor(polygon?: Polygon);
|
||||
addPolygons(polygons: Polygon[]): void;
|
||||
remove(): void;
|
||||
isRemoved(): boolean;
|
||||
isRootNode(): boolean;
|
||||
invert(): void;
|
||||
getPolygon(): Polygon;
|
||||
getPolygons(outPolygons?: Polygon[]): Polygon[];
|
||||
splitByPlane(plane: Plane, coplanarFrontNodes: PolygonTreeNode[], coplanarBackNodes: PolygonTreeNode[], frontNodes: PolygonTreeNode[], backNodes: PolygonTreeNode[]): void;
|
||||
private splitByPlaneNotChildren;
|
||||
addChild(polygon: Polygon): PolygonTreeNode;
|
||||
invertSub(): void;
|
||||
recursivelyInvalidatePolygon(): void;
|
||||
}
|
||||
export declare class Tree {
|
||||
polygonTree: PolygonTreeNode;
|
||||
rootNode: Node;
|
||||
constructor(polygons: Polygon[]);
|
||||
invert(): void;
|
||||
/**
|
||||
* this 减去 tree 删除此BSP树中位于其他BSP树内的所有多边形
|
||||
* @param tree 不会被修改
|
||||
* @param [alsoRemovecoplanarFront=false] 同时删除共面
|
||||
*/
|
||||
clipTo(tree: Tree, alsoRemovecoplanarFront?: boolean): void;
|
||||
allPolygons(): Polygon[];
|
||||
addPolygons(polygons: Polygon[]): void;
|
||||
}
|
||||
declare class Node {
|
||||
plane: Plane;
|
||||
front: Node;
|
||||
back: Node;
|
||||
polygonTreeNodes: PolygonTreeNode[];
|
||||
parent: Node;
|
||||
constructor(parent: Node);
|
||||
invert(): void;
|
||||
clipPolygons(polygonTreeNodes: PolygonTreeNode[], alsoRemoveCoplanarFront: boolean): void;
|
||||
clipTo(tree: Tree, alsoRemovecoplanarFront: boolean): void;
|
||||
addPolygonTreeNodes(polygonTreeNodes: PolygonTreeNode[]): void;
|
||||
getParentPlaneNormals(normals: Vector3D[], maxdepth: number): void;
|
||||
}
|
||||
export {};
|
||||
//# sourceMappingURL=trees.d.ts.map
|
1
types/csg/core/trees.d.ts.map
Normal file
1
types/csg/core/trees.d.ts.map
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"trees.d.ts","sourceRoot":"","sources":["../../../../src/csg/core/trees.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,OAAO,EAAQ,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AA2B1C,cAAM,eAAe;IAEjB,MAAM,EAAE,eAAe,CAAC;IACxB,QAAQ,EAAE,eAAe,EAAE,CAAM;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAS;gBACb,OAAO,CAAC,EAAE,OAAO;IAO7B,WAAW,CAAC,QAAQ,EAAE,OAAO,EAAE;IAc/B,MAAM;IAsBN,SAAS;IAKT,UAAU;IAOV,MAAM;IAMN,UAAU,IAAI,OAAO;IAMrB,WAAW,CAAC,WAAW,GAAE,OAAO,EAAO,GAAG,OAAO,EAAE;IA2BnD,YAAY,CACR,KAAK,EAAE,KAAK,EACZ,kBAAkB,EAAE,eAAe,EAAE,EACrC,iBAAiB,EAAE,eAAe,EAAE,EACpC,UAAU,EAAE,eAAe,EAAE,EAC7B,SAAS,EAAE,eAAe,EAAE;IAgChC,OAAO,CAAC,uBAAuB;IA6D/B,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,eAAe;IAQ3C,SAAS;IAgBT,4BAA4B;CAU/B;AAMD,qBAAa,IAAI;IAEb,WAAW,kBAAyB;IACpC,QAAQ,OAAkB;gBACd,QAAQ,EAAE,OAAO,EAAE;IAK/B,MAAM;IAON;;;;OAIG;IACH,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,uBAAuB,UAAQ;IAKlD,WAAW;IAKX,WAAW,CAAC,QAAQ,EAAE,OAAO,EAAE;CAOlC;AAUD,cAAM,IAAI;IAEN,KAAK,EAAE,KAAK,CAAC;IACb,KAAK,EAAE,IAAI,CAAC;IACZ,IAAI,EAAE,IAAI,CAAC;IACX,gBAAgB,EAAE,eAAe,EAAE,CAAM;IACzC,MAAM,EAAE,IAAI,CAAC;gBACD,MAAM,EAAE,IAAI;IAMxB,MAAM;IAmBN,YAAY,CAAC,gBAAgB,EAAE,eAAe,EAAE,EAAE,uBAAuB,EAAE,OAAO;IAkDlF,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,uBAAuB,EAAE,OAAO;IAoBnD,mBAAmB,CAAC,gBAAgB,EAAE,eAAe,EAAE;IA2DvD,qBAAqB,CAAC,OAAO,EAAE,QAAQ,EAAE,EAAE,QAAQ,EAAE,MAAM;CAW9D"}
|
6
types/csg/core/utils.d.ts
vendored
Normal file
6
types/csg/core/utils.d.ts
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
import { Vector2D } from "./math/Vector2";
|
||||
export declare function fnNumberSort(a: any, b: any): number;
|
||||
export declare const solve2Linear: (a: number, b: number, c: number, d: number, u: number, v: number) => number[];
|
||||
export declare function insertSorted<T>(array: T[], element: T, comparefunc: (a: T, b: T) => number): void;
|
||||
export declare function interpolateBetween2DPointsForY(point1: Vector2D, point2: Vector2D, y: number): number;
|
||||
//# sourceMappingURL=utils.d.ts.map
|
1
types/csg/core/utils.d.ts.map
Normal file
1
types/csg/core/utils.d.ts.map
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/csg/core/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,wBAAgB,YAAY,CAAC,CAAC,KAAA,EAAE,CAAC,KAAA,UAGhC;AAED,eAAO,MAAM,YAAY,MAAgB,MAAM,KAAK,MAAM,KAAK,MAAM,KAAK,MAAM,KAAK,MAAM,KAAK,MAAM,aASrG,CAAC;AAEF,wBAAgB,YAAY,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,MAAM,QAgB1F;AAKD,wBAAgB,8BAA8B,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,UAqB3F"}
|
13
types/csg/core/utils/canonicalize.d.ts
vendored
Normal file
13
types/csg/core/utils/canonicalize.d.ts
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
import { FuzzyCSGFactory } from "../FuzzyFactory3d";
|
||||
import { CSG } from "../CSG";
|
||||
import { CAG } from "../CAG";
|
||||
/**
|
||||
* Returns a cannoicalized version of the input csg : ie every very close
|
||||
* points get deduplicated
|
||||
*
|
||||
* 返回删除重复点的csg,重复点将被合并
|
||||
*/
|
||||
export declare function canonicalizeCSG(csg: CSG): CSG;
|
||||
export declare function canonicalizeCAG(cag: CAG): CAG;
|
||||
export declare function CSGFromCSGFuzzyFactory(factory: FuzzyCSGFactory, sourcecsg: CSG): CSG;
|
||||
//# sourceMappingURL=canonicalize.d.ts.map
|
1
types/csg/core/utils/canonicalize.d.ts.map
Normal file
1
types/csg/core/utils/canonicalize.d.ts.map
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"canonicalize.d.ts","sourceRoot":"","sources":["../../../../../src/csg/core/utils/canonicalize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAC7B,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAI7B;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,CAO7C;AAED,wBAAgB,eAAe,CAAC,GAAG,EAAE,GAAG,OAMvC;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,GAAG,OAO9E"}
|
11
types/csg/core/utils/csgMeasurements.d.ts
vendored
Normal file
11
types/csg/core/utils/csgMeasurements.d.ts
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
import { Vector3D } from "../math/Vector3";
|
||||
import { CSG } from "../CSG";
|
||||
/**
|
||||
* Returns an array of Vector3D, providing minimum coordinates and maximum coordinates
|
||||
* of this solid.
|
||||
* @example
|
||||
* let bounds = A.getBounds()
|
||||
* let minX = bounds[0].x
|
||||
*/
|
||||
export declare function bounds(csg: CSG): Vector3D[];
|
||||
//# sourceMappingURL=csgMeasurements.d.ts.map
|
1
types/csg/core/utils/csgMeasurements.d.ts.map
Normal file
1
types/csg/core/utils/csgMeasurements.d.ts.map
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"csgMeasurements.d.ts","sourceRoot":"","sources":["../../../../../src/csg/core/utils/csgMeasurements.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAC7B;;;;;;GAMG;AACH,wBAAgB,MAAM,CAAC,GAAG,EAAE,GAAG,GAAG,QAAQ,EAAE,CA2B3C"}
|
3
types/csg/core/utils/retesellate.d.ts
vendored
Normal file
3
types/csg/core/utils/retesellate.d.ts
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
import { CSG } from "../CSG";
|
||||
export declare function reTesselate(csg: CSG): CSG;
|
||||
//# sourceMappingURL=retesellate.d.ts.map
|
1
types/csg/core/utils/retesellate.d.ts.map
Normal file
1
types/csg/core/utils/retesellate.d.ts.map
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"retesellate.d.ts","sourceRoot":"","sources":["../../../../../src/csg/core/utils/retesellate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAK7B,wBAAgB,WAAW,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,CA+BzC"}
|
Loading…
Reference in New Issue
Block a user