Merge branch 'refs/heads/tanderson-rev-partdimension'
@@ -2215,6 +2215,62 @@ void StdCmdDemoMode::activated(int iMsg)
|
||||
dlg->show();
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
// Part_Measure_Clear_All
|
||||
//===========================================================================
|
||||
|
||||
DEF_STD_CMD(CmdViewMeasureClearAll);
|
||||
|
||||
CmdViewMeasureClearAll::CmdViewMeasureClearAll()
|
||||
: Command("View_Measure_Clear_All")
|
||||
{
|
||||
sGroup = QT_TR_NOOP("Measure");
|
||||
sMenuText = QT_TR_NOOP("Clear All");
|
||||
sToolTipText = QT_TR_NOOP("Clear All");
|
||||
sWhatsThis = sToolTipText;
|
||||
sStatusTip = sToolTipText;
|
||||
sPixmap = "Part_Measure_Clear_All";
|
||||
}
|
||||
|
||||
void CmdViewMeasureClearAll::activated(int iMsg)
|
||||
{
|
||||
Gui::View3DInventor *view = dynamic_cast<Gui::View3DInventor*>(Gui::Application::Instance->
|
||||
activeDocument()->getActiveView());
|
||||
if (!view)
|
||||
return;
|
||||
Gui::View3DInventorViewer *viewer = view->getViewer();
|
||||
if (!viewer)
|
||||
return;
|
||||
viewer->eraseAllDimensions();
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
// Part_Measure_Toggle_All
|
||||
//===========================================================================
|
||||
|
||||
DEF_STD_CMD(CmdViewMeasureToggleAll);
|
||||
|
||||
CmdViewMeasureToggleAll::CmdViewMeasureToggleAll()
|
||||
: Command("View_Measure_Toggle_All")
|
||||
{
|
||||
sGroup = QT_TR_NOOP("Measure");
|
||||
sMenuText = QT_TR_NOOP("Toggle All");
|
||||
sToolTipText = QT_TR_NOOP("Toggle All");
|
||||
sWhatsThis = sToolTipText;
|
||||
sStatusTip = sToolTipText;
|
||||
sPixmap = "Part_Measure_Toggle_All";
|
||||
}
|
||||
|
||||
void CmdViewMeasureToggleAll::activated(int iMsg)
|
||||
{
|
||||
ParameterGrp::handle group = App::GetApplication().GetUserParameter().
|
||||
GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("View");
|
||||
bool visibility = group->GetBool("DimensionsVisible", true);
|
||||
if (visibility)
|
||||
group->SetBool("DimensionsVisible", false);
|
||||
else
|
||||
group->SetBool("DimensionsVisible", true);
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
// Instantiation
|
||||
@@ -2280,6 +2336,8 @@ void CreateViewStdCommands(void)
|
||||
rcCmdMgr.addCommand(new StdCmdDemoMode());
|
||||
rcCmdMgr.addCommand(new StdCmdToggleNavigation());
|
||||
rcCmdMgr.addCommand(new StdCmdAxisCross());
|
||||
rcCmdMgr.addCommand(new CmdViewMeasureClearAll());
|
||||
rcCmdMgr.addCommand(new CmdViewMeasureToggleAll());
|
||||
}
|
||||
|
||||
} // namespace Gui
|
||||
|
||||
@@ -152,6 +152,9 @@ View3DInventor::View3DInventor(Gui::Document* pcDocument, QWidget* parent, Qt::W
|
||||
OnChange(*hGrp,"OrbitStyle");
|
||||
OnChange(*hGrp,"Sensitivity");
|
||||
OnChange(*hGrp,"ResetCursorPosition");
|
||||
OnChange(*hGrp,"DimensionsVisible");
|
||||
OnChange(*hGrp,"Dimensions3dVisible");
|
||||
OnChange(*hGrp,"DimensionsDeltaVisible");
|
||||
|
||||
stopSpinTimer = new QTimer(this);
|
||||
connect(stopSpinTimer, SIGNAL(timeout()), this, SLOT(stopAnimating()));
|
||||
@@ -360,7 +363,28 @@ void View3DInventor::OnChange(ParameterGrp::SubjectType &rCaller,ParameterGrp::M
|
||||
else
|
||||
_viewer->setCameraType(SoPerspectiveCamera::getClassTypeId());
|
||||
}
|
||||
else {
|
||||
else if (strcmp(Reason, "DimensionsVisible") == 0)
|
||||
{
|
||||
if (rGrp.GetBool("DimensionsVisible", true))
|
||||
_viewer->turnAllDimensionsOn();
|
||||
else
|
||||
_viewer->turnAllDimensionsOff();
|
||||
}
|
||||
else if (strcmp(Reason, "Dimensions3dVisible") == 0)
|
||||
{
|
||||
if (rGrp.GetBool("Dimensions3dVisible", true))
|
||||
_viewer->turn3dDimensionsOn();
|
||||
else
|
||||
_viewer->turn3dDimensionsOff();
|
||||
}
|
||||
else if (strcmp(Reason, "DimensionsDeltaVisible") == 0)
|
||||
{
|
||||
if (rGrp.GetBool("DimensionsDeltaVisible", true))
|
||||
_viewer->turnDeltaDimensionsOn();
|
||||
else
|
||||
_viewer->turnDeltaDimensionsOff();
|
||||
}
|
||||
else{
|
||||
unsigned long col1 = rGrp.GetUnsigned("BackgroundColor",3940932863UL);
|
||||
unsigned long col2 = rGrp.GetUnsigned("BackgroundColor2",859006463UL); // default color (dark blue)
|
||||
unsigned long col3 = rGrp.GetUnsigned("BackgroundColor3",2880160255UL); // default color (blue/grey)
|
||||
|
||||
@@ -250,6 +250,11 @@ View3DInventorViewer::View3DInventorViewer (QWidget *parent, const char *name,
|
||||
pEventCallback->ref();
|
||||
pcViewProviderRoot->addChild(pEventCallback);
|
||||
pEventCallback->addEventCallback(SoEvent::getClassTypeId(), handleEventCB, this);
|
||||
|
||||
dimensionRoot = new SoSwitch(SO_SWITCH_NONE);
|
||||
pcViewProviderRoot->addChild(dimensionRoot);
|
||||
dimensionRoot->addChild(new SoSwitch()); //first one will be for the 3d dimensions.
|
||||
dimensionRoot->addChild(new SoSwitch()); //second one for the delta dimensions.
|
||||
|
||||
// This is a callback node that logs all action that traverse the Inventor tree.
|
||||
#if defined (FC_DEBUG) && defined(FC_LOGGING_CB)
|
||||
@@ -2182,3 +2187,49 @@ std::vector<ViewProvider*> View3DInventorViewer::getViewProvidersOfType(const Ba
|
||||
}
|
||||
return views;
|
||||
}
|
||||
|
||||
void View3DInventorViewer::turnAllDimensionsOn()
|
||||
{
|
||||
dimensionRoot->whichChild = SO_SWITCH_ALL;
|
||||
}
|
||||
|
||||
void View3DInventorViewer::turnAllDimensionsOff()
|
||||
{
|
||||
dimensionRoot->whichChild = SO_SWITCH_NONE;
|
||||
}
|
||||
|
||||
void View3DInventorViewer::eraseAllDimensions()
|
||||
{
|
||||
static_cast<SoSwitch *>(dimensionRoot->getChild(0))->removeAllChildren();
|
||||
static_cast<SoSwitch *>(dimensionRoot->getChild(1))->removeAllChildren();
|
||||
}
|
||||
|
||||
void View3DInventorViewer::turn3dDimensionsOn()
|
||||
{
|
||||
static_cast<SoSwitch *>(dimensionRoot->getChild(0))->whichChild = SO_SWITCH_ALL;
|
||||
}
|
||||
|
||||
void View3DInventorViewer::turn3dDimensionsOff()
|
||||
{
|
||||
static_cast<SoSwitch *>(dimensionRoot->getChild(0))->whichChild = SO_SWITCH_NONE;
|
||||
}
|
||||
|
||||
void View3DInventorViewer::addDimension3d(SoNode *node)
|
||||
{
|
||||
static_cast<SoSwitch *>(dimensionRoot->getChild(0))->addChild(node);
|
||||
}
|
||||
|
||||
void View3DInventorViewer::addDimensionDelta(SoNode *node)
|
||||
{
|
||||
static_cast<SoSwitch *>(dimensionRoot->getChild(1))->addChild(node);
|
||||
}
|
||||
|
||||
void View3DInventorViewer::turnDeltaDimensionsOn()
|
||||
{
|
||||
static_cast<SoSwitch *>(dimensionRoot->getChild(1))->whichChild = SO_SWITCH_ALL;
|
||||
}
|
||||
|
||||
void View3DInventorViewer::turnDeltaDimensionsOff()
|
||||
{
|
||||
static_cast<SoSwitch *>(dimensionRoot->getChild(1))->whichChild = SO_SWITCH_NONE;
|
||||
}
|
||||
|
||||
@@ -112,8 +112,8 @@ public:
|
||||
SbBool isBacklight(void) const;
|
||||
void setSceneGraph (SoNode *root);
|
||||
|
||||
void setAnimationEnabled(const SbBool enable);
|
||||
SbBool isAnimationEnabled(void) const;
|
||||
void setAnimationEnabled(const SbBool enable);
|
||||
SbBool isAnimationEnabled(void) const;
|
||||
|
||||
void setPopupMenuEnabled(const SbBool on);
|
||||
SbBool isPopupMenuEnabled(void) const;
|
||||
@@ -121,16 +121,16 @@ public:
|
||||
void startAnimating(const SbVec3f& axis, float velocity);
|
||||
void stopAnimating(void);
|
||||
SbBool isAnimating(void) const;
|
||||
|
||||
void setFeedbackVisibility(const SbBool enable);
|
||||
SbBool isFeedbackVisible(void) const;
|
||||
|
||||
void setFeedbackSize(const int size);
|
||||
int getFeedbackSize(void) const;
|
||||
|
||||
void setRenderFramebuffer(const SbBool enable);
|
||||
SbBool isRenderFramebuffer() const;
|
||||
void renderToFramebuffer(QGLFramebufferObject*);
|
||||
void setFeedbackVisibility(const SbBool enable);
|
||||
SbBool isFeedbackVisible(void) const;
|
||||
|
||||
void setFeedbackSize(const int size);
|
||||
int getFeedbackSize(void) const;
|
||||
|
||||
void setRenderFramebuffer(const SbBool enable);
|
||||
SbBool isRenderFramebuffer() const;
|
||||
void renderToFramebuffer(QGLFramebufferObject*);
|
||||
|
||||
virtual void setViewing(SbBool enable);
|
||||
virtual void setCursorEnabled(SbBool enable);
|
||||
@@ -193,8 +193,8 @@ public:
|
||||
void setEditingCursor (const QCursor& cursor);
|
||||
void setRedirectToSceneGraph(SbBool redirect) { this->redirected = redirect; }
|
||||
SbBool isRedirectedToSceneGraph() const { return this->redirected; }
|
||||
void setRedirectToSceneGraphEnabled(SbBool enable) { this->allowredir = enable; }
|
||||
SbBool isRedirectToSceneGraphEnabled(void) const { return this->allowredir; }
|
||||
void setRedirectToSceneGraphEnabled(SbBool enable) { this->allowredir = enable; }
|
||||
SbBool isRedirectToSceneGraphEnabled(void) const { return this->allowredir; }
|
||||
//@}
|
||||
|
||||
/** @name Pick actions */
|
||||
@@ -241,6 +241,23 @@ public:
|
||||
/** Project the given normalized 2d point onto the far plane */
|
||||
SbVec3f projectOnFarPlane(const SbVec2f&) const;
|
||||
//@}
|
||||
|
||||
/** @name Dimension controls
|
||||
* the "turn*" functions are wired up to parameter groups through view3dinventor.
|
||||
* don't call them directly. instead set the parameter groups.
|
||||
* @see TaskDimension
|
||||
*/
|
||||
//@{
|
||||
void turnAllDimensionsOn();
|
||||
void turnAllDimensionsOff();
|
||||
void turn3dDimensionsOn();
|
||||
void turn3dDimensionsOff();
|
||||
void turnDeltaDimensionsOn();
|
||||
void turnDeltaDimensionsOff();
|
||||
void eraseAllDimensions();
|
||||
void addDimension3d(SoNode *node);
|
||||
void addDimensionDelta(SoNode *node);
|
||||
//@}
|
||||
|
||||
/**
|
||||
* Set the camera's orientation. If isAnimationEnabled() returns
|
||||
@@ -320,7 +337,6 @@ private:
|
||||
SoFCBackgroundGradient *pcBackGround;
|
||||
SoSeparator * backgroundroot;
|
||||
SoSeparator * foregroundroot;
|
||||
SoRotationXYZ * arrowrotation;
|
||||
SoDirectionalLight* backlight;
|
||||
|
||||
SoSeparator * pcViewProviderRoot;
|
||||
@@ -328,6 +344,7 @@ private:
|
||||
NavigationStyle* navigation;
|
||||
SoFCUnifiedSelection* selectionRoot;
|
||||
QGLFramebufferObject* framebuffer;
|
||||
SoSwitch *dimensionRoot;
|
||||
|
||||
// small axis cross in the corner
|
||||
SbBool axiscrossEnabled;
|
||||
|
||||
@@ -399,7 +399,11 @@ void StdWorkbench::setupContextMenu(const char* recipient, MenuItem* item) const
|
||||
<< "Std_ViewRear" << "Std_ViewBottom" << "Std_ViewLeft"
|
||||
<< "Separator" << "Std_ViewRotateLeft" << "Std_ViewRotateRight";
|
||||
|
||||
*item << "Std_ViewFitAll" << "Std_ViewFitSelection" << StdViews
|
||||
MenuItem *measure = new MenuItem();
|
||||
measure->setCommand("Measure");
|
||||
*measure << "View_Measure_Toggle_All" << "View_Measure_Clear_All";
|
||||
|
||||
*item << "Std_ViewFitAll" << "Std_ViewFitSelection" << StdViews << measure
|
||||
<< "Separator" << "Std_ViewDockUndockFullscreen";
|
||||
|
||||
if (Gui::Selection().countObjectsOfType(App::DocumentObject::getClassTypeId()) > 0 )
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
#include "ViewProviderPrism.h"
|
||||
#include "ViewProviderSpline.h"
|
||||
#include "ViewProviderRegularPolygon.h"
|
||||
|
||||
#include "TaskDimension.h"
|
||||
#include "DlgSettingsGeneral.h"
|
||||
#include "DlgSettingsObjectColor.h"
|
||||
#include "DlgSettings3DViewPartImp.h"
|
||||
@@ -146,6 +146,9 @@ void PartGuiExport initPartGui()
|
||||
PartGui::ViewProviderConeParametric ::init();
|
||||
PartGui::ViewProviderTorusParametric ::init();
|
||||
PartGui::ViewProviderRuledSurface ::init();
|
||||
PartGui::DimensionLinear ::initClass();
|
||||
PartGui::DimensionAngular ::initClass();
|
||||
PartGui::ArcEngine ::initClass();
|
||||
|
||||
PartGui::Workbench ::init();
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@ set(PartGui_MOC_HDRS
|
||||
TaskOffset.h
|
||||
TaskSweep.h
|
||||
TaskThickness.h
|
||||
TaskDimension.h
|
||||
TaskCheckGeometry.h
|
||||
)
|
||||
fc_wrap_cpp(PartGui_MOC_SRCS ${PartGui_MOC_HDRS})
|
||||
@@ -208,6 +209,8 @@ SET(PartGui_SRCS
|
||||
TaskSweep.ui
|
||||
TaskThickness.cpp
|
||||
TaskThickness.h
|
||||
TaskDimension.cpp
|
||||
TaskDimension.h
|
||||
TaskCheckGeometry.cpp
|
||||
TaskCheckGeometry.h
|
||||
)
|
||||
|
||||
@@ -63,6 +63,7 @@
|
||||
#include "TaskShapeBuilder.h"
|
||||
#include "TaskLoft.h"
|
||||
#include "TaskSweep.h"
|
||||
#include "TaskDimension.h"
|
||||
#include "TaskCheckGeometry.h"
|
||||
|
||||
|
||||
@@ -1495,6 +1496,179 @@ bool CmdColorPerFace::isActive(void)
|
||||
return (hasActiveDocument() && !Gui::Control().activeDialog() && objectSelected);
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
// Part_Measure_Linear
|
||||
//===========================================================================
|
||||
|
||||
DEF_STD_CMD_A(CmdMeasureLinear);
|
||||
|
||||
CmdMeasureLinear::CmdMeasureLinear()
|
||||
: Command("Part_Measure_Linear")
|
||||
{
|
||||
sAppModule = "Part";
|
||||
sGroup = QT_TR_NOOP("Part");
|
||||
sMenuText = QT_TR_NOOP("Measure Linear");
|
||||
sToolTipText = QT_TR_NOOP("Measure Linear");
|
||||
sWhatsThis = sToolTipText;
|
||||
sStatusTip = sToolTipText;
|
||||
sPixmap = "Part_Measure_Linear";
|
||||
}
|
||||
|
||||
void CmdMeasureLinear::activated(int iMsg)
|
||||
{
|
||||
PartGui::goDimensionLinearRoot();
|
||||
}
|
||||
|
||||
bool CmdMeasureLinear::isActive(void)
|
||||
{
|
||||
return hasActiveDocument();
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
// Part_Measure_Angular
|
||||
//===========================================================================
|
||||
|
||||
DEF_STD_CMD_A(CmdMeasureAngular);
|
||||
|
||||
CmdMeasureAngular::CmdMeasureAngular()
|
||||
: Command("Part_Measure_Angular")
|
||||
{
|
||||
sAppModule = "Part";
|
||||
sGroup = QT_TR_NOOP("Part");
|
||||
sMenuText = QT_TR_NOOP("Measure Angular");
|
||||
sToolTipText = QT_TR_NOOP("Measure Angular");
|
||||
sWhatsThis = sToolTipText;
|
||||
sStatusTip = sToolTipText;
|
||||
sPixmap = "Part_Measure_Angular";
|
||||
}
|
||||
|
||||
void CmdMeasureAngular::activated(int iMsg)
|
||||
{
|
||||
PartGui::goDimensionAngularRoot();
|
||||
}
|
||||
|
||||
bool CmdMeasureAngular::isActive(void)
|
||||
{
|
||||
return hasActiveDocument();
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
// Part_Measure_Clear_All
|
||||
//===========================================================================
|
||||
|
||||
DEF_STD_CMD_A(CmdMeasureClearAll);
|
||||
|
||||
CmdMeasureClearAll::CmdMeasureClearAll()
|
||||
: Command("Part_Measure_Clear_All")
|
||||
{
|
||||
sAppModule = "Part";
|
||||
sGroup = QT_TR_NOOP("Part");
|
||||
sMenuText = QT_TR_NOOP("Clear All");
|
||||
sToolTipText = QT_TR_NOOP("Clear All");
|
||||
sWhatsThis = sToolTipText;
|
||||
sStatusTip = sToolTipText;
|
||||
sPixmap = "Part_Measure_Clear_All";
|
||||
}
|
||||
|
||||
void CmdMeasureClearAll::activated(int iMsg)
|
||||
{
|
||||
PartGui::eraseAllDimensions();
|
||||
}
|
||||
|
||||
bool CmdMeasureClearAll::isActive(void)
|
||||
{
|
||||
return hasActiveDocument();
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
// Part_Measure_Toggle_All
|
||||
//===========================================================================
|
||||
|
||||
DEF_STD_CMD_A(CmdMeasureToggleAll);
|
||||
|
||||
CmdMeasureToggleAll::CmdMeasureToggleAll()
|
||||
: Command("Part_Measure_Toggle_All")
|
||||
{
|
||||
sAppModule = "Part";
|
||||
sGroup = QT_TR_NOOP("Part");
|
||||
sMenuText = QT_TR_NOOP("Toggle All");
|
||||
sToolTipText = QT_TR_NOOP("Toggle All");
|
||||
sWhatsThis = sToolTipText;
|
||||
sStatusTip = sToolTipText;
|
||||
sPixmap = "Part_Measure_Toggle_All";
|
||||
}
|
||||
|
||||
void CmdMeasureToggleAll::activated(int iMsg)
|
||||
{
|
||||
ParameterGrp::handle group = App::GetApplication().GetUserParameter().
|
||||
GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("View");
|
||||
bool visibility = group->GetBool("DimensionsVisible", true);
|
||||
if (visibility)
|
||||
group->SetBool("DimensionsVisible", false);
|
||||
else
|
||||
group->SetBool("DimensionsVisible", true);
|
||||
}
|
||||
|
||||
bool CmdMeasureToggleAll::isActive(void)
|
||||
{
|
||||
return hasActiveDocument();
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
// Part_Measure_Toggle_3d
|
||||
//===========================================================================
|
||||
|
||||
DEF_STD_CMD_A(CmdMeasureToggle3d);
|
||||
|
||||
CmdMeasureToggle3d::CmdMeasureToggle3d()
|
||||
: Command("Part_Measure_Toggle_3d")
|
||||
{
|
||||
sAppModule = "Part";
|
||||
sGroup = QT_TR_NOOP("Part");
|
||||
sMenuText = QT_TR_NOOP("Toggle 3d");
|
||||
sToolTipText = QT_TR_NOOP("Toggle 3d");
|
||||
sWhatsThis = sToolTipText;
|
||||
sStatusTip = sToolTipText;
|
||||
sPixmap = "Part_Measure_Toggle_3d";
|
||||
}
|
||||
|
||||
void CmdMeasureToggle3d::activated(int iMsg)
|
||||
{
|
||||
PartGui::toggle3d();
|
||||
}
|
||||
|
||||
bool CmdMeasureToggle3d::isActive(void)
|
||||
{
|
||||
return hasActiveDocument();
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
// Part_Measure_Toggle_Delta
|
||||
//===========================================================================
|
||||
|
||||
DEF_STD_CMD_A(CmdMeasureToggleDelta);
|
||||
|
||||
CmdMeasureToggleDelta::CmdMeasureToggleDelta()
|
||||
: Command("Part_Measure_Toggle_Delta")
|
||||
{
|
||||
sAppModule = "Part";
|
||||
sGroup = QT_TR_NOOP("Part");
|
||||
sMenuText = QT_TR_NOOP("Toggle Delta");
|
||||
sToolTipText = QT_TR_NOOP("Toggle Delta");
|
||||
sWhatsThis = sToolTipText;
|
||||
sStatusTip = sToolTipText;
|
||||
sPixmap = "Part_Measure_Toggle_Delta";
|
||||
}
|
||||
|
||||
void CmdMeasureToggleDelta::activated(int iMsg)
|
||||
{
|
||||
PartGui::toggleDelta();
|
||||
}
|
||||
|
||||
bool CmdMeasureToggleDelta::isActive(void)
|
||||
{
|
||||
return hasActiveDocument();
|
||||
}
|
||||
|
||||
void CreatePartCommands(void)
|
||||
{
|
||||
@@ -1531,4 +1705,10 @@ void CreatePartCommands(void)
|
||||
rcCmdMgr.addCommand(new CmdPartThickness());
|
||||
rcCmdMgr.addCommand(new CmdCheckGeometry());
|
||||
rcCmdMgr.addCommand(new CmdColorPerFace());
|
||||
rcCmdMgr.addCommand(new CmdMeasureLinear());
|
||||
rcCmdMgr.addCommand(new CmdMeasureAngular());
|
||||
rcCmdMgr.addCommand(new CmdMeasureClearAll());
|
||||
rcCmdMgr.addCommand(new CmdMeasureToggleAll());
|
||||
rcCmdMgr.addCommand(new CmdMeasureToggle3d());
|
||||
rcCmdMgr.addCommand(new CmdMeasureToggleDelta());
|
||||
}
|
||||
|
||||
@@ -42,6 +42,14 @@
|
||||
<file>icons/Part_Point_Parametric.svg</file>
|
||||
<file>icons/Part_Polygon_Parametric.svg</file>
|
||||
<file>icons/Part_Spline_Parametric.svg</file>
|
||||
<file>icons/Part_Measure_Linear.svg</file>
|
||||
<file>icons/Part_Measure_Angular.svg</file>
|
||||
<file>icons/Part_Measure_Clear_All.svg</file>
|
||||
<file>icons/Part_Measure_Toggle_All.svg</file>
|
||||
<file>icons/Part_Measure_Toggle_3d.svg</file>
|
||||
<file>icons/Part_Measure_Toggle_Delta.svg</file>
|
||||
<file>icons/Part_Measure_Step_Active.svg</file>
|
||||
<file>icons/Part_Measure_Step_Done.svg</file>
|
||||
<file>icons/Tree_Part_Box_Parametric.svg</file>
|
||||
<file>icons/Tree_Part_Cylinder_Parametric.svg</file>
|
||||
<file>icons/Tree_Part_Cone_Parametric.svg</file>
|
||||
|
||||
489
src/Mod/Part/Gui/Resources/icons/Part_Measure_Angular.svg
Normal file
|
After Width: | Height: | Size: 25 KiB |
583
src/Mod/Part/Gui/Resources/icons/Part_Measure_Clear_All.svg
Normal file
|
After Width: | Height: | Size: 28 KiB |
448
src/Mod/Part/Gui/Resources/icons/Part_Measure_Linear.svg
Normal file
|
After Width: | Height: | Size: 23 KiB |
297
src/Mod/Part/Gui/Resources/icons/Part_Measure_Step_Active.svg
Normal file
@@ -0,0 +1,297 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="64px"
|
||||
height="64px"
|
||||
id="svg2943"
|
||||
sodipodi:version="0.32"
|
||||
inkscape:version="0.48.4 r9939"
|
||||
sodipodi:docname="Part_Measure_Step_Active.svg"
|
||||
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
||||
version="1.1">
|
||||
<defs
|
||||
id="defs2945">
|
||||
<linearGradient
|
||||
id="linearGradient3848">
|
||||
<stop
|
||||
style="stop-color:#c32828;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop3850" />
|
||||
<stop
|
||||
style="stop-color:#ffffff;stop-opacity:0;"
|
||||
offset="1"
|
||||
id="stop3852" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient4158">
|
||||
<stop
|
||||
style="stop-color:#000000;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop4160" />
|
||||
<stop
|
||||
style="stop-color:#f6f6f6;stop-opacity:0;"
|
||||
offset="1"
|
||||
id="stop4162" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient4122">
|
||||
<stop
|
||||
style="stop-color:#e3d328;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop4124" />
|
||||
<stop
|
||||
style="stop-color:#e1dec3;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop4126" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient4088">
|
||||
<stop
|
||||
style="stop-color:#e9cd23;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop4090" />
|
||||
<stop
|
||||
style="stop-color:#040000;stop-opacity:0;"
|
||||
offset="1"
|
||||
id="stop4092" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
id="linearGradient4060">
|
||||
<stop
|
||||
style="stop-color:#ada9a9;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop4062" />
|
||||
<stop
|
||||
style="stop-color:#ada9a9;stop-opacity:0;"
|
||||
offset="1"
|
||||
id="stop4064" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient4052">
|
||||
<stop
|
||||
style="stop-color:#ada9a9;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop4054" />
|
||||
<stop
|
||||
style="stop-color:#ada9a9;stop-opacity:0;"
|
||||
offset="1"
|
||||
id="stop4056" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient4349">
|
||||
<stop
|
||||
style="stop-color:#898709;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop4351" />
|
||||
<stop
|
||||
style="stop-color:#000000;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop4353" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient5241">
|
||||
<stop
|
||||
style="stop-color:#212c45;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop5243" />
|
||||
<stop
|
||||
style="stop-color:#000000;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop5245" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient5227"
|
||||
osb:paint="solid">
|
||||
<stop
|
||||
style="stop-color:#000000;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop5229" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient3902">
|
||||
<stop
|
||||
style="stop-color:#000000;stop-opacity:0.58823532;"
|
||||
offset="0"
|
||||
id="stop3904" />
|
||||
<stop
|
||||
style="stop-color:#000000;stop-opacity:0.39215687;"
|
||||
offset="1"
|
||||
id="stop3906" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient3894">
|
||||
<stop
|
||||
style="stop-color:#45351d;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop3896" />
|
||||
<stop
|
||||
style="stop-color:#000000;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop3898" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient3886">
|
||||
<stop
|
||||
style="stop-color:#45351d;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop3888" />
|
||||
<stop
|
||||
style="stop-color:#000000;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop3890" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient3792">
|
||||
<stop
|
||||
style="stop-color:#aaaaaa;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop3794" />
|
||||
<stop
|
||||
style="stop-color:#d2d2d2;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop3796" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient3784">
|
||||
<stop
|
||||
style="stop-color:#bebebe;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop3786" />
|
||||
<stop
|
||||
style="stop-color:#ffffff;stop-opacity:0.39215687;"
|
||||
offset="1"
|
||||
id="stop3788" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient3377">
|
||||
<stop
|
||||
id="stop3379"
|
||||
offset="0"
|
||||
style="stop-color:#71b2f8;stop-opacity:1;" />
|
||||
<stop
|
||||
id="stop3381"
|
||||
offset="1"
|
||||
style="stop-color:#002795;stop-opacity:1;" />
|
||||
</linearGradient>
|
||||
<inkscape:perspective
|
||||
sodipodi:type="inkscape:persp3d"
|
||||
inkscape:vp_x="0 : 32 : 1"
|
||||
inkscape:vp_y="0 : 1000 : 0"
|
||||
inkscape:vp_z="64 : 32 : 1"
|
||||
inkscape:persp3d-origin="32 : 21.333333 : 1"
|
||||
id="perspective2951" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4052"
|
||||
id="linearGradient4058"
|
||||
x1="138.99986"
|
||||
y1="44.863674"
|
||||
x2="92.497559"
|
||||
y2="-14.356517"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(168.6744,65.825928)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4060"
|
||||
id="linearGradient4066"
|
||||
x1="103.93729"
|
||||
y1="49.179436"
|
||||
x2="120.49899"
|
||||
y2="0.21229285"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(168.6744,65.825928)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4122"
|
||||
id="linearGradient4128"
|
||||
x1="391.3074"
|
||||
y1="120.81136"
|
||||
x2="394.43201"
|
||||
y2="112.43636"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(-88.034794,-1.0606602)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient4158"
|
||||
id="linearGradient4164"
|
||||
x1="419.99387"
|
||||
y1="102.77802"
|
||||
x2="458.7193"
|
||||
y2="69.431564"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(-129.22376,-0.88388348)" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3848"
|
||||
id="linearGradient3854"
|
||||
x1="2.7195754"
|
||||
y1="32.826416"
|
||||
x2="101.26959"
|
||||
y2="33.327396"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="3.9921875"
|
||||
inkscape:cx="11.764075"
|
||||
inkscape:cy="26.551316"
|
||||
inkscape:current-layer="g3629"
|
||||
showgrid="true"
|
||||
inkscape:document-units="px"
|
||||
inkscape:grid-bbox="true"
|
||||
inkscape:window-width="1368"
|
||||
inkscape:window-height="686"
|
||||
inkscape:window-x="-3"
|
||||
inkscape:window-y="-3"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata2948">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1"
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer">
|
||||
<g
|
||||
id="g3629"
|
||||
transform="translate(-256.70919,-66.886588)">
|
||||
<path
|
||||
style="fill:#e3d328;fill-opacity:1;stroke:#040400;stroke-width:0.08838835;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d=""
|
||||
id="path4102"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="translate(256.70919,66.886588)" />
|
||||
<path
|
||||
style="fill:url(#linearGradient3854);stroke:#000000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none;fill-opacity:1"
|
||||
d="M 3.7195754,33.0921 24.531485,4.6639163 l 0,18.5093157 35.158844,0 -0.177123,19.837735 -34.981721,0 0,17.977948 z"
|
||||
id="path3078"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="translate(256.70919,66.886588)"
|
||||
sodipodi:nodetypes="cccccccc" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 8.6 KiB |
254
src/Mod/Part/Gui/Resources/icons/Part_Measure_Step_Done.svg
Normal file
@@ -0,0 +1,254 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="64px"
|
||||
height="64px"
|
||||
id="svg2943"
|
||||
sodipodi:version="0.32"
|
||||
inkscape:version="0.48.4 r9939"
|
||||
sodipodi:docname="Part_Measure_Step_Done.svg"
|
||||
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
||||
version="1.1">
|
||||
<defs
|
||||
id="defs2945">
|
||||
<linearGradient
|
||||
id="linearGradient3848">
|
||||
<stop
|
||||
style="stop-color:#31a52e;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop3850" />
|
||||
<stop
|
||||
style="stop-color:#ffffff;stop-opacity:0;"
|
||||
offset="1"
|
||||
id="stop3852" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient4158">
|
||||
<stop
|
||||
style="stop-color:#000000;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop4160" />
|
||||
<stop
|
||||
style="stop-color:#f6f6f6;stop-opacity:0;"
|
||||
offset="1"
|
||||
id="stop4162" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient4122">
|
||||
<stop
|
||||
style="stop-color:#e3d328;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop4124" />
|
||||
<stop
|
||||
style="stop-color:#e1dec3;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop4126" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient4088">
|
||||
<stop
|
||||
style="stop-color:#e9cd23;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop4090" />
|
||||
<stop
|
||||
style="stop-color:#040000;stop-opacity:0;"
|
||||
offset="1"
|
||||
id="stop4092" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient4052">
|
||||
<stop
|
||||
style="stop-color:#ada9a9;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop4054" />
|
||||
<stop
|
||||
style="stop-color:#ada9a9;stop-opacity:0;"
|
||||
offset="1"
|
||||
id="stop4056" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient4349">
|
||||
<stop
|
||||
style="stop-color:#898709;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop4351" />
|
||||
<stop
|
||||
style="stop-color:#000000;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop4353" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient5241">
|
||||
<stop
|
||||
style="stop-color:#212c45;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop5243" />
|
||||
<stop
|
||||
style="stop-color:#000000;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop5245" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient5227"
|
||||
osb:paint="solid">
|
||||
<stop
|
||||
style="stop-color:#000000;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop5229" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient3902">
|
||||
<stop
|
||||
style="stop-color:#000000;stop-opacity:0.58823532;"
|
||||
offset="0"
|
||||
id="stop3904" />
|
||||
<stop
|
||||
style="stop-color:#000000;stop-opacity:0.39215687;"
|
||||
offset="1"
|
||||
id="stop3906" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient3894">
|
||||
<stop
|
||||
style="stop-color:#45351d;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop3896" />
|
||||
<stop
|
||||
style="stop-color:#000000;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop3898" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient3886">
|
||||
<stop
|
||||
style="stop-color:#45351d;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop3888" />
|
||||
<stop
|
||||
style="stop-color:#000000;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop3890" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient3792">
|
||||
<stop
|
||||
style="stop-color:#aaaaaa;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop3794" />
|
||||
<stop
|
||||
style="stop-color:#d2d2d2;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop3796" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient3784">
|
||||
<stop
|
||||
style="stop-color:#bebebe;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop3786" />
|
||||
<stop
|
||||
style="stop-color:#ffffff;stop-opacity:0.39215687;"
|
||||
offset="1"
|
||||
id="stop3788" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient3377">
|
||||
<stop
|
||||
id="stop3379"
|
||||
offset="0"
|
||||
style="stop-color:#71b2f8;stop-opacity:1;" />
|
||||
<stop
|
||||
id="stop3381"
|
||||
offset="1"
|
||||
style="stop-color:#002795;stop-opacity:1;" />
|
||||
</linearGradient>
|
||||
<inkscape:perspective
|
||||
sodipodi:type="inkscape:persp3d"
|
||||
inkscape:vp_x="0 : 32 : 1"
|
||||
inkscape:vp_y="0 : 1000 : 0"
|
||||
inkscape:vp_z="64 : 32 : 1"
|
||||
inkscape:persp3d-origin="32 : 21.333333 : 1"
|
||||
id="perspective2951" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3848"
|
||||
id="linearGradient3854"
|
||||
x1="2.7195754"
|
||||
y1="32.826416"
|
||||
x2="101.26959"
|
||||
y2="33.327396"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3848"
|
||||
id="linearGradient3891"
|
||||
x1="8.3518963"
|
||||
y1="56.123516"
|
||||
x2="77.455673"
|
||||
y2="-10.828839"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="5.6458057"
|
||||
inkscape:cx="25.044686"
|
||||
inkscape:cy="29.630776"
|
||||
inkscape:current-layer="g3629"
|
||||
showgrid="true"
|
||||
inkscape:document-units="px"
|
||||
inkscape:grid-bbox="true"
|
||||
inkscape:window-width="1368"
|
||||
inkscape:window-height="686"
|
||||
inkscape:window-x="-3"
|
||||
inkscape:window-y="-3"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata2948">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1"
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer">
|
||||
<g
|
||||
id="g3629"
|
||||
transform="translate(-256.70919,-66.886588)">
|
||||
<path
|
||||
style="fill:#e3d328;fill-opacity:1;stroke:#040400;stroke-width:0.08838835;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d=""
|
||||
id="path4102"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="translate(256.70919,66.886588)" />
|
||||
<path
|
||||
style="fill:url(#linearGradient3891);stroke:#000000;stroke-width:2.00000009999999984;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none;fill-opacity:1"
|
||||
d="M 4.9238304,35.755495 C 16.38031,39.62625 19.163587,48.256892 23.746127,60.670274 34.349153,38.985364 45.837793,20.842907 60.868885,13.150685 L 53.230489,5.1706329 C 40.016779,12.035562 32.116747,25.808274 24.570961,43.83193 22.73332,36.407403 18.415962,31.462593 12.327378,27.403396 z"
|
||||
id="path3875"
|
||||
inkscape:connector-curvature="0"
|
||||
transform="translate(256.70919,66.886588)"
|
||||
sodipodi:nodetypes="ccccccc" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 7.5 KiB |
454
src/Mod/Part/Gui/Resources/icons/Part_Measure_Toggle_3d.svg
Normal file
|
After Width: | Height: | Size: 23 KiB |
461
src/Mod/Part/Gui/Resources/icons/Part_Measure_Toggle_All.svg
Normal file
|
After Width: | Height: | Size: 24 KiB |
455
src/Mod/Part/Gui/Resources/icons/Part_Measure_Toggle_Delta.svg
Normal file
|
After Width: | Height: | Size: 24 KiB |
1678
src/Mod/Part/Gui/TaskDimension.cpp
Normal file
360
src/Mod/Part/Gui/TaskDimension.h
Normal file
@@ -0,0 +1,360 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2013 Thomas Anderson <blobfish[at]gmx.com> *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef TASKDIMENSION_H
|
||||
#define TASKDIMENSION_H
|
||||
|
||||
#include <gp_Vec.hxx>
|
||||
#include <gp_Lin.hxx>
|
||||
|
||||
#include <Inventor/fields/SoSFVec3f.h>
|
||||
#include <Inventor/fields/SoSFMatrix.h>
|
||||
#include <Inventor/fields/SoSFString.h>
|
||||
#include <Inventor/nodekits/SoSeparatorKit.h>
|
||||
#include <Inventor/fields/SoSFColor.h>
|
||||
#include <Inventor/fields/SoSFRotation.h>
|
||||
#include <Inventor/fields/SoSFFloat.h>
|
||||
#include <Inventor/engines/SoSubEngine.h>
|
||||
#include <Inventor/engines/SoEngine.h>
|
||||
|
||||
#include <Gui/TaskView/TaskDialog.h>
|
||||
#include <Gui/TaskView/TaskView.h>
|
||||
|
||||
class TopoDS_Shape;
|
||||
class TopoDS_Face;
|
||||
class TopoDS_Edge;
|
||||
class TopoDS_Vertex;
|
||||
class gp_Pnt;
|
||||
class BRepExtrema_DistShapeShape;
|
||||
|
||||
class QPushButton;
|
||||
class QPixmap;
|
||||
class QLabel;
|
||||
|
||||
namespace Gui{class View3dInventorViewer;}
|
||||
|
||||
namespace PartGui
|
||||
{
|
||||
/*!find shape from selection strings
|
||||
* @param shapeOut search results.
|
||||
* @param doc document name to search.
|
||||
* @param object object name to search.
|
||||
* @param sub sub-object name to search.
|
||||
* @return signal if the search was successful.
|
||||
*/
|
||||
bool getShapeFromStrings(TopoDS_Shape &shapeOut, const std::string &doc, const std::string &object, const std::string &sub);
|
||||
/*!examine pre selection
|
||||
* @param shape1 firt shape in current selection
|
||||
* @param shape2 second shape in current selection
|
||||
* @return signal if preselection is valid. false means shape1 and shape2 are invalid.
|
||||
*/
|
||||
bool evaluateLinearPreSelection(TopoDS_Shape &shape1, TopoDS_Shape &shape2);
|
||||
/*!start of the measure linear command*/
|
||||
void goDimensionLinearRoot();
|
||||
/*!does the measure and create dimensions without a dialog
|
||||
* @param shape1 first shape.
|
||||
* @param shape2 second shape.
|
||||
* @todo incorporate some form of "adapt to topods_shape". so we can expand to other types outside OCC.
|
||||
*/
|
||||
void goDimensionLinearNoTask(const TopoDS_Shape &shape1, const TopoDS_Shape &shape2);
|
||||
/*!prints results of measuring to console.
|
||||
* @param measure object containing the measure information
|
||||
*/
|
||||
void dumpLinearResults(const BRepExtrema_DistShapeShape &measure);
|
||||
/*!convenience function to get the viewer*/
|
||||
Gui::View3DInventorViewer* getViewer();
|
||||
/*!adds 3d and delta dimensions to the viewer
|
||||
* @param measure object containing the measure information.
|
||||
*/
|
||||
void addLinearDimensions(const BRepExtrema_DistShapeShape &measure);
|
||||
/*!creates one dimension from points with color
|
||||
* @param point1 first point
|
||||
* @param point2 second point
|
||||
* @param color color of dimension
|
||||
* @return an inventor node to add to a scenegraph
|
||||
*/
|
||||
SoNode* createLinearDimension(const gp_Pnt &point1, const gp_Pnt &point2, const SbColor &color);
|
||||
/*!erases all the dimensions in the viewer.*/
|
||||
void eraseAllDimensions();
|
||||
/*!toggles the display status of the 3d dimensions*/
|
||||
void toggle3d();
|
||||
/*!toggles the display status of the delta dimensions*/
|
||||
void toggleDelta();
|
||||
/*!make sure measure command isn't working with everthing invisible. Confusing the user*/
|
||||
void ensureSomeDimensionVisible();
|
||||
/*!make sure angle measure command isn't working with 3d off. Confusing the user*/
|
||||
void ensure3dDimensionVisible();
|
||||
/*convert a vertex to vector*/
|
||||
gp_Vec convert(const TopoDS_Vertex &vertex);
|
||||
|
||||
class DimensionLinear : public SoSeparatorKit
|
||||
{
|
||||
SO_KIT_HEADER(DimensionLinear);
|
||||
|
||||
SO_KIT_CATALOG_ENTRY_HEADER(transformation);
|
||||
SO_KIT_CATALOG_ENTRY_HEADER(annotate);
|
||||
SO_KIT_CATALOG_ENTRY_HEADER(leftArrow);
|
||||
SO_KIT_CATALOG_ENTRY_HEADER(rightArrow);
|
||||
SO_KIT_CATALOG_ENTRY_HEADER(line);
|
||||
SO_KIT_CATALOG_ENTRY_HEADER(textSep);
|
||||
public:
|
||||
DimensionLinear();
|
||||
static void initClass();
|
||||
virtual SbBool affectsState() const;
|
||||
|
||||
SoSFVec3f point1;
|
||||
SoSFVec3f point2;
|
||||
SoSFString text;
|
||||
SoSFColor dColor;
|
||||
protected:
|
||||
SoSFRotation rotate;
|
||||
SoSFFloat length;
|
||||
SoSFVec3f origin;
|
||||
|
||||
private:
|
||||
virtual ~DimensionLinear();
|
||||
void setupDimension();
|
||||
};
|
||||
|
||||
/*kit for anglular dimensions*/
|
||||
class DimensionAngular : public SoSeparatorKit
|
||||
{
|
||||
SO_KIT_HEADER(DimensionAngular);
|
||||
|
||||
SO_KIT_CATALOG_ENTRY_HEADER(transformation);
|
||||
SO_KIT_CATALOG_ENTRY_HEADER(annotate);
|
||||
SO_KIT_CATALOG_ENTRY_HEADER(arrow1);
|
||||
SO_KIT_CATALOG_ENTRY_HEADER(arrow2);
|
||||
SO_KIT_CATALOG_ENTRY_HEADER(arcSep);
|
||||
SO_KIT_CATALOG_ENTRY_HEADER(textSep);
|
||||
public:
|
||||
DimensionAngular();
|
||||
static void initClass();
|
||||
virtual SbBool affectsState() const;
|
||||
|
||||
SoSFFloat radius;//radians.
|
||||
SoSFFloat angle;//radians.
|
||||
SoSFString text;
|
||||
SoSFColor dColor;
|
||||
SoSFMatrix matrix;
|
||||
private:
|
||||
virtual ~DimensionAngular();
|
||||
void setupDimension();
|
||||
};
|
||||
|
||||
/*used for generating points for arc display*/
|
||||
class ArcEngine : public SoEngine
|
||||
{
|
||||
SO_ENGINE_HEADER(ArcEngine);
|
||||
public:
|
||||
ArcEngine();
|
||||
static void initClass();
|
||||
|
||||
SoSFFloat radius;
|
||||
SoSFFloat angle;
|
||||
SoSFFloat deviation;
|
||||
|
||||
SoEngineOutput points;
|
||||
SoEngineOutput pointCount;
|
||||
protected:
|
||||
virtual void evaluate();
|
||||
private:
|
||||
virtual ~ArcEngine(){}
|
||||
void defaultValues(); //some non error values if something goes wrong.
|
||||
};
|
||||
|
||||
/*! a widget with buttons and icons for a controlled selection process*/
|
||||
class SteppedSelection : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
SteppedSelection(const uint &buttonCountIn, QWidget *parent = 0);
|
||||
~SteppedSelection();
|
||||
QPushButton* getButton(const uint &index);
|
||||
void setIconDone(const uint &index);
|
||||
|
||||
protected:
|
||||
typedef std::pair<QPushButton *, QLabel *> ButtonIconPairType;
|
||||
std::vector<ButtonIconPairType> buttons;
|
||||
QPixmap *stepActive;
|
||||
QPixmap *stepDone;
|
||||
|
||||
private slots:
|
||||
void selectionSlot(bool checked);
|
||||
void buildPixmaps();
|
||||
|
||||
};
|
||||
|
||||
/*! just convenience container*/
|
||||
class DimSelections
|
||||
{
|
||||
public:
|
||||
enum ShapeType{None, Vertex, Edge, Face};
|
||||
struct DimSelection
|
||||
{
|
||||
std::string documentName;
|
||||
std::string objectName;
|
||||
std::string subObjectName;
|
||||
float x;
|
||||
float y;
|
||||
float z;
|
||||
ShapeType shapeType;
|
||||
};
|
||||
std::vector<DimSelection> selections;
|
||||
};
|
||||
|
||||
/*!widget for buttons controlling the display of dimensions*/
|
||||
class DimensionControl : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit DimensionControl(QWidget* parent);
|
||||
public slots:
|
||||
void toggle3dSlot(bool);
|
||||
void toggleDeltaSlot(bool);
|
||||
void clearAllSlot(bool);
|
||||
};
|
||||
|
||||
/*!linear dialog*/
|
||||
class TaskMeasureLinear : public Gui::TaskView::TaskDialog, public Gui::SelectionObserver
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
TaskMeasureLinear();
|
||||
~TaskMeasureLinear();
|
||||
|
||||
virtual QDialogButtonBox::StandardButtons getStandardButtons() const
|
||||
{return QDialogButtonBox::Close;}
|
||||
virtual bool isAllowedAlterDocument(void) const {return false;}
|
||||
virtual bool needsFullSpace() const {return false;}
|
||||
protected:
|
||||
virtual void onSelectionChanged(const Gui::SelectionChanges& msg);
|
||||
|
||||
protected slots:
|
||||
void selection1Slot(bool checked);
|
||||
void selection2Slot(bool checked);
|
||||
void resetDialogSlot(bool);
|
||||
void toggle3dSlot(bool);
|
||||
void toggleDeltaSlot(bool);
|
||||
void clearAllSlot(bool);
|
||||
void selectionClearDelayedSlot();
|
||||
|
||||
private:
|
||||
void setUpGui();
|
||||
void buildDimension();
|
||||
void clearSelectionStrings();
|
||||
DimSelections selections1;
|
||||
DimSelections selections2;
|
||||
uint buttonSelectedIndex;
|
||||
SteppedSelection *stepped;
|
||||
|
||||
};
|
||||
|
||||
/*! @brief Convert to vector
|
||||
*
|
||||
* Used to construct a vector from various input types
|
||||
*/
|
||||
class VectorAdapter
|
||||
{
|
||||
public:
|
||||
/*!default construction isValid is set to false*/
|
||||
VectorAdapter();
|
||||
/*!Build a vector from a faceIn
|
||||
* @param faceIn vector will be normal to plane and equal to cylindrical axis.
|
||||
* @param pickedPointIn location of pick. straight conversion from sbvec. not accurate.*/
|
||||
VectorAdapter(const TopoDS_Face &faceIn, const gp_Vec &pickedPointIn);
|
||||
/*!Build a vector from an edgeIn
|
||||
* @param edgeIn vector will be lastPoint - firstPoint.
|
||||
* @param pickedPointIn location of pick. straight conversion from sbvec. not accurate.*/
|
||||
VectorAdapter(const TopoDS_Edge &edgeIn, const gp_Vec &pickedPointIn);
|
||||
/*!Build a vector From 2 vertices.
|
||||
*vector will be equal to @param vertex2In - @param vertex1In.*/
|
||||
VectorAdapter(const TopoDS_Vertex &vertex1In, const TopoDS_Vertex &vertex2In);
|
||||
/*!Build a vector From 2 vectors.
|
||||
*vector will be equal to @param vector2 - @param vector1.*/
|
||||
VectorAdapter(const gp_Vec &vector1, const gp_Vec &vector2);
|
||||
|
||||
/*!make sure no errors in vector construction.
|
||||
* @return true = vector is good. false = vector is NOT good.*/
|
||||
bool isValid() const {return status;}
|
||||
/*!get the calculated vector.
|
||||
* @return the vector. use isValid to ensure correct results.*/
|
||||
operator gp_Vec() const {return vector;}
|
||||
/*!build occ line used for extrema calculation*/
|
||||
operator gp_Lin() const;
|
||||
gp_Vec getPickPoint() const {return origin;}
|
||||
|
||||
private:
|
||||
void projectOriginOntoVector(const gp_Vec &pickedPointIn);
|
||||
bool status;
|
||||
gp_Vec vector;
|
||||
gp_Vec origin;
|
||||
};
|
||||
|
||||
/*!angular dialog class*/
|
||||
class TaskMeasureAngular : public Gui::TaskView::TaskDialog, public Gui::SelectionObserver
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
TaskMeasureAngular();
|
||||
~TaskMeasureAngular();
|
||||
|
||||
virtual QDialogButtonBox::StandardButtons getStandardButtons() const
|
||||
{return QDialogButtonBox::Close;}
|
||||
virtual bool isAllowedAlterDocument(void) const {return false;}
|
||||
virtual bool needsFullSpace() const {return false;}
|
||||
protected:
|
||||
virtual void onSelectionChanged(const Gui::SelectionChanges& msg);
|
||||
|
||||
protected slots:
|
||||
void selection1Slot(bool checked);
|
||||
void selection2Slot(bool checked);
|
||||
void resetDialogSlot(bool);
|
||||
void toggle3dSlot(bool);
|
||||
void toggleDeltaSlot(bool);
|
||||
void clearAllSlot(bool);
|
||||
void selectionClearDelayedSlot();
|
||||
|
||||
private:
|
||||
void setUpGui();
|
||||
void buildDimension();
|
||||
void clearSelection();
|
||||
DimSelections selections1;
|
||||
DimSelections selections2;
|
||||
uint buttonSelectedIndex;
|
||||
SteppedSelection *stepped;
|
||||
VectorAdapter buildAdapter(const DimSelections &selection) const;
|
||||
};
|
||||
|
||||
/*!start of the measure angular command*/
|
||||
void goDimensionAngularRoot();
|
||||
/*!examine angular pre selection
|
||||
* @param vector1Out firt shape in current selection
|
||||
* @param vector2Out second shape in current selection
|
||||
* @return signal if preselection is valid. false means vector1Out and vector2Out are invalid.
|
||||
*/
|
||||
bool evaluateAngularPreSelection(VectorAdapter &vector1Out, VectorAdapter &vector2Out);
|
||||
/*!build angular dimension*/
|
||||
void goDimensionAngularNoTask(const VectorAdapter &vector1Adapter, const VectorAdapter &vector2Adapter);
|
||||
}
|
||||
|
||||
#endif // TASKDIMENSION_H
|
||||
@@ -66,6 +66,11 @@ Gui::MenuItem* Workbench::setupMenuBar() const
|
||||
Gui::MenuItem* bop = new Gui::MenuItem;
|
||||
bop->setCommand("Boolean");
|
||||
*bop << "Part_Boolean" << "Part_Cut" << "Part_Fuse" << "Part_Common";
|
||||
|
||||
Gui::MenuItem* measure = new Gui::MenuItem;
|
||||
measure->setCommand("Measure");
|
||||
*measure << "Part_Measure_Linear" << "Part_Measure_Angular" << "Part_Measure_Clear_All" << "Part_Measure_Toggle_All" <<
|
||||
"Part_Measure_Toggle_3d" << "Part_Measure_Toggle_Delta";
|
||||
|
||||
Gui::MenuItem* part = new Gui::MenuItem;
|
||||
root->insertItem(item, part);
|
||||
@@ -74,7 +79,7 @@ Gui::MenuItem* Workbench::setupMenuBar() const
|
||||
*part << prim << "Part_Primitives" << "Part_Builder" << "Separator"
|
||||
<< "Part_ShapeFromMesh" << "Part_MakeSolid" << "Part_ReverseShape"
|
||||
<< "Part_SimpleCopy" << "Part_RefineShape" << "Part_CheckGeometry"
|
||||
<< "Separator" << bop << "Separator"
|
||||
<< measure << "Separator" << bop << "Separator"
|
||||
<< "Part_CrossSections" << "Part_Compound" << "Part_Extrude"
|
||||
<< "Part_Revolve" << "Part_Mirror" << "Part_Fillet" << "Part_Chamfer"
|
||||
<< "Part_RuledSurface" << "Part_Loft" << "Part_Sweep"
|
||||
@@ -114,6 +119,11 @@ Gui::ToolBarItem* Workbench::setupToolBars() const
|
||||
boolop->setCommand("Boolean");
|
||||
*boolop << "Part_Boolean" << "Part_Cut" << "Part_Fuse" << "Part_Common"
|
||||
<< "Part_CheckGeometry" << "Part_Section" << "Part_CrossSections";
|
||||
|
||||
Gui::ToolBarItem* measure = new Gui::ToolBarItem(root);
|
||||
measure->setCommand("Measure");
|
||||
*measure << "Part_Measure_Linear" << "Part_Measure_Angular" << "Part_Measure_Clear_All" << "Part_Measure_Toggle_All"
|
||||
<< "Part_Measure_Toggle_3d" << "Part_Measure_Toggle_Delta";
|
||||
|
||||
return root;
|
||||
}
|
||||
@@ -124,4 +134,3 @@ Gui::ToolBarItem* Workbench::setupCommandBars() const
|
||||
Gui::ToolBarItem* root = new Gui::ToolBarItem;
|
||||
return root;
|
||||
}
|
||||
|
||||
|
||||