+ fix Placement of PartDesign/Fillet feature to the Placement of its base

git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5289 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
This commit is contained in:
logari81
2011-12-13 07:17:09 +00:00
parent 0c7de56369
commit f6ce9caf79
4 changed files with 22 additions and 6 deletions

View File

@@ -49,7 +49,7 @@ Fillet::Fillet()
short Fillet::mustExecute() const
{
if (Base.isTouched() || Radius.isTouched())
if (Placement.isTouched() || Base.isTouched() || Radius.isTouched())
return 1;
if (Base.getValue() && Base.getValue()->isTouched())
return 1;
@@ -74,6 +74,7 @@ App::DocumentObjectExecReturn *Fillet::execute(void)
float radius = Radius.getValue();
this->positionByBase();
try {
BRepFilletAPI_MakeFillet mkFillet(base->Shape.getValue());
@@ -89,7 +90,10 @@ App::DocumentObjectExecReturn *Fillet::execute(void)
TopoDS_Shape shape = mkFillet.Shape();
if (shape.IsNull())
return new App::DocumentObjectExecReturn("Resulting shape is null");
this->Shape.setValue(shape);
Part::TopoShape newShape(shape);
newShape.transformGeometry(this->Placement.getValue().inverse().toMatrix());
this->Shape.setValue(newShape);
return App::DocumentObject::StdReturn;
}
catch (Standard_Failure) {