Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
openmesh-python
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OpenMesh
openmesh-python
Commits
feb1290c
Commit
feb1290c
authored
7 years ago
by
Alexander Dielen
Browse files
Options
Downloads
Patches
Plain Diff
don't use uninitialized face normals to compute vertex normals
parent
8a3d334f
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_trimesh_normal_calculations.py
+1
-13
1 addition, 13 deletions
tests/test_trimesh_normal_calculations.py
with
1 addition
and
13 deletions
tests/test_trimesh_normal_calculations.py
+
1
−
13
View file @
feb1290c
...
...
@@ -73,26 +73,14 @@ class Normals(unittest.TestCase):
self
.
mesh
.
update_halfedge_normals
()
def
test_calc_vertex_normal_fast
(
self
):
self
.
mesh
.
request_vertex_normals
()
self
.
mesh
.
request_halfedge_normals
()
self
.
mesh
.
request_face_normals
()
n
=
self
.
mesh
.
calc_vertex_normal_fast
(
self
.
vhandle
[
2
])
self
.
assertTrue
(
np
.
allclose
(
n
,
np
.
array
([
1
,
2
,
0
])))
self
.
assertTrue
(
np
.
allclose
(
n
,
np
.
array
([
0.70710678
,
0.
,
-
0.29289322
])))
def
test_calc_vertex_normal_correct
(
self
):
self
.
mesh
.
request_vertex_normals
()
self
.
mesh
.
request_halfedge_normals
()
self
.
mesh
.
request_face_normals
()
n
=
self
.
mesh
.
calc_vertex_normal_correct
(
self
.
vhandle
[
2
])
self
.
assertTrue
(
np
.
allclose
(
n
,
np
.
array
([
1
,
0
,
0
])))
def
test_calc_vertex_normal_loop
(
self
):
self
.
mesh
.
request_vertex_normals
()
self
.
mesh
.
request_halfedge_normals
()
self
.
mesh
.
request_face_normals
()
n
=
self
.
mesh
.
calc_vertex_normal_loop
(
self
.
vhandle
[
2
])
self
.
assertTrue
(
np
.
allclose
(
n
,
np
.
array
([
0.8660254
,
0
,
0
])))
...
...
This diff is collapsed.
Click to expand it.
Alexander Dielen
@adielen
mentioned in issue
#4 (closed)
·
7 years ago
mentioned in issue
#4 (closed)
mentioned in issue #4
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment