+ fix issues on 64-bit Linux/MacOSX systems
This commit is contained in:
parent
b11acfd165
commit
be7f583aa0
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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],
|
||||
|
|
|
@ -184,7 +184,7 @@ void CurveProjectorShape::projectCurve( const TopoDS_Edge& aEdge,
|
|||
// more the one intersection (@ToDo)
|
||||
}else if(Alg.NbPoints() > 1){
|
||||
PointOnEdge[i] = Base::Vector3f(FLOAT_MAX,0,0);
|
||||
Base::Console().Log("MeshAlgos::projectCurve(): More then one intersection in Facet %ld, Edge %d\n",uCurFacetIdx,i);
|
||||
Base::Console().Log("MeshAlgos::projectCurve(): More then one intersection in Facet %lu, Edge %d\n",uCurFacetIdx,i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -202,7 +202,7 @@ void CurveProjectorShape::projectCurve( const TopoDS_Edge& aEdge,
|
|||
cResultPoint = cSplitPoint;
|
||||
GoOn = true;
|
||||
}else{
|
||||
Base::Console().Log("MeshAlgos::projectCurve(): Posibel reentry in Facet %ld\n", uCurFacetIdx);
|
||||
Base::Console().Log("MeshAlgos::projectCurve(): Possible reentry in Facet %lu\n", uCurFacetIdx);
|
||||
}
|
||||
|
||||
if( uCurFacetIdx == uStartFacetIdx )
|
||||
|
|
|
@ -170,7 +170,7 @@ void CmdApproxPlane::activated(int iMsg)
|
|||
double q0, q1, q2, q3;
|
||||
pm.getRotation().getValue(q0, q1, q2, q3);
|
||||
|
||||
Base::Console().Log("RMS value for plane fit with %ld points: %.4f\n", aData.size(), sigma);
|
||||
Base::Console().Log("RMS value for plane fit with %lu points: %.4f\n", aData.size(), sigma);
|
||||
Base::Console().Log(" Plane base(%.4f, %.4f, %.4f)\n", base.x, base.y, base.z);
|
||||
Base::Console().Log(" Plane normal(%.4f, %.4f, %.4f)\n", norm.x, norm.y, norm.z);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user