开发:清理代码导入

pull/1714/MERGE
ChenX 3 years ago
parent 2116647cd1
commit 3dfd08cdd5

@ -1,5 +1,5 @@
import { Polyline } from "../../src/DatabaseServices/Entity/Polyline";
import { Vector2, Vector3 } from "three";
import { Vector2 } from "three";
import { IntersectOption } from "../../src/GraphicsSystem/IntersectWith";
describe("相交", () =>
{

@ -1,5 +1,5 @@
import { Polyline } from "../../src/DatabaseServices/Entity/Polyline";
import { Vector2, Vector3 } from "three";
import { Vector2 } from "three";
//构造测试的多段线

@ -1,4 +1,4 @@
import { Button, Card, Classes, H5, Intent } from '@blueprintjs/core';
import { Button, Card, Classes, Intent } from '@blueprintjs/core';
import { observable } from 'mobx';
import { observer } from 'mobx-react';
import React from 'react';

@ -1,14 +1,13 @@
import { Intent } from "@blueprintjs/core";
import { app } from "../ApplicationServices/Application";
import { ExtrudeHole } from "../DatabaseServices/3DSolid/ExtrudeHole";
import { Board } from "../DatabaseServices/Entity/Board";
import { ExtrudeSolid } from "../DatabaseServices/Entity/Extrude";
import { Command } from "../Editor/CommandMachine";
import { JigUtils } from "../Editor/JigUtils";
import { PromptStatus } from "../Editor/PromptResult";
import { FeedingToolPath } from "../GraphicsSystem/ToolPath/FeedingToolPath";
import { ExtrudeHole } from "../DatabaseServices/3DSolid/ExtrudeHole";
import { AppToaster } from "../UI/Components/Toaster";
import { Intent } from "@blueprintjs/core";
import { Production } from "../Production/Product";
export class CheckModeling implements Command
{

@ -1,7 +1,5 @@
import * as path from 'path';
import * as THREE from 'three';
import { begin } from 'xaop';
import { app } from '../ApplicationServices/Application';
import { Command } from '../Editor/CommandMachine';

@ -1,7 +1,7 @@
import { app } from '../ApplicationServices/Application';
import { Point } from '../DatabaseServices/Entity/Point';
import { Command } from '../Editor/CommandMachine';
import { PromptStatus, PromptEntityResult } from '../Editor/PromptResult';
import { PromptStatus } from '../Editor/PromptResult';
export class CMD_DrawPoint implements Command

@ -1,12 +1,11 @@
import { Vector3 } from "three";
import { Board } from "../../DatabaseServices/Entity/Board";
import { Polyline } from "../../DatabaseServices/Entity/Polyline";
import { MoveMatrix, AsVector2 } from "../../Geometry/GeUtils";
import { AsVector2, MoveMatrix } from "../../Geometry/GeUtils";
import { ISpaceParse } from "../../Geometry/SpaceParse/ISpaceParse";
import { BoardType } from "../../UI/Store/BoardInterface";
import { EWRackArrayType, IWineRackOption } from "../../UI/Store/WineRackInterface";
import { DrawWineRackTool } from "./DrawWinRackTool";
import { BoardType } from "../../UI/Store/BoardInterface";
import { clamp } from "../../Common/Utils";
/**
*

@ -10,7 +10,7 @@ import { PromptStatus } from '../Editor/PromptResult';
import { VisualSpaceBox } from '../Editor/VisualSpaceBox';
import { DynamicInputManage } from '../UI/DynamicPrompt/DynamicInputManage';
import { PromptBlock } from '../UI/DynamicPrompt/PromptBlock';
import { BoxLine } from './testEntity/TestBoundaryBox';
import { BoxLine } from "./testEntity/BoxLine";
//演示了如何单选图形

@ -1,4 +1,3 @@
import { Vector3 } from "three";
import { IOriginModelingData } from "../../../Production/Product";
export class CadBlockPoint

@ -1,10 +1,9 @@
import { Command } from "../Editor/CommandMachine";
import { GetBox, GetBoxArr } from "../Geometry/GeUtils";
import { Object3D, Vector3 } from "three";
import { app } from "../ApplicationServices/Application";
import { Vector3, Object3D } from "three";
import { Board } from "../DatabaseServices/Entity/Board";
import { PromptStatus } from "../Editor/PromptResult";
import { Entity } from "../DatabaseServices/Entity/Entity";
import { Command } from "../Editor/CommandMachine";
import { PromptStatus } from "../Editor/PromptResult";
import { GetBox, GetBoxArr } from "../Geometry/GeUtils";
const MOVEDIS = 10;
const MOVECOUNT = 300;

@ -1,6 +1,5 @@
import { Box3, Group, Object3D } from 'three';
import { STLExporter } from 'three/examples/jsm/exporters/STLExporter.js';
import { ColladaExporter } from 'three/examples/jsm/exporters/ColladaExporter';
import { app } from '../../ApplicationServices/Application';
import { FileSystem } from '../../Common/FileSystem';
import { Entity } from '../../DatabaseServices/Entity/Entity';

@ -1,12 +1,11 @@
import { app } from "../ApplicationServices/Application";
import { formateDate } from "../Common/Utils";
import { deflate } from "../Common/SerializeMaterial";
import { Database } from "../DatabaseServices/Database";
import { Entity } from "../DatabaseServices/Entity/Entity";
import { FileServer } from "../DatabaseServices/FileServer";
import { Command } from "../Editor/CommandMachine";
import { PromptStatus } from "../Editor/PromptResult";
import { MoveMatrix } from "../Geometry/GeUtils";
import { deflate } from "../Common/SerializeMaterial";
export class Command_Wblock implements Command
{

@ -0,0 +1,38 @@
import { Box3, Vector3 } from "three";
import { Line } from "../../DatabaseServices/Entity/Line";
import { equalv3 } from "../../Geometry/GeUtils";
export function BoxLine(box: Box3): Line[]
{
if (box.isEmpty())
return [];
let pts = [
new Vector3(box.min.x, box.min.y, box.min.z),
new Vector3(box.min.x, box.min.y, box.max.z),
new Vector3(box.min.x, box.max.y, box.min.z),
new Vector3(box.min.x, box.max.y, box.max.z),
new Vector3(box.max.x, box.min.y, box.min.z),
new Vector3(box.max.x, box.min.y, box.max.z),
new Vector3(box.max.x, box.max.y, box.min.z),
new Vector3(box.max.x, box.max.y, box.max.z),
];
let lines: Line[] = [];
for (let line of [
[0, 1], [2, 3], [0, 2], [1, 3],
[4, 5], [6, 7], [4, 6], [5, 7],
[0, 4], [2, 6],
[1, 5], [3, 7],
])
{
let p1 = pts[line[0]];
let p2 = pts[line[1]];
if (!equalv3(p1, p2))
lines.push(new Line(p1, p2));
}
return lines;
}

@ -1,10 +1,8 @@
import { Box3, Vector3 } from "three";
import { app } from "../../ApplicationServices/Application";
import { Line } from "../../DatabaseServices/Entity/Line";
import { Command } from "../../Editor/CommandMachine";
import { PromptStatus } from "../../Editor/PromptResult";
import { equalv3 } from "../../Geometry/GeUtils";
import { TestDraw } from "../test/TestUtil";
import { BoxLine } from "./BoxLine";
export class Command_TestBoundaryBox implements Command
{
@ -21,36 +19,3 @@ export class Command_TestBoundaryBox implements Command
}
}
}
export function BoxLine(box: Box3): Line[]
{
if (box.isEmpty()) return [];
let pts = [
new Vector3(box.min.x, box.min.y, box.min.z),
new Vector3(box.min.x, box.min.y, box.max.z),
new Vector3(box.min.x, box.max.y, box.min.z),
new Vector3(box.min.x, box.max.y, box.max.z),
new Vector3(box.max.x, box.min.y, box.min.z),//4
new Vector3(box.max.x, box.min.y, box.max.z),
new Vector3(box.max.x, box.max.y, box.min.z),
new Vector3(box.max.x, box.max.y, box.max.z),
];
let lines: Line[] = [];
for (let line of [
[0, 1], [2, 3], [0, 2], [1, 3],//左右
[4, 5], [6, 7], [4, 6], [5, 7],
[0, 4], [2, 6],
[1, 5], [3, 7],
])
{
let p1 = pts[line[0]];
let p2 = pts[line[1]];
if (!equalv3(p1, p2))
lines.push(new Line(p1, p2));
}
return lines;
}

@ -1,4 +1,4 @@
import { Vector3, Box3 } from "three";
import { Vector3 } from "three";
import { app } from "../../ApplicationServices/Application";
import { Board } from "../../DatabaseServices/Entity/Board";
import { Line } from "../../DatabaseServices/Entity/Line";
@ -20,7 +20,7 @@ export class TestCollision implements Command
let checkRes = new CollisionDetection(boardCus);
if (boardCus.length >= 2)
if (boardCus.length >= 2)
{
let checkRes = new CollisionDetection(boardCus);

@ -1,4 +1,6 @@
import { MeshBasicMaterial, MeshStandardMaterial, Texture } from 'three';
import { FractionDigitsType } from '../Common/SystemEnum';
import { ICursorConfig } from '../Editor/ICursorConfig';
import { RenderType } from '../GraphicsSystem/RenderType';
import { DrillingOption } from '../UI/Store/drillInterface';
@ -63,6 +65,22 @@ export class IHostApplicationServices
statSt: false,//统计双头排钻
};
@ProxyValue viewSize = {
minViewHeight: 1e-3,
maxViewHeight: 3e6,
zoomSpeed: 0.6
};
@ProxyValue cursorSize: ICursorConfig = {
D2: 1000,
D3: 100,
SquareSize: 10,
};
@ProxyValue dimTextHeight = 60;
@ProxyValue lineWidth = 2; //打印线框
@ProxyValue fractionDigitsType: FractionDigitsType = FractionDigitsType.two;
private constructor() { };
private static _SingleInstance: IHostApplicationServices;

@ -1,10 +1,14 @@
export function IsDev()
{
//del_exp_start
return window.location.hostname === "localhost";
//del_exp_end return false
}
export function IsTest()
{
//del_exp_start
return window.location.hostname === "localhost" || window.location.hostname === "t.cfcad.cn";
//del_exp_end return false
}

@ -1,12 +1,12 @@
import { BufferGeometry, Line as TLine, Material, MathUtils, Matrix3, Matrix4, Mesh, Object3D, Vector3 } from "three";
import { Line2 } from "three/examples/jsm/lines/Line2";
import { HostApplicationServices } from "../../ApplicationServices/HostApplicationServices";
import { AddEntityDrawObject } from "../../Common/AddEntityDrawObject";
import { arrayRemoveDuplicateBySort, arraySortByNumber } from "../../Common/ArrayExt";
import { ColorMaterial } from "../../Common/ColorPalette";
import { reviseMirrorMatrix } from "../../Common/Matrix4Utils";
import { FixedNotZero, FixIndex } from "../../Common/Utils";
import { ObjectSnapMode } from "../../Editor/ObjectSnapMode";
import { userConfig } from "../../Editor/UserConfig";
import { BufferGeometryUtils } from "../../Geometry/BufferGeometryUtils";
import { angle, equaln, equalv3 } from "../../Geometry/GeUtils";
import { IntersectOption } from "../../GraphicsSystem/IntersectWith";
@ -37,7 +37,7 @@ export class LineAngularDimension extends Dimension
super();
// this._Arc.ColorIndex = 3;
this._Text.TextAligen = TextAligen.Down;
this._Text.Height = userConfig.dimTextHeight;
this._Text.Height = HostApplicationServices.dimTextHeight;
}
protected GetString()
@ -189,7 +189,7 @@ export class LineAngularDimension extends Dimension
{
l = new Line2(undefined, ColorMaterial.PrintLineMatrial);
l2 = new Line2(undefined, ColorMaterial.PrintLineMatrial);
arrowSize *= userConfig.lineWidth * 0.5;
arrowSize *= HostApplicationServices.lineWidth * 0.5;
}
else
{

@ -1,6 +1,7 @@
import { BufferGeometry, Line as TLine, Material, Matrix3, Matrix4, Mesh, Object3D, Vector2, Vector3 } from "three";
import { Line2 } from "three/examples/jsm/lines/Line2";
import { LineGeometry } from "three/examples/jsm/lines/LineGeometry";
import { HostApplicationServices } from "../../ApplicationServices/HostApplicationServices";
import { AddEntityDrawObject } from "../../Common/AddEntityDrawObject";
import { ColorMaterial } from "../../Common/ColorPalette";
import { safeEval } from "../../Common/eval";
@ -8,7 +9,6 @@ import { reviseMirrorMatrix } from "../../Common/Matrix4Utils";
import { UpdateDraw } from "../../Common/Status";
import { FixedNotZero } from "../../Common/Utils";
import { ObjectSnapMode } from "../../Editor/ObjectSnapMode";
import { userConfig } from "../../Editor/UserConfig";
import { BufferGeometryUtils } from "../../Geometry/BufferGeometryUtils";
import { angle, angleAndX, AsVector2, equaln, equalv3, midPoint, ZAxis } from "../../Geometry/GeUtils";
import { RenderType } from "../../GraphicsSystem/RenderType";
@ -65,7 +65,7 @@ export class AlignedDimension extends Dimension
{
super();
this._Text.TextAligen = TextAligen.Down;
this._Text.Height = userConfig.dimTextHeight;
this._Text.Height = HostApplicationServices.dimTextHeight;
}
set Material(materialId: ObjectId) { }
@ -354,7 +354,7 @@ export class AlignedDimension extends Dimension
let arrowSize = 10;
if (renderType === RenderType.WireframePrint)
{
arrowSize *= userConfig.lineWidth * 0.5;
arrowSize *= HostApplicationServices.lineWidth * 0.5;
const geometry = (<Line2>line).geometry;
let nums: number[] = [];
for (let p of [this._FootP1, this._ArmP1, this._ArmP2, this._FootP2])
@ -615,7 +615,7 @@ export class AlignedDimension extends Dimension
this._LeadOutOffsetX = file.Read();
}
if (ver > 4) this._TextSize = file.Read();
if (ver > 5) this._FractionDigits = file.Read() ?? userConfig.fractionDigitsType ?? 2;
if (ver > 5) this._FractionDigits = file.Read() ?? HostApplicationServices.fractionDigitsType ?? 2;
}
//对象将自身数据写入到文件.

@ -1,9 +1,9 @@
import { BufferGeometry, Line as TLine, Material, Mesh, Object3D, Vector3 } from "three";
import { Line2 } from "three/examples/jsm/lines/Line2";
import { HostApplicationServices } from "../../ApplicationServices/HostApplicationServices";
import { AddEntityDrawObject } from "../../Common/AddEntityDrawObject";
import { ColorMaterial } from "../../Common/ColorPalette";
import { DisposeThreeObj } from "../../Common/Dispose";
import { userConfig } from "../../Editor/UserConfig";
import { BufferGeometryUtils } from "../../Geometry/BufferGeometryUtils";
import { angle, midPoint } from "../../Geometry/GeUtils";
import { RenderType } from "../../GraphicsSystem/RenderType";
@ -60,7 +60,7 @@ export class DiameterDimension extends RadiusDimension
if (renderType === RenderType.WireframePrint)
{
arrowSize *= userConfig.lineWidth * 0.5;
arrowSize *= HostApplicationServices.lineWidth * 0.5;
let geo = (line as Line2).geometry;
geo.setPositions([...sp.toArray(), ...this.center.toArray(), ...this.endPt.toArray()]);
}

@ -1,4 +1,4 @@
import { userConfig } from "../../Editor/UserConfig";
import { HostApplicationServices } from "../../ApplicationServices/HostApplicationServices";
import { Factory } from "../CADFactory";
import { Entity } from "../Entity/Entity";
import { Text } from "../Text/Text";
@ -8,9 +8,9 @@ export abstract class Dimension extends Entity
{
OnlyRenderType = true;
protected _TextString: string;
protected _TextSize: number = userConfig.dimTextHeight;
protected _TextSize: number = HostApplicationServices.dimTextHeight;
protected _Text = new Text(undefined, undefined, "yahei");
protected _FractionDigits: number = userConfig.fractionDigitsType;
protected _FractionDigits: number = HostApplicationServices.fractionDigitsType;
set TextString(txt: string)
{
let str = this.GetString();

@ -1,12 +1,12 @@
import { BufferGeometry, Line as TLine, Material, Matrix3, Matrix4, Mesh, Object3D, Vector3 } from "three";
import { Line2 } from "three/examples/jsm/lines/Line2";
import { HostApplicationServices } from "../../ApplicationServices/HostApplicationServices";
import { AddEntityDrawObject } from "../../Common/AddEntityDrawObject";
import { ColorMaterial } from "../../Common/ColorPalette";
import { DisposeThreeObj } from "../../Common/Dispose";
import { reviseMirrorMatrix } from "../../Common/Matrix4Utils";
import { FixedNotZero } from "../../Common/Utils";
import { ObjectSnapMode } from "../../Editor/ObjectSnapMode";
import { userConfig } from "../../Editor/UserConfig";
import { BufferGeometryUtils } from "../../Geometry/BufferGeometryUtils";
import { angle, angleAndX, MoveMatrix } from "../../Geometry/GeUtils";
import { RenderType } from "../../GraphicsSystem/RenderType";
@ -32,7 +32,7 @@ export class RadiusDimension extends Dimension
)
{
super();
this._Text.Height = userConfig.dimTextHeight;
this._Text.Height = HostApplicationServices.dimTextHeight;
}
get Text()
@ -138,7 +138,7 @@ export class RadiusDimension extends Dimension
if (renderType === RenderType.WireframePrint)
{
arrowSize *= userConfig.lineWidth * 0.5;
arrowSize *= HostApplicationServices.lineWidth * 0.5;
let geo = (line as Line2).geometry;
geo.setPositions([...this.startPt.toArray(), ...this.center.toArray(), ...this.endPt.toArray()]);
}

@ -1,12 +1,10 @@
import { Box3, BufferGeometry, Matrix3, Matrix4, Object3D, Shape, Vector3, Line as TLine, MathUtils } from 'three';
import { Matrix3, Matrix4, Shape, Vector3, MathUtils } from 'three';
import { arrayLast, arrayRemoveDuplicateBySort } from '../../Common/ArrayExt';
import { ColorMaterial } from '../../Common/ColorPalette';
import { getDeterminantFor2V, getArcOrCirNearPts, getTanPtsOnEllipse, Pts2Polyline } from '../../Common/CurveUtils';
import { Status } from '../../Common/Status';
import { ObjectSnapMode } from '../../Editor/ObjectSnapMode';
import { angle, equaln, equalv3, MoveMatrix, rotatePoint, angleTo, AsVector2, AsVector3 } from '../../Geometry/GeUtils';
import { angle, equaln, equalv3, MoveMatrix, rotatePoint, angleTo, AsVector2 } from '../../Geometry/GeUtils';
import { IntersectEllipse, IntersectEllipseAndCircleOrArc, IntersectEllipseAndLine, IntersectOption, IntersectPolylineAndCurve, reverseIntersectOption } from '../../GraphicsSystem/IntersectWith';
import { RenderType } from '../../GraphicsSystem/RenderType';
import { Arc } from './Arc';
import { Factory } from '../CADFactory';
import { CADFiler } from '../CADFiler';

@ -1,6 +1,6 @@
import { Box3, Matrix3, Matrix4, Mesh, MeshPhongMaterial, MeshPhysicalMaterial, Object3D, Vector3 } from "three";
import { BoxLine } from "../../Add-on/testEntity/BoxLine";
import { ConverMaterial2, ParseBoxUrl, ParseFBXUrl, UE_FBX_LOADER } from "../../Add-on/testEntity/ParseMaterialImage";
import { BoxLine } from "../../Add-on/testEntity/TestBoundaryBox";
import { ColorMaterial } from "../../Common/ColorPalette";
import { DisposeThreeObj, Object3DRemoveAll } from "../../Common/Dispose";
import { UpdateDraw } from "../../Common/Status";
@ -119,6 +119,7 @@ export class EntityRef extends Entity
// // return new Box3(this._Center.clone().sub(size2), size2.add(this._Center));
// // }
//del_exp_start
//#region Draw
InitDrawObject(renderType: RenderType = RenderType.Wireframe)
{
@ -272,6 +273,8 @@ export class EntityRef extends Entity
newObject.updateMatrixWorld(false);//保证更新位置
}
//del_exp_end
GetObjectSnapPoints(
snapMode: ObjectSnapMode,
pickPoint: Vector3,

@ -1,4 +1,4 @@
import { Face3, Geometry, Mesh, Object3D, Vector3, Line } from "three";
import { Face3, Geometry, Object3D, Vector3, Line } from "three";
import { RenderType } from "../GraphicsSystem/RenderType";
import { CADFiler } from "./CADFiler";
import { Entity } from "./Entity/Entity";

@ -190,6 +190,8 @@ export class ViewportEntity extends Entity
new Vector3(0, this._height, z),
];
}
//del_exp_start
NeedUpdateTexture = true;
InitDrawObject(type: RenderType)
{
@ -249,6 +251,7 @@ export class ViewportEntity extends Entity
}
this.NeedUpdateTexture = false;
}
//del_exp_end
UpdateByPts(p1: Vector3, p2: Vector3)
{

@ -1,4 +1,4 @@
import { Geometry, Mesh, MeshBasicMaterial, Object3D, Scene, ShapeGeometry, Vector2, Vector3, WebGLRenderer, WebGLRenderTarget } from "three";
import { Geometry, Mesh, MeshBasicMaterial, Object3D, Scene, ShapeGeometry, Vector3, WebGLRenderer, WebGLRenderTarget } from "three";
import { CADFiler } from "../../api";
import { app } from "../../ApplicationServices/Application";
import { ColorMaterial } from "../../Common/ColorPalette";
@ -61,6 +61,7 @@ export class ViewportEntity2 extends Entity
_Target = new Vector3(0, 0, -1);
//del_exp_start
private _RenderTarget: WebGLRenderTarget;
private _Scene: Scene;
InitDrawObject(renderType: RenderType = RenderType.Wireframe): Object3D
@ -133,6 +134,7 @@ export class ViewportEntity2 extends Entity
ViewportEntity2.Renderer.setClearColor(0x000000);
}
}
//del_exp_end
Destroy()
{

@ -0,0 +1,9 @@
import { IBaseOption } from "../UI/Store/BoardInterface";
export interface ICursorConfig extends IBaseOption
{
D2: number;
D3: number;
SquareSize: number;
}

@ -1,9 +1,9 @@
import { Intersection, Object3D, OrthographicCamera, Raycaster, Vector2, Vector3 } from 'three';
import { HostApplicationServices } from '../ApplicationServices/HostApplicationServices';
import { equaln } from '../Geometry/GeUtils';
import { IViewer } from '../GraphicsSystem/IView';
import { SelectBox, SelectType } from './SelectBox';
import { CheckFilter, Filter } from './SelectFilter';
import { userConfig } from './UserConfig';
/**
* 线.
@ -73,7 +73,7 @@ export function PointPickOneObject(
if (!useSelectBox) return;
let pCenter = new Vector2(ptVcs.x, ptVcs.y);
let selectSize = new Vector2(userConfig.cursorSize.SquareSize, userConfig.cursorSize.SquareSize);
let selectSize = new Vector2(HostApplicationServices.cursorSize.SquareSize, HostApplicationServices.cursorSize.SquareSize);
let minPt = pCenter.clone().sub(selectSize);
let maxPt = pCenter.clone().add(selectSize);

@ -1,5 +1,5 @@
import { Object3D } from "three";
import { GetEntity, IsEntity } from "../Common/Utils";
import { GetEntity } from "../Common/Utils";
import { Entity } from "../DatabaseServices/Entity/Entity";
import { GripScene } from "../GraphicsSystem/GripScene";

@ -7,6 +7,7 @@ import { IBaseOption, IGrooveOption } from "../UI/Store/BoardInterface";
import { IConfigStore } from "../UI/Store/BoardStore";
import { DrillingOption } from "../UI/Store/drillInterface";
import { IWineRackOption } from "../UI/Store/WineRackInterface";
import { ICursorConfig } from "./ICursorConfig";
export interface IMaxSizeProps extends IBaseOption
{
@ -24,13 +25,6 @@ export interface ISystemConfig extends IBaseOption
layoutBackground: string;
}
export interface ICursorConfig extends IBaseOption
{
D2: number;
D3: number;
SquareSize: number;
}
export interface IUCSGridConfig extends IBaseOption
{
isShowUCSGrid: boolean,

@ -1,6 +1,6 @@
import { Box3, MathUtils, OrthographicCamera, PerspectiveCamera, Vector3 } from 'three';
import { HostApplicationServices } from '../ApplicationServices/HostApplicationServices';
import { CADFiler } from '../DatabaseServices/CADFiler';
import { userConfig } from '../Editor/UserConfig';
import { Orbit } from '../Geometry/Orbit';
const ViewScopeSize = 4e6;
@ -81,7 +81,7 @@ export class CameraUpdate
}
set ViewHeight(height)
{
this._ViewHeight = MathUtils.clamp(height, userConfig.viewSize.minViewHeight, userConfig.viewSize.maxViewHeight);
this._ViewHeight = MathUtils.clamp(height, HostApplicationServices.viewSize.minViewHeight, HostApplicationServices.viewSize.maxViewHeight);
this.ZoomEvent();
}
@ -189,7 +189,7 @@ export class CameraUpdate
if (this.Camera instanceof OrthographicCamera)
{
this.ViewHeight *= scale;
if (scaleCenter && this._ViewHeight < userConfig.viewSize.maxViewHeight)
if (scaleCenter && this._ViewHeight < HostApplicationServices.viewSize.maxViewHeight)
{
this._Target.sub(scaleCenter);
this._Target.multiplyScalar(scale);

@ -1,5 +1,4 @@
import { Command } from "../../Editor/CommandMachine";
import { HotCMD } from "../../Hot/HotCommand";
import { app } from "../../ApplicationServices/Application";
import { Polyline } from "../../DatabaseServices/Entity/Polyline";
import { PromptStatus } from "../../Editor/PromptResult";

@ -3,7 +3,6 @@ import { Point } from "../../DatabaseServices/Entity/Point";
import { PromptStatus } from "../../Editor/PromptResult";
import { ConvexHull2D } from "../Common/ConvexHull2D";
import { Path2Polyline } from "../Converter/Path2Polyline";
import { HotCMD } from "../../Hot/HotCommand";
export class Command_TestHull

@ -6,7 +6,6 @@ import { Polyline } from "../../DatabaseServices/Entity/Polyline";
import { Command } from "../../Editor/CommandMachine";
import { PromptStatus } from "../../Editor/PromptResult";
import { AsVector3 } from "../../Geometry/GeUtils";
import { HotCMD } from "../../Hot/HotCommand";
import { Container } from "../Core/Container";
import { Curve2Path, Curves2Parts } from "../Converter/Curves2Parts";
import { Part } from "../Core/Part";

@ -1,4 +1,4 @@
import { Button, Checkbox, Classes, HTMLSelect, Intent, IOptionProps } from '@blueprintjs/core';
import { Button, Checkbox, Classes, HTMLSelect, Intent } from '@blueprintjs/core';
import { observer } from 'mobx-react';
import * as React from 'react';
import { safeEval } from '../../../Common/eval';

@ -1,6 +1,6 @@
import { inject, observer } from 'mobx-react';
import { observer } from 'mobx-react';
import * as React from 'react';
import { Button, Classes, H5, Label } from '@blueprintjs/core';
import { Button, Classes, H5 } from '@blueprintjs/core';
import { ModalState } from '../../Modal/ModalInterface';
import { DoorConfigModal } from './DoorConfigModal';
import { DoorPreviewComponent } from './DoorPreviewComponent';

@ -1,4 +1,4 @@
import { Button, Classes, Intent } from '@blueprintjs/core';
import { Button, Classes } from '@blueprintjs/core';
import { observer } from 'mobx-react';
import * as React from 'react';
import { app } from '../../../ApplicationServices/Application';

@ -4,7 +4,8 @@ import * as React from 'react';
import { CheckObjectType } from '../../../../Common/CheckoutVaildValue';
import { DataAdapter } from '../../../../Common/DataAdapter';
import { safeEval } from '../../../../Common/eval';
import { ICursorConfig, ISystemConfig, userConfig } from "../../../../Editor/UserConfig";
import { ICursorConfig } from "../../../../Editor/ICursorConfig";
import { ISystemConfig, userConfig } from "../../../../Editor/UserConfig";
import { IUiOption } from '../../../Store/BoardInterface';
import { ToasterInput } from '../../Toaster';

@ -1,4 +1,4 @@
import { Button, Card, Checkbox, Classes, ContextMenu, Intent, Menu, MenuItem, Popover, Position } from '@blueprintjs/core';
import { Button, ContextMenu, Intent, Menu, MenuItem } from '@blueprintjs/core';
import { IObservableValue, observable } from 'mobx';
import { observer } from 'mobx-react';
import * as React from 'react';

@ -1,4 +1,4 @@
import { Classes, HTMLSelect, Label } from '@blueprintjs/core';
import { Classes, Label } from '@blueprintjs/core';
import { inject, observer } from 'mobx-react';
import * as React from 'react';
import { ColorMaterial } from '../../../Common/ColorPalette';

@ -1,6 +1,6 @@
import * as React from 'react';
import { H5, Label, Classes, Button, Intent } from '@blueprintjs/core';
import { Button, Classes, H5, Intent } from '@blueprintjs/core';
import { observer } from 'mobx-react';
import * as React from 'react';
export interface ISimpleDialogProps
{

@ -1,4 +1,4 @@
import { Button, Card, Checkbox, Classes, Intent, Popover, Position, PopoverInteractionKind } from '@blueprintjs/core';
import { Button, Card, Checkbox, Classes, Intent, Popover, Position } from '@blueprintjs/core';
import { inject, observer } from 'mobx-react';
import * as React from 'react';
import { MaterialStore } from '../../Store/MaterialStore';

@ -17,8 +17,6 @@ export interface SoucePanelState
}
export const MFilePanel = "f1";
const ModelPanel = () => <h5></h5>;
/**
*
* TODO:

@ -1,21 +1,21 @@
import { Button, Card, Checkbox, Classes, Intent, Popover, Position, ContextMenu, Menu, MenuItem } from '@blueprintjs/core';
import { Button, ContextMenu, Intent, Menu, MenuItem } from '@blueprintjs/core';
import { IObservableValue } from 'mobx';
import { observer } from 'mobx-react';
import * as React from 'react';
import { TempEditor } from '../../../Editor/TempEditor';
import { app } from '../../../ApplicationServices/Application';
import { Polyline } from '../../../DatabaseServices/Entity/Polyline';
import { PostJson, RequestStatus } from '../../../Common/Request';
import { ToplineUrls } from '../../../Common/HostUrl';
import { inflate, toplineFileIn, getPolylineSVG, deflate } from '../../../Common/SerializeMaterial';
import { PostJson, RequestStatus } from '../../../Common/Request';
import { deflate, getPolylineSVG, inflate, toplineFileIn } from '../../../Common/SerializeMaterial';
import { CADFiler } from '../../../DatabaseServices/CADFiler';
import { ZoomToEntity } from '../../Store/RightPanelStore/BoardEdgesEditor';
import { Polyline } from '../../../DatabaseServices/Entity/Polyline';
import { CommandWrap } from '../../../Editor/CommandMachine';
import { AppToaster } from '../Toaster';
import { TopllineManage } from './ToplineManage';
import { TempEditor } from '../../../Editor/TempEditor';
import { ZoomToEntity } from '../../Store/RightPanelStore/BoardEdgesEditor';
import { DataList } from '../Common/Datalist';
import { ModalPosition } from '../Modal/ModalInterface';
import { IDirectoryProps } from '../SourceManage/CommonPanel';
import { DataList } from '../Common/Datalist';
import { AppToaster } from '../Toaster';
import { TopllineManage } from './ToplineManage';
export interface IToplineListProps
{

@ -1,4 +1,4 @@
import { Card, HTMLTable, Icon, InputGroup, Tooltip } from '@blueprintjs/core';
import { Card, HTMLTable, Icon, InputGroup } from '@blueprintjs/core';
import { IObservableValue, observable } from 'mobx';
import { observer } from 'mobx-react';
import * as React from 'react';

@ -1,12 +1,12 @@
import { IKuGangDrawOption } from "../Components/Template/TemplateInterface";
import { DefaultKuGanOption } from "../../Editor/DefaultConfig";
import { IUiOption } from "./BoardInterface";
import { action, observable, reaction, toJS } from "mobx";
import { appCache } from "../../Common/AppCache";
import { DataAdapter } from "../../Common/DataAdapter";
import { observable, toJS, autorun, reaction, action } from "mobx";
import { safeEval } from "../../Common/eval";
import { PostJson, RequestStatus } from "../../Common/Request";
import { ConfigUrls } from "../../Common/HostUrl";
import { appCache } from "../../Common/AppCache";
import { PostJson, RequestStatus } from "../../Common/Request";
import { DefaultKuGanOption } from "../../Editor/DefaultConfig";
import { IKuGangDrawOption } from "../Components/Template/TemplateInterface";
import { IUiOption } from "./BoardInterface";
export class KuGanStore
{

@ -1,10 +1,10 @@
import { observable, toJS } from "mobx";
import { ICylMetalsOption, IExtMetalsOption, ICompHardwareOption, IHardwareOption, IToplineOption } from "../../Components/RightPanel/RightPanelInterface";
import { DefaultCylinederMetalsOption, DefaultExtruderMetalsOption, DefaultCompositeMetalsOption, DefaultToplineMetalsOption } from "../../../Editor/DefaultConfig";
import { IConfigStore } from "../BoardStore";
import { IConfigOption } from "../../Components/Board/UserConfig";
import { HardwareCompositeEntity } from "../../../DatabaseServices/Hardware/HardwareCompositeEntity";
import { HardwareTopline } from "../../../DatabaseServices/Hardware/HardwareTopline";
import { DefaultCompositeMetalsOption, DefaultToplineMetalsOption } from "../../../Editor/DefaultConfig";
import { IConfigOption } from "../../Components/Board/UserConfig";
import { ICompHardwareOption, IHardwareOption, IToplineOption } from "../../Components/RightPanel/RightPanelInterface";
import { IConfigStore } from "../BoardStore";
export abstract class BaseHardwareStore implements IConfigStore
{

@ -1,7 +1,7 @@
import * as THREE from 'three';
import '../../Css/switchTheme.less';
import { CameraControlState } from './Editor/CameraControls';
import './UI/Css/style.less';
import '../../Css/switchTheme.less';
import { WebCADView } from './WebCADView/WebCADView';
function createRootElement()
@ -31,8 +31,6 @@ function createBtn(textCtx: string, parEl: HTMLElement, callback: any)
return btn;
}
let bulbLight: THREE.PointLight;
window.onload = async () =>
{
let el = createRootElement();

Loading…
Cancel
Save