mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-25 09:00:33 +05:00
Improve CheckShape function
This commit is contained in:
parent
e2dcf4323c
commit
218ffc54e0
@ -183,29 +183,29 @@ CORBA::Boolean GEOM_IMeasureOperations_i::CheckShape (GEOM::GEOM_Object_ptr theS
|
|||||||
GetOperations()->SetNotDone();
|
GetOperations()->SetNotDone();
|
||||||
|
|
||||||
if (theShape == NULL)
|
if (theShape == NULL)
|
||||||
{
|
{
|
||||||
theDescription = CORBA::string_dup("null");
|
theDescription = CORBA::string_dup("null");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Get the reference shape
|
//Get the reference shape
|
||||||
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
Handle(GEOM_Object) aShape = GetOperations()->GetEngine()->GetObject
|
||||||
(theShape->GetStudyID(), theShape->GetEntry());
|
(theShape->GetStudyID(), theShape->GetEntry());
|
||||||
|
|
||||||
if (aShape.IsNull())
|
if (aShape.IsNull())
|
||||||
{
|
{
|
||||||
theDescription = CORBA::string_dup("null2");
|
theDescription = CORBA::string_dup("null2");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get shape parameters
|
// Get shape parameters
|
||||||
TCollection_AsciiString aDump;
|
TCollection_AsciiString aDump;
|
||||||
if (GetOperations()->CheckShape(aShape, aDump))
|
if (GetOperations()->CheckShape(aShape, aDump))
|
||||||
{
|
{
|
||||||
theDescription = CORBA::string_dup(aDump.ToCString());
|
theDescription = CORBA::string_dup("OK");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
theDescription = CORBA::string_dup("checkShape 0");
|
theDescription = CORBA::string_dup(aDump.ToCString());
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user