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;

View File

@@ -1385,7 +1385,7 @@ void ViewProviderMesh::faceInfo(unsigned long uFacet)
if (uFacet < facets.size()) {
MeshCore::MeshFacet face = facets[uFacet];
MeshCore::MeshGeomFacet tria = rKernel.GetFacet(face);
Base::Console().Message("Mesh: %s Facet %ld: Points: <%ld, %ld, %ld>, Neighbours: <%ld, %ld, %ld>\n"
Base::Console().Message("Mesh: %s Facet %lu: Points: <%lu, %lu, %lu>, Neighbours: <%lu, %lu, %lu>\n"
"Triangle: <[%.6f, %.6f, %.6f], [%.6f, %.6f, %.6f], [%.6f, %.6f, %.6f]>\n", fea->getNameInDocument(), uFacet,
face._aulPoints[0], face._aulPoints[1], face._aulPoints[2],
face._aulNeighbours[0], face._aulNeighbours[1], face._aulNeighbours[2],