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
873dfaf8
Commit
873dfaf8
authored
Mar 24, 2012
by
Whitham D. Reeve II
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed old commented out code.
parent
a87a94d4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
5 deletions
+0
-5
OpenGLTools.py
pycam/Gui/OpenGLTools.py
+0
-5
No files found.
pycam/Gui/OpenGLTools.py
View file @
873dfaf8
...
@@ -55,12 +55,9 @@ def keep_matrix(func):
...
@@ -55,12 +55,9 @@ def keep_matrix(func):
@
keep_matrix
@
keep_matrix
def
draw_direction_cone
(
p1
,
p2
,
position
=
0.5
,
precision
=
12
,
size
=
0.1
):
def
draw_direction_cone
(
p1
,
p2
,
position
=
0.5
,
precision
=
12
,
size
=
0.1
):
# convert p1 and p2 from list/tuple to Point
distance
=
psub
(
p2
,
p1
)
distance
=
psub
(
p2
,
p1
)
#distance = p2.sub(p1)
length
=
pnorm
(
distance
)
length
=
pnorm
(
distance
)
direction
=
pnormalized
(
distance
)
direction
=
pnormalized
(
distance
)
#direction = distance.normalized()
if
direction
is
None
:
if
direction
is
None
:
# zero-length line
# zero-length line
return
return
...
@@ -72,8 +69,6 @@ def draw_direction_cone(p1, p2, position=0.5, precision=12, size=0.1):
...
@@ -72,8 +69,6 @@ def draw_direction_cone(p1, p2, position=0.5, precision=12, size=0.1):
# rotate the cone according to the line direction
# rotate the cone according to the line direction
# The cross product is a good rotation axis.
# The cross product is a good rotation axis.
cross
=
pcross
(
direction
,
(
0
,
0
,
-
1
))
cross
=
pcross
(
direction
,
(
0
,
0
,
-
1
))
#cross = direction.cross(Point(0, 0, -1))
#if cross.norm != 0:
if
pnorm
(
cross
)
!=
0
:
if
pnorm
(
cross
)
!=
0
:
# The line direction is not in line with the z axis.
# The line direction is not in line with the z axis.
try
:
try
:
...
...
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