std::shared_ptr<GeomAlgoAPI_Offset> anOffsetShape(
new GeomAlgoAPI_Offset(aPlane, aWireShape, aValue*aSign));
- std::shared_ptr<GeomAlgoAPI_MakeShapeList> aMakeList(new GeomAlgoAPI_MakeShapeList);
- aMakeList->appendAlgo(aWireBuilder);
- aMakeList->appendAlgo(anOffsetShape);
- anOffsetAlgos.push_back(aMakeList);
+ if (anOffsetShape->isDone()) {
+ std::shared_ptr<GeomAlgoAPI_MakeShapeList> aMakeList(new GeomAlgoAPI_MakeShapeList);
+ aMakeList->appendAlgo(aWireBuilder);
+ aMakeList->appendAlgo(anOffsetShape);
+ anOffsetAlgos.push_back(aMakeList);
+ }
+ else {
+ setError("Offset algorithm failed");
+ }
}
}
}
else { // non-rational B-spline
aWeightsAttr->setSize((int)aWeights.size());
- std::list<double>::iterator anIt = aWeights.begin();
- for (int anIndex = 0; anIt != aWeights.end(); ++anIt, ++anIndex)
- aWeightsAttr->setValue(anIndex, *anIt);
+ std::list<double>::iterator aWIt = aWeights.begin();
+ for (int anIndex = 0; aWIt != aWeights.end(); ++aWIt, ++anIndex)
+ aWeightsAttr->setValue(anIndex, *aWIt);
}
AttributeDoubleArrayPtr aKnotsAttr =