- if (!aPoint_A && aPoint_B) { //Line and point
- boost::shared_ptr<SketchPlugin_Line> aLine = getFeatureLine(
- aData, SketchPlugin_Constraint::ENTITY_A());
- if (aLine)
- anAttr_Value->setValue(aLine->distanceToPoint(aPoint_B->pnt()));
- } else if (aPoint_A && !aPoint_B) { // Point and line
- boost::shared_ptr<SketchPlugin_Line> aLine = getFeatureLine(
- aData, SketchPlugin_Constraint::ENTITY_B());
- if (aLine)
- anAttr_Value->setValue(aLine->distanceToPoint(aPoint_A->pnt()));
+ if (!aPointA && aPointB) { //Line and point
+ boost::shared_ptr<SketchPlugin_Line> aLine =
+ getFeatureLine(aData, SketchPlugin_Constraint::ENTITY_A());
+ if (aLine) {
+ aDistance = aLine->distanceToPoint(aPointB->pnt());
+ }
+ } else if (aPointA && !aPointB) { // Point and line
+ boost::shared_ptr<SketchPlugin_Line> aLine =
+ getFeatureLine(aData, SketchPlugin_Constraint::ENTITY_B());
+ if (aLine) {
+ aDistance = aLine->distanceToPoint(aPointA->pnt());
+ }