Frusta

Check-in [c8eec67efd]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:fixed machine/exercise output
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:c8eec67efddaf7439bbdfd3ae6da6a7ca27746b2
User & Date: rmelton 2014-01-06 05:17:02
Context
2014-03-02
02:08
0.1 - several cleanups check-in: d3a03866d2 user: rmelton tags: trunk
2014-01-06
05:17
fixed machine/exercise output check-in: c8eec67efd user: rmelton tags: trunk
01:07
fixed machine/exercise menu output check-in: 83b3f53d74 user: rmelton tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to lib/gcode/gcode_0.1.tcl.

564
565
566
567
568
569
570



571
572
573
574
575
576
577
      set cArgs {}
      while {[llength $args] > 0 && [string match "-*" [lindex $arg 0]]} {
        set args [lassign $args cmd]
        switch -- $cmd {
          default {error "gcode::write::Init bad cmd=$cmd"}
        }
      }



      Puts G21 ;# set units to mm
      Puts G90 ;# set to absolute positioning
    }
    proc Home {args} {
      set cArgs {}
      while {[llength $args] > 0 && [string match "-*" [lindex $args 0]]} {
        set args [lassign $args cmd]







>
>
>







564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
      set cArgs {}
      while {[llength $args] > 0 && [string match "-*" [lindex $arg 0]]} {
        set args [lassign $args cmd]
        switch -- $cmd {
          default {error "gcode::write::Init bad cmd=$cmd"}
        }
      }
      Puts [format "\#\# frusta version = %s" $::cfg(frustaVersion)]
      Puts [format "\#\# http://chiselapp.com/user/seadevil/repository/frusta"]
      Puts [format "\#\# seadevil (R. Melton) 2013"]
      Puts G21 ;# set units to mm
      Puts G90 ;# set to absolute positioning
    }
    proc Home {args} {
      set cArgs {}
      while {[llength $args] > 0 && [string match "-*" [lindex $args 0]]} {
        set args [lassign $args cmd]

Changes to lib/gui/gui_0.1.tcl.

128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
        }
        default {error "giu::Busy: bad cmd=$cmd"}
      }
    }
  }


  set ::cfg(frustaVersion) 0.1
  set ::cfg(frustaAbout) {
    Frusta / Frustum (latin) = pieces/peice (the math definition of frustum is the portion of a rectangular or conic section sliced parallel to the base)
    
    This project is my attempt to use Tcl to build a toolkit to manipulate data for a 3d-printer
    
    In the first version I want to build internal representations of STL and GCODE datafiles and provide a simple way to visualize them. I'll see where it goes from there.








<







128
129
130
131
132
133
134

135
136
137
138
139
140
141
        }
        default {error "giu::Busy: bad cmd=$cmd"}
      }
    }
  }



  set ::cfg(frustaAbout) {
    Frusta / Frustum (latin) = pieces/peice (the math definition of frustum is the portion of a rectangular or conic section sliced parallel to the base)
    
    This project is my attempt to use Tcl to build a toolkit to manipulate data for a 3d-printer
    
    In the first version I want to build internal representations of STL and GCODE datafiles and provide a simple way to visualize them. I'll see where it goes from there.

Changes to lib/machine/machine_0.1.tcl.

150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
    if {$v(doResonanceY)} {
      drawPathInCanvas $w.view [resonanceY          $v(x0) $v(y0) $v(x1) $v(y1) $v(segsResonanceY)] 1 {-fill cyan}
    }
  }

  proc BuildExercise {fileName} {
    variable v
    gcode::write::Open
    gcode::write::Init
    gcode::write::Display "Motor Exercise"
    for {set i 0} {$i < $v(loops)} {incr i} {
      gcode::write::Display "Motor Exercise $i/$v(loops)"
      if {$v(autoHome)} {
        gcode::write::Home
      }







|







150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
    if {$v(doResonanceY)} {
      drawPathInCanvas $w.view [resonanceY          $v(x0) $v(y0) $v(x1) $v(y1) $v(segsResonanceY)] 1 {-fill cyan}
    }
  }

  proc BuildExercise {fileName} {
    variable v
    gcode::write::Open $fileName
    gcode::write::Init
    gcode::write::Display "Motor Exercise"
    for {set i 0} {$i < $v(loops)} {incr i} {
      gcode::write::Display "Motor Exercise $i/$v(loops)"
      if {$v(autoHome)} {
        gcode::write::Home
      }

Changes to main.tcl.

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
..
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
## kits stuff
lappend auto_path [file join $cfg(kitLib) Canvas3d]
lappend auto_path [file join $cfg(kitLib) sqlite3]

## frusta components
lappend auto_path $cfg(frustaLib)

set version "0.1"
switch -- $version {
  0.1 {
    ## hard code for now, autoload later...
    source [file join $cfg(frustaLib) commandLineArgs.tcl]
    source [file join $cfg(frustaLib) stl.tcl]
    package require -exact frusta::gcode 0.1
    source [file join $cfg(frustaLib) geom.tcl]
    source [file join $cfg(frustaLib) slice.tcl]
................................................................................
    source [file join $cfg(frustaLib) view2d.tcl]
    source [file join $cfg(frustaLib) menu.tcl]
    source [file join $cfg(frustaLib) logging.tcl]
    package require -exact frusta::settings 0.1
    package require -exact frusta::machine 0.1
  }
  default {
    error "bad frust version=$version"
  }
}

##
lappend auto_path [file join $cfg(frustaLib) utils]

proc Exit {} {







|
|







 







|







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
..
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
## kits stuff
lappend auto_path [file join $cfg(kitLib) Canvas3d]
lappend auto_path [file join $cfg(kitLib) sqlite3]

## frusta components
lappend auto_path $cfg(frustaLib)

set cfg(frustaVersion) "0.1"
switch -- $cfg(frustaVersion) {
  0.1 {
    ## hard code for now, autoload later...
    source [file join $cfg(frustaLib) commandLineArgs.tcl]
    source [file join $cfg(frustaLib) stl.tcl]
    package require -exact frusta::gcode 0.1
    source [file join $cfg(frustaLib) geom.tcl]
    source [file join $cfg(frustaLib) slice.tcl]
................................................................................
    source [file join $cfg(frustaLib) view2d.tcl]
    source [file join $cfg(frustaLib) menu.tcl]
    source [file join $cfg(frustaLib) logging.tcl]
    package require -exact frusta::settings 0.1
    package require -exact frusta::machine 0.1
  }
  default {
    error "bad frustaVersion=$cfg(frustaVersion)"
  }
}

##
lappend auto_path [file join $cfg(frustaLib) utils]

proc Exit {} {