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
3a79c2b2
Commit
3a79c2b2
authored
Jul 02, 2012
by
Lars Kruse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed tool filter
parent
11b1e7f5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
ToolTypes.py
pycam/Plugins/ToolTypes.py
+4
-4
No files found.
pycam/Plugins/ToolTypes.py
View file @
3a79c2b2
...
@@ -26,16 +26,16 @@ import pycam.Cutters.SphericalCutter
...
@@ -26,16 +26,16 @@ import pycam.Cutters.SphericalCutter
import
pycam.Cutters.ToroidalCutter
import
pycam.Cutters.ToroidalCutter
import
pycam.Cutters.CylindricalCutter
import
pycam.Cutters.CylindricalCutter
def
tool_params_and_filters
(
*
param_names
):
def
tool_params_and_filters
(
*
param_names
):
def
get_params_and_filters_inner
(
func
):
def
get_params_and_filters_inner
(
func
):
def
get_tool_func
(
self
,
parameters
):
def
get_tool_func
(
self
,
parameters
):
filters
=
[]
filters
=
[]
self
.
core
.
call_chain
(
"get_toolpath_filters"
,
"tool"
,
parameters
,
filters
)
self
.
core
.
call_chain
(
"get_toolpath_filters"
,
"tool"
,
parameters
,
filters
)
args
=
[]
args
=
[]
for
param_name
in
param_names
:
for
param_name
in
param_names
:
args
.
append
(
parameters
[
param_name
])
args
.
append
(
parameters
[
param_name
])
cutter
=
func
(
*
args
)
cutter
=
func
(
self
,
*
args
)
return
cutter
,
filters
return
cutter
,
filters
return
get_tool_func
return
get_tool_func
return
get_params_and_filters_inner
return
get_params_and_filters_inner
...
@@ -106,7 +106,7 @@ class ToolTypeFlat(pycam.Plugins.PluginBase):
...
@@ -106,7 +106,7 @@ class ToolTypeFlat(pycam.Plugins.PluginBase):
def
teardown
(
self
):
def
teardown
(
self
):
self
.
core
.
get
(
"unregister_parameter_set"
)(
"tool"
,
"flat"
)
self
.
core
.
get
(
"unregister_parameter_set"
)(
"tool"
,
"flat"
)
@
tool_params_and_filters
(
"radius"
,
"torus_radius"
)
@
tool_params_and_filters
(
"radius"
)
def
get_tool
(
self
,
radius
):
def
get_tool
(
self
,
radius
):
return
pycam
.
Cutters
.
CylindricalCutter
(
radius
)
return
pycam
.
Cutters
.
CylindricalCutter
(
radius
)
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