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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pub
mods
Commits
39ee9c92
Commit
39ee9c92
authored
6 years ago
by
Neil Gershenfeld
Browse files
Options
Downloads
Patches
Plain Diff
drawing scaling problem
parent
184c9d04
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/processes/mill/raster/2.5D
+22
-17
22 additions, 17 deletions
modules/processes/mill/raster/2.5D
programs/processes/mill/raster/2.5D
+1
-1
1 addition, 1 deletion
programs/processes/mill/raster/2.5D
with
23 additions
and
18 deletions
modules/processes/mill/raster/2.5D
+
22
−
17
View file @
39ee9c92
...
...
@@ -57,14 +57,13 @@ var inputs = {
// calculation in progress, show and accumulate
//
draw_path(evt.detail)
accumulate_
layer
(evt.detail)
accumulate_
path
(evt.detail)
mod.offsetCount += 1
if ((mod.offsetCount != 1+parseInt(mod.number.value))
&& (evt.detail.length > 0)) {
//
// layer detail present and offset not complete
//
console.log('layer '+mod.offsetCount)
mod.offset += parseFloat(mod.stepover.value)
outputs.offset.event()
}
...
...
@@ -72,11 +71,9 @@ var inputs = {
//
// layer loop not complete
//
merge_layer()
clear_layer()
draw_path(mod.path)
draw_connections()
console.log('depth '+mod.depth)
merge_path()
accumulate_toolpath()
clear_path()
mod.depth += parseFloat(mod.cut_mm.value)
if (mod.depth > parseFloat(mod.max_mm.value)) {
mod.depth = parseFloat(mod.max_mm.value)
...
...
@@ -99,6 +96,8 @@ var inputs = {
//
// done, finish and output
//
//draw_path(mod.path)
//draw_connections()
mod.label.nodeValue = 'calculate'
mod.labelspan.style.fontWeight = 'normal'
outputs.toolpath.event()
...
...
@@ -318,15 +317,15 @@ var interface = function(div){
mod.labelspan = span
btn.appendChild(span)
btn.addEventListener('click',function(){
mods.output(mod,'offset','')
mods.output(mod,'depth',{depthmm:mod.depth})
mod.label.nodeValue = 'calculating'
mod.labelspan.style.fontWeight = 'bold'
mod.depth = parseFloat(mod.cut_mm.value)
mod.offset = 0.5
mod.offsetCount = 0
mod.path = []
mods.output(mod,'offset','')
mods.output(mod,'depth',{depthmm:mod.depth})
clear_layer()
mod.toolpath = []
clear_path()
outputs.diameter.event()
outputs.offset.event()
})
...
...
@@ -407,9 +406,9 @@ function set_values(settings) {
}
}
//
// clear_
layer
// clear_
path
//
function clear_
layer
() {
function clear_
path
() {
mod.path = []
var svg = document.getElementById(mod.div.id+'svg')
svg.setAttribute('viewBox',"0 0 "+(mod.img.width-1)+" "+(mod.img.height-1))
...
...
@@ -420,11 +419,11 @@ function clear_layer() {
svg.appendChild(g)
}
//
// accumulate_
layer
// accumulate_
path
// todo: replace inefficient insertion sort
// todo: move sort out of main thread
//
function accumulate_
layer
(path) {
function accumulate_
path
(path) {
var forward = mod.forward.checked
var conventional = mod.conventional.checked
var sort = mod.sort.checked
...
...
@@ -463,9 +462,9 @@ function accumulate_layer(path) {
}
}
//
// merge_
layer
// merge_
path
//
function merge_
layer
() {
function merge_
path
() {
var dmerge = mod.dpi*parseFloat(mod.merge.value)*parseFloat(mod.dia_in.value)
var seg = 0
while (seg < (mod.path.length-1)) {
...
...
@@ -483,6 +482,12 @@ function merge_layer() {
}
}
//
// accumulate_toolpath
//
function accumulate_toolpath() {
console.log('accum '+mod.depth)
}
//
// add_depth
//
function add_depth() {
...
...
This diff is collapsed.
Click to expand it.
programs/processes/mill/raster/2.5D
+
1
−
1
View file @
39ee9c92
Source diff could not be displayed: it is too large. Options to address this:
view the blob
.
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