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
a36ef40c
Commit
a36ef40c
authored
Jun 19, 2012
by
Lars Kruse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some more Point -> tuple fixes
parent
7d9bd732
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
5 deletions
+6
-5
Model.py
pycam/Geometry/Model.py
+2
-2
PointUtils.py
pycam/Geometry/PointUtils.py
+2
-1
DropCutter.py
pycam/PathGenerators/DropCutter.py
+1
-1
ModelProjection.py
pycam/Plugins/ModelProjection.py
+1
-1
No files found.
pycam/Geometry/Model.py
View file @
a36ef40c
...
...
@@ -303,7 +303,7 @@ class Model(BaseModel):
return
contour
.
append
(
line
)
counter
+=
1
log
.
debug
(
"Waterline:
%
f -
%
d -
%
s"
%
(
plane
.
p
.
z
,
log
.
debug
(
"Waterline:
%
f -
%
d -
%
s"
%
(
plane
.
p
[
2
]
,
len
(
contour
.
get_polygons
()),
[
len
(
p
.
get_lines
())
for
p
in
contour
.
get_polygons
()]))
return
contour
...
...
@@ -992,7 +992,7 @@ class PolygonGroup(object):
direction
=
psub
(
point
,
p
)
dist
=
pnorm
(
direction
)
line_distances
.
append
(
dist
)
elif
cross_product
.
z
==
0
:
elif
cross_product
[
2
]
==
0
:
# the point is on the line
line_distances
.
append
(
0.0
)
# no other line can get closer than this
...
...
pycam/Geometry/PointUtils.py
View file @
a36ef40c
...
...
@@ -79,7 +79,7 @@ def pmul(a, c):
def
pdiv
(
a
,
c
):
c
=
number
(
c
)
return
(
a
[
0
]
/
c
,
a
[
0
]
/
c
,
a
[
0
]
/
c
)
return
(
a
[
0
]
/
c
,
a
[
1
]
/
c
,
a
[
2
]
/
c
)
def
padd
(
a
,
b
):
return
(
a
[
0
]
+
b
[
0
],
a
[
1
]
+
b
[
1
],
a
[
2
]
+
b
[
2
])
...
...
@@ -107,3 +107,4 @@ def pis_inside(a, minx=None, maxx=None, miny=None, maxy=None, minz=None, maxz=No
and
((
maxy
is
None
)
or
(
a
[
1
]
<=
maxy
+
epsilon
))
\
and
((
minz
is
None
)
or
(
minz
-
epsilon
<=
a
[
2
]))
\
and
((
maxz
is
None
)
or
(
a
[
2
]
<=
maxz
+
epsilon
))
pycam/PathGenerators/DropCutter.py
View file @
a36ef40c
...
...
@@ -67,7 +67,7 @@ class DropCutter(object):
args
=
[]
for
one_grid_line
in
lines
:
# simplify the data (useful for remote processing)
xy_coords
=
[(
pos
.
x
,
pos
.
y
)
for
pos
in
one_grid_line
]
xy_coords
=
[(
pos
[
0
],
pos
[
1
]
)
for
pos
in
one_grid_line
]
args
.
append
((
xy_coords
,
minz
,
maxz
,
model
,
cutter
,
self
.
physics
))
for
points
in
run_in_parallel
(
_process_one_grid_line
,
args
,
...
...
pycam/Plugins/ModelProjection.py
View file @
a36ef40c
...
...
@@ -96,7 +96,7 @@ class ModelProjection(pycam.Plugins.PluginBase):
name_template
=
"Projected model #
%
d"
)
else
:
self
.
log
.
warn
(
"The 2D projection at z=
%
g is empty. Aborted."
%
\
plane
.
p
.
z
)
plane
.
p
[
2
]
)
break
progress
.
update_multiple
()
progress
.
finish
()
...
...
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