Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mods
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pub
mods
Commits
b6716e9b
Commit
b6716e9b
authored
5 years ago
by
Neil Gershenfeld
Browse files
Options
Downloads
Patches
Plain Diff
ready for tool shape
parent
c8ea4dcf
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/processes/mill/raster/3D
+14
-6
14 additions, 6 deletions
modules/processes/mill/raster/3D
with
14 additions
and
6 deletions
modules/processes/mill/raster/3D
+
14
−
6
View file @
b6716e9b
...
...
@@ -24,7 +24,7 @@ var name = 'mill raster 3D (incomplete)'
// initialization
//
var init = function() {
mod.dia_in.value = 0.
0156
mod.dia_in.value = 0.
125
mod.dia_mm.value = 25.4*parseFloat(mod.dia_in.value)
mod.stepover.value = 0.5
mod.error.value = 0.001
...
...
@@ -265,10 +265,14 @@ function calculate_path() {
// call webworker
//
webworker.postMessage({
h:mod.height,w:mod.width,error:mod.error.value,
height:mod.height,width:mod.width,
error:mod.error.value,
xmin:mod.xmin,xmax:mod.xmax,
ymin:mod.ymin,ymax:mod.ymax,
zmin:mod.zmin,zmax:mod.zmax,
diameter:mod.dia_mm.value,
stepover:mod.stepover.value,
mmunits: mod.mmunits,
map:mod.map})
}
//
...
...
@@ -276,8 +280,8 @@ function calculate_path() {
//
function calculate_path_worker() {
self.addEventListener('message',function(evt) {
var h = evt.data.h
var w = evt.data.w
var h = evt.data.h
eight
var w = evt.data.w
idth
var error = evt.data.error
var xmin = evt.data.xmin
var xmax = evt.data.xmax
...
...
@@ -286,6 +290,10 @@ function calculate_path_worker() {
var zmin = evt.data.zmin
var zmax = evt.data.zmax
var map = evt.data.map
var diameter = evt.data.diameter
var stepover = evt.data.stepover
var mmunits = evt.data.mmunits
var ystep = Math.floor(stepover*diameter*w/(mmunits*(xmax-xmin)))
var path = [[]]
//
// loop over lines
...
...
@@ -335,7 +343,7 @@ function calculate_path_worker() {
if (xcur == (w-1)) {
if (dx == 1) {
dx = 0
dy = -
10
dy = -
ystep
}
else {
dx = -1
...
...
@@ -345,7 +353,7 @@ function calculate_path_worker() {
else if (xcur == 0) {
if (dx == -1) {
dx = 0
dy = -
10
dy = -
ystep
}
else {
dx = 1
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment