!821 修复:打印效果和测试错误问题

pull/821/MERGE
ZoeLeeFZ 5 years ago committed by ChenX
parent 10c3f32a3d
commit 287b22a4c8

@ -28,9 +28,9 @@ const vendors = [
"three/examples/jsm/postprocessing/SMAAPass",
"three/examples/jsm/renderers/SVGRenderer.js",
"three/examples/jsm/helpers/RectAreaLightHelper",
"three/examples/jsm//lines/LineMaterial.js",
"three/examples/jsm/lines/LineGeometry.js",
"three/examples/jsm/lines/Line2.js",
"three/examples/jsm//lines/LineMaterial",
"three/examples/jsm/lines/LineGeometry",
"three/examples/jsm/lines/Line2",
];
const config: webpack.Configuration = {

@ -98,8 +98,9 @@
},
"jest": {
"transform": {
".(ts|tsx)": "ts-jest"
"^.+\\.(js|ts|tsx)$": "ts-jest"
},
"transformIgnorePatterns": [],
"testRegex": "/__test__/.*\\.(test|spec)\\.(ts|tsx|js)$",
"moduleFileExtensions": [
"ts",

@ -18,8 +18,8 @@ import { Polyline } from "../Entity/Polyline";
import { Shape } from "../Shape";
import { Hole } from "./Hole";
import { OBB } from './../../Geometry/OBB/obb';
import { LineMaterial } from 'three/examples/jsm/lines/LineMaterial.js';
import { Line2 } from 'three/examples/jsm/lines/Line2.js';
import { LineMaterial } from 'three/examples/jsm/lines/LineMaterial';
import { Line2 } from 'three/examples/jsm/lines/Line2';
import { Geometry2CSG } from './../../csg/core/Geometry2CSG';
@Factory

@ -19,8 +19,8 @@ import { OBB } from './../../Geometry/OBB/obb';
import { FixIndex } from './../../Common/Utils';
import { PlaneExt } from './../../Geometry/Plane';
import { tempMatrix1 } from "../../Common/Matrix4Utils";
import { Line2 } from "three/examples/jsm/lines/Line2.js";
import { LineMaterial } from "three/examples/jsm/lines/LineMaterial.js";
import { Line2 } from "three/examples/jsm/lines/Line2";
import { LineMaterial } from "three/examples/jsm/lines/LineMaterial";
import { Geometry2CSG } from './../../csg/core/Geometry2CSG';
@Factory

@ -30,8 +30,8 @@ import { DragPointType } from "./DragPointType";
import { Entity } from "./Entity";
import { Polyline } from "./Polyline";
import { Region } from "./Region";
import { Line2 } from "three/examples/jsm/lines/Line2.js";
import { LineMaterial } from "three/examples/jsm/lines/LineMaterial.js";
import { Line2 } from "three/examples/jsm/lines/Line2";
import { LineMaterial } from "three/examples/jsm/lines/LineMaterial";
/** 最大的槽个数,当大于最大个数时,实体不会绘制槽,并且不会校验槽的正确性 */
const MaxGrooveCount = 15;
@ -1258,9 +1258,9 @@ export class ExtrudeSolid extends Entity
let line = new Line2(geometry, mat);
let mat2 = ColorMaterial.GetBasicMaterial(7).clone();
let meshGeo = this.MeshGeometry.clone();
const n1 = 10 / this.width;
const n2 = 10 / this.height;
const n3 = 5 / this.thickness;
const n1 = 4 / this.width;
const n2 = 4 / this.height;
const n3 = 2 / this.thickness;
meshGeo.translate(this.width * n1 / 2, this.height * n2 / 2, n3 / 2 * this.thickness);
meshGeo.scale(1 - n1, 1 - n2, 1 - n3);
let mesh = new Mesh(meshGeo, mat2);

@ -6,7 +6,7 @@ import { FuzzyCSGFactory } from "../csg/core/FuzzyFactory3d";
import { Polygon } from "../csg/core/math/Polygon3";
import { Vector3D } from "../csg/core/math/Vector3";
import { equalv3 } from "./GeUtils";
import { LineGeometry } from "three/examples/jsm/lines/LineGeometry.js";
import { LineGeometry } from "three/examples/jsm/lines/LineGeometry";
//ref: https://github.com/mrdoob/js/issues/10517
const keys = ['a', 'b', 'c'];

@ -7,6 +7,7 @@
"moduleResolution": "node",
"skipLibCheck": true,
"esModuleInterop": true,
"allowJs": true,
"lib": [
"esnext",
"dom"

Loading…
Cancel
Save