rename vectorutils

This commit is contained in:
casperlamboo 2018-02-11 23:50:57 +01:00
parent 5944153de7
commit 03f95b7570
8 changed files with 8 additions and 9 deletions

View File

@ -1,4 +1,4 @@
import { divide } from './helpers/VectorUtils.js'; import { divide } from './helpers/vector2D.js';
import { PRECISION } from '../constants.js' import { PRECISION } from '../constants.js'
export default function applyPrecision(layers) { export default function applyPrecision(layers) {

View File

@ -1,4 +1,4 @@
import { normalize } from './helpers/VectorUtils.js'; import { normalize } from './helpers/vector2D.js';
function addLine(geometry, lineLookup, lines, a, b, faceIndex) { function addLine(geometry, lineLookup, lines, a, b, faceIndex) {
let index; let index;

View File

@ -1,4 +1,4 @@
import { scale, distanceTo } from './VectorUtils.js'; import { scale, distanceTo } from './vector2D.js';
import { PRECISION, VERSION } from '../../constants.js'; import { PRECISION, VERSION } from '../../constants.js';
export const MOVE = 'G'; export const MOVE = 'G';

View File

@ -1,5 +1,5 @@
import Shape from 'clipper-js'; import Shape from 'clipper-js';
import { subtract, add, scale, normalize, dot, length, distanceTo } from './VectorUtils.js'; import { subtract, add, scale, normalize, dot, length, distanceTo } from './vector2D.js';
import { PRECISION } from '../../constants.js'; import { PRECISION } from '../../constants.js';
const TOLERANCE = 1 / PRECISION; const TOLERANCE = 1 / PRECISION;

View File

@ -30,5 +30,4 @@ export const normalize = (v) => {
x: v.x / l, x: v.x / l,
y: v.y / l y: v.y / l
}; };
} };
export const clone = (v) => ({ x: v.x, y: v.y });

View File

@ -1,4 +1,4 @@
import { subtract, normal, normalize, dot, almostEquals } from './helpers/VectorUtils.js'; import { subtract, normal, normalize, dot, almostEquals } from './helpers/vector2D.js';
export default function intersectionsToShapes(intersectionLayers, faces, openObjectIndexes, settings) { export default function intersectionsToShapes(intersectionLayers, faces, openObjectIndexes, settings) {
const layers = []; const layers = [];

View File

@ -1,4 +1,4 @@
import { length, distanceTo } from './helpers/VectorUtils.js'; import { length, distanceTo } from './helpers/vector2D.js';
import Shape from 'clipper-js'; import Shape from 'clipper-js';
export default function optimizePaths(slices, settings) { export default function optimizePaths(slices, settings) {

View File

@ -1,6 +1,6 @@
import GCode from './helpers/GCode.js'; import GCode from './helpers/GCode.js';
import comb from './helpers/comb.js'; import comb from './helpers/comb.js';
import { divide } from './helpers/VectorUtils.js'; import { divide } from './helpers/vector2D.js';
import { PRECISION, Z_OFFSET } from '../constants.js'; import { PRECISION, Z_OFFSET } from '../constants.js';
const PROFILE_TYPES = ['support', 'innerShell', 'outerShell', 'innerInfill', 'outerInfill', 'brim']; const PROFILE_TYPES = ['support', 'innerShell', 'outerShell', 'innerInfill', 'outerInfill', 'brim'];