#1 CloudCompare 2.10.2
Opened a month ago by mjb90. Modified 19 days ago
rpms/ mjb90/cloudcompare master  into  master

submodule license corrected
Michael Barnes • a month ago  
submodules have changed
Michael Barnes • a month ago  
Path correction
Michael Barnes • a month ago  

@@ -1,415 +0,0 @@ 

- --- CloudCompare-2.9.1/libs/qCC_io/ShpFilter.cpp	2017-11-03 12:30:42.000000000 +0100

- +++ ./ShpFilter.cpp	2018-02-23 14:19:46.837624000 +0100

- @@ -72,6 +72,34 @@

-  						SHP_MULTI_PATCH		= 31

-  };

-  

- +//DGM: by default qToLittleEndian and qFromLittleEndian only works for integer types!

- +double swapD(double in)

- +{

- +	//! Change the endianness (see https://stackoverflow.com/questions/41012414/convert-double-value-from-little-endian-to-big-endian)

- +	std::array<char, sizeof(double)> p;

- +	memcpy(&p[0], &in, sizeof(double));

- +	std::reverse(p.begin(), p.end());

- +	memcpy(&in, &p[0], sizeof(double));

- +	return in;

- +}

- +

- +double qFromLittleEndianD(double in)

- +{

- +#if Q_BYTE_ORDER == Q_BIG_ENDIAN

- +	return swapD(in);

- +#endif

- +	return in;

- +}

- +

- +double qToLittleEndianD(double in)

- +{

- +#if Q_BYTE_ORDER == Q_BIG_ENDIAN

- +	return swapD(in);

- +#endif

- +	return in;

- +}

- +

- +

-  //! Shape File Save dialog

-  class SaveSHPFileDialog : public QDialog, public Ui::SaveSHPFileDlg

-  {

- @@ -271,10 +299,10 @@

-  	{

-  		//The Bounding Box for the PolyLine stored in the order Xmin, Ymin, Xmax, Ymax

-  		//DGM: ignored

- -		//double xMin = qFromLittleEndian<double>(*reinterpret_cast<double*>(header   ));

- -		//double xMax = qFromLittleEndian<double>(*reinterpret_cast<double*>(header+ 8));

- -		//double yMin = qFromLittleEndian<double>(*reinterpret_cast<double*>(header+16));

- -		//double yMax = qFromLittleEndian<double>(*reinterpret_cast<double*>(header+24));

- +		//double xMin = qFromLittleEndianD(*reinterpret_cast<double*>(header   ));

- +		//double xMax = qFromLittleEndianD(*reinterpret_cast<double*>(header+ 8));

- +		//double yMin = qFromLittleEndianD(*reinterpret_cast<double*>(header+16));

- +		//double yMax = qFromLittleEndianD(*reinterpret_cast<double*>(header+24));

-  	}

-  

-  	//Byte 32: NumParts (The number of parts in the PolyLine)

- @@ -321,8 +349,8 @@

-  			//check for errors

-  			if (file.error() != QFile::NoError)

-  				return CC_FERR_READING;

- -			double x = qFromLittleEndian<double>(*reinterpret_cast<double*>(header));

- -			double y = qFromLittleEndian<double>(*reinterpret_cast<double*>(header + 8));

- +			double x = qFromLittleEndianD(*reinterpret_cast<double*>(header));

- +			double y = qFromLittleEndianD(*reinterpret_cast<double*>(header + 8));

-  			points[i].x = static_cast<PointCoordinateType>(x + PShift.x);

-  			points[i].y = static_cast<PointCoordinateType>(y + PShift.y);

-  			points[i].z = 0;

- @@ -337,8 +365,8 @@

-  		{

-  			file.read(header, 16);

-  			//DGM: ignored

- -			//double zMin = qFromLittleEndian<double>(*reinterpret_cast<double*>(header  ));

- -			//double zMax = qFromLittleEndian<double>(*reinterpret_cast<double*>(header+8));

- +			//double zMin = qFromLittleEndianD(*reinterpret_cast<double*>(header  ));

- +			//double zMax = qFromLittleEndianD(*reinterpret_cast<double*>(header+8));

-  		}

-  

-  		//Z coordinates (an array of length NumPoints)

- @@ -349,7 +377,7 @@

-  				//check for errors

-  				if (file.error() != QFile::NoError)

-  					return CC_FERR_READING;

- -				double z = qFromLittleEndian<double>(*reinterpret_cast<double*>(header));

- +				double z = qFromLittleEndianD(*reinterpret_cast<double*>(header));

-  				points[i].z = static_cast<PointCoordinateType>(z + PShift.z);

-  			}

-  		}

- @@ -365,8 +393,8 @@

-  			//check for errors

-  			if (file.error() != QFile::NoError)

-  				return CC_FERR_READING;

- -			double mMin = qFromLittleEndian<double>(*reinterpret_cast<double*>(header));

- -			double mMax = qFromLittleEndian<double>(*reinterpret_cast<double*>(header + 8));

- +			double mMin = qFromLittleEndianD(*reinterpret_cast<double*>(header));

- +			double mMax = qFromLittleEndianD(*reinterpret_cast<double*>(header + 8));

-  

-  			if (mMin != ESRI_NO_DATA && mMax != ESRI_NO_DATA)

-  			{

- @@ -391,7 +419,7 @@

-  				//check for errors

-  				if (file.error() != QFile::NoError)

-  					return CC_FERR_READING;

- -				double m = qFromLittleEndian<double>(*reinterpret_cast<double*>(header));

- +				double m = qFromLittleEndianD(*reinterpret_cast<double*>(header));

-  				scalarValues[i] = (m == ESRI_NO_DATA ? NAN_VALUE : static_cast<ScalarType>(m));

-  			}

-  		}

- @@ -509,10 +537,10 @@

-  

-  	//Byte 4: Box

-  	{

- -		double xMin = qToLittleEndian<double>(bbMing.u[X]);

- -		double xMax = qToLittleEndian<double>(bbMaxg.u[X]);

- -		double yMin = qToLittleEndian<double>(bbMing.u[Y]);

- -		double yMax = qToLittleEndian<double>(bbMaxg.u[Y]);

- +		double xMin = qToLittleEndianD(bbMing.u[X]);

- +		double xMax = qToLittleEndianD(bbMaxg.u[X]);

- +		double yMin = qToLittleEndianD(bbMing.u[Y]);

- +		double yMax = qToLittleEndianD(bbMaxg.u[Y]);

-  		//The Bounding Box for the PolyLine stored in the order Xmin, Ymin, Xmax, Ymax

-  		/*Byte  4*/file.write((const char*)&xMin, 8);

-  		/*Byte 12*/file.write((const char*)&yMin, 8);

- @@ -595,8 +623,8 @@

-  			const CCVector3* P = vertices->getPoint(ii % realNumPoints); //warning: handle loop if polyline is closed

-  			CCVector3d Pg = poly->toGlobal3d(*P);

-  

- -			double x = qToLittleEndian<double>(Pg.u[X]);

- -			double y = qToLittleEndian<double>(Pg.u[Y]);

- +			double x = qToLittleEndianD(Pg.u[X]);

- +			double y = qToLittleEndianD(Pg.u[Y]);

-  			/*Byte 0*/file.write((const char*)&x, 8);

-  			/*Byte 8*/file.write((const char*)&y, 8);

-  			bytesWritten += 16;

- @@ -608,8 +636,8 @@

-  	{

-  		//Z boundaries

-  		{

- -			double zMin = qToLittleEndian<double>(bbMing.u[Z]);

- -			double zMax = qToLittleEndian<double>(bbMaxg.u[Z]);

- +			double zMin = qToLittleEndianD(bbMing.u[Z]);

- +			double zMax = qToLittleEndianD(bbMaxg.u[Z]);

-  			file.write((const char*)&zMin, 8);

-  			file.write((const char*)&zMax, 8);

-  			bytesWritten += 16;

- @@ -622,7 +650,7 @@

-  				int32_t ii = (inverseOrder ? numPoints - 1 - i : i);

-  				const CCVector3* P = vertices->getPoint(ii % realNumPoints); //warning: handle loop if polyline is closed

-  				CCVector3d Pg = poly->toGlobal3d(*P);

- -				double z = qToLittleEndian<double>(Pg.u[Z]);

- +				double z = qToLittleEndianD(Pg.u[Z]);

-  				file.write((const char*)&z, 8);

-  				bytesWritten += 8;

-  			}

- @@ -651,8 +679,8 @@

-  					}

-  				}

-  			}

- -			mMin = qToLittleEndian<double>(mMin);

- -			mMax = qToLittleEndian<double>(mMax);

- +			mMin = qToLittleEndianD(mMin);

- +			mMax = qToLittleEndianD(mMax);

-  			file.write((const char*)&mMin, 8);

-  			file.write((const char*)&mMax, 8);

-  			bytesWritten += 16;

- @@ -660,13 +688,13 @@

-  

-  		//M values (for each part - just one here)

-  		{

- -			double scalar = qToLittleEndian<double>(ESRI_NO_DATA);

- +			double scalar = qToLittleEndianD(ESRI_NO_DATA);

-  			for (int32_t i = 0; i < numPoints; ++i)

-  			{

-  				if (hasSF)

-  				{

-  					scalar = static_cast<double>(vertices->getPointScalarValue(i % realNumPoints)); //warning: handle loop if polyline is closed

- -					scalar = qToLittleEndian<double>(scalar);

- +					scalar = qToLittleEndianD(scalar);

-  				}

-  				file.write((const char*)&scalar, 8);

-  				bytesWritten += 8;

- @@ -686,10 +714,10 @@

-  	{

-  		//The Bounding Box for the Cloud stored in the order Xmin, Ymin, Xmax, Ymax

-  		//DGM: ignored

- -		//double xMin = qFromLittleEndian<double>(*reinterpret_cast<double*>(header   ));

- -		//double xMax = qFromLittleEndian<double>(*reinterpret_cast<double*>(header+ 8));

- -		//double yMin = qFromLittleEndian<double>(*reinterpret_cast<double*>(header+16));

- -		//double yMax = qFromLittleEndian<double>(*reinterpret_cast<double*>(header+24));

- +		//double xMin = qFromLittleEndianD(*reinterpret_cast<double*>(header   ));

- +		//double xMax = qFromLittleEndianD(*reinterpret_cast<double*>(header+ 8));

- +		//double yMin = qFromLittleEndianD(*reinterpret_cast<double*>(header+16));

- +		//double yMax = qFromLittleEndianD(*reinterpret_cast<double*>(header+24));

-  	}

-  

-  	//Byte 32: NumPoints (The total number of points)

- @@ -708,8 +736,8 @@

-  		for (int32_t i = 0; i < numPoints; ++i)

-  		{

-  			file.read(header, 16);

- -			double x = qFromLittleEndian<double>(*reinterpret_cast<double*>(header));

- -			double y = qFromLittleEndian<double>(*reinterpret_cast<double*>(header + 8));

- +			double x = qFromLittleEndianD(*reinterpret_cast<double*>(header));

- +			double y = qFromLittleEndianD(*reinterpret_cast<double*>(header + 8));

-  			CCVector3 P(static_cast<PointCoordinateType>(x + PShift.x),

-  				static_cast<PointCoordinateType>(y + PShift.y),

-  				0);

- @@ -724,8 +752,8 @@

-  		{

-  			file.read(header, 16);

-  			//DGM: ignored

- -			//double zMin = qFromLittleEndian<double>(*reinterpret_cast<double*>(header  ));

- -			//double zMax = qFromLittleEndian<double>(*reinterpret_cast<double*>(header+8));

- +			//double zMin = qFromLittleEndianD(*reinterpret_cast<double*>(header  ));

- +			//double zMax = qFromLittleEndianD(*reinterpret_cast<double*>(header+8));

-  		}

-  

-  		//Z coordinates (an array of length NumPoints)

- @@ -733,7 +761,7 @@

-  			for (int32_t i = 0; i < numPoints; ++i)

-  			{

-  				file.read(header, 8);

- -				double z = qFromLittleEndian<double>(*reinterpret_cast<double*>(header));

- +				double z = qFromLittleEndianD(*reinterpret_cast<double*>(header));

-  				const CCVector3* P = cloud->getPoint(i);

-  				const_cast<CCVector3*>(P)->z = static_cast<PointCoordinateType>(z + PShift.z);

-  			}

- @@ -749,8 +777,8 @@

-  		ccScalarField* sf = 0;

-  		{

-  			file.read(header, 16);

- -			double mMin = qFromLittleEndian<double>(*reinterpret_cast<double*>(header));

- -			double mMax = qFromLittleEndian<double>(*reinterpret_cast<double*>(header + 8));

- +			double mMin = qFromLittleEndianD(*reinterpret_cast<double*>(header));

- +			double mMax = qFromLittleEndianD(*reinterpret_cast<double*>(header + 8));

-  

-  			if (mMin != ESRI_NO_DATA && mMax != ESRI_NO_DATA)

-  			{

- @@ -770,7 +798,7 @@

-  			for (int32_t i = 0; i < numPoints; ++i)

-  			{

-  				file.read(header, 8);

- -				double m = qFromLittleEndian<double>(*reinterpret_cast<double*>(header));

- +				double m = qFromLittleEndianD(*reinterpret_cast<double*>(header));

-  				ScalarType s = m == ESRI_NO_DATA ? NAN_VALUE : static_cast<ScalarType>(m);

-  				sf->addElement(s);

-  			}

- @@ -809,10 +837,10 @@

-  

-  	//Byte 4: Box

-  	{

- -		double xMin = qToLittleEndian<double>(bbMing.x);

- -		double xMax = qToLittleEndian<double>(bbMaxg.x);

- -		double yMin = qToLittleEndian<double>(bbMing.y);

- -		double yMax = qToLittleEndian<double>(bbMaxg.y);

- +		double xMin = qToLittleEndianD(bbMing.x);

- +		double xMax = qToLittleEndianD(bbMaxg.x);

- +		double yMin = qToLittleEndianD(bbMing.y);

- +		double yMax = qToLittleEndianD(bbMaxg.y);

-  		//The Bounding Box for the Cloud stored in the order Xmin, Ymin, Xmax, Ymax

-  		/*Byte  4*/file.write((const char*)&xMin, 8);

-  		/*Byte 12*/file.write((const char*)&yMin, 8);

- @@ -836,8 +864,8 @@

-  			const CCVector3* P = cloud->getPoint(i);

-  			CCVector3d Pg = cloud->toGlobal3d(*P);

-  

- -			double x = qToLittleEndian<double>(Pg.x);

- -			double y = qToLittleEndian<double>(Pg.y);

- +			double x = qToLittleEndianD(Pg.x);

- +			double y = qToLittleEndianD(Pg.y);

-  			/*Byte 0*/file.write((const char*)&x, 8);

-  			/*Byte 8*/file.write((const char*)&y, 8);

-  			bytesWritten += 16;

- @@ -846,8 +874,8 @@

-  

-  	//Z boundaries

-  	{

- -		double zMin = qToLittleEndian<double>(bbMing.z);

- -		double zMax = qToLittleEndian<double>(bbMaxg.z);

- +		double zMin = qToLittleEndianD(bbMing.z);

- +		double zMax = qToLittleEndianD(bbMaxg.z);

-  		file.write((const char*)&zMin, 8);

-  		file.write((const char*)&zMax, 8);

-  		bytesWritten += 16;

- @@ -859,7 +887,7 @@

-  		{

-  			const CCVector3* P = cloud->getPoint(i);

-  			CCVector3d Pg = cloud->toGlobal3d(*P);

- -			double z = qToLittleEndian<double>(Pg.z);

- +			double z = qToLittleEndianD(Pg.z);

-  			file.write((const char*)&z, 8);

-  			bytesWritten += 8;

-  		}

- @@ -888,8 +916,8 @@

-  				}

-  			}

-  		}

- -		mMin = qToLittleEndian<double>(mMin);

- -		mMax = qToLittleEndian<double>(mMax);

- +		mMin = qToLittleEndianD(mMin);

- +		mMax = qToLittleEndianD(mMax);

-  		file.write((const char*)&mMin, 8);

-  		file.write((const char*)&mMax, 8);

-  		bytesWritten += 16;

- @@ -897,13 +925,13 @@

-  

-  	//M values

-  	{

- -		double scalar = qToLittleEndian<double>(ESRI_NO_DATA);

- +		double scalar = qToLittleEndianD(ESRI_NO_DATA);

-  		for (int32_t i = 0; i < numPoints; ++i)

-  		{

-  			if (hasSF)

-  			{

-  				scalar = static_cast<double>(cloud->getPointScalarValue(i));

- -				scalar = qToLittleEndian<double>(scalar);

- +				scalar = qToLittleEndianD(scalar);

-  			}

-  			file.write((const char*)&scalar, 8);

-  			bytesWritten += 8;

- @@ -918,8 +946,8 @@

-  	char buffer[16];

-  	file.read(buffer, 16);

-  

- -	double x = qFromLittleEndian<double>(*reinterpret_cast<double*>(buffer));

- -	double y = qFromLittleEndian<double>(*reinterpret_cast<double*>(buffer + 8));

- +	double x = qFromLittleEndianD(*reinterpret_cast<double*>(buffer));

- +	double y = qFromLittleEndianD(*reinterpret_cast<double*>(buffer + 8));

-  	CCVector3 P(static_cast<PointCoordinateType>(x + PShift.x),

-  		static_cast<PointCoordinateType>(y + PShift.y),

-  		0);

- @@ -930,7 +958,7 @@

-  		//Z coordinate

-  		{

-  			file.read(buffer, 8);

- -			double z = qFromLittleEndian<double>(*reinterpret_cast<double*>(buffer));

- +			double z = qFromLittleEndianD(*reinterpret_cast<double*>(buffer));

-  			P.z = static_cast<PointCoordinateType>(z + PShift.z);

-  		}

-  	}

- @@ -957,7 +985,7 @@

-  		//Measure

-  		{

-  			file.read(buffer, 8);

- -			double m = qFromLittleEndian<double>(*reinterpret_cast<double*>(buffer));

- +			double m = qFromLittleEndianD(*reinterpret_cast<double*>(buffer));

-  			if (m != ESRI_NO_DATA)

-  			{

-  				s = static_cast<ScalarType>(m);

- @@ -1144,10 +1172,10 @@

-  		_header += 4;

-  

-  		//X and Y bounaries

- -		double xMin = qToLittleEndian<double>(bbMinCorner.u[X]);

- -		double xMax = qToLittleEndian<double>(bbMaxCorner.u[X]);

- -		double yMin = qToLittleEndian<double>(bbMinCorner.u[Y]);

- -		double yMax = qToLittleEndian<double>(bbMaxCorner.u[Y]);

- +		double xMin = qToLittleEndianD(bbMinCorner.u[X]);

- +		double xMax = qToLittleEndianD(bbMaxCorner.u[X]);

- +		double yMin = qToLittleEndianD(bbMinCorner.u[Y]);

- +		double yMax = qToLittleEndianD(bbMaxCorner.u[Y]);

-  		//Byte 36: box X min

-  		memcpy(_header, (const char*)&xMin, 8);

-  		_header += 8;

- @@ -1163,8 +1191,8 @@

-  

-  		//Z bounaries

-  		//Unused, with value 0.0, if not Measured or Z type

- -		double zMin = outputShapeType < SHP_POINT_Z ? 0.0 : qToLittleEndian<double>(bbMinCorner.u[Z]);

- -		double zMax = outputShapeType < SHP_POINT_Z ? 0.0 : qToLittleEndian<double>(bbMaxCorner.u[Z]);

- +		double zMin = outputShapeType < SHP_POINT_Z ? 0.0 : qToLittleEndianD(bbMinCorner.u[Z]);

- +		double zMax = outputShapeType < SHP_POINT_Z ? 0.0 : qToLittleEndianD(bbMaxCorner.u[Z]);

-  		//Byte 68: box Z min

-  		memcpy(_header, (const char*)&zMin, 8);

-  		_header += 8;

- @@ -1447,25 +1475,25 @@

-  

-  		//X and Y bounaries

-  		//Byte 36: box X min

- -		double xMin = qFromLittleEndian<double>(*reinterpret_cast<const double*>(_header));

- +		double xMin = qFromLittleEndianD(*reinterpret_cast<const double*>(_header));

-  		_header += 8;

-  		//Byte 44: box Y min

- -		double yMin = qFromLittleEndian<double>(*reinterpret_cast<const double*>(_header));

- +		double yMin = qFromLittleEndianD(*reinterpret_cast<const double*>(_header));

-  		_header += 8;

-  		//Byte 52: box X max

- -		//double xMax = qFromLittleEndian<double>(*reinterpret_cast<const double*>(_header));

- +		//double xMax = qFromLittleEndianD(*reinterpret_cast<const double*>(_header));

-  		_header += 8;

-  		//Byte 60: box Y max

- -		//double yMax = qFromLittleEndian<double>(*reinterpret_cast<const double*>(_header));

- +		//double yMax = qFromLittleEndianD(*reinterpret_cast<const double*>(_header));

-  		_header += 8;

-  

-  		//Z bounaries

-  		//Unused, with value 0.0, if not Measured or Z type

-  		//Byte 68: box Z min

- -		double zMin = qFromLittleEndian<double>(*reinterpret_cast<const double*>(_header));

- +		double zMin = qFromLittleEndianD(*reinterpret_cast<const double*>(_header));

-  		_header += 8;

-  		//Byte 76: box Z max

- -		//double zMax = qFromLittleEndian<double>(*reinterpret_cast<const double*>(_header));

- +		//double zMax = qFromLittleEndianD(*reinterpret_cast<const double*>(_header));

-  		_header += 8;

-  

-  		if (std::isnan(zMin))

- @@ -1482,10 +1510,10 @@

-  

-  		//M bounaries (M = measures)

-  		//Byte 84: M min

- -		//double mMin = qFromLittleEndian<double>(*reinterpret_cast<const double*>(_header));

- +		//double mMin = qFromLittleEndianD(*reinterpret_cast<const double*>(_header));

-  		_header += 8;

-  		//Byte 92: M max

- -		//double mMax = qFromLittleEndian<double>(*reinterpret_cast<const double*>(_header));

- +		//double mMax = qFromLittleEndianD(*reinterpret_cast<const double*>(_header));

-  		_header += 8;

-  	}

-  	assert(fileLength >= 100);

@@ -1,118 +0,0 @@ 

- From 457ee6699bfbe95a387bc53667c6b2ab39917d3b Mon Sep 17 00:00:00 2001

- From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>

- Date: Thu, 22 Feb 2018 17:23:25 +0100

- Subject: [PATCH] Be explicit about signed chars

- 

- Chars being signed is apparently an implementation detail, see [1].

- 

- This was failing the build on various architectures:

- 

-     ppc64le aarch64 ppc64 s390x armv7hl

- 

- With:

- 

-     CC/src/ChamferDistanceTransform.cpp:44:1:

-     error: narrowing conversion of '-1' from 'int' to 'char' inside { }

-     ...

- 

- [1] https://stackoverflow.com/q/31634962/1839451

- ---

-  CC/src/ChamferDistanceTransform.cpp | 22 +++++++++++-----------

-  1 file changed, 11 insertions(+), 11 deletions(-)

- 

- diff --git a/CC/src/ChamferDistanceTransform.cpp b/CC/src/ChamferDistanceTransform.cpp

- index 5cba46c6..026b2349 100644

- --- a/CC/src/ChamferDistanceTransform.cpp

- +++ b/CC/src/ChamferDistanceTransform.cpp

- @@ -26,7 +26,7 @@

-  using namespace CCLib;

-  

-  //! Forward mask shifts and weights (Chamfer 3-4-5)

- -const char ForwardNeighbours345[14*4] = {

- +const signed char ForwardNeighbours345[14*4] = {

-  	-1,-1,-1, 5,

-  	 0,-1,-1, 4,

-  	 1,-1,-1, 5,

- @@ -44,7 +44,7 @@ const char ForwardNeighbours345[14*4] = {

-  };

-  

-  //! Backward mask shifts and weights (Chamfer 3-4-5)

- -const char BackwardNeighbours345[14*4] = {

- +const signed char BackwardNeighbours345[14*4] = {

-  	 0, 0, 0, 0,

-  	 1, 0, 0, 3,

-  	-1, 1, 0, 4,

- @@ -62,7 +62,7 @@ const char BackwardNeighbours345[14*4] = {

-  };

-  

-  //! Forward mask shifts and weights (Chamfer 1-1-1)

- -const char ForwardNeighbours111[14*4] = {

- +const signed char ForwardNeighbours111[14*4] = {

-  	-1,-1,-1, 1,

-  	 0,-1,-1, 1,

-  	 1,-1,-1, 1,

- @@ -80,7 +80,7 @@ const char ForwardNeighbours111[14*4] = {

-  };

-  

-  //! Backward masks shifts and weights (Chamfer 1-1-1)

- -const char BackwardNeighbours111[14*4] = {

- +const signed char BackwardNeighbours111[14*4] = {

-  	 0, 0, 0, 0,

-  	 1, 0, 0, 1,

-  	-1, 1, 0, 1,

- @@ -101,7 +101,7 @@ const char BackwardNeighbours111[14*4] = {

-  //																					unsigned jStart,

-  //																					unsigned kStart,

-  //																					bool forward,

- -//																					const char neighbours[14][4],

- +//																					const signed char neighbours[14][4],

-  //																					NormalizedProgress* normProgress/*=0*/)

-  //{

-  //	assert(!m_grid.empty());

- @@ -169,8 +169,8 @@ int ChamferDistanceTransform::propagateDistance(CC_CHAMFER_DISTANCE_TYPE type, G

-          return -1;

-  	}

-  

- -	const char* fwNeighbours = 0;

- -	const char* bwNeighbours = 0;

- +	const signed char* fwNeighbours = 0;

- +	const signed char* bwNeighbours = 0;

-  	switch (type)

-  	{

-  	case CHAMFER_111:

- @@ -216,7 +216,7 @@ int ChamferDistanceTransform::propagateDistance(CC_CHAMFER_DISTANCE_TYPE type, G

-  		{

-  			for (unsigned char v=0; v<14; ++v)

-  			{

- -				const char* fwNeighbour = fwNeighbours + 4*v;

- +				const signed char* fwNeighbour = fwNeighbours + 4*v;

-  				neighborShift[v] =	static_cast<int>(fwNeighbour[0]) +

-  									static_cast<int>(fwNeighbour[1]) * static_cast<int>(m_rowSize) +

-  									static_cast<int>(fwNeighbour[2]) * static_cast<int>(m_sliceSize);

- @@ -233,7 +233,7 @@ int ChamferDistanceTransform::propagateDistance(CC_CHAMFER_DISTANCE_TYPE type, G

-  

-  					for (unsigned char v=1; v<14; ++v)

-  					{

- -						const char* fwNeighbour = fwNeighbours + 4*v;

- +						const signed char* fwNeighbour = fwNeighbours + 4*v;

-  						GridElement neighborVal = _grid[neighborShift[v]] + static_cast<GridElement>(fwNeighbour[3]);

-  						minVal = std::min(minVal, neighborVal);

-  					}

- @@ -260,7 +260,7 @@ int ChamferDistanceTransform::propagateDistance(CC_CHAMFER_DISTANCE_TYPE type, G

-  		{

-  			for (unsigned char v=0; v<14; ++v)

-  			{

- -				const char* bwNeighbour = bwNeighbours + 4*v;

- +				const signed char* bwNeighbour = bwNeighbours + 4*v;

-  				neighborShift[v] =	static_cast<int>(bwNeighbour[0]) +

-  									static_cast<int>(bwNeighbour[1]) * static_cast<int>(m_rowSize) +

-  									static_cast<int>(bwNeighbour[2]) * static_cast<int>(m_sliceSize);

- @@ -279,7 +279,7 @@ int ChamferDistanceTransform::propagateDistance(CC_CHAMFER_DISTANCE_TYPE type, G

-  

-  					for (unsigned char v=1; v<14; ++v)

-  					{

- -						const char* bwNeighbour = bwNeighbours + 4*v;

- +						const signed char* bwNeighbour = bwNeighbours + 4*v;

-  						GridElement neighborVal = _grid[neighborShift[v]] + static_cast<GridElement>(bwNeighbour[3]);

-  						minVal = std::min(minVal, neighborVal);

-  					}

file modified
+19 -24

@@ -18,13 +18,14 @@ 

  %global edition Release

  %global cname   CloudCompare

  Name:           cloudcompare

- Version:        2.9.1

- Release:        4%{?dist}

+ Version:        2.10.2

+ Release:        1%{?dist}

  Summary:        3D point cloud and mesh processing software

  

  # Main part is GPLv2+

- # CCLib is LGPLv2+

- # Plugins from Source1 and Source2 are MIT

+ # CCLib is GPLv2+

+ # Plugin from Source1 is MIT

+ # Source2 is Boostv1.0

  # dxflib is GPLv2+

  # shapelib is (LGPLv2+ or MIT)

  # as the result is compiled into one piece, it should be:

@@ -38,19 +39,13 @@ 

  %global pr_commit f42872b45ac35bf85efc662d348bb5d8ac9e5577

  Source1:        https://github.com/%{cname}/PoissonRecon/archive/%{pr_commit}/PoissonRecon-%{pr_commit}.tar.gz

  

- %global nh_commit 61ba8056d72eedffadb838d9051cc8975ec7a825

- Source2:        https://github.com/%{cname}/normals_Hough/archive/%{nh_commit}/normals_Hough-%{nh_commit}.tar.gz

+ %global e57_commit a6f2845e4591bd29dac5e644e35addb372dced97

+ Source2:        https://github.com/asmaloney/libE57Format/archive/%{e57_commit}/libE57Format-%{e57_commit}.tar.gz

  

  # desktop files

  Source3:        %{name}.desktop

  Source4:        ccviewer.desktop

  

- # https://github.com/CloudCompare/CloudCompare/pull/648

- Patch0:         %{name}-signed-chars.patch

- 

- # https://github.com/CloudCompare/CloudCompare/issues/649

- Patch1:         %{name}-big-endian.patch

- 

  BuildRequires:  boost-devel

  BuildRequires:  desktop-file-utils

  BuildRequires:  cmake >= 3

@@ -59,6 +54,7 @@ 

  BuildRequires:  laszip-devel

  BuildRequires:  libgomp

  BuildRequires:  liblas-devel

+ BuildRequires:  libjpeg-turbo-devel

  BuildRequires:  pkgconfig(gdal)

  BuildRequires:  pkgconfig(cunit)

  BuildRequires:  pkgconfig(dri)

@@ -131,19 +127,13 @@ 

  %prep

  %autosetup -n %{cname}-%{version} -p1

  

- rmdir plugins/qPoissonRecon/PoissonReconLib

+ rmdir plugins/core/qPoissonRecon/PoissonReconLib

  tar -xf %{SOURCE1}

- mv PoissonRecon-%{pr_commit} plugins/qPoissonRecon/PoissonReconLib

+ mv PoissonRecon-%{pr_commit} plugins/core/qPoissonRecon/PoissonReconLib

  

- rmdir plugins/qHoughNormals/normals_Hough

+ rmdir contrib/libE57Format

  tar -xf %{SOURCE2}

- mv normals_Hough-%{nh_commit} plugins/qHoughNormals/normals_Hough

- 

- # fix spurious executable permissions

- # https://github.com/aboulch/normals_Hough/pull/5

- # https://github.com/CloudCompare/normals_Hough/pull/3

- # https://github.com/CloudCompare/CloudCompare/pull/650

- find plugins/qHoughNormals '(' -name '*.h' -o -name '*.hpp' ')' -exec chmod -x {} \;

+ mv libE57Format-%{e57_commit} contrib/libE57Format

  

  # On 64bits, change /usr/lib/cloudcompare to /usr/lib64/cloudcompare

  sed -i 's|lib/%{name}|%{_lib}/%{name}|g' $(grep -r lib/%{name} -l)

@@ -154,7 +144,7 @@ 

  # Remove bundle shapelib https://github.com/CloudCompare/CloudCompare/issues/497

  rm -rf contrib/shapelib-*

  sed -i 's/add_subdirectory.*//' contrib/ShapeLibSupport.cmake

- sed -i 's/ SHAPELIB / shp /g' plugins/qFacets/CMakeLists.txt contrib/ShapeLibSupport.cmake

+ sed -i 's/ SHAPELIB / shp /g' plugins/core/qFacets/CMakeLists.txt contrib/ShapeLibSupport.cmake

  

  %build

  mkdir build

@@ -195,6 +185,7 @@ 

  %else

     -DINSTALL_QRANSAC_SD_PLUGIN=OFF \

  %endif

+    -DCMAKE_INSTALL_LIBDIR=%{_libdir} \

     ..

  

  # QRANSAC_SD_PLUGIN on other arches: fatal error: xmmintrin.h: No such file or directory

@@ -226,7 +217,7 @@ 

  

  %files

  %doc README.md CONTRIBUTING.md CHANGELOG.md

- %license license.txt license_headers.txt

+ %license license.txt

  %{_bindir}/%{name}

  %{_bindir}/%{cname}

  %{_bindir}/ccviewer

@@ -242,6 +233,10 @@ 

  %doc doc

  

  %changelog

+ * Thu Nov 14 2019 Michael Barnes <michael.barnes@trace.vision> - 2.10.2-1

+ - Updated to 2.10.2

+ - removed merged patches

+ 

  * Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.1-4

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

  

file modified
+3 -2

@@ -1,3 +1,4 @@ 

- SHA512 (CloudCompare-2.9.1.tar.gz) = f647197cdb500c3438fffdd8752a9a1016d91d7a535bd8a4fdfdcbab0df11b047b0f054881d0ba1e29db01fbc40f7dfcfb7233c5fc7f409417e43b4297fc6635

- SHA512 (normals_Hough-61ba8056d72eedffadb838d9051cc8975ec7a825.tar.gz) = 2c3b3aa3d1288ee0d3bea8a5ff9da198b518c6e43993eb4a67cb91a13e7e8411e38e00c655c771a76f2c92139ce77ee295f1a1039cbab9565f642821aa5884ec

+ SHA512 (CloudCompare-2.10.2.tar.gz) = 13fccb8bee499a064fea69873c7a26d0787ea5329f8135dd710922b73ab90710cb8ffd7797f6b988e7c523a688fd41166bdfafb35655e3d77831ab8d4add289b

  SHA512 (PoissonRecon-f42872b45ac35bf85efc662d348bb5d8ac9e5577.tar.gz) = 9e5f23d03f3baef891421809dd4cf7fce5aeb703e21584c8e2fde348a0819102359dac83dcad98b4cafcdb7929e5868cf1c6f9c57087e5712c4142c9ab1781d5

+ SHA512 (libE57Format-a6f2845e4591bd29dac5e644e35addb372dced97.tar.gz) = 28cef452c453e45f7534d4b2f9dff9ecfb8ae3314017f816cc6cf35ba7a022b7745f6e5efeca3a89b851b2e61a94e0653e54d226909ac5c01b2bffec7661fdc6

+ 

Build spec for CloudCompare 2.10.2

note to self: double check

this was explicitly rmdir to make sure we are removing an empty directory. in fact, this is what I've found on my dist from a very old attempt to update to 2.10.1:

-rmdir plugins/qPoissonRecon/PoissonReconLib
+rmdir plugins/core/qPoissonRecon/PoissonReconLib
 tar -xf %{SOURCE1}
-mv PoissonRecon-%{pr_commit} plugins/qPoissonRecon/PoissonReconLib
-
-rmdir plugins/qHoughNormals/normals_Hough
-tar -xf %{SOURCE2}
-mv normals_Hough-%{nh_commit} plugins/qHoughNormals/normals_Hough
-
-# fix spurious executable permissions
-# https://github.com/aboulch/normals_Hough/pull/5
-# https://github.com/CloudCompare/normals_Hough/pull/3
-# https://github.com/CloudCompare/CloudCompare/pull/650
-find plugins/qHoughNormals '(' -name '*.h' -o -name '*.hpp' ')' -exec chmod -x {} \;
+mv PoissonRecon-%{pr_commit} plugins/core/qPoissonRecon/PoissonReconLib

The simple-koji-ci build on the right indicates that it doesn't build currently, but the problem seems unrelated:

DEBUG util.py:593:  Error: 
DEBUG util.py:593:   Problem: package liblas-devel-1.8.1-2.fc31.x86_64 requires liblas.so.3()(64bit), but none of the providers can be installed
DEBUG util.py:593:    - package liblas-devel-1.8.1-2.fc31.x86_64 requires liblas_c.so.3()(64bit), but none of the providers can be installed
DEBUG util.py:593:    - package liblas-devel-1.8.1-2.fc31.x86_64 requires liblas(x86-64) = 1.8.1-2.fc31, but none of the providers can be installed
DEBUG util.py:593:    - conflicting requests
DEBUG util.py:593:    - nothing provides libgeotiff.so.2()(64bit) needed by liblas-1.8.1-2.fc31.x86_64

this was explicitly rmdir to make sure we are removing an empty directory.

To clarify then, since normals_Hough is no longer an empty directory should this be changed to only remove PoissonReconLib?

Let me first try to explain why is this there in the first place.

The upstream git repository has git submodules. The GitHub tarball does not contain them, but contains empty directories instead. I have manually checked what commit hashes of those submodules are present in the repo. As and example, here:

https://github.com/CloudCompare/CloudCompare/tree/v2.9.1/plugins/qPoissonRecon

I can see that PoissonReconLib is at @ f42872b.

There were 2 such submodules for 2.9.1 - normals_Hough and PoissonReconLib. For both of them, I download the appropriate github tarball and removed the empty directories, replacing them with the extracted tarballs.

When updating, this needs to be done again. Possibly, one of the submodules is gone now.

Thanks.

I can see the changes in .gitmodules now. Working on a revision.

2 new commits added

  • submodule license corrected
  • submodules have changed
a month ago

Is there a way that I can see the log files which koji references in its outputs?

the build.log and root.log? they are linked in https://koji.fedoraproject.org/koji/taskinfo?taskID=38993703 for example. note that currently, there is a bug and koji always says the error is in the root.log, even if it is in fact in the build.log.

For reference, I have clicked simple-koji-ci on the right here and than a particular architecture, such as buildArch (cloudcompare-2.10.2-1.fc32.src.rpm, x86_64)