aShape = aSelectedFeature->context()->shape();
if (aShape && aShape->isEdge())
anEdge = GeomEdgePtr(new GeomAPI_Edge(aShape));
- if (!anEdge)
+ if (!anEdge) {
+ string(RESULT_ID())->setValue("");
return;
+ }
std::ostringstream anOutput;
anOutput << "Length = " << std::setprecision(10) << anEdge->length();
if (!aShape2 && aSecondFeature->context())
aShape2 = aSecondFeature->context()->shape();
- if (!aShape1 || !aShape2)
+ if (!aShape1 || !aShape2) {
+ string(RESULT_ID())->setValue("");
return;
+ }
double aDistance = GeomAlgoAPI_ShapeTools::minimalDistance(aShape1, aShape2);
}
}
- if (aRadius < 0.0)
+ if (aRadius < 0.0) {
+ string(RESULT_ID())->setValue("");
return;
+ }
std::ostringstream anOutput;
anOutput << "Radius = " << std::setprecision(10) << aRadius;
if (aShape1 && aShape1->isEdge())
anEdge1 = GeomEdgePtr(new GeomAPI_Edge(aShape1));
-
AttributeSelectionPtr aSecondFeature = selection(ANGLE_TO_EDGE_ID());
GeomShapePtr aShape2;
GeomEdgePtr anEdge2;
if (aShape2 && aShape2->isEdge())
anEdge2 = GeomEdgePtr(new GeomAPI_Edge(aShape2));
- if (!anEdge1 || !anEdge2)
+ if (!anEdge1 || !anEdge2) {
+ string(RESULT_ID())->setValue("");
return;
+ }
GeomShapePtr anInter = anEdge1->intersect(anEdge2);