Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
Printrun
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
machinery
Printrun
Commits
cb7dd322
Commit
cb7dd322
authored
Mar 25, 2014
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Statically specify Z move distances
parent
c68e3742
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
zbuttons.py
printrun/zbuttons.py
+2
-1
No files found.
printrun/zbuttons.py
View file @
cb7dd322
...
@@ -25,6 +25,7 @@ def sign(n):
...
@@ -25,6 +25,7 @@ def sign(n):
class
ZButtons
(
BufferedCanvas
):
class
ZButtons
(
BufferedCanvas
):
button_ydistances
=
[
7
,
30
,
55
,
83
]
# ,112
button_ydistances
=
[
7
,
30
,
55
,
83
]
# ,112
move_values
=
[
0.1
,
1
,
10
]
center
=
(
30
,
118
)
center
=
(
30
,
118
)
label_overlay_positions
=
{
label_overlay_positions
=
{
0
:
(
1.1
,
18
,
9
),
0
:
(
1.1
,
18
,
9
),
...
@@ -148,7 +149,7 @@ class ZButtons(BufferedCanvas):
...
@@ -148,7 +149,7 @@ class ZButtons(BufferedCanvas):
mpos
=
event
.
GetPosition
()
mpos
=
event
.
GetPosition
()
r
,
d
=
self
.
getRangeDir
(
mpos
)
r
,
d
=
self
.
getRangeDir
(
mpos
)
if
r
>=
0
:
if
r
>=
0
:
value
=
math
.
pow
(
10
,
self
.
orderOfMagnitudeIdx
)
*
math
.
pow
(
10
,
r
-
1
)
*
d
value
=
d
*
self
.
move_values
[
r
]
if
self
.
moveCallback
:
if
self
.
moveCallback
:
self
.
lastValue
=
value
self
.
lastValue
=
value
self
.
moveCallback
(
value
)
self
.
moveCallback
(
value
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment