Fix for sweep if selected trajectory is broken

This commit is contained in:
wmayer
2013-02-19 15:17:24 +01:00
parent 4057a45368
commit 00cc5af5d8

View File

@@ -259,12 +259,16 @@ App::DocumentObjectExecReturn *Sweep::execute(void)
path = mkWire.Wire();
}
catch (Standard_Failure) {
if (shape._Shape.ShapeType() == TopAbs_EDGE)
if (shape._Shape.ShapeType() == TopAbs_EDGE) {
path = shape._Shape;
else if (shape._Shape.ShapeType() == TopAbs_WIRE)
path = shape._Shape;
else
}
else if (shape._Shape.ShapeType() == TopAbs_WIRE) {
BRepBuilderAPI_MakeWire mkWire(TopoDS::Wire(shape._Shape));
path = mkWire.Wire();
}
else {
return new App::DocumentObjectExecReturn("Spine is neither an edge nor a wire.");
}
}
}