Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
pyMKcam
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
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
machinery
pyMKcam
Commits
d0f9a3ca
Commit
d0f9a3ca
authored
Aug 21, 2012
by
Lars Kruse
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into openvoronoi
parents
b4a35fb3
30b554aa
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
11 deletions
+6
-11
Polygon.py
pycam/Geometry/Polygon.py
+4
-10
GCodeParameters.py
pycam/Plugins/GCodeParameters.py
+2
-1
No files found.
pycam/Geometry/Polygon.py
View file @
d0f9a3ca
...
@@ -866,20 +866,11 @@ class Polygon(TransformableContainer):
...
@@ -866,20 +866,11 @@ class Polygon(TransformableContainer):
if
len
(
new_group
)
>
0
:
if
len
(
new_group
)
>
0
:
group_starts
=
[]
group_starts
=
[]
index1
=
0
index1
=
0
fallout3
=
0
while
index1
<
len
(
new_group
):
while
index1
<
len
(
new_group
):
index2
=
0
index2
=
0
fallout2
=
len
(
new_group
)
fallout3
+=
1
while
index2
<
len
(
new_group
):
while
index2
<
len
(
new_group
):
fallout2
-=
1
index_distance
=
min
(
abs
(
index2
-
index1
),
\
index_distance
=
min
(
abs
(
index2
-
index1
),
\
abs
(
len
(
new_group
)
-
(
index2
-
index1
)))
abs
(
len
(
new_group
)
-
(
index2
-
index1
)))
if
fallout3
>
10000
:
print
"FALLOUT3"
print
index_distance
,
index2
,
index1
,
len
(
new_group
),
len
(
group_starts
)
import
sys
sys
.
exit
(
1
)
# skip neighbours
# skip neighbours
if
index_distance
>
1
:
if
index_distance
>
1
:
line1
=
new_group
[
index1
]
line1
=
new_group
[
index1
]
...
@@ -915,7 +906,10 @@ class Polygon(TransformableContainer):
...
@@ -915,7 +906,10 @@ class Polygon(TransformableContainer):
groups
=
[]
groups
=
[]
last_start
=
0
last_start
=
0
for
group_start
in
group_starts
:
for
group_start
in
group_starts
:
groups
.
append
(
new_group
[
last_start
:
group_start
])
transfer_group
=
new_group
[
last_start
:
group_start
]
# add only non-empty groups
if
transfer_group
:
groups
.
append
(
transfer_group
)
last_start
=
group_start
last_start
=
group_start
# Add the remaining lines to the first group or as a new
# Add the remaining lines to the first group or as a new
...
...
pycam/Plugins/GCodeParameters.py
View file @
d0f9a3ca
...
@@ -228,7 +228,8 @@ class GCodeCornerStyle(pycam.Plugins.PluginBase):
...
@@ -228,7 +228,8 @@ class GCodeCornerStyle(pycam.Plugins.PluginBase):
self
.
core
.
get
(
"unregister_parameter"
)(
"toolpath_processor"
,
name
)
self
.
core
.
get
(
"unregister_parameter"
)(
"toolpath_processor"
,
name
)
def
update_widgets
(
self
,
widget
=
None
):
def
update_widgets
(
self
,
widget
=
None
):
enable_tolerances
=
(
self
.
path_mode
.
get_value
()
==
"optimize_speed"
)
enable_tolerances
=
(
self
.
path_mode
.
get_value
()
==
\
CORNER_STYLE_OPTIMIZE_TOLERANCE
)
controls
=
(
self
.
motion_tolerance
,
self
.
naive_tolerance
)
controls
=
(
self
.
motion_tolerance
,
self
.
naive_tolerance
)
for
control
in
controls
:
for
control
in
controls
:
control
.
get_widget
()
.
set_sensitive
(
enable_tolerances
)
control
.
get_widget
()
.
set_sensitive
(
enable_tolerances
)
...
...
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