+ 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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user