Skip to content

Commit

Permalink
Updated hello world workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
petervanderwalt committed Apr 17, 2024
1 parent 08f83da commit e17c9c9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
8 changes: 7 additions & 1 deletion js/advanced-cam-doctree.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,13 @@ function filldoctree() {

// Add Vectors to Layers
for (j = 0; j < objectsInScene[i].children.length; j++) {
var template = ` <li><input id="checkbox_` + i + `_` + j + `" type="checkbox" data-role="checkbox" data-caption="<span class='fas fa-vector-square'></span> ` + objectsInScene[i].children[j].name + `" data-type="vector" data-object="` + i + `" data-child="` + j + `" data-layer="` + layersinthisdoc[j] + `"></li>`

if (objectsInScene[i].children[j].closed) {
var template = ` <li><input id="checkbox_` + i + `_` + j + `" type="checkbox" data-role="checkbox" data-caption="<span class='fas fa-vector-square'></span> ` + objectsInScene[i].children[j].name + `" data-type="vector" data-object="` + i + `" data-child="` + j + `" data-layer="` + layersinthisdoc[j] + `"></li>`
} else {
var template = ` <li><input id="checkbox_` + i + `_` + j + `" type="checkbox" data-role="checkbox" data-caption="<span class='fas fa-slash'></span> ` + objectsInScene[i].children[j].name + ` (open vector)" data-type="vector" data-object="` + i + `" data-child="` + j + `" data-layer="` + layersinthisdoc[j] + `"></li>`
}

objectsInScene[i].children[j].userData.link = "link" + i + "_" + j;
if (objectsInScene[i].children[j].userData.layer) {
var layer = objectsInScene[i].children[j].userData.layer.label.replace(/ /g, '')
Expand Down
6 changes: 1 addition & 5 deletions workers/toolpath/worker/toolpathworker.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ if (typeof window == "undefined") { // Only run as worker
self.postMessage(data);
}, false);


function getToolpaths(toolpath, jobindex, performanceLimit) {
// Process Them
// console.log(toolpath)
Expand All @@ -42,7 +41,6 @@ if (typeof window == "undefined") { // Only run as worker
config = {
index: jobindex,
toolpath: toolpath,
repair: false,
union: toolpath.userData.camUnion,
offset: toolpath.userData.camToolDia / 2,
leadinval: 0,
Expand Down Expand Up @@ -188,9 +186,7 @@ if (typeof window == "undefined") { // Only run as worker
var inflateGrpZ = new THREE.Group();
var prettyGrp = new THREE.Group();
var clipperPaths = workerGetClipperPaths(config.toolpath)
if (config.repair) {
clipperPaths = repairClipperPath(clipperPaths);
}

// console.log('Original Toolpath: ', JSON.stringify(clipperPaths))
if (config.union == "Yes") {
// simplify this set of paths which is a very powerful Clipper call that figures out holes and path orientations
Expand Down
2 changes: 1 addition & 1 deletion workspace/helloworldplasma.obc

Large diffs are not rendered by default.

0 comments on commit e17c9c9

Please sign in to comment.