case GeomAlgoAPI_Boolean::BOOL_CUT:
case GeomAlgoAPI_Boolean::BOOL_COMMON:{
if((anObjects.empty() && aCompSolidsObjects.empty()) || aTools.empty()) {
- std::string aFeatureError = "Not enough objects for boolean operation";
+ std::string aFeatureError = "Error: Not enough objects for boolean operation.";
setError(aFeatureError);
return;
}
// Checking that the algorithm worked properly.
if(!aBoolAlgo.isDone()) {
- static const std::string aFeatureError = "Boolean algorithm failed";
+ static const std::string aFeatureError = "Error: Boolean algorithm failed.";
setError(aFeatureError);
return;
}
if(aBoolAlgo.shape()->isNull()) {
- static const std::string aShapeError = "Resulting shape is Null";
+ static const std::string aShapeError = "Error: Resulting shape is Null.";
setError(aShapeError);
return;
}
if(!aBoolAlgo.isValid()) {
- std::string aFeatureError = "Warning: resulting shape is not valid";
+ std::string aFeatureError = "Error: Resulting shape is not valid.";
setError(aFeatureError);
return;
}
// Checking that the algorithm worked properly.
if(!aBoolAlgo->isDone()) {
- static const std::string aFeatureError = "Boolean algorithm failed";
+ static const std::string aFeatureError = "Error: Boolean algorithm failed.";
setError(aFeatureError);
return;
}
if(aBoolAlgo->shape()->isNull()) {
- static const std::string aShapeError = "Resulting shape is Null";
+ static const std::string aShapeError = "Error: Resulting shape is Null.";
setError(aShapeError);
return;
}
if(!aBoolAlgo->isValid()) {
- std::string aFeatureError = "Warning: resulting shape is not valid";
+ std::string aFeatureError = "Error: Resulting shape is not valid.";
setError(aFeatureError);
return;
}
aShapesToAdd.push_back(aBoolAlgo->shape());
std::shared_ptr<GeomAlgoAPI_PaveFiller> aFillerAlgo(new GeomAlgoAPI_PaveFiller(aShapesToAdd, true));
if(!aFillerAlgo->isDone()) {
- std::string aFeatureError = "PaveFiller algorithm failed";
+ std::string aFeatureError = "Error: PaveFiller algorithm failed.";
setError(aFeatureError);
return;
}
}
case GeomAlgoAPI_Boolean::BOOL_FUSE: {
if((anObjects.size() + aTools.size() + aCompSolidsObjects.size() + anEdgesAndFaces.size()) < 2) {
- std::string aFeatureError = "Not enough objects for boolean operation";
+ std::string aFeatureError = "Error: Not enough objects for boolean operation.";
setError(aFeatureError);
return;
}
// Checking that the algorithm worked properly.
if(!aFuseAlgo->isDone()) {
- static const std::string aFeatureError = "Boolean algorithm failed";
+ static const std::string aFeatureError = "Error: Boolean algorithm failed.";
setError(aFeatureError);
return;
}
if(aFuseAlgo->shape()->isNull()) {
- static const std::string aShapeError = "Resulting shape is Null";
+ static const std::string aShapeError = "Error: Resulting shape is Null.";
setError(aShapeError);
return;
}
if(!aFuseAlgo->isValid()) {
- std::string aFeatureError = "Warning: resulting shape is not valid";
+ std::string aFeatureError = "Error: Resulting shape is not valid.";
setError(aFeatureError);
return;
}
}
std::shared_ptr<GeomAlgoAPI_PaveFiller> aFillerAlgo(new GeomAlgoAPI_PaveFiller(aShapesToAdd, true));
if(!aFillerAlgo->isDone()) {
- std::string aFeatureError = "PaveFiller algorithm failed";
+ std::string aFeatureError = "Error: PaveFiller algorithm failed.";
setError(aFeatureError);
return;
}
if(aFillerAlgo->shape()->isNull()) {
- static const std::string aShapeError = "Resulting shape is Null";
+ static const std::string aShapeError = "Error: Resulting shape is Null.";
setError(aShapeError);
return;
}
if(!aFillerAlgo->isValid()) {
- std::string aFeatureError = "Warning: resulting shape is not valid";
+ std::string aFeatureError = "Error: Resulting shape is not valid.";
setError(aFeatureError);
return;
}
break;
}
default: {
- std::string anOperationError = "Error: wrong type of operation";
+ std::string anOperationError = "Error: Wrong type of operation";
setError(anOperationError);
return;
}
// Checking that the algorithm worked properly.
if(!aBoolAlgo.isDone() || aBoolAlgo.shape()->isNull() || !aBoolAlgo.isValid()) {
- setError("Boolean algorithm failed");
+ setError("Error: Boolean algorithm failed.");
return;
}
// Checking that the algorithm worked properly.
if(!aBoolAlgo->isDone() || aBoolAlgo->shape()->isNull() || !aBoolAlgo->isValid()) {
- setError("Boolean algorithm failed");
+ setError("Error: Boolean algorithm failed.");
return;
}
aShapesToAdd.push_back(aBoolAlgo->shape());
std::shared_ptr<GeomAlgoAPI_PaveFiller> aFillerAlgo(new GeomAlgoAPI_PaveFiller(aShapesToAdd, true));
if(!aFillerAlgo->isDone()) {
- std::string aFeatureError = "PaveFiller algorithm failed";
+ std::string aFeatureError = "Error: PaveFiller algorithm failed.";
setError(aFeatureError);
return;
}
// Checking that the algorithm worked properly.
if(!aFuseAlgo->isDone() || aFuseAlgo->shape()->isNull() || !aFuseAlgo->isValid()) {
- static const std::string aFeatureError = "Boolean algorithm failed";
+ static const std::string aFeatureError = "Error: Boolean algorithm failed.";
setError(aFeatureError);
return;
}
aNotUsedSolids.push_back(aShape);
std::shared_ptr<GeomAlgoAPI_PaveFiller> aFillerAlgo(new GeomAlgoAPI_PaveFiller(aNotUsedSolids, true));
if(!aFillerAlgo->isDone()) {
- std::string aFeatureError = "PaveFiller algorithm failed";
+ std::string aFeatureError = "Error: PaveFiller algorithm failed.";
setError(aFeatureError);
return;
}
if(aFillerAlgo->shape()->isNull()) {
- static const std::string aShapeError = "Resulting shape is Null";
+ static const std::string aShapeError = "Error: Resulting shape is Null.";
setError(aShapeError);
return;
}
if(!aFillerAlgo->isValid()) {
- std::string aFeatureError = "Warning: resulting shape is not valid";
+ std::string aFeatureError = "Error: Resulting shape is not valid.";
setError(aFeatureError);
return;
}
break;
}
default: {
- setError("Error: wrong type of boolean operation");
+ setError("Error: Wrong type of boolean operation.");
return;
}
}
if(aErrorsNum > 0) {
std::ostringstream aStringStream;
- aStringStream << "Warning: could not create solid(s) from " << aErrorsNum << " face(s).";
+ aStringStream << "Error: Could not create solid(s) from " << aErrorsNum << " face(s).";
setError(aStringStream.str());
}
ResultPtr aContext = aFaceSel->context();
std::shared_ptr<GeomAPI_Shape> aContextShape = aContext->shape();
if(!aContextShape.get()) {
- static const std::string aContextError = "The selection context is bad";
+ static const std::string aContextError = "Error: The selection context is bad.";
setError(aContextError);
return;
}
ResultConstructionPtr aConstruction = std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(aContext);
if(!aConstruction.get()) {
- static const std::string aFaceError = "Can not find basis for extrusion";
+ static const std::string aFaceError = "Error: Can not find basis for extrusion.";
setError(aFaceError);
return;
}
GeomAlgoAPI_Prism aPrismAlgo(aBaseShape, aToShape, aToSize, aFromShape, aFromSize);
if(!aPrismAlgo.isDone()) {
- static const std::string aPrismAlgoError = "Extrusion algorithm failed";
+ static const std::string aPrismAlgoError = "Error: Extrusion algorithm failed.";
setError(aPrismAlgoError);
aResultIndex = 0;
break;
// Check if shape is valid
if(!aPrismAlgo.shape().get() || aPrismAlgo.shape()->isNull()) {
- static const std::string aShapeError = "Resulting shape is Null";
+ static const std::string aShapeError = "Error: Resulting shape is Null.";
setError(aShapeError);
aResultIndex = 0;
break;
}
if(!aPrismAlgo.isValid()) {
- std::string aPrismAlgoError = "Warning: resulting shape is not valid";
+ std::string aPrismAlgoError = "Error: Resulting shape is not valid.";
setError(aPrismAlgoError);
aResultIndex = 0;
break;
// Checking that the algorithm worked properly.
if(!aPrismAlgo->isDone() || !aPrismAlgo->shape().get() || aPrismAlgo->shape()->isNull() ||
!aPrismAlgo->isValid()) {
- setError("Extrusion algorithm failed");
+ setError("Error: Extrusion algorithm failed.");
theResults.clear();
return;
}
return;
}
if (!anIntersectionAlgo.isValid()) {
- std::string aFeatureError = "Error: resulting shape is not valid";
+ std::string aFeatureError = "Error: Resulting shape is not valid.";
setError(aFeatureError);
return;
}
bool isCombine = boolean(COMBINE_ID())->value();
if(anObjects.empty()/* || aTools.empty()*/) {
- std::string aFeatureError = "Not enough objects for partition operation";
+ std::string aFeatureError = "Error: Not enough objects for partition operation.";
setError(aFeatureError);
return;
}
// Checking that the algorithm worked properly.
if (!aPartitionAlgo->isDone()) {
- static const std::string aFeatureError = "Partition algorithm failed";
+ static const std::string aFeatureError = "Error: Partition algorithm failed.";
setError(aFeatureError);
return;
}
if (aPartitionAlgo->shape()->isNull()) {
- static const std::string aShapeError = "Resulting shape is Null";
+ static const std::string aShapeError = "Error: Resulting shape is Null.";
setError(aShapeError);
return;
}
if (!aPartitionAlgo->isValid()) {
- std::string aFeatureError = "Warning: resulting shape is not valid";
+ std::string aFeatureError = "Error: Resulting shape is not valid.";
setError(aFeatureError);
return;
}
// Checking that the algorithm worked properly.
if (!aPartitionAlgo->isDone()) {
- static const std::string aFeatureError = "Partition algorithm failed";
+ static const std::string aFeatureError = "Error: Partition algorithm failed.";
setError(aFeatureError);
return;
}
if (aPartitionAlgo->shape()->isNull()) {
- static const std::string aShapeError = "Resulting shape is Null";
+ static const std::string aShapeError = "Error: Resulting shape is Null.";
setError(aShapeError);
return;
}
if (!aPartitionAlgo->isValid()) {
- std::string aFeatureError = "Warning: resulting shape is not valid";
+ std::string aFeatureError = "Error: Resulting shape is not valid.";
setError(aFeatureError);
return;
}
}
std::shared_ptr<GeomAPI_Shape> aStartShape = anObjRef->value();
if(!aStartShape) {
- static const std::string aSelectionError = "The start shape selection is bad";
+ static const std::string aSelectionError = "Error: The start shape selection is bad.";
setError(aSelectionError);
return;
}
aStartShapeContext = aContextRes->shape();
}
if(!aStartShapeContext.get()) {
- static const std::string aContextError = "The start shape selection context is bad";
+ static const std::string aContextError = "Error: The start shape selection context is bad.";
setError(aContextError);
return;
}
anObjRef = selection(END_SHAPE_ID());
std::shared_ptr<GeomAPI_Shape> anEndShape = anObjRef->value();
if(!anEndShape) {
- static const std::string aSelectionError = "The end shape selection is bad";
+ static const std::string aSelectionError = "Error: The end shape selection is bad.";
setError(aSelectionError);
return;
}
anEndShapeContext = aContextRes->shape();
}
if(!anEndShapeContext.get()) {
- static const std::string aContextError = "The end shape selection context is bad";
+ static const std::string aContextError = "Error: The end shape selection context is bad.";
setError(aContextError);
return;
}
if (aShapes[i]->isFace()) {
std::shared_ptr<GeomAPI_Face> aFace(new GeomAPI_Face(aShapes[i]));
if (!aFace->isPlanar()) {
- static const std::string aPlanarityError = "One of selected faces is not planar";
+ static const std::string aPlanarityError = "Error: One of selected faces is not planar.";
setError(aPlanarityError);
return;
}
else if (aShapes[i]->isEdge()) {
std::shared_ptr<GeomAPI_Edge> anEdge(new GeomAPI_Edge(aShapes[i]));
if (!anEdge->isLine()) {
- static const std::string aLinearityError = "One of selected endges is not linear";
+ static const std::string aLinearityError = "Error: One of selected endges is not linear.";
setError(aLinearityError);
return;
}
GeomAlgoAPI_Placement aPlacementAlgo(
aStartShapeContext, anEndShapeContext, aStartShape, anEndShape, isReverse, isCentering, true);
if(!aPlacementAlgo.isDone()) {
- static const std::string aFeatureError = "Placement algorithm failed";
+ static const std::string aFeatureError = "Error: Placement algorithm failed.";
setError(aFeatureError);
return;
}
// Checking that the algorithm worked properly.
if(!aTransformAlgo.isDone()) {
- static const std::string aFeatureError = "Transform algorithm failed";
+ static const std::string aFeatureError = "Error: Transform algorithm failed.";
setError(aFeatureError);
break;
}
if(aTransformAlgo.shape()->isNull()) {
- static const std::string aShapeError = "Resulting shape is Null";
+ static const std::string aShapeError = "Error: Resulting shape is Null.";
setError(aShapeError);
break;
}
if(!aTransformAlgo.isValid()) {
- std::string aFeatureError = "Warning: resulting shape is not valid";
+ std::string aFeatureError = "Error: Resulting shape is not valid.";
setError(aFeatureError);
break;
}
ResultPtr aContext = aFaceSel->context();
std::shared_ptr<GeomAPI_Shape> aContextShape = aContext->shape();
if(!aContextShape.get()) {
- static const std::string aContextError = "The selection context is bad";
+ static const std::string aContextError = "Error: The selection context is bad.";
setError(aContextError);
return;
}
ResultConstructionPtr aConstruction = std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(aContext);
if(!aConstruction.get()) {
- static const std::string aFaceError = "Can not find basis for revolution";
+ static const std::string aFaceError = "Error: Can not find basis for revolution.";
setError(aFaceError);
return;
}
GeomAlgoAPI_Revolution aRevolAlgo(aBaseShape, anAxis, aToShape, aToAngle, aFromShape, aFromAngle);
if(!aRevolAlgo.isDone()) {
- static const std::string aPrismAlgoError = "Revolution algorithm failed";
+ static const std::string aPrismAlgoError = "Error: Revolution algorithm failed.";
setError(aPrismAlgoError);
aResultIndex = 0;
break;
// Check if shape is valid
if(!aRevolAlgo.shape().get() || aRevolAlgo.shape()->isNull()) {
- static const std::string aShapeError = "Resulting shape is Null";
+ static const std::string aShapeError = "Error: Resulting shape is Null.";
setError(aShapeError);
aResultIndex = 0;
break;
}
if(!aRevolAlgo.isValid()) {
- std::string aPrismAlgoError = "Warning: resulting shape is not valid";
+ std::string aPrismAlgoError = "Error: Resulting shape is not valid.";
setError(aPrismAlgoError);
aResultIndex = 0;
break;
// Checking that the algorithm worked properly.
if(!aRevolAlgo->isDone() || !aRevolAlgo->shape().get() || aRevolAlgo->shape()->isNull() ||
!aRevolAlgo->isValid()) {
- setError("Revolution algorithm failed");
+ setError("Error: Revolution algorithm failed.");
theResults.clear();
return;
}
// Checking that the algorithm worked properly.
if(!aRotationAlgo.isDone()) {
- static const std::string aFeatureError = "Rotation algorithm failed";
+ static const std::string aFeatureError = "Error: Rotation algorithm failed.";
setError(aFeatureError);
break;
}
if(aRotationAlgo.shape()->isNull()) {
- static const std::string aShapeError = "Resulting shape is Null";
+ static const std::string aShapeError = "Error: Resulting shape is Null.";
setError(aShapeError);
break;
}
if(!aRotationAlgo.isValid()) {
- std::string aFeatureError = "Warning: resulting shape is not valid";
+ std::string aFeatureError = "Error: Resulting shape is not valid.";
setError(aFeatureError);
break;
}
// Checking that the algorithm worked properly.
if(!aTranslationAlgo.isDone()) {
- static const std::string aFeatureError = "Translation algorithm failed";
+ static const std::string aFeatureError = "Error: Translation algorithm failed.";
setError(aFeatureError);
break;
}
if(aTranslationAlgo.shape()->isNull()) {
- static const std::string aShapeError = "Resulting shape is Null";
+ static const std::string aShapeError = "Error: Resulting shape is Null.";
setError(aShapeError);
break;
}
if(!aTranslationAlgo.isValid()) {
- std::string aFeatureError = "Warning: resulting shape is not valid";
+ std::string aFeatureError = "Error: Resulting shape is not valid.";
setError(aFeatureError);
break;
}
{
public:
struct FilletFeatures {
- std::list<FeaturePtr> baseEdges; ///< list of objects the fillet is based
+ std::list<std::pair<FeaturePtr, bool>> baseEdgesState; ///< list of objects the fillet is based and its states
std::list<FeaturePtr> resultEdges; ///< list of result edges
std::list<FeaturePtr> resultConstraints; ///< list of constraints provided by the fillet
};