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
a39bba08
Commit
a39bba08
authored
Jul 30, 2013
by
Guillaume Seguin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hackily handle avg_norm == 0
parent
2f3f39c2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
actors.py
printrun/gl/libtatlin/actors.py
+5
-2
No files found.
printrun/gl/libtatlin/actors.py
View file @
a39bba08
...
...
@@ -335,6 +335,9 @@ class GcodeModel(Model):
avg_move
=
move_normalized
/
2
+
prev_move
/
2
norm
=
numpy
.
linalg
.
norm
(
avg_move
)
# FIXME: handle norm == 0 or when paths go back (add an extra cap ?)
if
norm
==
0
:
avg_move_normal
=
move_normal
else
:
avg_move
=
avg_move
/
norm
avg_move_normal
=
numpy
.
array
([
-
avg_move
[
1
],
avg_move
[
0
]])
# Compute vertices
...
...
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