Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fslpy
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
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
FSL
fslpy
Commits
f5ce5503
Commit
f5ce5503
authored
5 years ago
by
Paul McCarthy
Browse files
Options
Downloads
Plain Diff
Merge branch 'bf/mesh' into 'master'
Bf/mesh See merge request fsl/fslpy!132
parents
99eb7f2b
e4d972ac
No related branches found
No related tags found
No related merge requests found
Pipeline
#3879
passed
5 years ago
Stage: test
Stage: style
Stage: doc
Stage: deploy
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
CHANGELOG.rst
+2
-0
2 additions, 0 deletions
CHANGELOG.rst
fsl/data/mesh.py
+3
-1
3 additions, 1 deletion
fsl/data/mesh.py
tests/test_idle.py
+5
-1
5 additions, 1 deletion
tests/test_idle.py
tests/test_mesh.py
+3
-0
3 additions, 0 deletions
tests/test_mesh.py
with
13 additions
and
2 deletions
CHANGELOG.rst
+
2
−
0
View file @
f5ce5503
...
...
@@ -32,6 +32,8 @@ Fixed
* The :func:`.makeWriteable` function will always create a copy of an
``array`` if its base is a ``bytes`` object.
* Fixed a bug in the :meth:`.GitfitMesh.loadVertices` method.
* Fixed a bug in the :meth:`.Mesh.addVertices` method where the wrong face
normals could be used for newly added vertex sets.
2.2.0 (Wednesday May 8th 2019)
...
...
This diff is collapsed.
Click to expand it.
fsl/data/mesh.py
+
3
−
1
View file @
f5ce5503
...
...
@@ -422,7 +422,7 @@ class Mesh(notifier.Notifier, meta.Meta):
if
fixWinding
:
indices
=
self
.
__indices
normals
=
self
.
normals
normals
=
calcFaceNormals
(
vertices
,
indices
)
needsFix
=
needsFixing
(
vertices
,
indices
,
normals
,
lo
,
hi
)
# See needsFixing documentation
...
...
@@ -433,6 +433,8 @@ class Mesh(notifier.Notifier, meta.Meta):
self
.
__vindices
[
key
]
=
self
.
__fixedIndices
self
.
__faceNormals
[
key
]
=
normals
*
-
1
else
:
self
.
__faceNormals
[
key
]
=
normals
return
vertices
...
...
This diff is collapsed.
Click to expand it.
tests/test_idle.py
+
5
−
1
View file @
f5ce5503
...
...
@@ -174,7 +174,11 @@ def _test_block():
idle
.
block
(
2
)
end
=
time
.
time
()
assert
(
end
-
start
)
>=
2
# Be relaxed about precision - timing
# can sometimes be pretty sloppy when
# running in a docker container.
assert
abs
((
end
-
start
)
<
2
)
<
0.05
if
fslplatform
.
haveGui
:
assert
called
[
0
]
...
...
This diff is collapsed.
Click to expand it.
tests/test_mesh.py
+
3
−
0
View file @
f5ce5503
...
...
@@ -433,6 +433,7 @@ def test_mesh_different_winding_orders():
mnofix
.
addVertices
(
verts2
,
key
=
'
v2
'
,
fixWinding
=
False
)
mfix
.
addVertices
(
verts1
,
key
=
'
v1
'
,
fixWinding
=
True
)
mfix
.
addVertices
(
verts2
,
key
=
'
v2
'
,
fixWinding
=
True
)
mfix
.
addVertices
(
verts1
,
key
=
'
v3
'
,
fixWinding
=
True
,
select
=
False
)
mnofix
.
vertices
=
'
v1
'
assert
np
.
all
(
mnofix
.
indices
==
tris
)
...
...
@@ -443,3 +444,5 @@ def test_mesh_different_winding_orders():
assert
np
.
all
(
mfix
.
indices
==
tris
)
mfix
.
vertices
=
'
v2
'
assert
np
.
all
(
mfix
.
indices
==
trisfixed
)
mfix
.
vertices
=
'
v3
'
assert
np
.
all
(
mfix
.
indices
==
tris
)
This diff is collapsed.
Click to expand it.
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