Sync changes from upstream repository

This commit is contained in:
Bozo the Builder
2025-04-02 09:33:17 -07:00
parent 6c91d229ab
commit fe0590ba8f
136 changed files with 23783 additions and 5749 deletions

View File

@@ -722,16 +722,17 @@ bool ON_ObjRefEvaluationParameter::Read( ON_BinaryArchive& archive )
}
ON_ObjRef::ON_ObjRef()
: m_uuid(ON_nil_uuid),
m_geometry(0),
m_parent_geometry(0),
m_geometry_type(ON::unknown_object_type),
m_runtime_sn(0),
m_point(ON_3dPoint::UnsetPoint),
m_osnap_mode(ON::os_none),
m__proxy1(0),
m__proxy2(0),
m__proxy_ref_count(0)
: m_uuid(ON_nil_uuid),
m_geometry(nullptr),
m_parent_geometry(nullptr),
m_geometry_type(ON::unknown_object_type),
m_runtime_sn(0),
m_point(ON_3dPoint::UnsetPoint),
m_osnap_mode(ON::os_none),
m_rhino_doc_sn(0),
m__proxy1(nullptr),
m__proxy2(nullptr),
m__proxy_ref_count(nullptr)
{
}
@@ -739,32 +740,34 @@ void ON_ObjRef::Destroy()
{
DecrementProxyReferenceCount();
m_uuid = ON_nil_uuid;
m_geometry = 0;
m_parent_geometry = 0;
m_geometry = nullptr;
m_parent_geometry = nullptr;
m_geometry_type = ON::unknown_object_type;
m_runtime_sn = 0;
m_point = ON_3dPoint::UnsetPoint;
m_osnap_mode = ON::os_none;
m__proxy1 = 0;
m__proxy2 = 0;
m__proxy_ref_count = 0;
m_rhino_doc_sn = 0;
m__proxy1 = nullptr;
m__proxy2 = nullptr;
m__proxy_ref_count = nullptr;
}
ON_ObjRef::ON_ObjRef( const ON_ObjRef& src )
: m_uuid(src.m_uuid),
m_geometry(src.m_geometry),
m_parent_geometry(src.m_parent_geometry),
m_component_index(src.m_component_index),
m_geometry_type(src.m_geometry_type),
m_runtime_sn(src.m_runtime_sn),
m_point(src.m_point),
m_osnap_mode(src.m_osnap_mode),
m_evp(src.m_evp),
m__iref(src.m__iref),
m__proxy1(src.m__proxy1),
m__proxy2(src.m__proxy2),
m__proxy_ref_count(src.m__proxy_ref_count)
: m_uuid(src.m_uuid),
m_geometry(src.m_geometry),
m_parent_geometry(src.m_parent_geometry),
m_component_index(src.m_component_index),
m_geometry_type(src.m_geometry_type),
m_runtime_sn(src.m_runtime_sn),
m_point(src.m_point),
m_osnap_mode(src.m_osnap_mode),
m_rhino_doc_sn(src.m_rhino_doc_sn),
m_evp(src.m_evp),
m__iref(src.m__iref),
m__proxy1(src.m__proxy1),
m__proxy2(src.m__proxy2),
m__proxy_ref_count(src.m__proxy_ref_count)
{
if ( m__proxy_ref_count && *m__proxy_ref_count > 0 )
{
@@ -789,6 +792,7 @@ ON_ObjRef& ON_ObjRef::operator=( const ON_ObjRef& src )
m_runtime_sn = src.m_runtime_sn;
m_point = src.m_point;
m_osnap_mode = src.m_osnap_mode;
m_rhino_doc_sn = src.m_rhino_doc_sn;
m_evp = src.m_evp;
m__iref = src.m__iref;
m__proxy1 = src.m__proxy1;
@@ -905,9 +909,11 @@ bool ON_ObjRef::Write( ON_BinaryArchive& archive ) const
rc = archive.WriteInt(m_geometry_type);
if (!rc) break;
// Do not save the value of m_runtime_sn in the
// archive. When the file is read in, the object
// will have a different value of m_runtime_sn.
// NOTE WELL:
// It is intentional that the RUNTIME serial numbers
// m_runtime_sn and m_rhino_doc_sn are NOT saved in the archive.
// These values are specific to the application instance;
// think of them as pointer values that change from instance to instance.
rc = archive.WritePoint(m_point);
if (!rc) break;
@@ -943,6 +949,12 @@ bool ON_ObjRef::Write( ON_BinaryArchive& archive ) const
rc = archive.WriteInt((int)m_osnap_mode);
if (!rc) break;
// NOTE WELL:
// It is intentional that the RUNTIME serial numbers
// m_runtime_sn and m_rhino_doc_sn are NOT saved in the archive.
// These values are specific to the application instance;
// think of them as pointer values that change from instance to instance.
break;
}