Skip to content
GitLab
About GitLab
GitLab: the DevOps platform
Explore GitLab
Install GitLab
How GitLab compares
Get started
GitLab docs
GitLab Learn
Pricing
Talk to an expert
Help
What's new
4
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Menu
Projects
Groups
Snippets
Sign up now
Login
Sign in / Register
Toggle navigation
Menu
Open sidebar
Inkscape
extensions
Commits
bc7f8779
Commit
bc7f8779
authored
May 13, 2020
by
Jonathan Neuhauser
Browse files
fix deprecation warnings for numpy.matrix
parent
90d172ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
polyhedron_3d.py
View file @
bc7f8779
...
...
@@ -237,7 +237,7 @@ class WavefrontObj(object):
"""translate vertex points according to the matrix"""
transformed_pts
=
[]
for
vtx
in
self
.
vtx
:
transformed_pts
.
append
((
numpy
.
matmul
(
trans_mat
,
numpy
.
mat
(
vtx
).
T
)).
T
.
tolist
()
[
0
]
)
transformed_pts
.
append
((
numpy
.
matmul
(
trans_mat
,
numpy
.
array
(
vtx
).
T
)).
T
.
tolist
())
return
transformed_pts
def
get_edge_list
(
self
):
...
...
@@ -312,7 +312,7 @@ class Poly3D(inkex.GenerateExtension):
poly
.
transform
.
add_scale
(
scale
)
# TRANSFORMATION OF THE OBJECT (ROTATION, SCALE, ETC)
trans_mat
=
numpy
.
mat
(
numpy
.
identity
(
3
,
float
)
)
# init. trans matrix as identity matrix
trans_mat
=
numpy
.
identity
(
3
,
float
)
# init. trans matrix as identity matrix
for
i
in
range
(
1
,
7
):
# for each rotation
axis
=
getattr
(
so
,
'r{}_ax'
.
format
(
i
))
angle
=
getattr
(
so
,
'r{}_ang'
.
format
(
i
))
*
pi
/
180
...
...
Nathan Lee
@nathanal
mentioned in issue
#212 (closed)
·
Jan 22, 2021
mentioned in issue
#212 (closed)
mentioned in issue #212
Toggle commit list
Write
Preview
Supports
Markdown
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