Part Dimension: alterations to existing files
Not sure what is happening with View3dInventorViewer.h.
The only REAL change, beyond the addition of dim functions, is
the removal of the member arrowrotation. It wasn't referenced anywhere.
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user