PartDesign: PCH GUI

This commit is contained in:
Abdullah Tahiri
2019-05-01 18:01:20 +02:00
committed by abdullahtahiriyo
parent 95788dde71
commit e82c154d1d
12 changed files with 127 additions and 102 deletions

View File

@@ -33,11 +33,10 @@
# include <GeomLib_IsPlanarSurface.hxx>
# include <QMessageBox>
# include <Inventor/nodes/SoCamera.h>
# include <sstream>
# include <algorithm>
#endif
#include <sstream>
#include <algorithm>
#include <App/DocumentObjectGroup.h>
#include <App/Origin.h>
#include <App/OriginFeature.h>
@@ -114,7 +113,7 @@ void UnifiedDatumCommand(Gui::Command &cmd, Base::Type type, std::string name)
std::string tmp = std::string("Create ")+name;
cmd.openCommand(tmp.c_str());
cmd.doCommand(Gui::Command::Doc,"App.activeDocument().%s.newObject('%s','%s')", pcActiveBody->getNameInDocument(),
cmd.doCommand(Gui::Command::Doc,"App.activeDocument().%s.newObject('%s','%s')", pcActiveBody->getNameInDocument(),
fullTypeName.c_str(),FeatName.c_str());
// remove the body from links in case it's selected as
@@ -785,7 +784,7 @@ void finishFeature(const Gui::Command* cmd, const std::string& FeatName,
//===========================================================================
// Take a list of Part2DObjects and classify them for creating a
// ProfileBased feature. FirstFreeSketch is the first free sketch in the same body
// ProfileBased feature. FirstFreeSketch is the first free sketch in the same body
// or sketches.end() if non available. The returned number is the amount of free sketches
unsigned validateSketches(std::vector<App::DocumentObject*>& sketches,
std::vector<PartDesignGui::TaskFeaturePick::featureStatus>& status,
@@ -817,7 +816,7 @@ unsigned validateSketches(std::vector<App::DocumentObject*>& sketches,
status.push_back(PartDesignGui::TaskFeaturePick::otherBody);
else
status.push_back(PartDesignGui::TaskFeaturePick::otherPart);
continue;
}
@@ -900,7 +899,7 @@ void prepareProfileBased(Gui::Command* cmd, const std::string& which,
}
else {
Gui::Command::doCommand(Gui::Command::Doc,"App.activeDocument().%s.Profile = (App.activeDocument().%s, [\"%s\"])",
FeatName.c_str(), feature->getNameInDocument(), sub.c_str());
FeatName.c_str(), feature->getNameInDocument(), sub.c_str());
}
func(static_cast<Part::Feature*>(feature), FeatName);
@@ -1933,7 +1932,7 @@ void CmdPartDesignMirrored::activated(int iMsg)
}
if(!direction) {
auto body = static_cast<PartDesign::Body*>(Part::BodyBase::findBodyOf(features.front()));
if(body) {
if(body) {
doCommand(Doc,"App.activeDocument().%s.MirrorPlane = (App.activeDocument().%s, [\"\"])", FeatName.c_str(),
body->getOrigin()->getXY()->getNameInDocument());
}
@@ -1997,7 +1996,7 @@ void CmdPartDesignLinearPattern::activated(int iMsg)
}
if(!direction) {
auto body = static_cast<PartDesign::Body*>(Part::BodyBase::findBodyOf(features.front()));
if(body) {
if(body) {
doCommand(Doc,"App.activeDocument().%s.Direction = (App.activeDocument().%s, [\"\"])", FeatName.c_str(),
body->getOrigin()->getX()->getNameInDocument());
}
@@ -2063,7 +2062,7 @@ void CmdPartDesignPolarPattern::activated(int iMsg)
}
if(!direction) {
auto body = static_cast<PartDesign::Body*>(Part::BodyBase::findBodyOf(features.front()));
if(body) {
if(body) {
doCommand(Doc,"App.activeDocument().%s.Axis = (App.activeDocument().%s, [\"\"])", FeatName.c_str(),
body->getOrigin()->getZ()->getNameInDocument());
}

View File

@@ -28,6 +28,7 @@
# include <QInputDialog>
# include <Inventor/C/basic.h>
# include <Inventor/nodes/SoCamera.h>
# include <TopExp_Explorer.hxx>
#endif
#include <Base/Console.h>
@@ -52,7 +53,7 @@
#include "Utils.h"
#include "TaskFeaturePick.h"
#include "WorkflowManager.h"
#include <TopExp_Explorer.hxx>
//===========================================================================

View File

@@ -37,10 +37,10 @@
#else // for Linux
# define PartDesignExport
# define PartDesignGuiExport
# define PartExport
# define PartGuiExport
# define SketcherExport
# define SketcherGuiExport
# define PartExport
# define PartGuiExport
# define SketcherExport
# define SketcherGuiExport
#endif
@@ -49,17 +49,32 @@
#endif
#ifdef _PreComp_
// Python
// Python
#include <Python.h>
// standard
#include <iostream>
#include <assert.h>
#include <cmath>
#include <sstream>
#include <algorithm>
// Boost
#include <boost/bind.hpp>
// OCC
#include <Standard_math.hxx>
#include <Standard_Version.hxx>
#include <Bnd_Box.hxx>
#include <BRepBndLib.hxx>
#include <BRepMesh_IncrementalMesh.hxx>
#include <BRep_Tool.hxx>
#include <TopoDS.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
// STL
#include <vector>
@@ -82,6 +97,11 @@
# include <Gui/Qt4All.h>
#endif
#include <QMessageBox>
#include <QMenu>
#include <QAction>
#include <QMessageBox>
// Inventor
#ifndef __InventorAll__
# include <Gui/InventorAll.h>

View File

@@ -24,6 +24,7 @@
#include "PreCompiled.h"
#ifndef _PreComp_
# include <QMessageBox>
#endif
#include "ui_TaskHoleParameters.h"
@@ -37,7 +38,7 @@
#include <Gui/Selection.h>
#include <Gui/Command.h>
#include <Mod/PartDesign/App/FeatureHole.h>
#include <QMessageBox>
using namespace PartDesignGui;
using namespace Gui;
@@ -114,7 +115,7 @@ TaskHoleParameters::TaskHoleParameters(ViewProviderHole *HoleView, QWidget *pare
ui->Depth->bind(pcHole->Depth);
ui->DrillPointAngle->bind(pcHole->DrillPointAngle);
ui->TaperedAngle->bind(pcHole->TaperedAngle);
connectPropChanged = App::GetApplication().signalChangePropertyEditor.connect(boost::bind(&TaskHoleParameters::changedObject, this, _1));
this->groupLayout()->addWidget(proxy);
@@ -332,7 +333,7 @@ void TaskHoleParameters::changedObject(const App::Property &Prop)
// happens when aborting the command
if (vp == nullptr)
return;
PartDesign::Hole* pcHole = static_cast<PartDesign::Hole*>(vp->getObject());
bool ro = Prop.isReadOnly();
@@ -389,7 +390,7 @@ void TaskHoleParameters::changedObject(const App::Property &Prop)
}
else if (&Prop == &pcHole->ThreadType) {
ui->ThreadType->setEnabled(true);
ui->ThreadSize->blockSignals(true);
ui->ThreadSize->clear();
const char ** cursor = pcHole->ThreadSize.getEnums();
@@ -399,7 +400,7 @@ void TaskHoleParameters::changedObject(const App::Property &Prop)
}
ui->ThreadSize->setCurrentIndex(pcHole->ThreadSize.getValue());
ui->ThreadSize->blockSignals(false);
// Thread type also updates HoleCutType and ThreadClass
ui->HoleCutType->blockSignals(true);
ui->HoleCutType->clear();
@@ -410,7 +411,7 @@ void TaskHoleParameters::changedObject(const App::Property &Prop)
}
ui->HoleCutType->setCurrentIndex(pcHole->HoleCutType.getValue());
ui->HoleCutType->blockSignals(false);
ui->ThreadClass->blockSignals(true);
ui->ThreadClass->clear();
cursor = pcHole->ThreadClass.getEnums();
@@ -418,9 +419,9 @@ void TaskHoleParameters::changedObject(const App::Property &Prop)
ui->ThreadClass->addItem(tr(*cursor));
++cursor;
}
ui->ThreadClass->setCurrentIndex(pcHole->ThreadClass.getValue());
ui->ThreadClass->setCurrentIndex(pcHole->ThreadClass.getValue());
ui->ThreadClass->blockSignals(false);
if (ui->ThreadType->currentIndex() != pcHole->ThreadType.getValue()) {
ui->ThreadType->blockSignals(true);
ui->ThreadType->setCurrentIndex(pcHole->ThreadType.getValue());
@@ -691,11 +692,11 @@ Base::Quantity TaskHoleParameters::getTaperedAngle() const
void TaskHoleParameters::apply()
{
std::string name = vp->getObject()->getNameInDocument();
PartDesign::Hole* pcHole = static_cast<PartDesign::Hole*>(vp->getObject());
PartDesign::Hole* pcHole = static_cast<PartDesign::Hole*>(vp->getObject());
const char * cname = name.c_str();
isApplying = true;
ui->ThreadPitch->apply();
ui->ThreadAngle->apply();
ui->ThreadCutOffInner->apply();
@@ -707,7 +708,7 @@ void TaskHoleParameters::apply()
ui->Depth->apply();
ui->DrillPointAngle->apply();
ui->TaperedAngle->apply();
if (!pcHole->Threaded.isReadOnly())
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.Threaded = %u", cname, getThreaded() ? 1 : 0);
if (!pcHole->ModelActualThread.isReadOnly())
@@ -718,7 +719,7 @@ void TaskHoleParameters::apply()
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.ThreadSize = %u", cname, getThreadSize());
if (!pcHole->ThreadClass.isReadOnly())
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.ThreadClass = %u", cname, getThreadClass());
if (!pcHole->ThreadFit.isReadOnly())
if (!pcHole->ThreadFit.isReadOnly())
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.ThreadFit = %u", cname, getThreadFit());
if (!pcHole->ThreadDirection.isReadOnly())
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.ThreadDirection = %u", cname, getThreadDirection());
@@ -730,7 +731,7 @@ void TaskHoleParameters::apply()
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.DrillPoint = %u", cname, getDrillPoint());
if (!pcHole->Tapered.isReadOnly())
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.Tapered = %u", cname, getTapered());
isApplying = false;
}

View File

@@ -30,6 +30,7 @@
# include <QMessageBox>
# include <Precision.hxx>
# include <boost/bind/bind.hpp>
# include <boost/bind.hpp>
#endif
#include "TaskPrimitiveParameters.h"
@@ -47,7 +48,7 @@
#include <Base/Console.h>
#include <Base/UnitsApi.h>
#include <App/Origin.h>
#include <boost/bind.hpp>
using namespace PartDesignGui;
@@ -58,7 +59,7 @@ TaskBoxPrimitives::TaskBoxPrimitives(ViewProviderPrimitive* vp, QWidget* parent)
ui.setupUi(proxy);
// box
ui.boxLength->setMaximum(INT_MAX);
ui.boxLength->setMaximum(INT_MAX);
ui.boxWidth->setMaximum(INT_MAX);
ui.boxHeight->setMaximum(INT_MAX);
@@ -104,12 +105,12 @@ TaskBoxPrimitives::TaskBoxPrimitives(ViewProviderPrimitive* vp, QWidget* parent)
ui.wedgeX2max->setMaximum(INT_MAX);
ui.wedgeZ2max->setMinimum(INT_MIN);
ui.wedgeZ2max->setMaximum(INT_MAX);
this->groupLayout()->addWidget(proxy);
int index = 0;
switch(static_cast<PartDesign::FeaturePrimitive*>(vp->getObject())->getPrimitiveType()) {
case PartDesign::FeaturePrimitive::Box:
index = 1;
ui.boxLength->setValue(static_cast<PartDesign::Box*>(vp->getObject())->Length.getValue());
@@ -171,13 +172,13 @@ TaskBoxPrimitives::TaskBoxPrimitives(ViewProviderPrimitive* vp, QWidget* parent)
ui.wedgeZmin->setValue(static_cast<PartDesign::Wedge*>(vp->getObject())->Zmin.getValue());
ui.wedgeZ2max->setValue(static_cast<PartDesign::Wedge*>(vp->getObject())->Z2max.getValue());
ui.wedgeZ2min->setValue(static_cast<PartDesign::Wedge*>(vp->getObject())->Z2min.getValue());
break;
break;
}
ui.widgetStack->setCurrentIndex(index);
ui.widgetStack->setMinimumSize(ui.widgetStack->widget(index)->minimumSize());
for(int i=0; i<ui.widgetStack->count(); ++i) {
if(i != index)
ui.widgetStack->widget(i)->setSizePolicy(QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored));
}
@@ -197,29 +198,29 @@ TaskBoxPrimitives::TaskBoxPrimitives(ViewProviderPrimitive* vp, QWidget* parent)
Base::Console().Error ("%s\n", ex.what () );
}
}
// box
connect(ui.boxLength, SIGNAL(valueChanged(double)), this, SLOT(onBoxLengthChanged(double)));
connect(ui.boxWidth, SIGNAL(valueChanged(double)), this, SLOT(onBoxWidthChanged(double)));
connect(ui.boxHeight, SIGNAL(valueChanged(double)), this, SLOT(onBoxHeightChanged(double)));
// cylinder
connect(ui.cylinderRadius, SIGNAL(valueChanged(double)), this, SLOT(onCylinderRadiusChanged(double)));
connect(ui.cylinderHeight, SIGNAL(valueChanged(double)), this, SLOT(onCylinderHeightChanged(double)));
connect(ui.cylinderAngle, SIGNAL(valueChanged(double)), this, SLOT(onCylinderAngleChanged(double)));
// cone
connect(ui.coneRadius1, SIGNAL(valueChanged(double)), this, SLOT(onConeRadius1Changed(double)));
connect(ui.coneRadius2, SIGNAL(valueChanged(double)), this, SLOT(onConeRadius2Changed(double)));
connect(ui.coneAngle, SIGNAL(valueChanged(double)), this, SLOT(onConeAngleChanged(double)));
connect(ui.coneHeight, SIGNAL(valueChanged(double)), this, SLOT(onConeHeightChanged(double)));
// sphere
connect(ui.sphereRadius, SIGNAL(valueChanged(double)), this, SLOT(onSphereRadiusChanged(double)));
connect(ui.sphereAngle1, SIGNAL(valueChanged(double)), this, SLOT(onSphereAngle1Changed(double)));
connect(ui.sphereAngle2, SIGNAL(valueChanged(double)), this, SLOT(onSphereAngle2Changed(double)));
connect(ui.sphereAngle3, SIGNAL(valueChanged(double)), this, SLOT(onSphereAngle3Changed(double)));
// ellipsoid
connect(ui.ellipsoidRadius1, SIGNAL(valueChanged(double)), this, SLOT(onEllipsoidRadius1Changed(double)));
connect(ui.ellipsoidRadius2, SIGNAL(valueChanged(double)), this, SLOT(onEllipsoidRadius2Changed(double)));
@@ -227,19 +228,19 @@ TaskBoxPrimitives::TaskBoxPrimitives(ViewProviderPrimitive* vp, QWidget* parent)
connect(ui.ellipsoidAngle1, SIGNAL(valueChanged(double)), this, SLOT(onEllipsoidAngle1Changed(double)));
connect(ui.ellipsoidAngle2, SIGNAL(valueChanged(double)), this, SLOT(onEllipsoidAngle2Changed(double)));
connect(ui.ellipsoidAngle3, SIGNAL(valueChanged(double)), this, SLOT(onEllipsoidAngle3Changed(double)));
// torus
connect(ui.torusRadius1, SIGNAL(valueChanged(double)), this, SLOT(onTorusRadius1Changed(double)));
connect(ui.torusRadius2, SIGNAL(valueChanged(double)), this, SLOT(onTorusRadius2Changed(double)));
connect(ui.torusAngle1, SIGNAL(valueChanged(double)), this, SLOT(onTorusAngle1Changed(double)));
connect(ui.torusAngle2, SIGNAL(valueChanged(double)), this, SLOT(onTorusAngle2Changed(double)));
connect(ui.torusAngle3, SIGNAL(valueChanged(double)), this, SLOT(onTorusAngle3Changed(double)));
//prism
connect(ui.prismCircumradius, SIGNAL(valueChanged(double)), this, SLOT(onPrismCircumradiusChanged(double)));
connect(ui.prismHeight, SIGNAL(valueChanged(double)), this, SLOT(onPrismHeightChanged(double)));
connect(ui.prismPolygon, SIGNAL(valueChanged(int)), this, SLOT(onPrismPolygonChanged(int)));
// wedge
connect(ui.wedgeXmax, SIGNAL(valueChanged(double)), this, SLOT(onWedgeXmaxChanged(double)));
connect(ui.wedgeXmin, SIGNAL(valueChanged(double)), this, SLOT(onWedgeXinChanged(double)));
@@ -253,7 +254,7 @@ TaskBoxPrimitives::TaskBoxPrimitives(ViewProviderPrimitive* vp, QWidget* parent)
connect(ui.wedgeZ2min, SIGNAL(valueChanged(double)), this, SLOT(onWedgeZ2inChanged(double)));
}
/*
/*
* Destroys the object and frees any allocated resources
*/
TaskBoxPrimitives::~TaskBoxPrimitives()
@@ -530,7 +531,7 @@ void TaskBoxPrimitives::setPrimitive(QString name)
.arg(ui.boxWidth->value().getValue(),0,'f',Base::UnitsApi::getDecimals())
.arg(ui.boxHeight->value().getValue(),0,'f',Base::UnitsApi::getDecimals());
break;
case 2: // cylinder
cmd = QString::fromLatin1(
"App.ActiveDocument.%1.Radius=%2\n"
@@ -541,7 +542,7 @@ void TaskBoxPrimitives::setPrimitive(QString name)
.arg(ui.cylinderHeight->value().getValue(),0,'f',Base::UnitsApi::getDecimals())
.arg(ui.cylinderAngle->value().getValue(),0,'f',Base::UnitsApi::getDecimals());
break;
case 3: // cone
cmd = QString::fromLatin1(
"App.ActiveDocument.%1.Radius1=%2\n"
@@ -583,7 +584,7 @@ void TaskBoxPrimitives::setPrimitive(QString name)
.arg(ui.ellipsoidAngle2->value().getValue(),0,'f',Base::UnitsApi::getDecimals())
.arg(ui.ellipsoidAngle3->value().getValue(),0,'f',Base::UnitsApi::getDecimals());
break;
case 6: // torus
cmd = QString::fromLatin1(
"App.ActiveDocument.%1.Radius1=%2\n"
@@ -632,7 +633,7 @@ void TaskBoxPrimitives::setPrimitive(QString name)
.arg(ui.wedgeX2max->value().getValue(),0,'f',Base::UnitsApi::getDecimals())
.arg(ui.wedgeZ2max->value().getValue(),0,'f',Base::UnitsApi::getDecimals());
break;
default:
break;
}
@@ -650,12 +651,12 @@ void TaskBoxPrimitives::setPrimitive(QString name)
TaskPrimitiveParameters::TaskPrimitiveParameters(ViewProviderPrimitive* PrimitiveView) : vp_prm(PrimitiveView)
{
assert(PrimitiveView);
primitive = new TaskBoxPrimitives(PrimitiveView);
Content.push_back(primitive);
parameter = new PartGui::TaskAttacher(PrimitiveView);
Content.push_back(parameter);
}

View File

@@ -24,6 +24,7 @@
#include "PreCompiled.h"
#ifndef _PreComp_
# include <boost/bind.hpp>
#endif
#include "ui_TaskTransformedMessages.h"
@@ -32,8 +33,6 @@
#include <Gui/Document.h>
#include <Gui/BitmapFactory.h>
#include <boost/bind.hpp>
#include "ViewProviderTransformed.h"
using namespace PartDesignGui;

View File

@@ -24,6 +24,19 @@
#include "PreCompiled.h"
#ifndef _PreComp_
# include <Inventor/nodes/SoSeparator.h>
# include <Inventor/nodes/SoSwitch.h>
# include <Inventor/nodes/SoCoordinate3.h>
# include <Inventor/nodes/SoNormal.h>
# include <Inventor/nodes/SoMaterial.h>
# include <Inventor/nodes/SoPickStyle.h>
# include <Bnd_Box.hxx>
# include <BRepBndLib.hxx>
# include <BRepMesh_IncrementalMesh.hxx>
# include <BRep_Tool.hxx>
# include <TopExp_Explorer.hxx>
# include <TopoDS.hxx>
# include <Standard_Version.hxx>
#endif
#include "ViewProviderAddSub.h"
@@ -36,19 +49,7 @@
#include <Gui/BitmapFactory.h>
#include <Gui/Document.h>
#include <Base/Console.h>
#include <Inventor/nodes/SoSeparator.h>
#include <Inventor/nodes/SoSwitch.h>
#include <Inventor/nodes/SoCoordinate3.h>
#include <Inventor/nodes/SoNormal.h>
#include <Inventor/nodes/SoMaterial.h>
#include <Inventor/nodes/SoPickStyle.h>
#include <Bnd_Box.hxx>
#include <BRepBndLib.hxx>
#include <BRepMesh_IncrementalMesh.hxx>
#include <BRep_Tool.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS.hxx>
#include <Standard_Version.hxx>
using namespace PartDesignGui;
@@ -196,7 +197,7 @@ void ViewProviderAddSub::updateAddSubShapeIndicator() {
const TColgp_Array1OfPnt& Nodes = mesh->Nodes();
TColgp_Array1OfDir Normals (Nodes.Lower(), Nodes.Upper());
getNormals(actFace, mesh, Normals);
for (int g=1;g<=nbTriInFace;g++) {
// Get the triangle
Standard_Integer N1,N2,N3;
@@ -213,7 +214,7 @@ void ViewProviderAddSub::updateAddSubShapeIndicator() {
gp_Pnt V1(Nodes(N1)), V2(Nodes(N2)), V3(Nodes(N3));
// get the 3 previewNormals of this triangle
gp_Dir NV1(Normals(N1)), NV2(Normals(N2)), NV3(Normals(N3));
gp_Dir NV1(Normals(N1)), NV2(Normals(N2)), NV3(Normals(N3));
// transform the vertices and previewNormals to the place of the face
if(!identity) {
@@ -243,16 +244,16 @@ void ViewProviderAddSub::updateAddSubShapeIndicator() {
}
parts[ii] = nbTriInFace; // new part
// counting up the per Face offsets
faceNodeOffset += nbNodesInFace;
faceTriaOffset += nbTriInFace;
}
// previewNormalize all previewNormals
// previewNormalize all previewNormals
for (int i = 0; i< numNorms ;i++)
previewNorms[i].normalize();
// end the editing of the nodes
previewCoords ->point .finishEditing();
previewNorm ->vector .finishEditing();
@@ -268,7 +269,7 @@ void ViewProviderAddSub::updateData(const App::Property* p) {
if(strcmp(p->getName(), "AddSubShape")==0)
updateAddSubShapeIndicator();
PartDesignGui::ViewProvider::updateData(p);
}

View File

@@ -24,11 +24,11 @@
#include "PreCompiled.h"
#ifndef _PreComp_
# include <QMenu>
# include <QAction>
# include <QMessageBox>
#endif
#include <QMenu>
#include <QAction>
#include <QMessageBox>
#include "ViewProviderHole.h"
#include "TaskHoleParameters.h"
#include <Mod/PartDesign/App/FeatureHole.h>

View File

@@ -25,7 +25,9 @@
#ifndef _PreComp_
# include <QMessageBox>
#include <QMenu>
# include <QMenu>
# include <TopExp.hxx>
# include <TopTools_IndexedMapOfShape.hxx>
#endif
#include "ViewProviderLoft.h"
@@ -38,8 +40,7 @@
#include <Gui/Command.h>
#include <Gui/Application.h>
#include <Gui/BitmapFactory.h>
#include <TopExp.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
using namespace PartDesignGui;

View File

@@ -25,7 +25,9 @@
#ifndef _PreComp_
# include <QMessageBox>
#include <QMenu>
# include <QMenu>
# include <TopExp.hxx>
# include <TopTools_IndexedMapOfShape.hxx>
#endif
#include "ViewProviderPipe.h"
@@ -38,8 +40,7 @@
#include <Gui/Command.h>
#include <Gui/Application.h>
#include <Gui/BitmapFactory.h>
#include <TopExp.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
using namespace PartDesignGui;

View File

@@ -27,6 +27,17 @@
# include <QAction>
# include <QMenu>
# include <QMessageBox>
# include <Inventor/nodes/SoSeparator.h>
# include <Inventor/nodes/SoSwitch.h>
# include <Inventor/nodes/SoCoordinate3.h>
# include <Inventor/nodes/SoNormal.h>
# include <Inventor/nodes/SoMaterial.h>
# include <Inventor/nodes/SoPickStyle.h>
# include <Bnd_Box.hxx>
# include <BRepBndLib.hxx>
# include <BRepMesh_IncrementalMesh.hxx>
# include <TopExp_Explorer.hxx>
# include <TopoDS.hxx>
#endif
#include "ViewProviderPrimitive.h"
@@ -39,17 +50,7 @@
#include <Gui/Application.h>
#include <Gui/BitmapFactory.h>
#include <Base/Console.h>
#include <Inventor/nodes/SoSeparator.h>
#include <Inventor/nodes/SoSwitch.h>
#include <Inventor/nodes/SoCoordinate3.h>
#include <Inventor/nodes/SoNormal.h>
#include <Inventor/nodes/SoMaterial.h>
#include <Inventor/nodes/SoPickStyle.h>
#include <Bnd_Box.hxx>
#include <BRepBndLib.hxx>
#include <BRepMesh_IncrementalMesh.hxx>
#include <TopExp_Explorer.hxx>
#include <TopoDS.hxx>
using namespace PartDesignGui;
@@ -81,7 +82,7 @@ bool ViewProviderPrimitive::setEdit(int ModNum)
{
if (ModNum == ViewProvider::Default ) {
setPreviewDisplayMode(true);
// When double-clicking on the item for this fillet the
// object unsets and sets its edit mode without closing
// the task panel

View File

@@ -23,12 +23,12 @@
#include "PreCompiled.h"
#ifndef _PreComp_
#include <vector>
#include <list>
#include <set>
#include <boost/bind.hpp>
#include <QMessageBox>
#include <QPushButton>
# include <vector>
# include <list>
# include <set>
# include <boost/bind.hpp>
# include <QMessageBox>
# include <QPushButton>
#endif
#include <Base/Exception.h>