mirror of
https://github.com/Doodle3D/Doodle3D-Slicer.git
synced 2025-01-09 11:04:24 +01:00
fix grid size calculation
This commit is contained in:
parent
a892d6ff89
commit
961337138b
@ -22,7 +22,7 @@ export default function generateInfills(slices, settings) {
|
|||||||
const bottomSkinCount = Math.ceil(bottomThickness / layerHeight);
|
const bottomSkinCount = Math.ceil(bottomThickness / layerHeight);
|
||||||
const topSkinCount = Math.ceil(topThickness / layerHeight);
|
const topSkinCount = Math.ceil(topThickness / layerHeight);
|
||||||
const nozzleRadius = nozzleDiameter / 2;
|
const nozzleRadius = nozzleDiameter / 2;
|
||||||
const outerFillTemplateSize = Math.sqrt(2 * Math.pow(nozzleDiameter, 2));
|
const outerFillTemplateSize = nozzleDiameter;
|
||||||
|
|
||||||
for (let layer = 0; layer < slices.length; layer ++) {
|
for (let layer = 0; layer < slices.length; layer ++) {
|
||||||
const slice = slices[layer];
|
const slice = slices[layer];
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
import Shape from 'clipper-js';
|
import Shape from 'clipper-js';
|
||||||
|
|
||||||
export default function getFillTemplate(bounds, size, even, uneven) {
|
export default function getFillTemplate(bounds, gridSize, even, uneven) {
|
||||||
const paths = [];
|
const paths = [];
|
||||||
|
|
||||||
|
const size = Math.sqrt(2 * Math.pow(gridSize, 2));
|
||||||
|
|
||||||
const left = Math.floor(bounds.left / size) * size;
|
const left = Math.floor(bounds.left / size) * size;
|
||||||
const right = Math.ceil(bounds.right / size) * size;
|
const right = Math.ceil(bounds.right / size) * size;
|
||||||
const top = Math.floor(bounds.top / size) * size;
|
const top = Math.floor(bounds.top / size) * size;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user