AttributeDoubleArrayPtr aValues =
std::dynamic_pointer_cast<ModelAPI_AttributeDoubleArray>(attribute(RESULT_VALUES_ID()));
if ((aValues->size() == 0) || (aValues->value(0) <= Precision::Confusion()))
- return thePrevious;
+ return AISObjectPtr();
AISObjectPtr anAIS;
std::string aKind = string(MEASURE_KIND())->value();
aDim = Handle(AIS_LengthDimension)::DownCast(aAIS);
if (aDim.IsNull()) {
aDim = new AIS_LengthDimension(aTEdge, aPlane);
+ aAISObj = AISObjectPtr(new GeomAPI_AISObject());
aAISObj->setImpl(new Handle(AIS_InteractiveObject)(aDim));
}
else {
aDim = Handle(AIS_LengthDimension)::DownCast(aAIS);
if (aDim.IsNull()) {
aDim = new AIS_LengthDimension(aPnt1, aPnt2, aPlane);
+ aAISObj = AISObjectPtr(new GeomAPI_AISObject());
aAISObj->setImpl(new Handle(AIS_InteractiveObject)(aDim));
}
else {
Handle(AIS_RadiusDimension) aDim = Handle(AIS_RadiusDimension)::DownCast(aAIS);
if (aDim.IsNull()) {
aDim = new AIS_RadiusDimension(aShp);
+ aAISObj = AISObjectPtr(new GeomAPI_AISObject());
aAISObj->setImpl(new Handle(AIS_InteractiveObject)(aDim));
} else
aDim->SetMeasuredGeometry(aShp);
aDim = Handle(AIS_AngleDimension)::DownCast(aAIS);
if (aDim.IsNull()) {
aDim = new AIS_AngleDimension(aTEdge1, aTEdge2);
+ aAISObj = AISObjectPtr(new GeomAPI_AISObject());
aAISObj->setImpl(new Handle(AIS_InteractiveObject)(aDim));
} else
aDim->SetMeasuredGeometry(aTEdge1, aTEdge2);
Handle(AIS_AngleDimension) aDim = Handle(AIS_AngleDimension)::DownCast(aAIS);
if (aDim.IsNull()) {
aDim = new AIS_AngleDimension(aPnt1, aPnt2, aPnt3);
+ aAISObj = AISObjectPtr(new GeomAPI_AISObject());
aAISObj->setImpl(new Handle(AIS_InteractiveObject)(aDim));
} else
aDim->SetMeasuredGeometry(aPnt1, aPnt2, aPnt3);