mirror of
https://github.com/mcneel/opennurbs.git
synced 2026-03-16 22:36:01 +08:00
Update source to v6.11.18282.01000
This commit is contained in:
@@ -1775,6 +1775,50 @@ bool ON_Object::IsValid(ON_TextLog* text_log) const
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ON_Object::IsCorrupt(
|
||||
bool bRepair,
|
||||
bool bSilentError,
|
||||
class ON_TextLog* text_log
|
||||
) const
|
||||
{
|
||||
bool rc = true;
|
||||
if (this == nullptr)
|
||||
{
|
||||
if (false == bSilentError)
|
||||
ON_ERROR("this is nullptr.");
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (ObjectType())
|
||||
{
|
||||
case ON::object_type::brep_object:
|
||||
{
|
||||
const ON_Brep* brep = ON_Brep::Cast(this);
|
||||
if (brep)
|
||||
rc = brep->ON_Brep::IsCorrupt(bRepair, bSilentError, text_log);
|
||||
else if ( false == bSilentError )
|
||||
ON_ERROR("ON_Brep::Cast(this) failed.");
|
||||
}
|
||||
break;
|
||||
|
||||
case ON::object_type::mesh_object:
|
||||
{
|
||||
const ON_Mesh* mesh = ON_Mesh::Cast(this);
|
||||
if (mesh)
|
||||
rc = mesh->ON_Mesh::IsCorrupt(bRepair, bSilentError, text_log);
|
||||
else if ( false == bSilentError )
|
||||
ON_ERROR("ON_Mesh::Cast(this) failed.");
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
rc = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
void ON_Object::Dump( ON_TextLog& dump ) const
|
||||
{
|
||||
const ON_ClassId* p = ClassId();
|
||||
|
||||
Reference in New Issue
Block a user