Merge branch 'refs/heads/master' into review-CL-Bundler

Conflicts:
	src/3rdParty/salomesmesh/CMakeLists.txt
This commit is contained in:
jriegel
2014-11-22 13:51:04 +01:00
26 changed files with 431 additions and 223 deletions

View File

@@ -312,7 +312,7 @@ bool MeshInput::LoadOBJ (std::istream &rstrIn)
bool ok = true;
for (int i=0;i<3;i++) {
if (it->_aulPoints[i] >= ct) {
Base::Console().Warning("Face index %ld out of range\n", it->_aulPoints[i]);
Base::Console().Warning("Face index %lu out of range\n", it->_aulPoints[i]);
ok = false;
}
}
@@ -435,7 +435,7 @@ bool MeshInput::LoadOFF (std::istream &rstrIn)
bool ok = true;
for (int i=0;i<3;i++) {
if (it->_aulPoints[i] >= ct) {
Base::Console().Warning("Face index %ld out of range\n", it->_aulPoints[i]);
Base::Console().Warning("Face index %lu out of range\n", it->_aulPoints[i]);
ok = false;
}
}

View File

@@ -809,6 +809,7 @@ void MeshKernel::Read (std::istream &rclIn)
str >> magic >> version;
swap_magic = magic; Base::SwapEndian(swap_magic);
swap_version = version; Base::SwapEndian(swap_version);
uint32_t open_edge = 0xffffffff; // value to mark an open edge
// is it the new or old format?
bool new_format = false;
@@ -846,10 +847,25 @@ void MeshKernel::Read (std::istream &rclIn)
it->_aulPoints[1] = v2;
it->_aulPoints[2] = v3;
// On systems where an 'unsigned long' is a 64-bit value
// the empty neighbour must be explicitly set to 'ULONG_MAX'
// because in algorithms this value is always used to check
// for open edges.
str >> v1 >> v2 >> v3;
it->_aulNeighbours[0] = v1;
it->_aulNeighbours[1] = v2;
it->_aulNeighbours[2] = v3;
if (v1 < open_edge)
it->_aulNeighbours[0] = v1;
else
it->_aulNeighbours[0] = ULONG_MAX;
if (v2 < open_edge)
it->_aulNeighbours[1] = v2;
else
it->_aulNeighbours[1] = ULONG_MAX;
if (v3 < open_edge)
it->_aulNeighbours[2] = v3;
else
it->_aulNeighbours[2] = ULONG_MAX;
}
str >> _clBoundBox.MinX >> _clBoundBox.MaxX;