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
ddf06eb2
Commit
ddf06eb2
authored
Jul 22, 2012
by
Lars Kruse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
"get_points_of_arc" now returns 3D points
parent
3e03c255
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
__init__.py
pycam/Geometry/__init__.py
+2
-3
No files found.
pycam/Geometry/__init__.py
View file @
ddf06eb2
...
@@ -115,9 +115,8 @@ def get_points_of_arc(center, radius, a1, a2, plane=None, cords=32):
...
@@ -115,9 +115,8 @@ def get_points_of_arc(center, radius, a1, a2, plane=None, cords=32):
num_of_segments
=
ceil
(
angle_diff
/
(
2
*
math
.
pi
)
*
cords
)
num_of_segments
=
ceil
(
angle_diff
/
(
2
*
math
.
pi
)
*
cords
)
angle_segment
=
angle_diff
/
num_of_segments
angle_segment
=
angle_diff
/
num_of_segments
points
=
[]
points
=
[]
get_angle_point
=
lambda
angle
:
(
get_angle_point
=
lambda
angle
:
(
center
[
0
]
+
radius
*
math
.
cos
(
angle
),
center
[
0
]
+
radius
*
math
.
cos
(
angle
),
center
[
1
]
+
radius
*
math
.
sin
(
angle
),
0
)
center
[
1
]
+
radius
*
math
.
sin
(
angle
))
points
.
append
(
get_angle_point
(
a1
))
points
.
append
(
get_angle_point
(
a1
))
for
index
in
range
(
num_of_segments
):
for
index
in
range
(
num_of_segments
):
points
.
append
(
get_angle_point
(
a1
+
angle_segment
*
(
index
+
1
)))
points
.
append
(
get_angle_point
(
a1
+
angle_segment
*
(
index
+
1
)))
...
...
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