- catch (Standard_Failure) {
- Handle(Standard_Failure) aFail = Standard_Failure::Caught();
- MESSAGE("GEOM_Function::GetValue Error: " << aFail->GetMessageString());
- return aShape;
+
+ // compare tics
+ if (isResult) {
+ // tic of this
+ Standard_Integer aTic = anObject->GetTic();
+
+ // tic of main shape
+ GEOM_ISubShape aCI (this);
+ TDF_Label aLabelObjMainSh = aCI.GetMainShape()->GetOwnerEntry();
+ if (aLabelObjMainSh.IsRoot()) return aShape;
+ Handle(GEOM_Object) anObjMainSh = GEOM_Object::GetObject(aLabelObjMainSh);
+ if (anObjMainSh.IsNull()) return aShape;
+ Standard_Integer aTicMainSh = anObjMainSh->GetTic();
+
+ // compare
+ isResult = ((aTic == aTicMainSh) ? true : false);
+ }
+
+ if (!isResult) {
+ try {
+#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
+ OCC_CATCH_SIGNALS;
+#endif
+ GEOM_Solver aSolver(GEOM_Engine::GetEngine());
+ if (!aSolver.ComputeFunction(this)) {
+ MESSAGE("GEOM_Object::GetValue Error : Can't build a sub shape");
+ return aShape;
+ }
+ }
+ catch (Standard_Failure) {
+ Handle(Standard_Failure) aFail = Standard_Failure::Caught();
+ MESSAGE("GEOM_Function::GetValue Error: " << aFail->GetMessageString());
+ return aShape;
+ }