PD(hole taskpanel): Add image-based hole cut panel

* feat(PD): hole taskpanel: new image based cut panel
* fix(PD): hole taskpanel fix dynamic cut types
* refactor(PD): hole taskpanel: renames and vlayouts to keep labels closer
* fix(PD): hole diagram tweaks
This commit is contained in:
Alfredo Monclus
2025-01-20 16:50:51 -03:00
committed by Chris Hennes
parent ee2f327a96
commit be3ce13a7c
19 changed files with 2167 additions and 763 deletions

View File

@@ -1136,6 +1136,8 @@ SET(Widget_CPP_SRCS
Widgets.cpp
Window.cpp
WorkbenchSelector.cpp
ElideLabel.cpp
ElideCheckBox.cpp
)
SET(Widget_HPP_SRCS
FileDialog.h
@@ -1157,6 +1159,8 @@ SET(Widget_HPP_SRCS
Widgets.h
Window.h
WorkbenchSelector.h
ElideLabel.h
ElideCheckBox.h
)
SET(Widget_SRCS
${Widget_CPP_SRCS}

68
src/Gui/ElideCheckBox.cpp Normal file
View File

@@ -0,0 +1,68 @@
/***************************************************************************
* Copyright (c) 2025 Alfredo Monclus <alfredomonclus@gmail.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., 51 Franklin Street, *
* Fifth Floor, Boston, MA 02110-1301, USA *
* *
***************************************************************************/
// This custom widget adds the missing ellipsize functionality in QT5
#include "ElideCheckBox.h"
const int CheckboxSpacing = 25;
ElideCheckBox::ElideCheckBox(QWidget *parent)
: QCheckBox(parent) {
}
void ElideCheckBox::paintEvent(QPaintEvent *event) {
Q_UNUSED(event);
QStyleOptionButton option;
option.initFrom(this);
option.state = (isChecked() ? QStyle::State_On : QStyle::State_Off) |
(isEnabled() ? QStyle::State_Enabled : QStyle::State_ReadOnly);
QPainter painter(this);
style()->drawControl(QStyle::CE_CheckBox, &option, &painter, this);
QRect textRect = option.rect;
int padding = 4;
textRect.setX(textRect.x() + 25);
QFontMetrics fm(font());
QString elidedText = fm.elidedText(text(), Qt::ElideRight, textRect.width() - padding);
painter.setPen(palette().color(QPalette::WindowText));
painter.drawText(textRect, Qt::AlignLeft | Qt::AlignVCenter, elidedText);
}
QSize ElideCheckBox::sizeHint() const {
QFontMetrics fm(font());
int width = fm.horizontalAdvance(this->text()) + CheckboxSpacing;
int height = fm.height();
return QSize(width, height);
}
QSize ElideCheckBox::minimumSizeHint() const {
QFontMetrics fm(font());
QString minimumText = QStringLiteral("A...");
int width = fm.horizontalAdvance(minimumText) + CheckboxSpacing;
int height = fm.height();
return QSize(width, height);
}

51
src/Gui/ElideCheckBox.h Normal file
View File

@@ -0,0 +1,51 @@
/***************************************************************************
* Copyright (c) 2025 Alfredo Monclus <alfredomonclus@gmail.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., 51 Franklin Street, *
* Fifth Floor, Boston, MA 02110-1301, USA *
* *
***************************************************************************/
// This custom widget adds the missing ellipsize functionality in QT5
#ifndef ELIDECHECKBOX_H
#define ELIDECHECKBOX_H
#include "PreCompiled.h"
#ifndef _PreComp_
#include <QCheckBox>
#include <QPainter>
#include <QFontMetrics>
#include <QStyleOptionButton>
#endif
class ElideCheckBox : public QCheckBox {
Q_OBJECT
public:
explicit ElideCheckBox(QWidget *parent = nullptr);
~ElideCheckBox() override = default;
protected:
void paintEvent(QPaintEvent *event) override;
QSize sizeHint() const override;
QSize minimumSizeHint() const override;
};
#endif // ELIDECHECKBOX_H

59
src/Gui/ElideLabel.cpp Normal file
View File

@@ -0,0 +1,59 @@
/***************************************************************************
* Copyright (c) 2025 Alfredo Monclus <alfredomonclus@gmail.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., 51 Franklin Street, *
* Fifth Floor, Boston, MA 02110-1301, USA *
* *
***************************************************************************/
// This custom widget adds the missing ellipsize functionality in QT5
#include "ElideLabel.h"
ElideLabel::ElideLabel(QWidget *parent)
: QLabel(parent) {
}
void ElideLabel::paintEvent(QPaintEvent *event) {
Q_UNUSED(event);
QPainter painter(this);
painter.setPen(palette().color(QPalette::WindowText));
painter.setFont(font());
QFontMetrics fm(font());
QString text = this->text();
int availableWidth = width() - 4; // Account for padding
QString elidedText = fm.elidedText(text, Qt::ElideRight, availableWidth);
painter.drawText(2, 2, availableWidth, height(), Qt::AlignLeft | Qt::AlignVCenter, elidedText);
}
QSize ElideLabel::sizeHint() const {
QFontMetrics fm(font());
int width = fm.horizontalAdvance(this->text());
int height = fm.height();
return QSize(width, height);
}
QSize ElideLabel::minimumSizeHint() const {
QFontMetrics fm(font());
QString minimumText = QStringLiteral("A...");
int width = fm.horizontalAdvance(minimumText);
int height = fm.height();
return QSize(width, height);
}

49
src/Gui/ElideLabel.h Normal file
View File

@@ -0,0 +1,49 @@
/***************************************************************************
* Copyright (c) 2025 Alfredo Monclus <alfredomonclus@gmail.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., 51 Franklin Street, *
* Fifth Floor, Boston, MA 02110-1301, USA *
* *
***************************************************************************/
// This custom widget adds the missing ellipsize functionality in QT5
#ifndef ELIDELABEL_H
#define ELIDELABEL_H
#include "PreCompiled.h"
#ifndef _PreComp_
#include <QLabel>
#include <QPainter>
#include <QFontMetrics>
#endif
class ElideLabel : public QLabel {
Q_OBJECT
public:
explicit ElideLabel(QWidget *parent = nullptr);
~ElideLabel() override = default;
protected:
void paintEvent(QPaintEvent *event) override;
QSize sizeHint() const override;
QSize minimumSizeHint() const override;
};
#endif // ELIDELABEL_H

View File

@@ -834,7 +834,7 @@ QSize QuantitySpinBox::sizeHintCalculator(int h) const
const QFontMetrics fm(fontMetrics());
int w = 0;
constexpr int maxStrLen = 12;
constexpr int maxStrLen = 9;
QString s;
QString fixedContent = QLatin1String(" ");

View File

@@ -107,6 +107,8 @@ public:
void Restore(Base::XMLReader & reader) override;
virtual void updateProps();
bool isDynamicCounterbore(const std::string &thread, const std::string &holeCutType);
bool isDynamicCountersink(const std::string &thread, const std::string &holeCutType);
protected:
void onChanged(const App::Property* prop) override;
@@ -228,8 +230,6 @@ private:
const CutDimensionSet& find_cutDimensionSet(const CutDimensionKey &k);
void addCutType(const CutDimensionSet& dimensions);
bool isDynamicCounterbore(const std::string &thread, const std::string &holeCutType);
bool isDynamicCountersink(const std::string &thread, const std::string &holeCutType);
void updateHoleCutParams();
std::optional<double> determineDiameter() const;
void updateDiameterParam();

View File

@@ -56,5 +56,13 @@
<file>icons/PartDesign_SubtractiveWedge.svg</file>
<file>icons/PartDesign_Thickness.svg</file>
<file>icons/PartDesignWorkbench.svg</file>
<file>images/hole_counterbore_angled.svg</file>
<file>images/hole_counterdrill_angled.svg</file>
<file>images/hole_countersink_angled.svg</file>
<file>images/hole_none_angled.svg</file>
<file>images/hole_counterbore_flat.svg</file>
<file>images/hole_counterdrill_flat.svg</file>
<file>images/hole_countersink_flat.svg</file>
<file>images/hole_none_flat.svg</file>
</qresource>
</RCC>

View File

@@ -0,0 +1,128 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="90"
height="180"
viewBox="0 0 90 180"
version="1.1"
id="svg5"
xml:space="preserve"
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
sodipodi:docname="hole_counterbore_angled.svg"
inkscape:export-filename="hole_counterbore.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"><sodipodi:namedview
id="namedview7"
pagecolor="#2f2f2f"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="px"
showgrid="false"
inkscape:zoom="2.4373738"
inkscape:cx="-43.899709"
inkscape:cy="76.311643"
inkscape:window-width="1600"
inkscape:window-height="824"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="g3619"
showguides="true"><sodipodi:guide
position="-4.1420245,94.999913"
orientation="1,0"
id="guide1501"
inkscape:locked="false" /><sodipodi:guide
position="100.89495,80.036612"
orientation="1,0"
id="guide1530"
inkscape:locked="false" /></sodipodi:namedview><defs
id="defs2" /><g
inkscape:label="Capa 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-101.48917,-143.06709)"><g
id="g1241"
transform="translate(-0.18870399,0.37210001)"><g
id="g3619"
transform="matrix(3.3979922,0,0,3.779528,-225.68321,-396.88302)"
style="stroke-width:0.558085;stroke-dasharray:none"><path
style="fill:none;stroke:#999999;stroke-width:0.558085;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 96.618607,144.94329 11.674273,-7.9e-4 v 2.31582"
id="path476"
sodipodi:nodetypes="ccc" /><path
id="path578"
style="fill:none;stroke:#999999;stroke-width:0.558085;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 98.105312,165.1846 h -1.486705 m 2.971206,-15.21501 h -1.484501 v 3.43776 11.77725"
sodipodi:nodetypes="cccccc" /><path
style="fill:none;stroke:#999999;stroke-width:0.558085;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 112.77462,180.46499 h 8.22936 v -30.36167 h -4.06934"
id="path580"
sodipodi:nodetypes="cccc" /><path
style="fill:none;stroke:#999999;stroke-width:0.558085;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 105.83611,182.18333 v 1.72125 h 4.91358 v -1.72125"
id="path584"
sodipodi:nodetypes="cccc" /><path
style="fill:none;stroke:#ffffff;stroke-width:0.558085;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:0.558085, 2.23234;stroke-dashoffset:0;stop-color:#000000"
d="m 102.13905,150.10329 h 13.01161"
id="path786" /><path
style="fill:none;stroke:#999999;stroke-width:0.558085;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 101.23086,149.29842 v -2.0401 h 14.12404 v 2.0401"
id="path506"
sodipodi:nodetypes="cccc" /><path
style="font-variation-settings:normal;fill:none;fill-opacity:1;stroke:#999999;stroke-width:0.558085;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000"
d="m 98.105312,156.0532 1.484501,-1.1e-4"
id="path1853"
sodipodi:nodetypes="cc" /><path
style="fill:none;stroke:#ffffff;stroke-width:0.558085;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 115.65414,150.06205 -0.007,5.99104 -4.89863,3e-5 v 24.26373 l -2.45611,2.07652 -2.45613,-2.07652 v -24.2638 l -4.91225,4e-5 v -5.74104"
id="path455"
sodipodi:nodetypes="ccccccccc" /><path
style="fill:none;stroke:#999999;stroke-width:0.55808458;stroke-linecap:round;stroke-linejoin:round;stop-color:#000000;stroke-dasharray:none"
d="m 121.00398,158.56062 h 1.17716"
id="path582-6"
sodipodi:nodetypes="cc" /><path
style="fill:none;stroke:#999999;stroke-width:0.558085;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 108.2929,183.90458 v 2.18208 h 14.26387"
id="path586-7"
sodipodi:nodetypes="ccc" /><g
id="g1399"
transform="matrix(0.29429143,0,0,0.2645833,66.416637,105.00864)"><path
style="fill:none;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 114.8787,268.17673 -7.20083,39.51826 h -5"
id="path472"
sodipodi:nodetypes="ccc" /><path
style="fill:none;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 111.18088,264.17674 17.22369,17.22361"
id="path642" /><path
style="fill:none;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 174.68621,264.1767 -17.22369,17.22361"
id="path642-3" /><path
style="fill:none;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
id="path1314"
sodipodi:type="arc"
sodipodi:cx="142.29521"
sodipodi:cy="292.68314"
sodipodi:rx="41.997044"
sodipodi:ry="32.843685"
sodipodi:start="4.0142573"
sodipodi:end="5.4105207"
sodipodi:arc-type="arc"
d="m 115.30003,267.52341 a 41.997044,32.843685 0 0 1 53.99036,0"
sodipodi:open="true" /></g></g><path
style="fill:#000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:2, 8.00001;stroke-dashoffset:0;stop-color:#000000"
d="m 125.63827,142.69499 v 180"
id="path4446" /></g></g><metadata
id="metadata199"><rdf:RDF><cc:Work
rdf:about=""><dc:creator><cc:Agent><dc:title>Alfredo Monclus</dc:title></cc:Agent></dc:creator><dc:rights><cc:Agent><dc:title>FreeCAD LGPL2+</dc:title></cc:Agent></dc:rights><dc:publisher><cc:Agent><dc:title>FreeCAD</dc:title></cc:Agent></dc:publisher></cc:Work></rdf:RDF></metadata></svg>

After

Width:  |  Height:  |  Size: 7.0 KiB

View File

@@ -0,0 +1,99 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="90"
height="180"
viewBox="0 0 90 180"
version="1.1"
id="svg5"
xml:space="preserve"
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
sodipodi:docname="hole_counterbore_flat.svg"
inkscape:export-filename="hole_counterbore.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
id="namedview7"
pagecolor="#2f2f2f"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="px"
showgrid="false"
inkscape:zoom="3.4469671"
inkscape:cx="37.714314"
inkscape:cy="85.582482"
inkscape:window-width="1600"
inkscape:window-height="824"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="g3619"
showguides="true"><sodipodi:guide
position="-4.1420245,94.999913"
orientation="1,0"
id="guide1501"
inkscape:locked="false" /><sodipodi:guide
position="100.89495,80.036612"
orientation="1,0"
id="guide1530"
inkscape:locked="false" /></sodipodi:namedview><defs
id="defs2" /><g
inkscape:label="Capa 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-101.48917,-143.06709)"><g
id="g1241"
transform="translate(-0.18870399,0.37210001)"><g
id="g3619"
transform="matrix(3.3979922,0,0,3.779528,-225.68321,-396.88302)"
style="stroke-width:0.558085;stroke-dasharray:none"><path
style="fill:none;stroke:#999999;stroke-width:0.558085;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 96.618607,144.94329 11.674273,-7.9e-4 v 2.31582"
id="path476"
sodipodi:nodetypes="ccc" /><path
id="path578"
style="fill:none;stroke:#999999;stroke-width:0.558085;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 98.105312,165.1846 h -1.486705 m 2.971206,-15.21501 h -1.484501 v 3.43776 11.77725"
sodipodi:nodetypes="cccccc" /><path
style="fill:none;stroke:#999999;stroke-width:0.558085;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 112.77462,180.46486 8.22936,1.3e-4 v -30.36167 h -4.06934"
id="path580"
sodipodi:nodetypes="cccc" /><path
style="fill:none;stroke:#999999;stroke-width:0.558085;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 105.83611,182.18333 v 1.72125 h 4.91358 v -1.72125"
id="path584"
sodipodi:nodetypes="cccc" /><path
style="fill:none;stroke:#ffffff;stroke-width:0.558085;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:0.558085, 2.23234;stroke-dashoffset:0;stop-color:#000000"
d="m 102.13905,150.10329 h 13.01161"
id="path786" /><path
style="fill:none;stroke:#999999;stroke-width:0.558085;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 101.23086,149.29842 v -2.0401 h 14.12404 v 2.0401"
id="path506"
sodipodi:nodetypes="cccc" /><path
style="font-variation-settings:normal;fill:none;fill-opacity:1;stroke:#999999;stroke-width:0.558085;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000"
d="m 98.105312,156.0532 1.484501,-1.1e-4"
id="path1853"
sodipodi:nodetypes="cc" /><path
style="fill:none;stroke:#ffffff;stroke-width:0.558085;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 115.65414,150.06205 -0.007,5.99104 -4.89863,3e-5 v 24.41174 h -4.91224 v -24.41181 l -4.91225,4e-5 v -5.74104"
id="path455"
sodipodi:nodetypes="cccccccc" /><path
style="fill:none;stroke:#999999;stroke-width:0.55808458;stroke-linecap:round;stroke-linejoin:round;stop-color:#000000;stroke-dasharray:none"
d="m 121.00398,158.56062 h 1.17716"
id="path582-6"
sodipodi:nodetypes="cc" /><path
style="fill:none;stroke:#999999;stroke-width:0.55808458;stroke-linecap:round;stroke-linejoin:round;stop-color:#000000;stroke-dasharray:none"
d="m 108.2929,183.90458 v 2.18208 h 14.26387"
id="path586-7"
sodipodi:nodetypes="ccc" /></g><path
style="fill:#000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:2, 8.00001;stroke-dashoffset:0;stop-color:#000000"
d="m 125.63827,142.69499 v 180"
id="path4446" /></g></g></svg>

After

Width:  |  Height:  |  Size: 5.1 KiB

View File

@@ -0,0 +1,128 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="90"
height="180"
viewBox="0 0 90 180"
version="1.1"
id="svg5"
xml:space="preserve"
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
sodipodi:docname="hole_counterdrill_angled.svg"
inkscape:export-filename="hole_counterbore.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"><sodipodi:namedview
id="namedview7"
pagecolor="#2f2f2f"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="px"
showgrid="false"
inkscape:zoom="4.8747476"
inkscape:cx="-5.7438871"
inkscape:cy="131.69913"
inkscape:window-width="1600"
inkscape:window-height="824"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="g1241"
showguides="true"><sodipodi:guide
position="-4.1420245,94.999913"
orientation="1,0"
id="guide1501"
inkscape:locked="false" /><sodipodi:guide
position="100.89495,80.036612"
orientation="1,0"
id="guide1530"
inkscape:locked="false" /></sodipodi:namedview><defs
id="defs2" /><g
inkscape:label="Capa 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-101.48917,-143.06709)"><g
id="g1241"
transform="translate(-0.18870399,0.37210001)"><path
style="fill:none;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 102.67787,150.9342 39.61728,-0.003 v 8.7527"
id="path476"
sodipodi:nodetypes="ccc" /><path
id="path578"
style="fill:none;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 107.67787,227.4368 h -5 m 10.04433,-57.50556 h -5.04433 v 12.99311 44.51245"
sodipodi:nodetypes="cccccc" /><path
style="fill:none;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 157.52407,285.18897 27.9633,4.9e-4 V 170.43668 h -3.8276"
id="path580"
sodipodi:nodetypes="cccc" /><path
style="fill:none;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 186.30041,242.4001 h 3.98819"
id="path582"
sodipodi:nodetypes="cc" /><path
style="fill:none;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 133.94707,291.68398 v 6.50551 h 16.6963 v -6.50551"
id="path584"
sodipodi:nodetypes="cccc" /><path
style="fill:none;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 142.29522,298.18949 v 22.5055 h 47.99338"
id="path586"
sodipodi:nodetypes="ccc" /><path
style="fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:2, 8.00001;stroke-dashoffset:0;stop-color:#000000"
d="m 121.38449,170.43657 h 44.21334"
id="path786" /><path
style="fill:none;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 118.29846,167.39454 v -7.71062 h 47.99338 v 7.71062"
id="path506"
sodipodi:nodetypes="cccc" /><path
style="font-variation-settings:normal;fill:none;fill-opacity:1;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000"
d="m 170.62493,179.6839 9.88143,-15.57868 h 9.78224"
id="path454"
sodipodi:nodetypes="ccc" /><path
style="font-variation-settings:normal;fill:none;fill-opacity:1;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000"
d="m 107.67787,182.92435 h 5.04433"
id="path1853"
sodipodi:nodetypes="cc" /><path
style="fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 167.30866,170.2807 -0.0238,13.40323 -16.64551,17.50579 v 83.99925 l -8.34584,7.28886 -8.34591,-7.28886 v -83.99952 l -16.69179,-17.50552 v -12.45835"
id="path455"
sodipodi:nodetypes="ccccccccc" /><path
style="fill:#000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:2, 8.00001;stroke-dashoffset:0;stop-color:#000000"
d="m 125.63827,142.69499 v 180"
id="path4446" /><g
id="g1399"><path
style="fill:none;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 114.8787,268.17673 -7.20083,39.51826 h -5"
id="path472"
sodipodi:nodetypes="ccc" /><path
style="fill:none;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stop-color:#000000;stroke-dasharray:none"
d="m 111.18088,264.17674 17.22369,17.22361"
id="path642" /><path
style="fill:none;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stop-color:#000000;stroke-dasharray:none"
d="m 174.68621,264.1767 -17.22369,17.22361"
id="path642-3" /><path
style="fill:none;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
id="path1314"
sodipodi:type="arc"
sodipodi:cx="142.29521"
sodipodi:cy="292.68314"
sodipodi:rx="41.997044"
sodipodi:ry="32.843685"
sodipodi:start="4.0142573"
sodipodi:end="5.4105207"
sodipodi:arc-type="arc"
d="m 115.30003,267.52341 a 41.997044,32.843685 0 0 1 53.99036,0"
sodipodi:open="true" /></g></g></g><metadata
id="metadata1382"><rdf:RDF><cc:Work
rdf:about=""><dc:creator><cc:Agent><dc:title>Alfredo Monclus</dc:title></cc:Agent></dc:creator><dc:rights><cc:Agent><dc:title>FreeCAD LGPL2+</dc:title></cc:Agent></dc:rights><dc:publisher><cc:Agent><dc:title>FreeCAD</dc:title></cc:Agent></dc:publisher></cc:Work></rdf:RDF></metadata></svg>

After

Width:  |  Height:  |  Size: 6.9 KiB

View File

@@ -0,0 +1,105 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="90"
height="180"
viewBox="0 0 90 180"
version="1.1"
id="svg5"
xml:space="preserve"
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
sodipodi:docname="hole_counterdrill_flat.svg"
inkscape:export-filename="hole_counterbore.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"><sodipodi:namedview
id="namedview7"
pagecolor="#2f2f2f"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="px"
showgrid="false"
inkscape:zoom="2.4373738"
inkscape:cx="10.256941"
inkscape:cy="78.363032"
inkscape:window-width="1600"
inkscape:window-height="824"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="g1241"
showguides="true"><sodipodi:guide
position="-4.1420245,94.999913"
orientation="1,0"
id="guide1501"
inkscape:locked="false" /><sodipodi:guide
position="100.89495,80.036612"
orientation="1,0"
id="guide1530"
inkscape:locked="false" /></sodipodi:namedview><defs
id="defs2" /><g
inkscape:label="Capa 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-101.48917,-143.06709)"><g
id="g1241"
transform="translate(-0.18870399,0.37210001)"><path
style="fill:none;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 102.62606,150.9342 39.66909,-0.003 v 8.7527"
id="path476"
sodipodi:nodetypes="ccc" /><path
id="path578"
style="fill:none;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 107.67787,227.4368 h -5.05181 m 10.09614,-57.50556 h -5.04433 v 12.99311 44.51245"
sodipodi:nodetypes="cccccc" /><path
style="fill:none;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 157.52407,285.18897 27.9633,4.9e-4 V 170.43668 h -3.8276"
id="path580"
sodipodi:nodetypes="cccc" /><path
style="fill:none;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 186.30041,242.4001 h 3.98819"
id="path582"
sodipodi:nodetypes="cc" /><path
style="fill:none;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 133.94707,291.68398 v 6.50551 h 16.6963 v -6.50551"
id="path584"
sodipodi:nodetypes="cccc" /><path
style="fill:none;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 142.29522,298.18949 v 22.5055 h 47.99338"
id="path586"
sodipodi:nodetypes="ccc" /><path
style="fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:2, 8.00001;stroke-dashoffset:0;stop-color:#000000"
d="m 121.38449,170.43657 h 44.21334"
id="path786" /><path
style="fill:none;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 118.29846,167.39454 v -7.71062 h 47.99338 v 7.71062"
id="path506"
sodipodi:nodetypes="cccc" /><path
style="font-variation-settings:normal;fill:none;fill-opacity:1;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000"
d="m 170.62493,179.6839 9.88143,-15.57868 h 9.78224"
id="path454"
sodipodi:nodetypes="ccc" /><path
style="font-variation-settings:normal;fill:none;fill-opacity:1;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000"
d="m 107.67787,182.92435 h 5.04433"
id="path1853"
sodipodi:nodetypes="cc" /><path
style="fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 167.30866,170.2807 -0.0238,13.40323 -16.64551,17.50579 v 83.99925 H 133.9476 v -83.99952 l -16.69179,-17.50552 v -12.45835"
id="path455"
sodipodi:nodetypes="cccccccc" /><path
style="fill:#000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:2, 8.00001;stroke-dashoffset:0;stop-color:#000000"
d="m 125.63827,142.69499 v 180"
id="path4446" /></g></g><metadata
id="metadata1409"><rdf:RDF><cc:Work
rdf:about=""><dc:creator><cc:Agent><dc:title>Alfredo Monclus</dc:title></cc:Agent></dc:creator><dc:rights><cc:Agent><dc:title>FreeCAD LGPL2+</dc:title></cc:Agent></dc:rights><dc:publisher><cc:Agent><dc:title>FreeCAD</dc:title></cc:Agent></dc:publisher></cc:Work></rdf:RDF></metadata></svg>

After

Width:  |  Height:  |  Size: 5.6 KiB

View File

@@ -0,0 +1,137 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="90"
height="180"
viewBox="0 0 90 180"
version="1.1"
id="svg5"
xml:space="preserve"
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
sodipodi:docname="hole_countersink_angled.svg"
inkscape:export-filename="hole_counterbore.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"><sodipodi:namedview
id="namedview7"
pagecolor="#2f2f2f"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="px"
showgrid="false"
inkscape:zoom="3.4469671"
inkscape:cx="46.997838"
inkscape:cy="71.076977"
inkscape:window-width="1600"
inkscape:window-height="824"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="g1241"
showguides="true"><sodipodi:guide
position="-4.1420245,94.999913"
orientation="1,0"
id="guide1501"
inkscape:locked="false" /><sodipodi:guide
position="100.89495,80.036612"
orientation="1,0"
id="guide1530"
inkscape:locked="false" /><sodipodi:guide
position="64.613966,155.30045"
orientation="0,-1"
id="guide7482"
inkscape:locked="false" /><sodipodi:guide
position="32.269726,134.70891"
orientation="0,-1"
id="guide466"
inkscape:locked="false" /></sodipodi:namedview><defs
id="defs2" /><g
inkscape:label="Capa 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-101.48917,-143.06709)"><g
id="g1241"
transform="translate(-0.18870399,0.37210001)"><path
style="fill:none;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 102.62606,150.9342 39.66909,-0.003 v 8.7527"
id="path476"
sodipodi:nodetypes="ccc" /><path
id="path578"
style="fill:none;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 107.67787,227.4368 h -5.05181 m 10.09581,-57.50556 h -5.044 v 12.99311 44.51245"
sodipodi:nodetypes="cccccc" /><path
style="fill:none;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 157.52407,285.18897 27.9633,4.9e-4 V 170.43668 h -3.8276"
id="path580"
sodipodi:nodetypes="cccc" /><path
style="fill:none;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 186.30041,242.4001 h 3.98819"
id="path582"
sodipodi:nodetypes="cc" /><path
style="fill:none;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 133.94707,291.68398 v 6.50551 h 16.6963 v -6.50551"
id="path584"
sodipodi:nodetypes="cccc" /><path
style="fill:none;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 142.29522,298.18949 v 22.5055 h 47.99338"
id="path586"
sodipodi:nodetypes="ccc" /><path
style="fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:2, 8.00001;stroke-dashoffset:0;stop-color:#000000"
d="m 121.38449,170.43657 h 44.21334"
id="path786" /><path
style="fill:none;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 118.29846,167.39454 v -7.71062 h 47.99338 v 7.71062"
id="path506"
sodipodi:nodetypes="cccc" /><path
style="font-variation-settings:normal;fill:none;fill-opacity:1;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000"
d="m 169.33578,167.3723 1.73873,-3.26708 h 19.21409"
id="path454"
sodipodi:nodetypes="ccc" /><path
style="font-variation-settings:normal;fill:none;fill-opacity:1;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000"
d="m 107.67787,187.98608 h 5.044"
id="path1853"
sodipodi:nodetypes="cc" /><path
style="fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 167.28486,171.22599 -16.64551,16.76082 v 97.20216 l -8.34584,7.84827 -8.34591,-7.84827 v -97.20289 l -16.69179,-16.76009"
id="path455"
sodipodi:nodetypes="ccccccc" /><path
style="fill:#000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:2, 8.00001;stroke-dashoffset:0;stop-color:#000000"
d="m 125.63827,142.69499 v 180"
id="path4446" /><g
id="g1399"
transform="translate(3.99e-6,6.3499137e-5)"><path
style="fill:none;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 114.8787,268.17673 -7.20083,39.51826 h -5"
id="path472"
sodipodi:nodetypes="ccc" /><path
style="fill:none;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 111.18088,264.17674 17.22369,17.22361"
id="path642" /><path
style="fill:none;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 174.68621,264.1767 -17.22369,17.22361"
id="path642-3" /><path
style="fill:none;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
id="path1314"
sodipodi:type="arc"
sodipodi:cx="142.29521"
sodipodi:cy="292.68314"
sodipodi:rx="41.997044"
sodipodi:ry="32.843685"
sodipodi:start="4.0142573"
sodipodi:end="5.4105207"
sodipodi:arc-type="arc"
d="m 115.30003,267.52341 a 41.997044,32.843685 0 0 1 53.99036,0"
sodipodi:open="true" /></g></g></g><metadata
id="metadata1354"><rdf:RDF><cc:Work
rdf:about=""><dc:creator><cc:Agent><dc:title>Alfredo Monclus</dc:title></cc:Agent></dc:creator><dc:rights><cc:Agent><dc:title>FreeCAD LGPL2+</dc:title></cc:Agent></dc:rights><dc:publisher><cc:Agent><dc:title>FreeCAD</dc:title></cc:Agent></dc:publisher></cc:Work></rdf:RDF></metadata></svg>

After

Width:  |  Height:  |  Size: 7.2 KiB

View File

@@ -0,0 +1,113 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="90"
height="180"
viewBox="0 0 90 180"
version="1.1"
id="svg5"
xml:space="preserve"
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
sodipodi:docname="hole_countersink_flat.svg"
inkscape:export-filename="hole_counterbore.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"><sodipodi:namedview
id="namedview7"
pagecolor="#2f2f2f"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="px"
showgrid="false"
inkscape:zoom="3.3777778"
inkscape:cx="45"
inkscape:cy="90"
inkscape:window-width="1600"
inkscape:window-height="824"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="g1241"
showguides="true"><sodipodi:guide
position="-4.1420245,94.999913"
orientation="1,0"
id="guide1501"
inkscape:locked="false" /><sodipodi:guide
position="100.89495,80.036612"
orientation="1,0"
id="guide1530"
inkscape:locked="false" /><sodipodi:guide
position="64.613966,155.30045"
orientation="0,-1"
id="guide7482"
inkscape:locked="false" /><sodipodi:guide
position="32.269726,134.70891"
orientation="0,-1"
id="guide466"
inkscape:locked="false" /></sodipodi:namedview><defs
id="defs2" /><g
inkscape:label="Capa 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-101.48917,-143.06709)"><g
id="g1241"
transform="translate(-0.18870399,0.37210001)"><path
style="fill:none;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 102.62606,150.9342 39.66909,-0.003 v 8.7527"
id="path476"
sodipodi:nodetypes="ccc" /><path
id="path578"
style="fill:none;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 107.67787,227.4368 h -5.05181 m 10.09581,-57.50556 h -5.044 v 12.99311 44.51245"
sodipodi:nodetypes="cccccc" /><path
style="fill:none;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 157.52387,285.18899 27.9635,4.7e-4 V 170.43668 h -3.8276"
id="path580"
sodipodi:nodetypes="cccc" /><path
style="fill:none;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 186.30041,242.4001 h 3.98819"
id="path582"
sodipodi:nodetypes="cc" /><path
style="fill:none;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 133.94707,291.68398 v 6.50551 h 16.6963 v -6.50551"
id="path584"
sodipodi:nodetypes="cccc" /><path
style="fill:none;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 142.29522,298.18949 v 22.5055 h 47.99338"
id="path586"
sodipodi:nodetypes="ccc" /><path
style="fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:2, 8.00001;stroke-dashoffset:0;stop-color:#000000"
d="m 121.38449,170.43657 h 44.21334"
id="path786" /><path
style="fill:none;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 118.29846,167.39454 v -7.71062 h 47.99338 v 7.71062"
id="path506"
sodipodi:nodetypes="cccc" /><path
style="font-variation-settings:normal;fill:none;fill-opacity:1;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000"
d="m 169.33578,167.3723 1.73873,-3.26708 h 19.21409"
id="path454"
sodipodi:nodetypes="ccc" /><path
style="font-variation-settings:normal;fill:none;fill-opacity:1;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;stop-color:#000000"
d="m 107.67787,187.98608 h 5.044"
id="path1853"
sodipodi:nodetypes="cc" /><path
style="fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 167.28486,171.22599 -16.64551,16.76082 v 97.20218 H 133.9476 v -97.20291 l -16.69179,-16.76009"
id="path455"
sodipodi:nodetypes="cccccc" /><path
style="fill:#000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:2, 8.00001;stroke-dashoffset:0;stop-color:#000000"
d="m 125.63827,142.69499 v 180"
id="path4446" /></g></g><metadata
id="metadata1354"><rdf:RDF><cc:Work
rdf:about=""><dc:creator><cc:Agent><dc:title>Alfredo Monclus</dc:title></cc:Agent></dc:creator><dc:rights><cc:Agent><dc:title>FreeCAD LGPL2+</dc:title></cc:Agent></dc:rights><dc:publisher><cc:Agent><dc:title>FreeCAD</dc:title></cc:Agent></dc:publisher></cc:Work></rdf:RDF></metadata></svg>

After

Width:  |  Height:  |  Size: 5.8 KiB

View File

@@ -0,0 +1,106 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="90.034058"
height="112.00004"
viewBox="0 0 90.034058 112.00004"
version="1.1"
id="svg5"
xml:space="preserve"
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
sodipodi:docname="hole_none_angled.svg"
inkscape:export-filename="hole_counterbore.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"><sodipodi:namedview
id="namedview7"
pagecolor="#2f2f2f"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="px"
showgrid="false"
inkscape:zoom="3.4469671"
inkscape:cx="-1.8857157"
inkscape:cy="25.8198"
inkscape:window-width="1600"
inkscape:window-height="824"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="g1241"
showguides="true"><sodipodi:guide
position="-4.1420233,93.999969"
orientation="1,0"
id="guide1501"
inkscape:locked="false" /><sodipodi:guide
position="100.89496,79.036667"
orientation="1,0"
id="guide1530"
inkscape:locked="false" /></sodipodi:namedview><defs
id="defs2" /><g
inkscape:label="Capa 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-101.48916,-210.06711)"><g
id="g1241"
transform="translate(-0.18870399,0.37210001)"><path
style="fill:none;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 157.52407,285.18897 27.9633,4.9e-4 v -73.99945 h -27.9633"
id="path580"
sodipodi:nodetypes="cccc" /><path
style="fill:none;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 133.94707,291.68398 v 6.50551 h 16.6963 v -6.50551"
id="path584"
sodipodi:nodetypes="cccc" /><path
style="fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 150.63936,211.48814 v 73.70083 l -8.34584,7.84827 -8.34591,-7.84827 v -73.7011"
id="path455"
sodipodi:nodetypes="ccccc" /><path
style="fill:none;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 185.48737,242.13966 h 3.99998"
id="path582-6"
sodipodi:nodetypes="cc" /><path
style="fill:none;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 142.29522,298.18949 v 12.24722 h 48.46852"
id="path586-7"
sodipodi:nodetypes="ccc" /><path
style="fill:#000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stop-color:#000000"
d="M 101.67786,321.69505 V 209.69501"
id="path830" /><g
id="g1399"
transform="translate(1.5e-5,6e-5)"><path
style="fill:none;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 114.8787,268.17673 -7.20083,39.51826 h -5"
id="path472"
sodipodi:nodetypes="ccc" /><path
style="fill:none;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 111.18088,264.17674 17.22369,17.22361"
id="path642" /><path
style="fill:none;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 174.68621,264.1767 -17.22369,17.22361"
id="path642-3" /><path
style="fill:none;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
id="path1314"
sodipodi:type="arc"
sodipodi:cx="142.29521"
sodipodi:cy="292.68314"
sodipodi:rx="41.997044"
sodipodi:ry="32.843685"
sodipodi:start="4.0142573"
sodipodi:end="5.4105207"
sodipodi:arc-type="arc"
d="m 115.30003,267.52341 a 41.997044,32.843685 0 0 1 53.99036,0"
sodipodi:open="true" /></g></g></g><metadata
id="metadata1310"><rdf:RDF><cc:Work
rdf:about=""><dc:creator><cc:Agent><dc:title>Alfredo Monclus</dc:title></cc:Agent></dc:creator><dc:rights><cc:Agent><dc:title>FreeCAD LGPL2+</dc:title></cc:Agent></dc:rights><dc:publisher><cc:Agent><dc:title>FreeCAD</dc:title></cc:Agent></dc:publisher></cc:Work></rdf:RDF></metadata></svg>

After

Width:  |  Height:  |  Size: 5.1 KiB

View File

@@ -0,0 +1,82 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="90.034058"
height="112.00004"
viewBox="0 0 90.034058 112.00004"
version="1.1"
id="svg5"
xml:space="preserve"
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
sodipodi:docname="hole_none_flat.svg"
inkscape:export-filename="hole_counterbore.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"><sodipodi:namedview
id="namedview7"
pagecolor="#2f2f2f"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="px"
showgrid="false"
inkscape:zoom="3.4469671"
inkscape:cx="-36.408819"
inkscape:cy="55.120921"
inkscape:window-width="1600"
inkscape:window-height="824"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="g1241"
showguides="true"><sodipodi:guide
position="-4.1420233,93.999969"
orientation="1,0"
id="guide1501"
inkscape:locked="false" /><sodipodi:guide
position="100.89496,79.036667"
orientation="1,0"
id="guide1530"
inkscape:locked="false" /></sodipodi:namedview><defs
id="defs2" /><g
inkscape:label="Capa 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-101.48916,-210.06711)"><g
id="g1241"
transform="translate(-0.18870399,0.37210001)"><path
style="fill:none;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 157.52407,285.18897 27.9633,4.9e-4 v -73.99945 h -27.9633"
id="path580"
sodipodi:nodetypes="cccc" /><path
style="fill:none;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 133.94707,291.68398 v 6.50551 h 16.6963 v -6.50551"
id="path584"
sodipodi:nodetypes="cccc" /><path
style="fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 150.63936,211.48814 v 73.70083 h -16.69175 v -73.7011"
id="path455"
sodipodi:nodetypes="cccc" /><path
style="fill:none;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 185.48737,242.13966 h 3.99998"
id="path582-6"
sodipodi:nodetypes="cc" /><path
style="fill:none;stroke:#999999;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:none;stop-color:#000000"
d="m 142.29522,298.18949 v 12.24722 h 48.46852"
id="path586-7"
sodipodi:nodetypes="ccc" /><path
style="fill:#000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stop-color:#000000"
d="M 101.67786,321.69505 V 209.69501"
id="path830" /></g></g><metadata
id="metadata1294"><rdf:RDF><cc:Work
rdf:about=""><dc:creator><cc:Agent><dc:title>Alfredo Monclus</dc:title></cc:Agent></dc:creator><dc:rights><cc:Agent><dc:title>FreeCAD LGPL2+</dc:title></cc:Agent></dc:rights><dc:publisher><cc:Agent><dc:title>FreeCAD</dc:title></cc:Agent></dc:publisher></cc:Work></rdf:RDF></metadata></svg>

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

@@ -61,15 +61,15 @@ TaskHoleParameters::TaskHoleParameters(ViewProviderHole* HoleView, QWidget* pare
QMetaObject::connectSlotsByName(this);
ui->ThreadType->addItem(tr("None"), QByteArray("None"));
ui->ThreadType->addItem(tr("ISO metric regular profile"), QByteArray("ISO"));
ui->ThreadType->addItem(tr("ISO metric fine profile"), QByteArray("ISO"));
ui->ThreadType->addItem(tr("UTS coarse profile"), QByteArray("UTS"));
ui->ThreadType->addItem(tr("UTS fine profile"), QByteArray("UTS"));
ui->ThreadType->addItem(tr("UTS extra fine profile"), QByteArray("UTS"));
ui->ThreadType->addItem(tr("ANSI pipe profile"), QByteArray("NPT"));
ui->ThreadType->addItem(tr("BSP pipe profile"), QByteArray("BSP"));
ui->ThreadType->addItem(tr("BSW whitworth profile"), QByteArray("BSW"));
ui->ThreadType->addItem(tr("BSF whitworth fine profile"), QByteArray("BSF"));
ui->ThreadType->addItem(tr("ISO metric regular"), QByteArray("ISO"));
ui->ThreadType->addItem(tr("ISO metric fine"), QByteArray("ISO"));
ui->ThreadType->addItem(tr("UTS coarse"), QByteArray("UTS"));
ui->ThreadType->addItem(tr("UTS fine"), QByteArray("UTS"));
ui->ThreadType->addItem(tr("UTS extra fine"), QByteArray("UTS"));
ui->ThreadType->addItem(tr("ANSI pipes"), QByteArray("None"));
ui->ThreadType->addItem(tr("ISO/BSP pipes"), QByteArray("None"));
ui->ThreadType->addItem(tr("BSW whitworth"), QByteArray("BS"));
ui->ThreadType->addItem(tr("BSF whitworth fine"), QByteArray("BS"));
// read values from the hole properties
auto pcHole = getObject<PartDesign::Hole>();
@@ -129,10 +129,12 @@ TaskHoleParameters::TaskHoleParameters(ViewProviderHole* HoleView, QWidget* pare
ui->HoleCutDiameter->setHidden(isNotCut);
ui->HoleCutDepth->setHidden(isNotCut);
ui->HoleCutCountersinkAngle->setHidden(isNotCut);
ui->HoleCutCustomValues->setHidden(isNotCut);
ui->HoleCutCustomValues->setChecked(pcHole->HoleCutCustomValues.getValue());
ui->HoleCutCustomValues->setDisabled(pcHole->HoleCutCustomValues.isReadOnly());
ui->HoleCutCustomValues->setHidden(
pcHole->HoleCutType.getValue() < 5
|| pcHole->HoleCutCustomValues.isReadOnly()
);
// HoleCutDiameter must not be smaller or equal than the Diameter
ui->HoleCutDiameter->setMinimum(pcHole->Diameter.getValue() + 0.1);
ui->HoleCutDiameter->setValue(pcHole->HoleCutDiameter.getValue());
@@ -154,11 +156,9 @@ TaskHoleParameters::TaskHoleParameters(ViewProviderHole* HoleView, QWidget* pare
bool isFlatDrill = pcHole->DrillPoint.getValue() == 0L;
bool depthIsDimension = std::string(pcHole->DepthType.getValueAsString()) == "Dimension";
ui->DrillGroupBox->setVisible(depthIsDimension);
ui->drillPointFlat->setChecked(isFlatDrill);
ui->drillPointAngled->setChecked(!isFlatDrill);
ui->DrillPointAngle->setEnabled(!isFlatDrill);
ui->DrillForDepth->setVisible(!isFlatDrill);
ui->DrillPointAngled->setChecked(!isFlatDrill && depthIsDimension);
ui->DrillPointAngle->setEnabled(!isFlatDrill && depthIsDimension);
ui->DrillForDepth->setEnabled(!isFlatDrill && depthIsDimension);
ui->Tapered->setChecked(pcHole->Tapered.getValue());
// Angle is only enabled (sensible) if tapered
@@ -184,11 +184,14 @@ TaskHoleParameters::TaskHoleParameters(ViewProviderHole* HoleView, QWidget* pare
ui->UpdateView->setChecked(false);
ui->UpdateView->setVisible(isThreaded && isModeled);
ui->Depth->setEnabled(std::string(pcHole->DepthType.getValueAsString()) == "Dimension");
ui->Depth->setEnabled(depthIsDimension);
ui->ThreadDepthWidget->setVisible(isThreaded && isModeled);
ui->ThreadDepth->setEnabled(ui->Threaded->isChecked() && ui->ModelThread->isChecked()
&& std::string(pcHole->ThreadDepthType.getValueAsString())
== "Dimension");
ui->ThreadDepthDimensionWidget->setVisible(
std::string(pcHole->ThreadDepthType.getValueAsString()) == "Dimension"
);
setCutPixmap();
// clang-format off
connect(ui->Threaded, &QCheckBox::clicked,
@@ -221,9 +224,7 @@ TaskHoleParameters::TaskHoleParameters(ViewProviderHole* HoleView, QWidget* pare
this, &TaskHoleParameters::depthChanged);
connect(ui->Depth, qOverload<double>(&Gui::QuantitySpinBox::valueChanged),
this, &TaskHoleParameters::depthValueChanged);
connect(ui->drillPointFlat, &QRadioButton::clicked,
this, &TaskHoleParameters::drillPointChanged);
connect(ui->drillPointAngled, &QRadioButton::clicked,
connect(ui->DrillPointAngled, &QCheckBox::toggled,
this, &TaskHoleParameters::drillPointChanged);
connect(ui->DrillPointAngle, qOverload<double>(&Gui::QuantitySpinBox::valueChanged),
this, &TaskHoleParameters::drillPointAngledValueChanged);
@@ -306,7 +307,7 @@ void TaskHoleParameters::modelThreadChanged()
ui->CustomThreadClearance->setEnabled(ui->UseCustomThreadClearance->isChecked());
ui->ThreadDepthWidget->setVisible(isThreaded && isModeled);
ui->ThreadDepth->setEnabled(
ui->ThreadDepthDimensionWidget->setVisible(
std::string(pcHole->ThreadDepthType.getValueAsString()) == "Dimension"
);
@@ -323,7 +324,7 @@ void TaskHoleParameters::threadDepthTypeChanged(int index)
{
if (auto hole = getObject<PartDesign::Hole>()) {
hole->ThreadDepthType.setValue(index);
ui->ThreadDepth->setEnabled(index == 1);
ui->ThreadDepthDimensionWidget->setVisible(index == 1);
ui->ThreadDepth->setValue(hole->ThreadDepth.getValue());
recomputeFeature();
}
@@ -333,6 +334,7 @@ void TaskHoleParameters::threadDepthChanged(double value)
{
if (auto hole = getObject<PartDesign::Hole>()) {
hole->ThreadDepth.setValue(value);
setCutPixmap();
recomputeFeature();
}
}
@@ -388,7 +390,7 @@ void TaskHoleParameters::holeCutTypeChanged(int index)
recomputeFeature();
// apply the result to the widgets
ui->HoleCutCustomValues->setDisabled(hole->HoleCutCustomValues.isReadOnly());
ui->HoleCutCustomValues->setHidden(hole->HoleCutCustomValues.isReadOnly());
ui->HoleCutCustomValues->setChecked(hole->HoleCutCustomValues.getValue());
// HoleCutCustomValues is only enabled for screw definitions
@@ -403,21 +405,23 @@ void TaskHoleParameters::holeCutTypeChanged(int index)
ui->HoleCutDiameter->setHidden(isNotCut);
ui->HoleCutDepth->setHidden(isNotCut);
ui->HoleCutCountersinkAngle->setHidden(isNotCut);
ui->HoleCutCustomValues->setHidden(isNotCut);
if (HoleCutTypeString == "None" || HoleCutTypeString == "Counterbore"
|| HoleCutTypeString == "Countersink" || HoleCutTypeString == "Counterdrill") {
ui->HoleCutCustomValues->setEnabled(false);
ui->HoleCutCustomValues->setVisible(false);
if (HoleCutTypeString == "None") {
ui->HoleCutDiameter->setEnabled(false);
ui->HoleCutDepth->setEnabled(false);
ui->HoleCutCountersinkAngle->setEnabled(false);
ui->labelHoleCutCountersinkAngle->setVisible(false);
ui->HoleCutCountersinkAngle->setVisible(false);
}
if (HoleCutTypeString == "Counterbore") {
ui->HoleCutCountersinkAngle->setEnabled(false);
ui->labelHoleCutCountersinkAngle->setVisible(false);
ui->HoleCutCountersinkAngle->setVisible(false);
}
if (HoleCutTypeString == "Countersink") {
ui->HoleCutCountersinkAngle->setEnabled(true);
ui->labelHoleCutCountersinkAngle->setVisible(true);
ui->HoleCutCountersinkAngle->setVisible(true);
}
}
else { // screw definition
@@ -427,14 +431,86 @@ void TaskHoleParameters::holeCutTypeChanged(int index)
ui->HoleCutDiameter->setEnabled(true);
ui->HoleCutDepth->setEnabled(true);
if (!hole->HoleCutCountersinkAngle.isReadOnly()) {
ui->HoleCutCountersinkAngle->setVisible(true);
ui->labelHoleCutCountersinkAngle->setVisible(true);
ui->HoleCutCountersinkAngle->setEnabled(true);
}
}
else {
ui->HoleCutCustomValues->setEnabled(true);
ui->HoleCutCustomValues->setVisible(true);
ui->HoleCutDiameter->setEnabled(false);
ui->HoleCutDepth->setEnabled(false);
ui->HoleCutCountersinkAngle->setEnabled(false);
ui->labelHoleCutCountersinkAngle->setVisible(true);
ui->HoleCutCountersinkAngle->setVisible(true);
}
}
setCutPixmap();
}
void TaskHoleParameters::setCutPixmap()
{
auto hole = getObject<PartDesign::Hole>();
const std::string holeCutTypeString = hole->HoleCutType.getValueAsString();
const std::string threadTypeString = hole->ThreadType.getValueAsString();
bool isAngled = (
std::string(hole->DepthType.getValueAsString()) == "Dimension"
&& ui->DrillPointAngled->isChecked()
);
bool isCountersink = (
holeCutTypeString == "Countersink"
|| hole->isDynamicCountersink(threadTypeString, holeCutTypeString)
);
bool isCounterbore = (
holeCutTypeString == "Counterbore"
|| hole->isDynamicCounterbore(threadTypeString, holeCutTypeString)
);
bool isCounterdrill = (
holeCutTypeString == "Counterdrill"
);
if (isCounterbore) {
if (isAngled) {
ui->cutDiagram->setPixmap(
QPixmap(QString::fromUtf8(":/images/hole_counterbore_angled.svg"))
);
} else {
ui->cutDiagram->setPixmap(
QPixmap(QString::fromUtf8(":/images/hole_counterbore_flat.svg"))
);
}
}
else if (isCountersink) {
if (isAngled) {
ui->cutDiagram->setPixmap(
QPixmap(QString::fromUtf8(":/images/hole_countersink_angled.svg"))
);
} else {
ui->cutDiagram->setPixmap(
QPixmap(QString::fromUtf8(":/images/hole_countersink_flat.svg"))
);
}
}
else if (isCounterdrill) {
if (isAngled) {
ui->cutDiagram->setPixmap(
QPixmap(QString::fromUtf8(":/images/hole_counterdrill_angled.svg"))
);
} else {
ui->cutDiagram->setPixmap(
QPixmap(QString::fromUtf8(":/images/hole_counterdrill_flat.svg"))
);
}
}
else {
if (isAngled) {
ui->cutDiagram->setPixmap(
QPixmap(QString::fromUtf8(":/images/hole_none_angled.svg"))
);
} else {
ui->cutDiagram->setPixmap(
QPixmap(QString::fromUtf8(":/images/hole_none_flat.svg"))
);
}
}
}
@@ -514,17 +590,16 @@ void TaskHoleParameters::depthChanged(int index)
if (!hole) {
return;
}
hole->DepthType.setValue(index);
recomputeFeature();
// enabling must be handled after recompute
bool DepthisDimension = (
std::string(hole->DepthType.getValueAsString()) == "Dimension"
);
ui->DrillGroupBox->setVisible(DepthisDimension);
recomputeFeature();
// enabling must be handled after recompute
ui->ThreadDepth->setEnabled(DepthisDimension);
ui->DrillPointAngled->setEnabled(DepthisDimension);
ui->DrillPointAngle->setEnabled(DepthisDimension);
ui->DrillForDepth->setEnabled(DepthisDimension);
setCutPixmap();
}
void TaskHoleParameters::depthValueChanged(double value)
@@ -538,17 +613,11 @@ void TaskHoleParameters::depthValueChanged(double value)
void TaskHoleParameters::drillPointChanged()
{
if (auto hole = getObject<PartDesign::Hole>()) {
if (sender() == ui->drillPointFlat) {
hole->DrillPoint.setValue(0L);
ui->DrillForDepth->setVisible(false);
}
else if (sender() == ui->drillPointAngled) {
hole->DrillPoint.setValue(1L);
ui->DrillForDepth->setVisible(true);
}
else {
assert(0);
}
bool angled = ui->DrillPointAngled->isChecked();
hole->DrillPoint.setValue(angled);
ui->DrillPointAngle->setEnabled(angled);
ui->DrillForDepth->setEnabled(angled);
setCutPixmap();
recomputeFeature();
}
}
@@ -932,21 +1001,14 @@ void TaskHoleParameters::changedObject(const App::Document&, const App::Property
ui->Depth->setDisabled(ro);
}
else if (&Prop == &hole->DrillPoint) {
ui->drillPointFlat->setEnabled(true);
ui->drillPointAngled->setEnabled(true);
std::string drillPoint(hole->DrillPoint.getValueAsString());
if (drillPoint == "Flat" && !ui->drillPointFlat->isChecked()) {
ui->drillPointFlat->blockSignals(true);
ui->drillPointFlat->setChecked(true);
ui->drillPointFlat->blockSignals(false);
ui->DrillPointAngled->setEnabled(true);
if (ui->DrillPointAngled->isChecked() ^ (drillPoint == "Angled")) {
ui->DrillPointAngled->blockSignals(true);
ui->DrillPointAngled->setChecked(drillPoint == "Angled");
ui->DrillPointAngled->blockSignals(false);
}
if (drillPoint == "Angled" && !ui->drillPointAngled->isChecked()) {
ui->drillPointAngled->blockSignals(true);
ui->drillPointAngled->setChecked(true);
ui->drillPointAngled->blockSignals(false);
}
ui->drillPointFlat->setDisabled(ro);
ui->drillPointAngled->setDisabled(ro);
ui->DrillPointAngled->setDisabled(ro);
}
else if (&Prop == &hole->DrillPointAngle) {
ui->DrillPointAngle->setEnabled(true);
@@ -1131,14 +1193,11 @@ Base::Quantity TaskHoleParameters::getDepth() const
long TaskHoleParameters::getDrillPoint() const
{
if (ui->drillPointFlat->isChecked()) {
return 0;
}
if (ui->drillPointAngled->isChecked()) {
if (ui->DrillPointAngled->isChecked()) {
return 1;
}
assert(0);
return -1; // to avoid a compiler warning
return 0;
}
Base::Quantity TaskHoleParameters::getDrillPointAngle() const

View File

@@ -108,6 +108,7 @@ private Q_SLOTS:
void updateViewChanged(bool isChecked);
void threadDepthTypeChanged(int index);
void threadDepthChanged(double value);
void setCutPixmap();
private:
class Observer : public App::DocumentObserver {

File diff suppressed because it is too large Load Diff