TechDraw: Implement 'Area' dimension.
This commit is contained in:
@@ -89,6 +89,7 @@ void execAngle(Gui::Command* cmd);
|
||||
void execAngle3Pt(Gui::Command* cmd);
|
||||
void execRadius(Gui::Command* cmd);
|
||||
void execDiameter(Gui::Command* cmd);
|
||||
void execArea(Gui::Command* cmd);
|
||||
|
||||
void execExtent(Gui::Command* cmd, const std::string& dimType);
|
||||
|
||||
@@ -395,7 +396,7 @@ public:
|
||||
|
||||
bool mouseReleaseEvent(QMouseEvent* event) override
|
||||
{
|
||||
//Base::Console().Warning("mouseReleaseEvent TH\n");
|
||||
// Base::Console().Warning("mouseReleaseEvent TH\n");
|
||||
bool finalize = true;
|
||||
|
||||
if (removedRef.hasGeometry()) {
|
||||
@@ -429,7 +430,6 @@ public:
|
||||
}
|
||||
}
|
||||
else {
|
||||
Base::Console().Warning("h4\n");
|
||||
ReferenceVector& selVector = getSelectionVector(addedRef);
|
||||
selVector.push_back(addedRef);
|
||||
|
||||
@@ -464,7 +464,7 @@ public:
|
||||
|
||||
void onSelectionChanged(const Gui::SelectionChanges& msg)
|
||||
{
|
||||
Base::Console().Warning("onSelectionChanged %d - --%s--\n", (int)msg.Type, msg.pSubName);
|
||||
//Base::Console().Warning("onSelectionChanged %d - --%s--\n", (int)msg.Type, msg.pSubName);
|
||||
|
||||
if (msg.Type == Gui::SelectionChanges::ClrSelection) {
|
||||
//clearAndRestartCommand();
|
||||
@@ -568,6 +568,9 @@ protected:
|
||||
|
||||
availableDimension = AvailableDimension::FIRST;
|
||||
|
||||
partFeat = dynamic_cast<TechDraw::DrawViewPart*>(initialSelection[0].getObject());
|
||||
if (!partFeat) { return; }
|
||||
|
||||
// Add the selected elements to their corresponding selection vectors
|
||||
for (auto& ref : initialSelection) {
|
||||
ReferenceVector& selVector = getSelectionVector(ref);
|
||||
@@ -707,7 +710,8 @@ protected:
|
||||
|
||||
GeomSelectionSizes selection(selPoints.size(), selLine.size(), selCircleArc.size(), selEllipseArc.size(), selSplineAndCo.size(), selFaces.size());
|
||||
if (selection.hasFaces()) {
|
||||
makeCts_Faces(selAllowed, pos);
|
||||
if (selection.has1Face()) { makeCts_Faces(selAllowed, pos); }
|
||||
else { return false; } // nothing else with face works
|
||||
}
|
||||
else if (selection.hasPoints()) {
|
||||
if (selection.has1Point()) { selAllowed = true; }
|
||||
@@ -739,15 +743,14 @@ protected:
|
||||
return selAllowed;
|
||||
}
|
||||
|
||||
// TODO
|
||||
void makeCts_Faces(bool& selAllowed, QPoint& pos)
|
||||
{
|
||||
//area
|
||||
if (availableDimension == AvailableDimension::FIRST) {
|
||||
/*restartCommand(QT_TRANSLATE_NOOP("Command", "Add Area dimension"));
|
||||
createAreaDimension(pos);
|
||||
restartCommand(QT_TRANSLATE_NOOP("Command", "Add Area dimension"));
|
||||
createAreaDimension(selFaces[0], pos);
|
||||
selAllowed = true;
|
||||
availableDimension = AvailableDimension::RESET;*/
|
||||
availableDimension = AvailableDimension::RESET;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -997,31 +1000,12 @@ protected:
|
||||
}
|
||||
}
|
||||
|
||||
//TODO
|
||||
void createAreaDimension(QPoint& pos)
|
||||
void createAreaDimension(ReferenceEntry ref, QPoint& pos)
|
||||
{
|
||||
/*// see CmdTechDrawExtensionAreaAnnotation::activated
|
||||
Base::Vector3d center;
|
||||
double totalArea = 0.0;
|
||||
for (auto& ref : selFaces) {
|
||||
TechDraw::FacePtr face = partFeat->getFace(ref.getSubName());
|
||||
if (!face) {
|
||||
continue;
|
||||
}
|
||||
DrawViewDimension* dim = dimMaker(partFeat, "Area", { ref }, {});
|
||||
|
||||
GProp_GProps faceProps;
|
||||
BRepGProp::SurfaceProperties(face->toOccFace(), faceProps);
|
||||
|
||||
double faceArea = faceProps.Mass();
|
||||
totalArea += faceArea;
|
||||
center += faceArea * DrawUtil::toVector3d(faceProps.CentreOfMass());
|
||||
}
|
||||
if (totalArea > 0.0) {
|
||||
center /= totalArea;
|
||||
}
|
||||
|
||||
//function (and file) to create in CommandExtensionPack.h
|
||||
auto* areaBalloon = createAreaBalloon(totalArea, center);*/
|
||||
dims.push_back(dim);
|
||||
moveDimension(pos, dim);
|
||||
}
|
||||
|
||||
void createRadiusDiameterDimension(ReferenceEntry ref, QPoint& pos, bool firstCstr) {
|
||||
@@ -1366,6 +1350,7 @@ public:
|
||||
addCommand("TechDraw_DiameterDimension");
|
||||
addCommand("TechDraw_AngleDimension");
|
||||
addCommand("TechDraw_3PtAngleDimension");
|
||||
addCommand("TechDraw_AreaDimension");
|
||||
addCommand("TechDraw_ExtensionCreateLengthArc");
|
||||
addCommand(); //separator
|
||||
addCommand("TechDraw_HorizontalExtentDimension");
|
||||
@@ -2095,6 +2080,95 @@ void execAngle3Pt(Gui::Command* cmd)
|
||||
positionDimText(dim);
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
// TechDraw_AreaDimension
|
||||
//===========================================================================
|
||||
|
||||
DEF_STD_CMD_A(CmdTechDrawAreaDimension)
|
||||
|
||||
CmdTechDrawAreaDimension::CmdTechDrawAreaDimension()
|
||||
: Command("TechDraw_AreaDimension")
|
||||
{
|
||||
sAppModule = "TechDraw";
|
||||
sGroup = QT_TR_NOOP("TechDraw");
|
||||
sMenuText = QT_TR_NOOP("Insert Area Dimension");
|
||||
sToolTipText = sMenuText;
|
||||
sWhatsThis = "TechDraw_AreaDimension";
|
||||
sStatusTip = sToolTipText;
|
||||
sPixmap = "TechDraw_AreaDimension";
|
||||
}
|
||||
|
||||
void CmdTechDrawAreaDimension::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
Gui::TaskView::TaskDialog* dlg = Gui::Control().activeDialog();
|
||||
if (dlg) {
|
||||
QMessageBox::warning(Gui::getMainWindow(),
|
||||
QObject::tr("Task In Progress"),
|
||||
QObject::tr("Close active task dialog and try again."));
|
||||
return;
|
||||
}
|
||||
|
||||
execArea(this);
|
||||
}
|
||||
|
||||
bool CmdTechDrawAreaDimension::isActive()
|
||||
{
|
||||
bool havePage = DrawGuiUtil::needPage(this);
|
||||
bool haveView = DrawGuiUtil::needView(this);
|
||||
return (havePage && haveView);
|
||||
}
|
||||
|
||||
void execArea(Gui::Command* cmd)
|
||||
{
|
||||
bool result = _checkDrawViewPart(cmd);
|
||||
if (!result) {
|
||||
QMessageBox::warning(Gui::getMainWindow(),
|
||||
QObject::tr("Incorrect selection"),
|
||||
QObject::tr("No View of a Part in selection."));
|
||||
return;
|
||||
}
|
||||
|
||||
ReferenceVector references2d;
|
||||
ReferenceVector references3d;
|
||||
TechDraw::DrawViewPart* partFeat =
|
||||
TechDraw::getReferencesFromSelection(references2d, references3d);
|
||||
|
||||
//Define the geometric configuration required for a length dimension
|
||||
StringVector acceptableGeometry({"Face"});
|
||||
std::vector<int> minimumCounts({1});
|
||||
std::vector<DimensionGeometryType> acceptableDimensionGeometrys({isFace});
|
||||
|
||||
//what 2d geometry configuration did we receive?
|
||||
DimensionGeometryType geometryRefs2d = validateDimSelection(
|
||||
references2d, acceptableGeometry, minimumCounts, acceptableDimensionGeometrys);
|
||||
if (geometryRefs2d == TechDraw::isInvalid) {
|
||||
QMessageBox::warning(Gui::getMainWindow(),
|
||||
QObject::tr("Incorrect Selection"),
|
||||
QObject::tr("Can not make 2d angle dimension from selection"));
|
||||
return;
|
||||
}
|
||||
|
||||
//what 3d geometry configuration did we receive?
|
||||
DimensionGeometryType geometryRefs3d;
|
||||
if (geometryRefs2d == TechDraw::isViewReference && !references3d.empty()) {
|
||||
geometryRefs3d = validateDimSelection3d(partFeat,
|
||||
references3d,
|
||||
acceptableGeometry,
|
||||
minimumCounts,
|
||||
acceptableDimensionGeometrys);
|
||||
if (geometryRefs3d == TechDraw::isInvalid) {
|
||||
QMessageBox::warning(Gui::getMainWindow(),
|
||||
QObject::tr("Incorrect Selection"),
|
||||
QObject::tr("Can not make 3d angle dimension from selection"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//build the dimension
|
||||
dimensionMaker(partFeat, "Area", references2d, references3d);
|
||||
}
|
||||
|
||||
|
||||
// TechDraw_LinkDimension is DEPRECATED. Use TechDraw_DimensionRepair instead.
|
||||
//! link 3D geometry to Dimension(s) on a Page
|
||||
@@ -2593,6 +2667,7 @@ void CreateTechDrawCommandsDims()
|
||||
rcCmdMgr.addCommand(new CmdTechDrawVerticalDimension());
|
||||
rcCmdMgr.addCommand(new CmdTechDrawAngleDimension());
|
||||
rcCmdMgr.addCommand(new CmdTechDraw3PtAngleDimension());
|
||||
rcCmdMgr.addCommand(new CmdTechDrawAreaDimension());
|
||||
rcCmdMgr.addCommand(new CmdTechDrawExtentGroup());
|
||||
rcCmdMgr.addCommand(new CmdTechDrawVerticalExtentDimension());
|
||||
rcCmdMgr.addCommand(new CmdTechDrawHorizontalExtentDimension());
|
||||
@@ -2646,8 +2721,7 @@ DrawViewDimension* dimMaker(TechDraw::DrawViewPart* dvp, std::string dimType,
|
||||
dimName.c_str(),
|
||||
"Projected");
|
||||
|
||||
auto* dim =
|
||||
dynamic_cast<TechDraw::DrawViewDimension*>(dvp->getDocument()->getObject(dimName.c_str()));
|
||||
auto* dim = dynamic_cast<TechDraw::DrawViewDimension*>(dvp->getDocument()->getObject(dimName.c_str()));
|
||||
if (!dim) {
|
||||
throw Base::TypeError("CmdTechDrawNewDiameterDimension - dim not found\n");
|
||||
}
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
# include <QApplication>
|
||||
# include <QMessageBox>
|
||||
# include <sstream>
|
||||
# include <BRepGProp.hxx>
|
||||
# include <GProp_GProps.hxx>
|
||||
#endif
|
||||
|
||||
# include <App/Document.h>
|
||||
|
||||
@@ -116,7 +116,7 @@ DimensionGeometryType TechDraw::validateDimSelection(
|
||||
StringVector subNames;
|
||||
TechDraw::DrawViewPart* dvpSave(nullptr);
|
||||
for (auto& ref : references) {
|
||||
TechDraw::DrawViewPart* dvp = dynamic_cast<TechDraw::DrawViewPart*>(ref.getObject());
|
||||
auto* dvp = dynamic_cast<TechDraw::DrawViewPart*>(ref.getObject());
|
||||
if (dvp) {
|
||||
dvpSave = dvp;
|
||||
if (!ref.getSubName().empty()) {
|
||||
@@ -295,6 +295,10 @@ DimensionGeometryType TechDraw::getGeometryConfiguration(ReferenceVector valid2d
|
||||
if (config > isInvalid) {
|
||||
return config;
|
||||
}
|
||||
config = isValidSingleFace(valid2dReferences.front());
|
||||
if (config > isInvalid) {
|
||||
return config;
|
||||
}
|
||||
|
||||
// no valid configuration found
|
||||
return isInvalid;
|
||||
@@ -336,6 +340,10 @@ DimensionGeometryType TechDraw::getGeometryConfiguration3d(DrawViewPart* dvp,
|
||||
if (config > isInvalid) {
|
||||
return config;
|
||||
}
|
||||
config = isValidSingleFace3d(dvp, valid3dReferences.front());
|
||||
if (config > isInvalid) {
|
||||
return config;
|
||||
}
|
||||
config = isValidHybrid3d(dvp, valid3dReferences);
|
||||
if (config > isInvalid) {
|
||||
return config;
|
||||
@@ -461,6 +469,47 @@ DimensionGeometryType TechDraw::isValidSingleEdge3d(DrawViewPart* dvp, Reference
|
||||
return isInvalid;
|
||||
}
|
||||
|
||||
//! verify that Selection contains a valid Geometry for a single Edge Dimension
|
||||
DimensionGeometryType TechDraw::isValidSingleFace(ReferenceEntry ref)
|
||||
{
|
||||
auto objFeat(dynamic_cast<TechDraw::DrawViewPart*>(ref.getObject()));
|
||||
if (!objFeat) {
|
||||
return isInvalid;
|
||||
}
|
||||
|
||||
//the Name starts with "Edge"
|
||||
std::string geomName = DrawUtil::getGeomTypeFromName(ref.getSubName());
|
||||
if (geomName != "Face") {
|
||||
return isInvalid;
|
||||
}
|
||||
|
||||
auto geom = objFeat->getFace(ref.getSubName());
|
||||
if (!geom) {
|
||||
return isInvalid;
|
||||
}
|
||||
|
||||
return isFace;
|
||||
}
|
||||
|
||||
//! verify that Selection contains a valid Geometry for a single Edge Dimension
|
||||
DimensionGeometryType TechDraw::isValidSingleFace3d(DrawViewPart* dvp, ReferenceEntry ref)
|
||||
{
|
||||
(void)dvp;
|
||||
//the Name starts with "Edge"
|
||||
std::string geomName = DrawUtil::getGeomTypeFromName(ref.getSubName());
|
||||
if (geomName != "Face") {
|
||||
return isInvalid;
|
||||
}
|
||||
|
||||
TopoDS_Shape refShape = ref.getGeometry();
|
||||
if (refShape.IsNull() || refShape.ShapeType() != TopAbs_FACE) {
|
||||
Base::Console().Warning("Geometry for reference is not a face.\n");
|
||||
return isInvalid;
|
||||
}
|
||||
|
||||
return isFace;
|
||||
}
|
||||
|
||||
//! verify that the edge references can make a dimension. Currently only extent
|
||||
//! dimensions support more than 2 edges
|
||||
DimensionGeometryType TechDraw::isValidMultiEdge(ReferenceVector refs)
|
||||
|
||||
@@ -60,6 +60,7 @@ enum DimensionGeometryEnum {
|
||||
isMultiEdge,
|
||||
isZLimited,
|
||||
isHybrid,
|
||||
isFace,
|
||||
isViewReference //never needs to be specified in the acceptable list
|
||||
};
|
||||
|
||||
@@ -89,11 +90,13 @@ bool checkGeometryOccurrences(StringVector subNames, GeomCountMap keyedMinimumCo
|
||||
DimensionGeometryType isValidVertexes(ReferenceVector refs);
|
||||
DimensionGeometryType isValidMultiEdge(ReferenceVector refs);
|
||||
DimensionGeometryType isValidSingleEdge(ReferenceEntry ref);
|
||||
DimensionGeometryType isValidSingleFace(ReferenceEntry ref);
|
||||
DimensionGeometryType isValidHybrid(ReferenceVector refs);
|
||||
|
||||
DimensionGeometryType isValidVertexes3d(DrawViewPart* dvp, ReferenceVector refs);
|
||||
DimensionGeometryType isValidMultiEdge3d(DrawViewPart* dvp, ReferenceVector refs);
|
||||
DimensionGeometryType isValidSingleEdge3d(DrawViewPart* dvp, ReferenceEntry ref);
|
||||
DimensionGeometryType isValidSingleFace3d(DrawViewPart* dvp, ReferenceEntry ref);
|
||||
DimensionGeometryType isValidHybrid3d(DrawViewPart* dvp, ReferenceVector refs);
|
||||
|
||||
long int mapGeometryTypeToDimType(long int dimType, DimensionGeometryType geometry2d,
|
||||
|
||||
@@ -717,9 +717,9 @@ void QGIViewDimension::draw()
|
||||
return;
|
||||
}
|
||||
|
||||
TechDraw::DrawViewDimension* dim = dynamic_cast<TechDraw::DrawViewDimension*>(getViewObject());
|
||||
auto* dim = dynamic_cast<TechDraw::DrawViewDimension*>(getViewObject());
|
||||
if (!dim ||//nothing to draw, don't try
|
||||
!dim->isDerivedFrom(TechDraw::DrawViewDimension::getClassTypeId())
|
||||
!dim->isDerivedFrom<TechDraw::DrawViewDimension>()
|
||||
|| !dim->has2DReferences()) {
|
||||
datumLabel->hide();
|
||||
hide();
|
||||
@@ -767,6 +767,9 @@ void QGIViewDimension::draw()
|
||||
else if (strcmp(dimType, "Angle") == 0 || strcmp(dimType, "Angle3Pt") == 0) {
|
||||
drawAngle(dim, vp);
|
||||
}
|
||||
else if (strcmp(dimType, "Area") == 0) {
|
||||
drawArea(dim, vp);
|
||||
}
|
||||
else {
|
||||
Base::Console().Error("QGIVD::draw - this DimensionType is unknown: %s\n", dimType);
|
||||
}
|
||||
@@ -2085,6 +2088,75 @@ void QGIViewDimension::drawRadiusExecutive(const Base::Vector2d& centerPoint,
|
||||
dimLines->setPath(radiusPath);
|
||||
}
|
||||
|
||||
void QGIViewDimension::drawAreaExecutive(const Base::Vector2d& centerPoint, double area,
|
||||
const Base::BoundBox2d& labelRectangle,
|
||||
double centerOverhang, int standardStyle,
|
||||
int renderExtent, bool flipArrow) const
|
||||
{
|
||||
QPainterPath areaPath;
|
||||
|
||||
Base::Vector2d labelCenter(labelRectangle.GetCenter());
|
||||
double labelAngle = 0.0;
|
||||
|
||||
if (standardStyle == ViewProviderDimension::STD_STYLE_ISO_REFERENCING
|
||||
|| standardStyle == ViewProviderDimension::STD_STYLE_ASME_REFERENCING) {
|
||||
// The dimensional value text must stay horizontal
|
||||
|
||||
bool left = labelCenter.x < centerPoint.x;
|
||||
|
||||
Base::Vector2d jointDirection;
|
||||
if (standardStyle == ViewProviderDimension::STD_STYLE_ISO_REFERENCING) {
|
||||
jointDirection = getIsoRefJointPoint(labelRectangle, left) - centerPoint;
|
||||
}
|
||||
else {
|
||||
jointDirection = getAsmeRefJointPoint(labelRectangle, left) - centerPoint;
|
||||
}
|
||||
|
||||
double lineAngles = jointDirection.Angle();
|
||||
double jointPositions = jointDirection.Length();
|
||||
|
||||
drawDimensionLine(areaPath, centerPoint, lineAngles, 0.0,
|
||||
jointPositions, labelRectangle, 1, standardStyle, flipArrow);
|
||||
|
||||
Base::Vector2d outsetPoint(standardStyle == ViewProviderDimension::STD_STYLE_ISO_REFERENCING
|
||||
? getIsoRefOutsetPoint(labelRectangle, left)
|
||||
: getAsmeRefOutsetPoint(labelRectangle, left));
|
||||
|
||||
areaPath.moveTo(toQtGui(outsetPoint));
|
||||
areaPath.lineTo(toQtGui(centerPoint + jointDirection));
|
||||
}
|
||||
else if (standardStyle == ViewProviderDimension::STD_STYLE_ISO_ORIENTED) {
|
||||
// We may rotate the label so no reference line is needed
|
||||
double lineAngle;
|
||||
double devAngle = computeLineAndLabelAngles(centerPoint, labelCenter,
|
||||
labelRectangle.Height() * 0.5 + getIsoDimensionLineSpacing(),
|
||||
lineAngle, labelAngle);
|
||||
|
||||
lineAngle = lineAngle - M_PI;
|
||||
double labelPosition = -cos(devAngle) * ((labelCenter - centerPoint).Length());
|
||||
|
||||
drawDimensionLine(areaPath, centerPoint, lineAngle, 0.0, labelPosition, labelRectangle, 1, standardStyle, flipArrow);
|
||||
}
|
||||
else if (standardStyle == ViewProviderDimension::STD_STYLE_ASME_INLINED) {
|
||||
// Text must remain horizontal, but it may split the leader line
|
||||
Base::Vector2d labelDirection(labelCenter - centerPoint);
|
||||
double lineAngle = labelDirection.Angle();
|
||||
double labelPosition = labelDirection.Length();
|
||||
|
||||
drawDimensionLine(areaPath, centerPoint, lineAngle, 0.0, labelPosition, labelRectangle, 1, standardStyle, flipArrow);
|
||||
}
|
||||
else {
|
||||
Base::Console().Error(
|
||||
"QGIVD::drawRadiusExecutive - this Standard&Style is not supported: %d\n",
|
||||
standardStyle);
|
||||
}
|
||||
|
||||
datumLabel->setTransformOriginPoint(datumLabel->boundingRect().center());
|
||||
datumLabel->setRotation(toQtDeg(labelAngle));
|
||||
|
||||
dimLines->setPath(areaPath);
|
||||
}
|
||||
|
||||
void QGIViewDimension::drawDistance(TechDraw::DrawViewDimension* dimension,
|
||||
ViewProviderDimension* viewProvider) const
|
||||
{
|
||||
@@ -2510,6 +2582,21 @@ void QGIViewDimension::drawAngle(TechDraw::DrawViewDimension* dimension,
|
||||
dimLines->setPath(anglePath);
|
||||
}
|
||||
|
||||
void QGIViewDimension::drawArea(TechDraw::DrawViewDimension* dimension,
|
||||
ViewProviderDimension* viewProvider) const
|
||||
{
|
||||
Base::BoundBox2d labelRectangle(
|
||||
fromQtGui(mapRectFromItem(datumLabel, datumLabel->boundingRect())));
|
||||
areaPoint areaPoint = dimension->getAreaPoint();
|
||||
|
||||
double endAngle;
|
||||
double startRotation;
|
||||
|
||||
drawAreaExecutive(
|
||||
fromQtApp(areaPoint.center), areaPoint.area, labelRectangle, 0.0, viewProvider->StandardAndStyle.getValue(),
|
||||
viewProvider->RenderingExtent.getValue(), viewProvider->FlipArrowheads.getValue());
|
||||
}
|
||||
|
||||
QColor QGIViewDimension::prefNormalColor()
|
||||
{
|
||||
setNormalColor(PreferencesGui::getAccessibleQColor(PreferencesGui::dimQColor()));
|
||||
|
||||
@@ -261,10 +261,14 @@ protected:
|
||||
double endAngle, double startRotation, const Base::BoundBox2d &labelRectangle,
|
||||
double centerOverhang, int standardStyle, int renderExtent, bool flipArrow) const;
|
||||
|
||||
void drawAreaExecutive(const Base::Vector2d ¢erPoint, double area, const Base::BoundBox2d &labelRectangle,
|
||||
double centerOverhang, int standardStyle, int renderExtent, bool flipArrow) const;
|
||||
|
||||
void drawDistance(TechDraw::DrawViewDimension *dimension, ViewProviderDimension *viewProvider) const;
|
||||
void drawRadius(TechDraw::DrawViewDimension *dimension, ViewProviderDimension *viewProvider) const;
|
||||
void drawDiameter(TechDraw::DrawViewDimension *dimension, ViewProviderDimension *viewProvider) const;
|
||||
void drawAngle(TechDraw::DrawViewDimension *dimension, ViewProviderDimension *viewProvider) const;
|
||||
void drawArea(TechDraw::DrawViewDimension *dimension, ViewProviderDimension *viewProvider) const;
|
||||
|
||||
QVariant itemChange( GraphicsItemChange change,
|
||||
const QVariant &value ) override;
|
||||
|
||||
@@ -86,6 +86,7 @@
|
||||
<file>icons/square.svg</file>
|
||||
<file>icons/TechDraw_3PtAngleDimension.svg</file>
|
||||
<file>icons/TechDraw_AngleDimension.svg</file>
|
||||
<file>icons/TechDraw_AreaDimension.svg</file>
|
||||
<file>icons/TechDraw_Balloon.svg</file>
|
||||
<file>icons/TechDraw_CameraOrientation.svg</file>
|
||||
<file>icons/TechDraw_DiameterDimension.svg</file>
|
||||
|
||||
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 5.5 KiB |
@@ -196,6 +196,8 @@ void ViewProviderDimension::setPixmapForType()
|
||||
sPixmap = "TechDraw_AngleDimension";
|
||||
} else if (getViewObject()->Type.isValue("Angle3Pt")) {
|
||||
sPixmap = "TechDraw_3PtAngleDimension";
|
||||
} else if (getViewObject()->Type.isValue("Area")) {
|
||||
sPixmap = "TechDraw_ExtensionAreaAnnotation";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -91,6 +91,7 @@ Gui::MenuItem* Workbench::setupMenuBar() const
|
||||
*dimensions << "TechDraw_DiameterDimension";
|
||||
*dimensions << "TechDraw_AngleDimension";
|
||||
*dimensions << "TechDraw_3PtAngleDimension";
|
||||
*dimensions << "TechDraw_AreaDimension";
|
||||
*dimensions << "TechDraw_HorizontalExtentDimension";
|
||||
*dimensions << "TechDraw_VerticalExtentDimension";
|
||||
// TechDraw_LinkDimension is DEPRECATED. Use TechDraw_DimensionRepair instead.
|
||||
@@ -327,6 +328,7 @@ Gui::ToolBarItem* Workbench::setupToolBars() const
|
||||
*dims << "TechDraw_DiameterDimension";
|
||||
*dims << "TechDraw_AngleDimension";
|
||||
*dims << "TechDraw_3PtAngleDimension";
|
||||
*dims << "TechDraw_AreaDimension";
|
||||
*dims << "TechDraw_ExtentGroup";
|
||||
}
|
||||
|
||||
@@ -346,8 +348,8 @@ Gui::ToolBarItem* Workbench::setupToolBars() const
|
||||
*extattribs << "TechDraw_ExtensionPositionSectionView";
|
||||
*extattribs << "TechDraw_ExtensionPosChainDimensionGroup";
|
||||
*extattribs << "TechDraw_ExtensionCascadeDimensionGroup";
|
||||
*extattribs << "TechDraw_ExtensionAreaAnnotation";
|
||||
if (separatedTools) {
|
||||
*extattribs << "TechDraw_ExtensionAreaAnnotation";
|
||||
*extattribs << "TechDraw_ExtensionArcLengthAnnotation";
|
||||
}
|
||||
*extattribs << "TechDraw_ExtensionCustomizeFormat";
|
||||
|
||||
Reference in New Issue
Block a user