mirror of
https://github.com/Doodle3D/Doodle3D-Slicer.git
synced 2024-11-22 13:37:58 +01:00
rename file
This commit is contained in:
parent
dbc01167e5
commit
ca886afa25
@ -1,4 +1,4 @@
|
|||||||
import { divide } from './helpers/vector2D.js';
|
import { divide } from './helpers/vector2.js';
|
||||||
import { PRECISION } from '../constants.js'
|
import { PRECISION } from '../constants.js'
|
||||||
|
|
||||||
export default function applyPrecision(layers) {
|
export default function applyPrecision(layers) {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { normalize } from './helpers/vector2D.js';
|
import { normalize } from './helpers/vector2.js';
|
||||||
|
|
||||||
function addLine(vertices, lineLookup, lines, a, b, faceIndex) {
|
function addLine(vertices, lineLookup, lines, a, b, faceIndex) {
|
||||||
let index;
|
let index;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { scale, distanceTo } from './vector2D.js';
|
import { scale, distanceTo } from './vector2.js';
|
||||||
import { PRECISION, VERSION } from '../../constants.js';
|
import { PRECISION, VERSION } from '../../constants.js';
|
||||||
|
|
||||||
export const MOVE = 'G';
|
export const MOVE = 'G';
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import Shape from 'clipper-js';
|
import Shape from 'clipper-js';
|
||||||
import { subtract, add, scale, normalize, dot, length, distanceTo } from './vector2D.js';
|
import { subtract, add, scale, normalize, dot, length, distanceTo } from './vector2.js';
|
||||||
import { PRECISION } from '../../constants.js';
|
import { PRECISION } from '../../constants.js';
|
||||||
|
|
||||||
const TOLERANCE = 1 / PRECISION;
|
const TOLERANCE = 1 / PRECISION;
|
||||||
|
@ -6,17 +6,17 @@ export const add = (a, b) => ({
|
|||||||
x: a.x + b.x,
|
x: a.x + b.x,
|
||||||
y: a.y + b.y
|
y: a.y + b.y
|
||||||
});
|
});
|
||||||
export const scale = (a, factor) => ({
|
export const scale = (v, factor) => ({
|
||||||
x: a.x * factor,
|
x: v.x * factor,
|
||||||
y: a.y * factor
|
y: v.y * factor
|
||||||
});
|
});
|
||||||
export const divide = (a, factor) => ({
|
export const divide = (v, factor) => ({
|
||||||
x: a.x / factor,
|
x: v.x / factor,
|
||||||
y: a.y / factor
|
y: v.y / factor
|
||||||
});
|
});
|
||||||
export const normal = (a) => ({
|
export const normal = (v) => ({
|
||||||
x: -a.y,
|
x: -v.y,
|
||||||
y: a.x
|
y: v.x
|
||||||
});
|
});
|
||||||
export const equals = (a, b) => a.x === b.x && a.y === b.y;
|
export const equals = (a, b) => a.x === b.x && a.y === b.y;
|
||||||
export const almostEquals = (a, b) => Math.abs(a.x - b.x) < 0.001 && Math.abs(a.y - b.y) < 0.001;
|
export const almostEquals = (a, b) => Math.abs(a.x - b.x) < 0.001 && Math.abs(a.y - b.y) < 0.001;
|
@ -1,4 +1,4 @@
|
|||||||
import { subtract, normal, normalize, dot, almostEquals } from './helpers/vector2D.js';
|
import { subtract, normal, normalize, dot, almostEquals } from './helpers/vector2.js';
|
||||||
|
|
||||||
export default function intersectionsToShapes(layerPoints, layerFaceIndexes, faces, openObjectIndexes, settings) {
|
export default function intersectionsToShapes(layerPoints, layerFaceIndexes, faces, openObjectIndexes, settings) {
|
||||||
const layers = [];
|
const layers = [];
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { length, distanceTo } from './helpers/vector2D.js';
|
import { length, distanceTo } from './helpers/vector2.js';
|
||||||
import Shape from 'clipper-js';
|
import Shape from 'clipper-js';
|
||||||
|
|
||||||
export default function optimizePaths(slices, settings) {
|
export default function optimizePaths(slices, settings) {
|
||||||
|
@ -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/vector2D.js';
|
import { divide } from './helpers/vector2.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'];
|
||||||
|
Loading…
Reference in New Issue
Block a user