mirror of
https://github.com/Doodle3D/Doodle3D-Slicer.git
synced 2025-04-04 10:53:40 +02:00
20 lines
459 B
JavaScript
20 lines
459 B
JavaScript
import THREE from 'three.js';
|
|
import { PRECISION } from '../constants.js';
|
|
|
|
const offsetOptions = {
|
|
jointType: 'jtSquare',
|
|
endType: 'etClosedPolygon',
|
|
miterLimit: 2.0,
|
|
roundPrecision: 0.25
|
|
};
|
|
|
|
export default function addBrim(slices, settings) {
|
|
console.log('add brim');
|
|
|
|
let { brimOffset } = settings.config;
|
|
brimOffset /= PRECISION;
|
|
|
|
const fistLayer = slices[0];
|
|
fistLayer.brim = fistLayer.getOutline().offset(brimOffset, offsetOptions);
|
|
}
|