本文整理汇总了C++中ON_BinaryArchive::ArchiveOpenNURBSVersion方法的典型用法代码示例。如果您正苦于以下问题:C++ ON_BinaryArchive::ArchiveOpenNURBSVersion方法的具体用法?C++ ON_BinaryArchive::ArchiveOpenNURBSVersion怎么用?C++ ON_BinaryArchive::ArchiveOpenNURBSVersion使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ON_BinaryArchive
的用法示例。
在下文中一共展示了ON_BinaryArchive::ArchiveOpenNURBSVersion方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Read
BOOL ON_BrepEdge::Read( ON_BinaryArchive& file )
{
int bReversed = false;
ON_Interval proxy_domain;
BOOL rc = file.ReadInt( &m_edge_index );
if (rc) rc = file.ReadInt( &m_c3i );
if (rc) rc = file.ReadInt( &bReversed );
if (rc) rc = file.ReadInterval( proxy_domain );
if (rc) rc = file.ReadInt( 2, m_vi );
if (rc) rc = file.ReadArray( m_ti );
if (rc) rc = file.ReadDouble( &m_tolerance );
ON_Interval domain = proxy_domain;
if ( file.Archive3dmVersion() >= 3
&& file.ArchiveOpenNURBSVersion() >= 200206180 )
{
if (rc)
{
rc = file.ReadInterval(domain);
if ( !rc)
domain = proxy_domain;
}
}
SetProxyCurve( NULL, proxy_domain );
if ( bReversed )
ON_CurveProxy::Reverse();
SetDomain(domain);
return rc;
}
示例2: Read
bool ON_CheckSum::Read(ON_BinaryArchive& archive)
{
bool rc;
Zero();
rc = archive.ReadBigSize(&m_size);
if (rc)
rc = archive.ReadBigTime(&m_time);
if (rc)
rc = archive.ReadInt(8,&m_crc[0]);
if ( archive.ArchiveOpenNURBSVersion() < 200603100
|| archive.Archive3dmVersion() < 4
)
{
// ON_CheckSums in V3 archives and V4 archives with
// version < 200603100 have the same size but an
// incompatible format. These were not used.
Zero();
}
return rc;
}
示例3: Default
ON_BOOL32 ON_3dmObjectAttributes::Read( ON_BinaryArchive& file )
{
Default();
if ( file.Archive3dmVersion() >= 5
&& file.ArchiveOpenNURBSVersion() >= 200712190 )
{
return ReadV5Helper(file);
}
int i;
int major_version = 0;
int minor_version = 0;
bool rc = file.Read3dmChunkVersion(&major_version,&minor_version);
if ( rc && major_version == 1 )
{
if (rc) rc = file.ReadUuid(m_uuid);
if (rc) rc = file.ReadInt(&m_layer_index);
if (rc) rc = file.ReadInt(&m_material_index);
if (rc) rc = file.ReadColor(m_color);
while(rc)
{
// OBSOLETE if (rc) rc = file.ReadLineStyle(m_line_style); // 23 March 2005 Dale Lear
// replaced with
short s = 0;
double x;
rc = file.ReadShort(&s);
if (!rc) break;
if ( file.Archive3dmVersion() < 4 || file.ArchiveOpenNURBSVersion() < 200503170 )
{
// ignore unused linestyle info in old files
// This bit keeps the curve arrowheads from V3 showing up
// in V4.
m_object_decoration = ON::ObjectDecoration( (s & ON::both_arrowhead) );
}
rc = file.ReadShort(&s);
if (!rc) break;
rc = file.ReadDouble(&x);
if (!rc) break;
rc = file.ReadDouble(&x);
break;
}
if (rc) rc = file.ReadInt(&m_wire_density);
if (rc) rc = file.ReadChar(&m_mode);
if (rc) rc = file.ReadChar(&m_color_source);
if (rc) m_color_source = (unsigned char)ON::ObjectColorSource(m_color_source);
if (rc) rc = file.ReadChar(&m_linetype_source);
if (rc) m_linetype_source = (unsigned char)ON::ObjectLinetypeSource(m_linetype_source);
if (rc) rc = file.ReadChar(&m_material_source);
if (rc) m_material_source = (unsigned char)ON::ObjectMaterialSource(m_material_source);
if (rc) rc = file.ReadString(m_name);
if (rc) rc = file.ReadString(m_url);
m_bVisible = (Mode() != ON::hidden_object);
if ( rc && minor_version >= 1 )
{
rc = file.ReadArray( m_group );
if ( rc && minor_version >= 2 )
{
rc = file.ReadBool(&m_bVisible);
if ( rc && minor_version >= 3 )
{
rc = file.ReadArray(m_dmref);
if (rc && minor_version >= 4 )
{
// 23 March 2005 Dale Lear
// Added m_plot_color_source and m_plot_color
i = 0;
if (rc) rc = file.ReadInt(&i);
if (rc) m_object_decoration = ON::ObjectDecoration(i);
if (rc) rc = file.ReadChar(&m_plot_color_source);
if (rc) m_plot_color_source = (unsigned char)ON::PlotColorSource(m_plot_color_source);
if (rc) rc = file.ReadColor( m_plot_color );
if (rc) rc = file.ReadChar(&m_plot_weight_source);
if (rc) m_plot_weight_source = (unsigned char)ON::PlotWeightSource(m_plot_weight_source);
if (rc) rc = file.ReadDouble(&m_plot_weight_mm);
if (rc && minor_version >= 5 )
{
// version 1.5 fields 11 April 2005
if (rc) rc = file.ReadInt(&m_linetype_index);
// version 1.6 fields 2 September 2005
if (rc && minor_version >= 6 )
{
unsigned char uc = 0;
rc = file.ReadChar(&uc);
if (rc)
{
m_space = (1 == uc) ? ON::page_space : ON::model_space;
m_dmref.Empty();
int i, count=0;
rc = file.ReadInt(&count);
//.........这里部分代码省略.........
示例4: Read
BOOL ON_Layer::Read(
ON_BinaryArchive& file // restore definition from binary archive
)
{
int obsolete_value1 = 0; // see ON_Layer::Write
int major_version=0;
int minor_version=0;
int mode = ON::normal_layer;
Default();
BOOL rc = file.Read3dmChunkVersion(&major_version,&minor_version);
if ( rc && major_version == 1 )
{
// common to all 1.x formats
if ( rc ) rc = file.ReadInt( &mode );
if ( rc )
{
switch(mode)
{
case 0: // OBSOLETE ON::normal_layer
m_bVisible = true;
m_bLocked = false;
break;
case 1: // OBSOLETE ON::hidden_layer
m_bVisible = false;
m_bLocked = false;
break;
case 2: // OBSOLETE ON::locked_layer
m_bVisible = true;
m_bLocked = true;
break;
default:
m_bVisible = true;
m_bLocked = false;
break;
}
}
if ( rc ) rc = file.ReadInt( &m_layer_index );
if ( rc ) rc = file.ReadInt( &m_iges_level );
if ( rc ) rc = file.ReadInt( &m_material_index );
if ( rc ) rc = file.ReadInt( &obsolete_value1 );
if ( rc ) rc = file.ReadColor( m_color );
{
// OBSOLETE line style was never used - read and discard the next 20 bytes
short s;
double x;
if (rc) file.ReadShort(&s);
if (rc) file.ReadShort(&s);
if (rc) file.ReadDouble(&x);
if (rc) file.ReadDouble(&x);
}
if ( rc ) rc = file.ReadString( m_name );
if ( rc && minor_version >= 1 )
{
rc = file.ReadBool(&m_bVisible);
if ( rc && minor_version >= 2 )
{
rc = file.ReadInt( &m_linetype_index);
if (rc && minor_version >= 3 )
{
// 23 March 2005 Dale Lear
rc = file.ReadColor( m_plot_color);
if (rc) rc = file.ReadDouble( &m_plot_weight_mm);
if (rc && minor_version >= 4 )
{
rc = file.ReadBool(&m_bLocked);
if (rc && minor_version >= 5 )
{
rc = file.ReadUuid(m_layer_id);
if ( rc
&& minor_version >= 6
&& file.ArchiveOpenNURBSVersion() > 200505110
)
{
// Some files saved with opennurbs version 200505110
// do not contain correctly written m_parent_layer_id
// and m_bExpanded values.
// It is ok to default these values.
rc = file.ReadUuid(m_parent_layer_id);
if (rc)
rc = file.ReadBool(&m_bExpanded);
}
if ( rc && minor_version >= 7 )
{
// 1.7 field - added 6 June 2006
rc = m_rendering_attributes.Read(file);
if ( rc && minor_version >= 8 )
{
// 1.8 field - added 19 Sep 2006
rc = file.ReadUuid(m_display_material_id);
}
}
}
}
}
//.........这里部分代码省略.........