Casper Lamboo 13ffea4115 Shortest path now uses a heap
Use a heap in dijkstra's algoritm to keep track of the shortest path. Change time from O(v^2) to O(u + v log(v)).

@companje tijdens een college kwam een algoritme aan bod wat ik gebruikt heb in de slicer. Ik kwam er achter dat ik een fout had gemaakt waardoor het algoritme een stuk trager was als zou moeten. Door een binary heap te gebruiken is het algoritme een stuk sneller. Dit algoritme rekent een kortste pad uit en wordt gebruikt in de `comb` functie.
2019-04-04 23:02:01 +02:00
2018-01-30 00:19:05 +01:00
2019-04-04 23:02:01 +02:00
2017-12-21 12:49:44 +01:00
2018-04-17 11:29:17 +02:00
2017-11-16 22:40:39 +01:00
2017-11-16 22:40:39 +01:00
2018-05-24 16:14:03 +02:00
2018-03-06 17:49:39 +01:00
2018-01-30 19:41:30 +01:00
2018-06-26 16:08:33 +02:00
2019-04-04 23:02:01 +02:00
2017-12-24 14:46:00 +01:00
2018-05-02 16:34:35 +02:00

Doodle3D-Slicer

JavaScript gcode slicer, Intended to use with the Doodle3D WiFi-Box

Usage

import * as THREE from 'three';
import { defaultSettings, sliceGeometry } from 'Doodle3D/Doodle3D-Slicer';

const settings = {
  ...defaultSettings.default,
  ...defaultSettings.material.pla,
  ...defaultSettings.printer.ultimaker2go,
  ...defaultSettings.quality.high
};

const geometry = new THREE.TorusGeometry(20, 10, 30, 30).clone();

const gcode = await sliceGeometry(settings, geometry);

API

Settings

import { defaultSettings } from 'Doodle3D/Doodle3D-Slicer';

const settings = {
  ...defaultSettings.default,
  ...defaultSettings.material.pla,
  ...defaultSettings.printer.ultimaker2go,
  ...defaultSettings.quality.high
};

Create settings object to be used by the slicer

Slice Mesh

import { sliceMesh } from 'Doodle3D/Doodle3D-Slicer';

GCode: String = sliceMesh(settings: Object, mesh: THREE.Mesh, [sync: Boolean = false, onProgress: Func ])

Slice function that accepts Meshes

  • Settings: settings object (see settings)
  • Mesh: THREE.Mesh instance that contains the geometry
  • Sync: determines if the slicing progress will be sync (blocking) or async (non-blocking). A webworker is used to slice async
  • onProgress: progress callback

Slice Geometry

import { sliceGeometry } from 'Doodle3D/Doodle3D-Slicer';

GCode: String = sliceGeometry(settings: Object, geometry: THREE.Geometry | THREE.BufferGeometry, [matrix: THREE.Matrix, sync: Boolean = false, onProgress: Func ])

Slice function that accepts Geometry

  • Settings: settings object (see settings)
  • Geometry: THREE.Geometry instance
  • matrix: matrix that can control the scale, rotation and position of the model
  • Sync: determines if the slicing progress will be sync (blocking) or async (non-blocking). A webworker is used to slice async
  • onProgress: progress callback
Description
No description provided
Readme 146 MiB
Languages
JavaScript 100%