Skip to content

Commit

Permalink
Removed 'find-longest-segment-first' logic for now, messes with Gcode…
Browse files Browse the repository at this point in the history
… export and removes segments!
  • Loading branch information
petervanderwalt committed Sep 5, 2018
1 parent 8365136 commit 870cd96
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
8 changes: 4 additions & 4 deletions js/advanced-cam-gcode.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,10 @@ function generateGcode(index, toolpathGrp, cutSpeed, plungeSpeed, laserPwr, rapi
// let's create gcode for all points in line

// Find longest segment
var bestSegment = indexOfMax(child.geometry.vertices)
console.log('longest section' + bestSegment)

child.geometry.vertices.rotateRight(bestSegment)
// var bestSegment = indexOfMax(child.geometry.vertices)
// console.log('longest section' + bestSegment)
//
// child.geometry.vertices.rotateRight(bestSegment)

for (i = 0; i < child.geometry.vertices.length; i++) {
// Convert to World Coordinates
Expand Down
8 changes: 6 additions & 2 deletions js/advanced-cam-modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ function setupJob(i) {
<th style="width: 150px;"></th><th style="width: 210px;"></th>
</tr>
<tr class="inputcnc inputpocket">
<td>Plunge: Ramp In</td>
<td>Plunge: Ramp In<br><div class="text-small">[beta] Experimental!</div></td>
<td>
<div class="input-addon">
<span class="input-addon-label-left active-border"><i class="fas fa-ruler fa-fw"></i></span>
Expand Down Expand Up @@ -468,7 +468,11 @@ function setupJob(i) {
$('#tabdepth' + i).val(toolpathsInScene[i].userData.camTabDepth);
$('#tabWidth' + i).val(toolpathsInScene[i].userData.camTabWidth);
$('#tabSpace' + i).val(toolpathsInScene[i].userData.camTabSpace);
$('#tRampPlunge' + i).val(toolpathsInScene[i].userData.tRampPlunge);
if (toolpathsInScene[i].userData.tRampPlunge) {
$('#tRampPlunge' + i).val(toolpathsInScene[i].userData.tRampPlunge).prop('selected', true);
} else {
$('#tRampPlunge' + i).val("No").prop('selected', true);
}
$('#tplasmaihs' + i).val(toolpathsInScene[i].userData.camPlasmaIHS).prop('selected', true);
$('#tunion' + i).val(toolpathsInScene[i].userData.camUnion).prop('selected', true);
$('#tOpName' + i).val(toolpathsInScene[i].name);
Expand Down
2 changes: 1 addition & 1 deletion workspace/helloworld.json

Large diffs are not rendered by default.

0 comments on commit 870cd96

Please sign in to comment.