Sync changes from upstream repository

This commit is contained in:
Bozo the Builder
2025-11-05 03:40:11 -08:00
parent 85de57f34e
commit f97efd5026
6 changed files with 75 additions and 22 deletions

View File

@@ -227,7 +227,7 @@ bool ON_3dmObjectAttributes::operator==(const ON_3dmObjectAttributes& other) con
if ( m_viewport_id != other.m_viewport_id )
return false;
if ( m_dmref != other.m_dmref )
if (!ON_SimpleArray_IsEqual(m_dmref, other.m_dmref))
return false;
if (m_object_frame != other.m_object_frame)

View File

@@ -380,6 +380,12 @@ public:
*/
void SetArray(T*, int, int);
//Deleted these two functions because the compiler was actually using pointer
//comparison on m_a. Adding implementations for these in Rhino 8 is cumbersome because
//of the template initialization stuff, so use ON_SimpleArray_IsEqual for now.
bool operator==(const ON_SimpleArray<T>& other) const = delete;
bool operator!=(const ON_SimpleArray<T>& other) const = delete;
protected:
// implementation //////////////////////////////////////////////////////
void Move( int /* dest index*/, int /* src index */, int /* element count*/ );
@@ -388,6 +394,24 @@ protected:
int m_capacity; // actual length of m_a[]
};
template <typename T>
bool ON_SimpleArray_IsEqual(const ON_SimpleArray<T>& first, const ON_SimpleArray<T>& second)
{
if (first.Count() != second.Count())
return false;
const int count = first.Count();
for (int i = 0; i < count; i++)
{
//Use operator== because it's more common
if (!(first[i] == second[i]))
return false;
}
return true;
}
////////////////////////////////////////////////////////////////
//
@@ -733,6 +757,14 @@ public:
*/
void SetArray(T*, int, int);
//Deleted these two functions because the compiler was actually using pointer
//comparison on m_a. Adding implementations for these in Rhino 8 is cumbersome because
//of the template initialization stuff, so use ON_ClassArray_IsEqual for now.
bool operator==(const ON_ClassArray<T>& other) const = delete;
bool operator!=(const ON_ClassArray<T>& other) const = delete;
protected:
// implementation //////////////////////////////////////////////////////
void Move( int /* dest index*/, int /* src index */, int /* element count*/ );
@@ -743,6 +775,24 @@ protected:
int m_capacity; // actual length of m_a[]
};
template <typename T>
bool ON_ClassArray_IsEqual(const ON_ClassArray<T>& first, const ON_ClassArray<T>& second)
{
if (first.Count() != second.Count())
return false;
const int count = first.Count();
for (int i = 0; i < count; i++)
{
//Use operator== because it's more common
if (!(first[i] == second[i]))
return false;
}
return true;
}
#if defined(ON_DLL_TEMPLATE)
ON_DLL_TEMPLATE template class ON_CLASS ON_ClassArray<ON_String>;

View File

@@ -231,7 +231,7 @@ bool ON_HatchLine::operator==(const ON_HatchLine& src) const
m_angle_radians == src.m_angle_radians
&& m_base == src.m_base
&& m_offset == src.m_offset
&& m_dashes == src.m_dashes
&& ON_SimpleArray_IsEqual(m_dashes, src.m_dashes)
);
}
@@ -241,7 +241,7 @@ bool ON_HatchLine::operator!=(const ON_HatchLine& src) const
m_angle_radians != src.m_angle_radians
|| m_base != src.m_base
|| m_offset != src.m_offset
|| m_dashes != src.m_dashes
|| !ON_SimpleArray_IsEqual(m_dashes, src.m_dashes)
);
}

View File

@@ -5208,21 +5208,25 @@ Returns:
bool HasSinglePrecisionVertices() const;
/*
Description:
If you modify the values of double precision vertices,
then you must call UpdateSinglePrecisionVertices().
Copies the values of the double precision vertices array to the
single precision array.
If you modify the values of double precision vertices only,
then you must call UpdateSinglePrecisionVertices().
Remarks:
If double precision vertices are not present, this function
does nothing.
empties the single precision vertices array.
*/
void UpdateSinglePrecisionVertices();
/*
Description:
Copies the values of the single precision vertices array to the
double precision array.
If you modify the values of the single precision vertices
in m_V[], then you must call UpdateDoublePrecisionVertices().
in m_V[], and double precision vertices are present,
then you must call UpdateDoublePrecisionVertices().
Remarks:
If double precision vertices are not present, this function
creates them.

View File

@@ -1659,12 +1659,12 @@ private:
unsigned int m_reserved4 = 0;
};
bool operator==(
ON_DECL bool operator==(
const ON_ModelComponentContentMark& lhs,
const ON_ModelComponentContentMark& rhs
);
bool operator!=(
ON_DECL bool operator!=(
const ON_ModelComponentContentMark& lhs,
const ON_ModelComponentContentMark& rhs
);

View File

@@ -6,7 +6,7 @@
// To update version numbers, edit ..\build\build_dates.msbuild
#define RMA_VERSION_MAJOR 8
#define RMA_VERSION_MINOR 21
#define RMA_VERSION_MINOR 23
////////////////////////////////////////////////////////////////
//
@@ -14,9 +14,9 @@
// first step in each build.
//
#define RMA_VERSION_YEAR 2025
#define RMA_VERSION_MONTH 7
#define RMA_VERSION_DATE 7
#define RMA_VERSION_HOUR 17
#define RMA_VERSION_MONTH 9
#define RMA_VERSION_DATE 8
#define RMA_VERSION_HOUR 13
#define RMA_VERSION_MINUTE 0
////////////////////////////////////////////////////////////////
@@ -35,8 +35,8 @@
// 3 = build system release build
#define RMA_VERSION_BRANCH 0
#define VERSION_WITH_COMMAS 8,21,25188,17000
#define VERSION_WITH_PERIODS 8.21.25188.17000
#define VERSION_WITH_COMMAS 8,23,25251,13000
#define VERSION_WITH_PERIODS 8.23.25251.13000
#define COPYRIGHT "Copyright (C) 1993-2025, Robert McNeel & Associates. All Rights Reserved."
#define SPECIAL_BUILD_DESCRIPTION "Public OpenNURBS C++ 3dm file IO library."
@@ -44,14 +44,13 @@
#define RMA_VERSION_NUMBER_MAJOR_WSTRING L"8"
#define RMA_PREVIOUS_VERSION_NUMBER_MAJOR_WSTRING L"7"
#define RMA_VERSION_NUMBER_SR_STRING "SR21"
#define RMA_VERSION_NUMBER_SR_WSTRING L"SR21"
#define RMA_VERSION_NUMBER_SR_STRING "SR23"
#define RMA_VERSION_NUMBER_SR_WSTRING L"SR23"
#define RMA_VERSION_WITH_PERIODS_STRING "8.23.25251.13000"
#define RMA_VERSION_WITH_PERIODS_WSTRING L"8.23.25251.13000"
#define RMA_VERSION_WITH_PERIODS_STRING "8.21.25188.17000"
#define RMA_VERSION_WITH_PERIODS_WSTRING L"8.21.25188.17000"
#define RMA_VERSION_WITH_PERIODS_STRING "8.20.25157.13000"
#define RMA_VERSION_WITH_PERIODS_WSTRING L"8.20.25157.13000"
// git revision SHA-1 hash as char hexadecimal string
#define RMA_GIT_REVISION_HASH_STRING ""