Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
OpenMesh
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
11
Issues
11
List
Boards
Labels
Service Desk
Milestones
Merge Requests
5
Merge Requests
5
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenMesh
OpenMesh
Commits
56dc45f0
Commit
56dc45f0
authored
Nov 27, 2018
by
Jan Möbius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix PLY Reader hang when reading directly from istream (Thanks to Paul Loré for the patch)
closes
#46
parent
be36e14b
Pipeline
#7918
passed with stage
in 104 minutes and 2 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
12 deletions
+9
-12
Doc/changelog.docu
Doc/changelog.docu
+1
-0
src/OpenMesh/Core/IO/reader/PLYReader.cc
src/OpenMesh/Core/IO/reader/PLYReader.cc
+8
-12
No files found.
Doc/changelog.docu
View file @
56dc45f0
...
...
@@ -18,6 +18,7 @@
<ul>
<li>PLY Reader: Allowing the PLY reader to read custom face ( Thanks to morgan Leborgne for the patch)</li>
<li>PLY Reader: Fixed endless loop on unknown property list type</li>
<li>PLY Reader: Fix hang when reading directly from istream (Thanks to Paul Loré for the patch)</li>
<li>OM Writer/Reader: Update file format version to 2.0. Older files can still be read, but older OpenMesh versions cannot read new format.</li>
<li>OM Writer/Reader: Fixed inconsistent writing/reading of edge properties</li>
<li>OM Writer/Reader: Add option to store status</li>
...
...
src/OpenMesh/Core/IO/reader/PLYReader.cc
View file @
56dc45f0
...
...
@@ -135,6 +135,14 @@ bool _PLYReader_::read(std::istream& _in, BaseImporter& _bi, Options& _opt) {
return
false
;
}
// Reparse the header
if
(
!
can_u_read
(
_in
))
{
omerr
()
<<
"[PLYReader] : Unable to parse header
\n
"
;
return
false
;
}
// filter relevant options for reading
bool
swap
=
_opt
.
check
(
Options
::
Swap
);
...
...
@@ -281,12 +289,6 @@ void _PLYReader_::readCustomProperty(std::istream& _in, BaseImporter& _bi, Handl
bool
_PLYReader_
::
read_ascii
(
std
::
istream
&
_in
,
BaseImporter
&
_bi
,
const
Options
&
_opt
)
const
{
// Reparse the header
if
(
!
can_u_read
(
_in
))
{
omerr
()
<<
"[PLYReader] : Unable to parse header
\n
"
;
return
false
;
}
unsigned
int
i
,
j
,
k
,
l
,
idx
;
unsigned
int
nV
;
OpenMesh
::
Vec3f
v
,
n
;
...
...
@@ -507,12 +509,6 @@ bool _PLYReader_::read_ascii(std::istream& _in, BaseImporter& _bi, const Options
bool
_PLYReader_
::
read_binary
(
std
::
istream
&
_in
,
BaseImporter
&
_bi
,
bool
/*_swap*/
,
const
Options
&
_opt
)
const
{
// Reparse the header
if
(
!
can_u_read
(
_in
))
{
omerr
()
<<
"[PLYReader] : Unable to parse header
\n
"
;
return
false
;
}
OpenMesh
::
Vec3f
v
,
n
;
// Vertex
OpenMesh
::
Vec2f
t
;
// TexCoords
BaseImporter
::
VHandles
vhandles
;
...
...
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