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
c8ed2fb3
Commit
c8ed2fb3
authored
Jun 18, 2013
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Start refactoring of excluder logic
parent
46c2805d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
8 deletions
+14
-8
pronterface.py
pronterface.py
+14
-8
No files found.
pronterface.py
View file @
c8ed2fb3
...
...
@@ -407,18 +407,24 @@ class PronterWindow(MainWindow, pronsole.pronsole):
return
self
.
sentlines
.
put_nowait
(
line
)
def
preprintsendcb
(
self
,
gline
):
def
is_excluded_move
(
self
,
gline
):
if
not
gline
.
is_move
or
not
self
.
excluder
or
not
self
.
excluder
.
rectangles
:
return
glin
e
return
Fals
e
if
gline
.
x
==
None
and
gline
.
y
==
None
:
return
glin
e
return
Fals
e
for
(
x0
,
y0
,
x1
,
y1
)
in
self
.
excluder
.
rectangles
:
if
x0
<=
gline
.
current_x
<=
x1
and
y0
<=
gline
.
current_y
<=
y1
:
if
gline
.
e
!=
None
and
not
gline
.
relative_e
:
return
gcoder
.
Line
(
"G92 E
%.5
f"
%
gline
.
e
)
else
:
return
None
return
gline
return
True
return
False
def
preprintsendcb
(
self
,
gline
):
if
self
.
is_excluded_move
(
gline
):
if
gline
.
e
!=
None
and
not
gline
.
relative_e
:
return
gcoder
.
Line
(
"G92 E
%.5
f"
%
gline
.
e
)
else
:
return
None
else
:
return
gline
def
printsentcb
(
self
,
gline
):
if
gline
.
is_move
and
hasattr
(
self
.
gwindow
,
"set_current_gline"
):
...
...
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