[TD] Insert new tool Area Annotation

This commit is contained in:
edi271
2022-01-26 15:50:38 +01:00
committed by WandererFan
parent cc770208ea
commit cd4da51e60
4 changed files with 374 additions and 16 deletions

View File

@@ -30,12 +30,10 @@
# include <exception>
#endif //#ifndef _PreComp_
#include <QGraphicsView>
# include <App/DocumentObject.h>
# include <Base/Exception.h>
#include <Base/Console.h>
#include <Base/Type.h>
# include <Base/Console.h>
# include <Base/Type.h>
# include <Gui/Action.h>
# include <Gui/Application.h>
# include <Gui/BitmapFactory.h>
@@ -59,22 +57,17 @@
# include <Mod/TechDraw/App/DrawPage.h>
# include <Mod/TechDraw/App/DrawUtil.h>
# include <Mod/TechDraw/App/Geometry.h>
# include <Mod/TechDraw/App/DrawViewSection.h>
# include <Mod/TechDraw/App/DrawViewBalloon.h>
#include <Mod/TechDraw/Gui/QGVPage.h>
#include "DrawGuiUtil.h"
#include "MDIViewPage.h"
#include "ViewProviderPage.h"
#include "TaskLinkDim.h"
# include "ViewProviderBalloon.h"
# include "QGVPage.h"
# include "DrawGuiUtil.h"
# include "ViewProviderPage.h"
# include "TaskLinkDim.h"
#include "TaskSelectLineAttributes.h"
/////////////////////////////
#include <Mod/TechDraw/App/DrawViewSection.h> // needed
#include <Mod/TechDraw/App/DrawProjGroupItem.h>
/////////////////////////////
using namespace TechDrawGui;
using namespace TechDraw;
using namespace std;
@@ -100,6 +93,7 @@ namespace TechDrawGui {
std::vector<Gui::SelectionObject>& selection,
TechDraw::DrawViewPart*& objFeat,
std::string message);
std::string _createBalloon(Gui::Command* cmd, TechDraw::DrawViewPart* objFeat);
//===========================================================================
// TechDraw_ExtensionHoleCircle
@@ -1652,6 +1646,130 @@ bool CmdTechDrawExtendShortenLineGroup::isActive(void)
return (havePage && haveView);
}
//===========================================================================
// TechDraw_ExtensionAreaAnnotation
//===========================================================================
DEF_STD_CMD_A(CmdTechDrawExtensionAreaAnnotation)
CmdTechDrawExtensionAreaAnnotation::CmdTechDrawExtensionAreaAnnotation()
: Command("TechDraw_ExtensionAreaAnnotation")
{
sAppModule = "TechDraw";
sGroup = QT_TR_NOOP("TechDraw");
sMenuText = QT_TR_NOOP("Calculate the area of selected faces");
sToolTipText = QT_TR_NOOP("Select several faces\n\
- click this tool");
sWhatsThis = "TechDraw_ExtensionAreaAnnotation";
sStatusTip = sToolTipText;
sPixmap = "TechDraw_ExtensionAreaAnnotation";
}
void CmdTechDrawExtensionAreaAnnotation::activated(int iMsg)
// calculate the area of selected faces, create output in a balloon
{
Q_UNUSED(iMsg);
std::vector<Gui::SelectionObject> selection;
TechDraw::DrawViewPart* objFeat;
if (!_checkSel(this, selection, objFeat, "TechDraw calculate selected area"))
return;
double faceArea(0.0), totalArea(0.0), xCenter(0.0), yCenter(0.0);
int totalPoints(0);
const std::vector<std::string> subNames = selection[0].getSubNames();
if (!subNames.empty()) {
for (std::string name : subNames) {
int idx = TechDraw::DrawUtil::getIndexFromName(name);
std::vector<TechDraw::BaseGeomPtr> faceEdges = objFeat->getFaceEdgesByIndex(idx);
// We filter arcs, circles etc. which are not allowed.
for (TechDraw::BaseGeomPtr geoPtr : faceEdges)
if (geoPtr->geomType != TechDraw::GENERIC)
throw Base::TypeError("CmdTechDrawAreaAnnotation - forbidden border element found\n");
// We create a list of all points along the boundary of the face.
// The edges form a closed polygon, but their start- and endpoints may be interchanged.
std::vector<Base::Vector3d> facePoints;
TechDraw::GenericPtr firstEdge =
std::static_pointer_cast<TechDraw::Generic>(faceEdges[0]);
facePoints.push_back(firstEdge->points.at(0));
facePoints.push_back(firstEdge->points.at(1));
for (long unsigned int n = 1; n < faceEdges.size() - 1; n++)
{
TechDraw::GenericPtr nextEdge =
std::static_pointer_cast<TechDraw::Generic>(faceEdges[n]);
if ((nextEdge->points.at(0)-facePoints.back()).Length() < 0.01)
facePoints.push_back(nextEdge->points.at(1));
else
facePoints.push_back(nextEdge->points.at(0));
}
facePoints.push_back(facePoints.front());
// We calculate the area, using triangles. Each having one point at (0/0).
faceArea = 0.0;
xCenter = xCenter + facePoints[0].x;
yCenter = yCenter + facePoints[0].y;
for (long unsigned int n = 0; n < facePoints.size() - 1; n++)
{
faceArea = faceArea + facePoints[n].x * facePoints[n+1].y -
facePoints[n].y * facePoints[n+1].x;
xCenter = xCenter + facePoints[n+1].x;
yCenter = yCenter + facePoints[n+1].y;
}
faceArea = abs(faceArea)/2.0;
totalArea = totalArea + faceArea;
totalPoints = totalPoints + facePoints.size();
}
}
// if area calculation was successfull, wie start the command
Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Calculate Face Area"));
// at first we create the balloon
std::string balloonName = _createBalloon(this, objFeat);
TechDraw::DrawViewBalloon* balloon = nullptr;
balloon = dynamic_cast<TechDraw::DrawViewBalloon *>(this->getDocument()->getObject(balloonName.c_str()));
if (!balloon)
throw Base::TypeError("CmdTechDrawNewBalloon - balloon not found\n");
// the balloon has been created successfull
// we calculate needed variables
double scale = objFeat->getScale();
totalArea = totalArea*10*10; // Todo: get factor cm->mm if cm set
std::stringstream balloonText;
balloonText << " " << totalArea << " cm2 ";
xCenter = (xCenter/totalPoints)/scale;
yCenter = (yCenter/totalPoints)/scale;
// we set the attributes in the data tab's fields
balloon->SourceView.setValue(objFeat);
balloon->BubbleShape.setValue("Rectangle");
balloon->EndType.setValue("None");
balloon->KinkLength.setValue(0.0);
balloon->X.setValue(xCenter);
balloon->Y.setValue(-yCenter);
balloon->OriginX.setValue(xCenter);
balloon->OriginY.setValue(-yCenter);
balloon->ShapeScale.setValue(0.75);
balloon->ScaleType.setValue("Page");
balloon->Text.setValue(balloonText.str());
// we look for the ballons's view provider
TechDraw::DrawPage* page = objFeat->findParentPage();
Gui::Document* guiDoc = Gui::Application::Instance->getDocument(page->getDocument());
auto viewProvider = static_cast<ViewProviderBalloon*>(guiDoc->getViewProvider(balloon));
if (viewProvider)
{
// view provider successfull found,
// we set the attributes in the view tab's fields
viewProvider->Fontsize.setValue(2.0);
viewProvider->LineWidth.setValue(0.75);
viewProvider->LineVisible.setValue(false);
viewProvider->Color.setValue(App::Color(1.0f, 0.0f, 0.0f));
}
Gui::Command::commitCommand();
objFeat->touch(true);
Gui::Command::updateActive();
}
bool CmdTechDrawExtensionAreaAnnotation::isActive(void)
{
bool havePage = DrawGuiUtil::needPage(this);
bool haveView = DrawGuiUtil::needView(this);
return (havePage && haveView);
}
//===========================================================================
// internal helper routines
//===========================================================================
@@ -1663,6 +1781,23 @@ namespace TechDrawGui {
return attributes;
}
std::string _createBalloon(Gui::Command* cmd, TechDraw::DrawViewPart* objFeat)
// create a new balloon, return it's name as string
{
TechDraw::DrawPage* page = objFeat->findParentPage();
page->balloonParent = objFeat;
Gui::Document* guiDoc = Gui::Application::Instance->getDocument(page->getDocument());
ViewProviderPage* pageVP = dynamic_cast<ViewProviderPage*>(guiDoc->getViewProvider(page));
QGVPage* viewPage = pageVP->getGraphicsView();
std::string featName = viewPage->getDrawPage()->getDocument()->getUniqueObjectName("Balloon");
std::string pageName = viewPage->getDrawPage()->getNameInDocument();
cmd->doCommand(cmd->Doc, "App.activeDocument().addObject('TechDraw::DrawViewBalloon','%s')",
featName.c_str());
cmd->doCommand(cmd->Doc, "App.activeDocument().%s.addView(App.activeDocument().%s)",
pageName.c_str(), featName.c_str());
return featName;
}
bool _checkSel(Gui::Command* cmd,
std::vector<Gui::SelectionObject>& selection,
TechDraw::DrawViewPart*& objFeat,
@@ -1964,4 +2099,5 @@ void CreateTechDrawCommandsExtensions(void)
rcCmdMgr.addCommand(new CmdTechDrawExtensionThreadBoltSide());
rcCmdMgr.addCommand(new CmdTechDrawExtensionThreadHoleBottom());
rcCmdMgr.addCommand(new CmdTechDrawExtensionThreadBoltBottom());
rcCmdMgr.addCommand(new CmdTechDrawExtensionAreaAnnotation());
}

View File

@@ -63,6 +63,7 @@
<file>icons/TechDraw_ExtensionCreateLengthArc.svg</file>
<file>icons/TechDraw_ExtensionIncreaseDecimal.svg</file>
<file>icons/TechDraw_ExtensionDecreaseDecimal.svg</file>
<file>icons/TechDraw_ExtensionAreaAnnotation.svg</file>
<file>icons/TechDraw_LengthDimension.svg</file>
<file>icons/TechDraw_RadiusDimension.svg</file>
<file>icons/TechDraw_Balloon.svg</file>

View File

@@ -0,0 +1,217 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
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:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="32"
height="32"
viewBox="0 0 8.4666665 8.466667"
version="1.1"
id="svg4254"
inkscape:version="0.92.2 (5c3e80d, 2017-08-06)"
sodipodi:docname="insert_polygon_area_annotation.svg">
<defs
id="defs4248" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="7.9999999"
inkscape:cx="4.4425745"
inkscape:cy="14.474994"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="false"
units="px"
inkscape:pagecheckerboard="true"
inkscape:snap-nodes="false"
inkscape:snap-others="false"
inkscape:window-width="1366"
inkscape:window-height="745"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
showguides="false" />
<metadata
id="metadata4251">
<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
inkscape:label="Livello 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-288.53332)">
<flowRoot
xml:space="preserve"
id="flowRoot894"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:24px;line-height:25px;font-family:Technic;-inkscape-font-specification:Technic;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none"
transform="matrix(0.26458333,0,0,0.26458333,0,280.06665)"><flowRegion
id="flowRegion896"><rect
id="rect898"
width="26.428572"
height="30"
x="-71.428574"
y="-8.1428566" /></flowRegion><flowPara
id="flowPara900" /></flowRoot> <flowRoot
xml:space="preserve"
id="flowRoot938"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:24px;line-height:25px;font-family:Technic;-inkscape-font-specification:Technic;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none"
transform="matrix(0.26458333,0,0,0.26458333,0,280.06665)"><flowRegion
id="flowRegion940"><rect
id="rect942"
width="30"
height="29.642857"
x="-88.928574"
y="-21.357141" /></flowRegion><flowPara
id="flowPara944" /></flowRoot> <g
id="g858"
transform="matrix(0.49549218,0,0,0.49549218,0.00539183,149.76634)">
<flowRoot
transform="matrix(0.21574441,0,0,0.22374542,16.082768,293.47649)"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:48px;line-height:25px;font-family:Arial;-inkscape-font-specification:'Arial, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#ff0000;fill-opacity:1;stroke:none"
id="flowRoot946"
xml:space="preserve"><flowRegion
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:48px;font-family:Arial;-inkscape-font-specification:'Arial, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:center;writing-mode:lr-tb;text-anchor:middle;fill:#ff0000"
id="flowRegion948"><rect
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:48px;font-family:Arial;-inkscape-font-specification:'Arial, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:center;writing-mode:lr-tb;text-anchor:middle;fill:#ff0000"
y="-29.571428"
x="-55.714287"
height="42.356422"
width="36.717514"
id="rect950" /></flowRegion><flowPara
id="flowPara952">A</flowPara></flowRoot> <flowRoot
transform="matrix(0.26458333,0,0,0.26458333,32.841429,288.67506)"
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:21.33333397px;line-height:25px;font-family:Arial;-inkscape-font-specification:'Arial, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#ff0000;fill-opacity:1;stroke:none"
id="flowRoot954"
xml:space="preserve"><flowRegion
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:21.33333397px;font-family:Arial;-inkscape-font-specification:'Arial, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:center;writing-mode:lr-tb;text-anchor:middle;fill:#ff0000"
id="flowRegion956"><rect
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:21.33333397px;font-family:Arial;-inkscape-font-specification:'Arial, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:center;writing-mode:lr-tb;text-anchor:middle;fill:#ff0000"
y="-21.714285"
x="-90.714287"
height="31.785713"
width="22.5"
id="rect958" /></flowRegion><flowPara
id="flowPara960">2</flowPara></flowRoot> <rect
y="281.52188"
x="2.447396"
height="0.66145831"
width="11.840104"
id="rect848"
style="opacity:1;fill:#ff0000;fill-opacity:1;fill-rule:nonzero;stroke:#ff0000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:30.95351028;stroke-opacity:1;paint-order:markers fill stroke" />
<rect
transform="rotate(-90)"
y="1.6867191"
x="-294.4534"
height="0.66145831"
width="11.840104"
id="rect852"
style="opacity:1;fill:#ff0000;fill-opacity:1;fill-rule:nonzero;stroke:#ff0000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:30.95351028;stroke-opacity:1;paint-order:markers fill stroke" />
<rect
style="opacity:1;fill:#ff0000;fill-opacity:1;fill-rule:nonzero;stroke:#ff0000;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:30.95351028;stroke-opacity:1;paint-order:markers fill stroke"
id="rect854"
width="11.840104"
height="0.66145831"
x="-294.38724"
y="14.982031"
transform="rotate(-90)" />
<rect
transform="rotate(90)"
style="opacity:1;fill:#ffff00;fill-opacity:1;fill-rule:nonzero;stroke:#2b2200;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect1001"
width="1.5165098"
height="13.288458"
x="294.22427"
y="-15.077822" />
<rect
y="-15.077822"
x="281.2597"
height="13.288458"
width="1.5165098"
id="rect862"
style="opacity:1;fill:#ffff00;fill-opacity:1;fill-rule:nonzero;stroke:#2b2200;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
transform="rotate(90)" />
<rect
y="-295.2106"
x="-15.872576"
height="13.288458"
width="1.5165098"
id="rect870"
style="opacity:1;fill:#ffff00;fill-opacity:1;fill-rule:nonzero;stroke:#2b2200;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
transform="scale(-1)" />
<rect
transform="scale(-1)"
style="opacity:1;fill:#ffff00;fill-opacity:1;fill-rule:nonzero;stroke:#2b2200;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
id="rect872"
width="1.5165098"
height="13.288458"
x="-2.775701"
y="-295.2106" />
<path
sodipodi:open="true"
d="M 0.34809558,295.15181 A 1.7218912,1.6888183 0 0 1 2.0717232,293.4653 a 1.7218912,1.6888183 0 0 1 1.7201527,1.68992 a 1.7218912,1.6888183 0 0 1 -1.7224167,1.68771 a 1.7218912,1.6888183 0 0 1 -1.72136521,-1.68874"
sodipodi:end="3.1415461"
sodipodi:start="3.142954"
sodipodi:ry="1.6888183"
sodipodi:rx="1.7218912"
sodipodi:cy="295.15411"
sodipodi:cx="2.0699852"
sodipodi:type="arc"
id="path838"
style="opacity:1;fill:#ffff00;fill-opacity:1;fill-rule:nonzero;stroke:#2b2200;stroke-width:0.64999998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:30.95351028;stroke-opacity:1;paint-order:markers fill stroke" />
<path
sodipodi:open="true"
d="m 13.227068,295.0133 a 1.7218912,1.6888183 0 0 1 1.723627,-1.68652 a 1.7218912,1.6888183 0 0 1 1.720153,1.68992 a 1.7218912,1.6888183 0 0 1 -1.722416,1.68771 a 1.7218912,1.6888183 0 0 1 -1.721366,-1.68874"
sodipodi:end="3.1415461"
sodipodi:start="3.142954"
sodipodi:ry="1.6888183"
sodipodi:rx="1.7218912"
sodipodi:cy="295.01559"
sodipodi:cx="14.948957"
sodipodi:type="arc"
id="path838-9"
style="opacity:1;fill:#ffff00;fill-opacity:1;fill-rule:nonzero;stroke:#2b2200;stroke-width:0.64999998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:30.95351028;stroke-opacity:1;paint-order:markers fill stroke" />
<path
sodipodi:open="true"
d="m 0.32863061,282.04873 a 1.7218912,1.6888183 0 0 1 1.72362759,-1.68652 a 1.7218912,1.6888183 0 0 1 1.7201528,1.68993 a 1.7218912,1.6888183 0 0 1 -1.7224167,1.6877 A 1.7218912,1.6888183 0 0 1 0.32862902,282.0511"
sodipodi:end="3.1415461"
sodipodi:start="3.142954"
sodipodi:ry="1.6888183"
sodipodi:rx="1.7218912"
sodipodi:cy="282.05103"
sodipodi:cx="2.0505202"
sodipodi:type="arc"
id="path838-1"
style="opacity:1;fill:#ffff00;fill-opacity:1;fill-rule:nonzero;stroke:#2b2200;stroke-width:0.64999998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:30.95351028;stroke-opacity:1;paint-order:markers fill stroke" />
<path
sodipodi:open="true"
d="m 13.293214,282.11486 a 1.7218912,1.6888183 0 0 1 1.723627,-1.68652 a 1.7218912,1.6888183 0 0 1 1.720153,1.68993 a 1.7218912,1.6888183 0 0 1 -1.722417,1.68771 a 1.7218912,1.6888183 0 0 1 -1.721365,-1.68874"
sodipodi:end="3.1415461"
sodipodi:start="3.142954"
sodipodi:ry="1.6888183"
sodipodi:rx="1.7218912"
sodipodi:cy="282.11716"
sodipodi:cx="15.015103"
sodipodi:type="arc"
id="path838-8"
style="opacity:1;fill:#ffff00;fill-opacity:1;fill-rule:nonzero;stroke:#2b2200;stroke-width:0.64999998;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:30.95351028;stroke-opacity:1;paint-order:markers fill stroke" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -104,6 +104,8 @@ Gui::MenuItem* Workbench::setupMenuBar() const
*toolattrib << "TechDraw_ExtensionCascadeHorizDimension";
*toolattrib << "TechDraw_ExtensionCascadeVertDimension";
*toolattrib << "TechDraw_ExtensionCascadeObliqueDimension";
*toolattrib << "Separator";
*toolattrib << "TechDraw_ExtensionAreaAnnotation";
// extension: centerlines and threading
Gui::MenuItem* toolcenter = new Gui::MenuItem;
@@ -275,6 +277,7 @@ Gui::ToolBarItem* Workbench::setupToolBars() const
// *extattribs << "TechDraw_ExtensionCascadeHorizDimension";
// *extattribs << "TechDraw_ExtensionCascadeVertDimension";
// *extattribs << "TechDraw_ExtensionCascadeObliqueDimension";
*extattribs << "TechDraw_ExtensionAreaAnnotation";
Gui::ToolBarItem *extcenter = new Gui::ToolBarItem(root);
extcenter->setCommand("TechDraw Centerlines");
@@ -410,6 +413,7 @@ Gui::ToolBarItem* Workbench::setupCommandBars() const
// *extattribs << "TechDraw_ExtensionCascadeHorizDimension";
// *extattribs << "TechDraw_ExtensionCascadeVertDimension";
// *extattribs << "TechDraw_ExtensionCascadeObliqueDimension";
*extattribs << "TechDraw_ExtensionAreaAnnotation";
Gui::ToolBarItem *extcenter = new Gui::ToolBarItem(root);
extcenter->setCommand("TechDraw Centerlines");