Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
iMSTK
iMSTK
Commits
a26712b2
Commit
a26712b2
authored
Apr 29, 2016
by
Alexis Girault
Browse files
BUG: Check cell dim in VTKMeshReader::copyCells
parent
76a1cab7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Base/Geometry/Reader/imstkVTKMeshReader.cpp
View file @
a26712b2
...
...
@@ -158,8 +158,7 @@ VTKMeshReader::convertVtkUnstructuredGridToVolumetricMesh(vtkUnstructuredGrid* v
std
::
vector
<
Vec3d
>
vertices
;
VTKMeshReader
::
copyVertices
(
vtkMesh
->
GetPoints
(),
vertices
);
vtkIdType
cellType
;
vtkMesh
->
GetCellType
(
cellType
);
int
cellType
=
vtkMesh
->
GetCellType
(
vtkMesh
->
GetNumberOfCells
()
-
1
);
if
(
cellType
==
VTK_TETRA
)
{
std
::
vector
<
TetrahedralMesh
::
TetraArray
>
cells
;
...
...
@@ -219,6 +218,10 @@ VTKMeshReader::copyCells(vtkCellArray* vtkCells, std::vector<std::array<size_t,d
std
::
array
<
size_t
,
dim
>
cell
;
while
(
vtkCells
->
GetNextCell
(
vtkCell
))
{
if
(
vtkCell
->
GetNumberOfIds
()
!=
dim
)
{
continue
;
}
for
(
size_t
i
=
0
;
i
<
dim
;
++
i
)
{
cell
[
i
]
=
vtkCell
->
GetId
(
i
);
...
...
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