PartDesign workflow without part/body

PartDesign: make datum features work outside of body/part
PartDesign old workflow: remove a few messageboxes about no part
PartDesign: old workflow: multitransform without body

Still has visibility issues, but generally works.
This commit is contained in:
DeepSOIC
2015-07-20 17:43:48 +03:00
committed by Stefan Tröger
parent c3da141020
commit 16e4ce20f0
8 changed files with 112 additions and 70 deletions

View File

@@ -47,7 +47,6 @@
#include <Gui/Control.h>
#include <Gui/Command.h>
#include <Gui/Application.h>
#include <Mod/PartDesign/App/Body.h>
using namespace PartDesignGui;
@@ -80,12 +79,9 @@ void ViewProviderDatumLine::updateData(const App::Property* prop)
Base::Vector3d dir(0,0,1);
// Get limits of the line from bounding box of the body
PartDesign::Body* body = static_cast<PartDesign::Body*>(Part::BodyBase::findBodyOf(this->getObject()));
if (body == NULL)
return;
Base::BoundBox3d bbox = body->getBoundBox();
Base::BoundBox3d bbox = this->getRelevantExtents();
bbox = bbox.Transformed(plm.toMatrix());
bbox.Enlarge(0.1 * bbox.CalcDiagonalLength());
Base::Vector3d p1, p2;
if (bbox.IsInBox(base)) {
bbox.IntersectionPoint(base, dir, p1, Precision::Confusion());