Translate DSH : A replacement for rectangular array.

This commit is contained in:
Paddle
2023-11-03 18:54:27 +01:00
committed by PaddleStroke
parent 31b40ce6a2
commit c4720e56c1
7 changed files with 1425 additions and 0 deletions

View File

@@ -70,6 +70,7 @@ SET(SketcherGui_SRCS
DrawSketchHandlerBSplineByInterpolation.h
DrawSketchHandlerPoint.h
DrawSketchHandlerFillet.h
DrawSketchHandlerTranslate.h
DrawSketchHandlerTrimming.h
DrawSketchHandlerExtend.h
DrawSketchHandlerSplitting.h

View File

@@ -54,6 +54,7 @@
#include "Utils.h"
#include "ViewProviderSketch.h"
#include "DrawSketchHandlerTranslate.h"
#include "DrawSketchHandlerOffset.h"
#include "DrawSketchHandlerRotate.h"
#include "DrawSketchHandlerScale.h"
@@ -2622,6 +2623,39 @@ bool CmdSketcherScale::isActive()
return isCommandActive(getActiveGuiDocument(), true);
}
// Translate / rectangular pattern tool =======================================================
DEF_STD_CMD_A(CmdSketcherTranslate)
CmdSketcherTranslate::CmdSketcherTranslate()
: Command("Sketcher_Translate")
{
sAppModule = "Sketcher";
sGroup = "Sketcher";
sMenuText = QT_TR_NOOP("Array transform");
sToolTipText = QT_TR_NOOP("Translate selected geometries. Enable creation of i * j copies.");
sWhatsThis = "Sketcher_Translate";
sStatusTip = sToolTipText;
sPixmap = "Sketcher_Translate";
sAccel = "W";
eType = ForEdit;
}
void CmdSketcherTranslate::activated(int iMsg)
{
Q_UNUSED(iMsg);
std::vector<int> listOfGeoIds = getListOfSelectedGeoIds(true);
if (!listOfGeoIds.empty()) {
ActivateHandler(getActiveGuiDocument(), new DrawSketchHandlerTranslate(listOfGeoIds));
}
getSelection().clearSelection();
}
bool CmdSketcherTranslate::isActive()
{
return isCommandActive(getActiveGuiDocument(), true);
}
void CreateSketcherCommandsConstraintAccel()
{
@@ -2638,6 +2672,7 @@ void CreateSketcherCommandsConstraintAccel()
rcCmdMgr.addCommand(new CmdSketcherSelectElementsAssociatedWithConstraints());
rcCmdMgr.addCommand(new CmdSketcherSelectElementsWithDoFs());
rcCmdMgr.addCommand(new CmdSketcherRestoreInternalAlignmentGeometry());
rcCmdMgr.addCommand(new CmdSketcherTranslate());
rcCmdMgr.addCommand(new CmdSketcherOffset());
rcCmdMgr.addCommand(new CmdSketcherRotate());
rcCmdMgr.addCommand(new CmdSketcherScale());

View File

@@ -0,0 +1,709 @@
/***************************************************************************
* Copyright (c) 2022 Boyer Pierre-Louis <pierrelouis.boyer@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., 59 Temple Place, *
* Suite 330, Boston, MA 02111-1307, USA *
* *
***************************************************************************/
#ifndef SKETCHERGUI_DrawSketchHandlerTranslate_H
#define SKETCHERGUI_DrawSketchHandlerTranslate_H
#include <QApplication>
#include <Gui/BitmapFactory.h>
#include <Gui/Notifications.h>
#include <Gui/Command.h>
#include <Gui/CommandT.h>
#include <Mod/Sketcher/App/GeometryFacade.h>
#include <Mod/Sketcher/App/SketchObject.h>
#include "DrawSketchDefaultWidgetController.h"
#include "DrawSketchControllableHandler.h"
#include "GeometryCreationMode.h"
#include "Utils.h"
using namespace Sketcher;
namespace SketcherGui
{
class DrawSketchHandlerTranslate;
using DSHTranslateController =
DrawSketchDefaultWidgetController<DrawSketchHandlerTranslate,
StateMachines::ThreeSeekEnd,
/*PAutoConstraintSize =*/0,
/*OnViewParametersT =*/OnViewParameters<6>,
/*WidgetParametersT =*/WidgetParameters<2>,
/*WidgetCheckboxesT =*/WidgetCheckboxes<1>,
/*WidgetComboboxesT =*/WidgetComboboxes<0>>;
using DSHTranslateControllerBase = DSHTranslateController::ControllerBase;
using DrawSketchHandlerTranslateBase = DrawSketchControllableHandler<DSHTranslateController>;
class DrawSketchHandlerTranslate: public DrawSketchHandlerTranslateBase
{
friend DSHTranslateController;
friend DSHTranslateControllerBase;
public:
explicit DrawSketchHandlerTranslate(std::vector<int> listOfGeoIds)
: listOfGeoIds(listOfGeoIds)
, deleteOriginal(false)
, cloneConstraints(false)
, numberOfCopies(0)
, secondNumberOfCopies(1)
{}
DrawSketchHandlerTranslate(const DrawSketchHandlerTranslate&) = delete;
DrawSketchHandlerTranslate(DrawSketchHandlerTranslate&&) = delete;
DrawSketchHandlerTranslate& operator=(const DrawSketchHandlerTranslate&) = delete;
DrawSketchHandlerTranslate& operator=(DrawSketchHandlerTranslate&&) = delete;
~DrawSketchHandlerTranslate() override = default;
private:
void updateDataAndDrawToPosition(Base::Vector2d onSketchPos) override
{
switch (state()) {
case SelectMode::SeekFirst: {
referencePoint = onSketchPos;
} break;
case SelectMode::SeekSecond: {
firstTranslationPoint = onSketchPos;
firstTranslationVector = toVector3d(firstTranslationPoint - referencePoint);
CreateAndDrawShapeGeometry();
} break;
case SelectMode::SeekThird: {
secondTranslationPoint = onSketchPos;
secondTranslationVector = toVector3d(secondTranslationPoint - referencePoint);
CreateAndDrawShapeGeometry();
} break;
default:
break;
}
}
void executeCommands() override
{
try {
Gui::Command::openCommand(QT_TRANSLATE_NOOP("Command", "Translate geometries"));
createShape(false);
commandAddShapeGeometryAndConstraints();
if (deleteOriginal) {
deleteOriginalGeos();
}
Gui::Command::commitCommand();
}
catch (const Base::Exception& e) {
e.ReportException();
Gui::NotifyError(sketchgui,
QT_TRANSLATE_NOOP("Notifications", "Error"),
QT_TRANSLATE_NOOP("Notifications", "Failed to translate"));
Gui::Command::abortCommand();
THROWM(Base::RuntimeError,
QT_TRANSLATE_NOOP(
"Notifications",
"Tool execution aborted") "\n") // This prevents constraints from being
// applied on non existing geometry
}
}
void createAutoConstraints() override
{
// none
}
std::string getToolName() const override
{
return "DSH_Translate";
}
QString getCrosshairCursorSVGName() const override
{
return QString::fromLatin1("Sketcher_Pointer_Create_Translate");
}
std::unique_ptr<QWidget> createWidget() const override
{
return std::make_unique<SketcherToolDefaultWidget>();
}
bool isWidgetVisible() const override
{
return true;
};
QPixmap getToolIcon() const override
{
return Gui::BitmapFactory().pixmap("Sketcher_Translate");
}
QString getToolWidgetText() const override
{
return QString(QObject::tr("Translate parameters"));
}
void onButtonPressed(Base::Vector2d onSketchPos) override
{
this->updateDataAndDrawToPosition(onSketchPos);
if (state() == SelectMode::SeekSecond && secondNumberOfCopies == 1) {
setState(SelectMode::End);
}
else {
this->moveToNextMode();
}
}
void activated() override
{
DrawSketchDefaultHandler::activated();
continuousMode = false;
}
bool canGoToNextMode() override
{
if (state() == SelectMode::SeekSecond
&& firstTranslationVector.Length() < Precision::Confusion()) {
// Prevent validation of null translation.
return false;
}
if (state() == SelectMode::SeekThird
&& secondTranslationVector.Length() < Precision::Confusion()
&& secondNumberOfCopies > 1) {
return false;
}
return true;
}
void angleSnappingControl() override
{
if (state() == SelectMode::SeekSecond || state() == SelectMode::SeekThird) {
setAngleSnapping(true, referencePoint);
}
else {
setAngleSnapping(false);
}
}
private:
std::vector<int> listOfGeoIds;
Base::Vector2d referencePoint, firstTranslationPoint, secondTranslationPoint;
Base::Vector3d firstTranslationVector, secondTranslationVector;
bool deleteOriginal, cloneConstraints;
int numberOfCopies, secondNumberOfCopies;
void deleteOriginalGeos()
{
std::stringstream stream;
for (size_t j = 0; j < listOfGeoIds.size() - 1; j++) {
stream << listOfGeoIds[j] << ",";
}
stream << listOfGeoIds[listOfGeoIds.size() - 1];
try {
Gui::cmdAppObjectArgs(sketchgui->getObject(),
"delGeometries([%s])",
stream.str().c_str());
}
catch (const Base::Exception& e) {
Base::Console().Error("%s\n", e.what());
}
}
void createShape(bool onlyeditoutline) override
{
Sketcher::SketchObject* Obj = sketchgui->getSketchObject();
ShapeGeometry.clear();
int numberOfCopiesToMake = numberOfCopies;
if (numberOfCopies == 0) {
numberOfCopiesToMake = 1;
deleteOriginal = 1;
}
else {
deleteOriginal = 0;
}
for (int k = 0; k < secondNumberOfCopies; k++) {
for (int i = 0; i <= numberOfCopiesToMake; i++) {
if ((k == 0 && i == 0)) {
continue;
}
Base::Vector3d vec = firstTranslationVector * i + secondTranslationVector * k;
for (auto& geoId : listOfGeoIds) {
const Part::Geometry* pGeo = Obj->getGeometry(geoId);
auto geoUniquePtr = std::unique_ptr<Part::Geometry>(pGeo->copy());
Part::Geometry* geo = geoUniquePtr.get();
if (isCircle(*geo)) {
Part::GeomCircle* circle = static_cast<Part::GeomCircle*>(geo); // NOLINT
circle->setCenter(circle->getCenter() + vec);
}
else if (isArcOfCircle(*geo)) {
Part::GeomArcOfCircle* arc =
static_cast<Part::GeomArcOfCircle*>(geo); // NOLINT
arc->setCenter(arc->getCenter() + vec);
}
else if (isEllipse(*geo)) {
Part::GeomEllipse* ellipse =
static_cast<Part::GeomEllipse*>(geo); // NOLINT
ellipse->setCenter(ellipse->getCenter() + vec);
}
else if (isArcOfEllipse(*geo)) {
Part::GeomArcOfEllipse* aoe =
static_cast<Part::GeomArcOfEllipse*>(geo); // NOLINT
aoe->setCenter(aoe->getCenter() + vec);
}
else if (isArcOfHyperbola(*geo)) {
Part::GeomArcOfHyperbola* aoh =
static_cast<Part::GeomArcOfHyperbola*>(geo); // NOLINT
aoh->setCenter(aoh->getCenter() + vec);
}
else if (isArcOfParabola(*geo)) {
Part::GeomArcOfParabola* aop =
static_cast<Part::GeomArcOfParabola*>(geo); // NOLINT
aop->setCenter(aop->getCenter() + vec);
}
else if (isLineSegment(*geo)) {
auto* line = static_cast<Part::GeomLineSegment*>(geo); // NOLINT
line->setPoints(line->getStartPoint() + vec, line->getEndPoint() + vec);
}
else if (isBSplineCurve(*geo)) {
auto* bSpline = static_cast<Part::GeomBSplineCurve*>(geo); // NOLINT
std::vector<Base::Vector3d> poles = bSpline->getPoles();
for (size_t p = 0; p < poles.size(); p++) {
poles[p] = poles[p] + vec;
}
bSpline->setPoles(poles);
}
else if (isPoint(*geo)) {
auto* point = static_cast<Part::GeomPoint*>(geo); // NOLINT
point->setPoint(point->getPoint() + vec);
}
ShapeGeometry.emplace_back(std::move(geoUniquePtr));
}
}
}
if (onlyeditoutline) {
// Add the lines to show angle
if (firstTranslationVector.Length() > Precision::Confusion()) {
addLineToShapeGeometry(toVector3d(referencePoint),
toVector3d(firstTranslationPoint),
true);
}
if (secondTranslationVector.Length() > Precision::Confusion()) {
addLineToShapeGeometry(toVector3d(referencePoint),
toVector3d(secondTranslationPoint),
true);
}
}
else {
int firstCurveCreated = getHighestCurveIndex() + 1;
int size = static_cast<int>(listOfGeoIds.size());
const std::vector<Sketcher::Constraint*>& vals = Obj->Constraints.getValues();
// avoid applying equal several times if cloning distanceX and distanceY of the
// same part.
std::vector<int> geoIdsWhoAlreadyHasEqual = {};
for (auto& cstr : vals) {
int firstIndex = indexOfGeoId(listOfGeoIds, cstr->First);
int secondIndex = indexOfGeoId(listOfGeoIds, cstr->Second);
int thirdIndex = indexOfGeoId(listOfGeoIds, cstr->Third);
for (int k = 0; k < secondNumberOfCopies; k++) {
for (int i = 0; i <= numberOfCopiesToMake; i++) {
if (k == 0 && i == 0) {
continue;
}
int firstIndexi = firstCurveCreated + firstIndex + size * (i - 1)
+ size * (numberOfCopiesToMake + 1) * k;
int secondIndexi = firstCurveCreated + secondIndex + size * (i - 1)
+ size * (numberOfCopiesToMake + 1) * k;
int thirdIndexi = firstCurveCreated + thirdIndex + size * (i - 1)
+ size * (numberOfCopiesToMake + 1) * k;
auto newConstr = std::unique_ptr<Constraint>(cstr->copy());
newConstr->First = firstIndexi;
if ((cstr->Type == Symmetric || cstr->Type == Tangent
|| cstr->Type == Perpendicular || cstr->Type == Angle)
&& firstIndex >= 0 && secondIndex >= 0 && thirdIndex >= 0) {
newConstr->Second = secondIndexi;
newConstr->Third = thirdIndexi;
}
else if ((cstr->Type == Coincident || cstr->Type == Tangent
|| cstr->Type == Symmetric || cstr->Type == Perpendicular
|| cstr->Type == Parallel || cstr->Type == Equal
|| cstr->Type == Angle || cstr->Type == PointOnObject
|| cstr->Type == InternalAlignment)
&& firstIndex >= 0 && secondIndex >= 0
&& thirdIndex == GeoEnum::GeoUndef) {
newConstr->Second = secondIndexi;
}
else if ((cstr->Type == Radius || cstr->Type == Diameter
|| cstr->Type == Weight)
&& firstIndex >= 0) {
if (deleteOriginal || !cloneConstraints) {
newConstr->setValue(cstr->getValue());
}
else {
newConstr->Type = Equal;
newConstr->First = cstr->First;
newConstr->Second = firstIndexi;
}
}
else if ((cstr->Type == Distance || cstr->Type == DistanceX
|| cstr->Type == DistanceY)
&& firstIndex >= 0 && secondIndex >= 0) {
if (!deleteOriginal && cloneConstraints
&& cstr->First == cstr->Second) { // only line distances
if (indexOfGeoId(geoIdsWhoAlreadyHasEqual, secondIndexi) != -1) {
continue;
}
newConstr->Type = Equal;
newConstr->First = cstr->First;
newConstr->Second = secondIndexi;
geoIdsWhoAlreadyHasEqual.push_back(secondIndexi);
}
else {
newConstr->Second = secondIndexi;
}
}
else if ((cstr->Type == Block) && firstIndex >= 0) {
newConstr->First = firstIndexi;
}
else {
continue;
}
ShapeConstraints.push_back(std::move(newConstr));
}
}
}
}
}
};
template<>
auto DSHTranslateControllerBase::getState(int labelindex) const
{
switch (labelindex) {
case OnViewParameter::First:
case OnViewParameter::Second:
return SelectMode::SeekFirst;
break;
case OnViewParameter::Third:
case OnViewParameter::Fourth:
return SelectMode::SeekSecond;
break;
case OnViewParameter::Fifth:
case OnViewParameter::Sixth:
return SelectMode::SeekThird;
break;
default:
THROWM(Base::ValueError, "OnViewParameter index without an associated machine state")
}
}
template<>
void DSHTranslateController::firstKeyShortcut()
{
auto value = toolWidget->getParameter(WParameter::First);
toolWidget->setParameterWithoutPassingFocus(OnViewParameter::First, value + 1);
}
template<>
void DSHTranslateController::secondKeyShortcut()
{
auto value = toolWidget->getParameter(WParameter::First);
if (value > 0.0) {
toolWidget->setParameterWithoutPassingFocus(OnViewParameter::First, value - 1);
}
}
template<>
void DSHTranslateController::configureToolWidget()
{
if (!init) { // Code to be executed only upon initialisation
toolWidget->setCheckboxLabel(
WCheckbox::FirstBox,
QApplication::translate("TaskSketcherTool_c1_translate", "Clone constraints"));
toolWidget->setCheckboxToolTip(
WCheckbox::FirstBox,
QApplication::translate(
"TaskSketcherTool_c1_translate",
"This concerns the datum constraints like distances. If you activate Clone, "
"then the tool will copy the datum. Else it will try to replace them with "
"equalities between the initial geometries and the new copies."));
}
onViewParameters[OnViewParameter::First]->setLabelType(Gui::SoDatumLabel::DISTANCEX);
onViewParameters[OnViewParameter::Second]->setLabelType(Gui::SoDatumLabel::DISTANCEY);
onViewParameters[OnViewParameter::Third]->setLabelType(
Gui::SoDatumLabel::DISTANCE,
Gui::EditableDatumLabel::Function::Dimensioning);
onViewParameters[OnViewParameter::Fourth]->setLabelType(
Gui::SoDatumLabel::ANGLE,
Gui::EditableDatumLabel::Function::Dimensioning);
onViewParameters[OnViewParameter::Fifth]->setLabelType(
Gui::SoDatumLabel::DISTANCE,
Gui::EditableDatumLabel::Function::Dimensioning);
onViewParameters[OnViewParameter::Sixth]->setLabelType(
Gui::SoDatumLabel::ANGLE,
Gui::EditableDatumLabel::Function::Dimensioning);
toolWidget->setParameterLabel(
WParameter::First,
QApplication::translate("TaskSketcherTool_p3_translate", "Copies (+'U'/-'J')"));
toolWidget->setParameterLabel(WParameter::Second,
QApplication::translate("TaskSketcherTool_p5_translate", "Rows"));
toolWidget->setParameter(OnViewParameter::First, 0.0);
toolWidget->setParameter(OnViewParameter::Second, 1.0);
toolWidget->configureParameterUnit(OnViewParameter::First, Base::Unit());
toolWidget->configureParameterUnit(OnViewParameter::Second, Base::Unit());
toolWidget->configureParameterMin(OnViewParameter::First, 0.0); // NOLINT
toolWidget->configureParameterMin(OnViewParameter::Second, 0.0); // NOLINT
toolWidget->configureParameterMax(OnViewParameter::First, 9999.0); // NOLINT
toolWidget->configureParameterMax(OnViewParameter::Second, 9999.0); // NOLINT
toolWidget->configureParameterDecimals(OnViewParameter::First, 0);
toolWidget->configureParameterDecimals(OnViewParameter::Second, 0);
}
template<>
void DSHTranslateController::adaptDrawingToParameterChange(int parameterindex, double value)
{
switch (parameterindex) {
case WParameter::First:
handler->numberOfCopies = floor(abs(value));
break;
case WParameter::Second:
handler->secondNumberOfCopies = floor(abs(value));
break;
}
}
template<>
void DSHTranslateController::adaptDrawingToCheckboxChange(int checkboxindex, bool value)
{
switch (checkboxindex) {
case WCheckbox::FirstBox: {
handler->cloneConstraints = value;
} break;
}
}
template<>
void DSHTranslateControllerBase::doEnforceControlParameters(Base::Vector2d& onSketchPos)
{
switch (handler->state()) {
case SelectMode::SeekFirst: {
if (onViewParameters[OnViewParameter::First]->isSet) {
onSketchPos.x = onViewParameters[OnViewParameter::First]->getValue();
}
if (onViewParameters[OnViewParameter::Second]->isSet) {
onSketchPos.y = onViewParameters[OnViewParameter::Second]->getValue();
}
} break;
case SelectMode::SeekSecond: {
Base::Vector2d dir = onSketchPos - handler->referencePoint;
if (dir.Length() < Precision::Confusion()) {
dir.x = 1.0; // if direction null, default to (1,0)
}
double length = dir.Length();
if (onViewParameters[OnViewParameter::Third]->isSet) {
length = onViewParameters[OnViewParameter::Third]->getValue();
if (length < Precision::Confusion()) {
unsetOnViewParameter(onViewParameters[OnViewParameter::Third].get());
return;
}
onSketchPos = handler->referencePoint + length * dir.Normalize();
}
if (onViewParameters[OnViewParameter::Fourth]->isSet) {
double angle = onViewParameters[OnViewParameter::Fourth]->getValue() * M_PI / 180;
onSketchPos.x = handler->referencePoint.x + cos(angle) * length;
onSketchPos.y = handler->referencePoint.y + sin(angle) * length;
}
} break;
case SelectMode::SeekThird: {
Base::Vector2d dir = onSketchPos - handler->referencePoint;
if (dir.Length() < Precision::Confusion()) {
dir.x = 1.0; // if direction null, default to (1,0)
}
double length = dir.Length();
if (onViewParameters[OnViewParameter::Fifth]->isSet) {
length = onViewParameters[OnViewParameter::Fifth]->getValue();
if (length < Precision::Confusion()) {
unsetOnViewParameter(onViewParameters[OnViewParameter::Fifth].get());
return;
}
onSketchPos = handler->referencePoint + length * dir.Normalize();
}
if (onViewParameters[OnViewParameter::Sixth]->isSet) {
double angle = onViewParameters[OnViewParameter::Sixth]->getValue() * M_PI / 180;
onSketchPos.x = handler->referencePoint.x + cos(angle) * length;
onSketchPos.y = handler->referencePoint.y + sin(angle) * length;
}
} break;
default:
break;
}
}
template<>
void DSHTranslateController::adaptParameters(Base::Vector2d onSketchPos)
{
switch (handler->state()) {
case SelectMode::SeekFirst: {
if (!onViewParameters[OnViewParameter::First]->isSet) {
setOnViewParameterValue(OnViewParameter::First, onSketchPos.x);
}
if (!onViewParameters[OnViewParameter::Second]->isSet) {
setOnViewParameterValue(OnViewParameter::Second, onSketchPos.y);
}
bool sameSign = onSketchPos.x * onSketchPos.y > 0.;
onViewParameters[OnViewParameter::First]->setLabelAutoDistanceReverse(!sameSign);
onViewParameters[OnViewParameter::Second]->setLabelAutoDistanceReverse(sameSign);
onViewParameters[OnViewParameter::First]->setPoints(Base::Vector3d(),
toVector3d(onSketchPos));
onViewParameters[OnViewParameter::Second]->setPoints(Base::Vector3d(),
toVector3d(onSketchPos));
} break;
case SelectMode::SeekSecond: {
if (!onViewParameters[OnViewParameter::Third]->isSet) {
onViewParameters[OnViewParameter::Third]->setSpinboxValue(
(onSketchPos - handler->referencePoint).Length());
}
Base::Vector2d vec2d = Base::Vector2d(handler->firstTranslationVector.x,
handler->firstTranslationVector.y);
double angle = vec2d.Angle();
double range = angle * 180 / M_PI;
if (!onViewParameters[OnViewParameter::Fourth]->isSet) {
onViewParameters[OnViewParameter::Fourth]->setSpinboxValue(range,
Base::Unit::Angle);
}
Base::Vector3d start = toVector3d(handler->referencePoint);
Base::Vector3d end = toVector3d(onSketchPos);
onViewParameters[OnViewParameter::Third]->setPoints(start, end);
onViewParameters[OnViewParameter::Fourth]->setPoints(start, Base::Vector3d());
onViewParameters[OnViewParameter::Fourth]->setLabelRange(angle);
} break;
case SelectMode::SeekThird: {
if (!onViewParameters[OnViewParameter::Fifth]->isSet) {
onViewParameters[OnViewParameter::Fifth]->setSpinboxValue(
(onSketchPos - handler->referencePoint).Length());
}
Base::Vector2d vec2d = Base::Vector2d(handler->secondTranslationVector.x,
handler->secondTranslationVector.y);
double angle = vec2d.Angle();
double range = angle * 180 / M_PI;
if (!onViewParameters[OnViewParameter::Sixth]->isSet) {
setOnViewParameterValue(OnViewParameter::Sixth, range, Base::Unit::Angle);
}
Base::Vector3d start = toVector3d(handler->referencePoint);
Base::Vector3d end = toVector3d(onSketchPos);
onViewParameters[OnViewParameter::Fifth]->setPoints(start, end);
onViewParameters[OnViewParameter::Sixth]->setPoints(start, Base::Vector3d());
onViewParameters[OnViewParameter::Sixth]->setLabelRange(angle);
} break;
default:
break;
}
}
template<>
void DSHTranslateController::doChangeDrawSketchHandlerMode()
{
switch (handler->state()) {
case SelectMode::SeekFirst: {
if (onViewParameters[OnViewParameter::First]->isSet
&& onViewParameters[OnViewParameter::Second]->isSet) {
handler->setState(SelectMode::SeekSecond);
}
} break;
case SelectMode::SeekSecond: {
if (onViewParameters[OnViewParameter::Third]->isSet
&& onViewParameters[OnViewParameter::Fourth]->isSet) {
if (handler->secondNumberOfCopies == 1) {
handler->setState(SelectMode::End);
}
else {
handler->setState(SelectMode::SeekThird);
}
}
} break;
case SelectMode::SeekThird: {
if (onViewParameters[OnViewParameter::Fifth]->isSet
&& onViewParameters[OnViewParameter::Sixth]->isSet) {
handler->setState(SelectMode::End);
}
} break;
default:
break;
}
}
} // namespace SketcherGui
#endif // SKETCHERGUI_DrawSketchHandlerTranslate_H

View File

@@ -239,6 +239,7 @@
<file>icons/pointers/Sketcher_Pointer_Create_Periodic_BSplineByInterpolation.svg</file>
<file>icons/pointers/Sketcher_Pointer_Create_Point.svg</file>
<file>icons/pointers/Sketcher_Pointer_Create_PointFillet.svg</file>
<file>icons/pointers/Sketcher_Pointer_Create_Translate.svg</file>
<file>icons/pointers/Sketcher_Pointer_Create_Offset.svg</file>
<file>icons/pointers/Sketcher_Pointer_Create_Rotate.svg</file>
<file>icons/pointers/Sketcher_Pointer_Create_Scale.svg</file>
@@ -302,6 +303,7 @@
<file>icons/tools/Sketcher_Offset.svg</file>
<file>icons/tools/Sketcher_OffsetArc.svg</file>
<file>icons/tools/Sketcher_OffsetIntersection.svg</file>
<file>icons/tools/Sketcher_Translate.svg</file>
</qresource>
<qresource>
<file>icons/dialogs/Sketcher_Settings.svg</file>

View File

@@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
version="1.1"
height="64"
width="64"
id="svg12"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs16">
<marker
style="overflow:visible"
id="Arrow1Lstart"
refX="0.0"
refY="0.0"
orient="auto">
<path
transform="scale(0.8) translate(12.5,0)"
style="fill-rule:evenodd;fill:context-stroke;stroke:context-stroke;stroke-width:1.0pt"
d="M 0.0,0.0 L 5.0,-5.0 L -12.5,0.0 L 5.0,5.0 L 0.0,0.0 z "
id="path4362" />
</marker>
</defs>
<g
id="crosshair"
style="stroke:#ffffff;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:miter">
<path
d="m16,3v9m0,8v9m-13-13h9m8,0h9"
id="path9" />
</g>
<g
id="g1"
transform="translate(-3.458469,-1.3832893)">
<path
style="fill:none;stroke:#cc0000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 43.992747,29.448698 v 23.19836"
id="path6036-4" />
<circle
cx="43.992748"
cy="29.448698"
r="5"
id="circle6"
style="fill:none;stroke:#cc0000;stroke-width:2" />
<circle
cx="43.992748"
cy="52.647057"
r="5"
id="circle1"
style="fill:none;stroke:#cc0000;stroke-width:2" />
</g>
<g
id="g3"
transform="translate(-18.92419,3.3529434)">
<path
style="fill:none;stroke:#cc0000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 43.992747,29.448698 v 23.19836"
id="path1" />
<circle
cx="43.992748"
cy="29.448698"
r="5"
id="circle2"
style="fill:none;stroke:#cc0000;stroke-width:2" />
<circle
cx="43.992748"
cy="52.647057"
r="5"
id="circle3"
style="fill:none;stroke:#cc0000;stroke-width:2" />
</g>
<g
id="g5"
transform="translate(12.007252,-6.119522)">
<path
style="fill:none;stroke:#cc0000;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 43.992747,29.448698 v 23.19836"
id="path3" />
<circle
cx="43.992748"
cy="29.448698"
r="5"
id="circle4"
style="fill:none;stroke:#cc0000;stroke-width:2" />
<circle
cx="43.992748"
cy="52.647057"
r="5"
id="circle5"
style="fill:none;stroke:#cc0000;stroke-width:2" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@@ -0,0 +1,585 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="64"
height="64"
id="svg2869"
version="1.1"
viewBox="0 0 64 64"
xmlns:xlink="http://www.w3.org/1999/xlink"
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/">
<defs
id="defs2871">
<linearGradient
id="linearGradient62">
<stop
style="stop-color:#d3d7cf;stop-opacity:1;"
offset="0"
id="stop62" />
<stop
style="stop-color:#eeeeec;stop-opacity:1;"
offset="1"
id="stop61" />
</linearGradient>
<linearGradient
id="linearGradient5">
<stop
style="stop-color:#ef2929;stop-opacity:1;"
offset="0"
id="stop19" />
<stop
style="stop-color:#ef2929;stop-opacity:0;"
offset="1"
id="stop20" />
</linearGradient>
<linearGradient
id="swatch18">
<stop
style="stop-color:#ef2929;stop-opacity:1;"
offset="0"
id="stop18" />
</linearGradient>
<linearGradient
id="swatch15">
<stop
style="stop-color:#3d0000;stop-opacity:1;"
offset="0"
id="stop15" />
</linearGradient>
<linearGradient
id="linearGradient5-1">
<stop
style="stop-color:#ef2929;stop-opacity:1;"
offset="0"
id="stop5" />
<stop
style="stop-color:#ef2929;stop-opacity:0;"
offset="1"
id="stop6" />
</linearGradient>
<linearGradient
id="linearGradient3836-9">
<stop
style="stop-color:#a40000;stop-opacity:1"
offset="0"
id="stop3838-8" />
<stop
style="stop-color:#ef2929;stop-opacity:1"
offset="1"
id="stop3840-1" />
</linearGradient>
<linearGradient
id="linearGradient3836-9-3">
<stop
style="stop-color:#a40000;stop-opacity:1"
offset="0"
id="stop3838-8-5" />
<stop
style="stop-color:#ef2929;stop-opacity:1"
offset="1"
id="stop3840-1-6" />
</linearGradient>
<linearGradient
y2="5"
x2="-22"
y1="18"
x1="-18"
gradientUnits="userSpaceOnUse"
id="linearGradient3082"
xlink:href="#linearGradient3836-9-3" />
<linearGradient
id="linearGradient3836-9-7">
<stop
style="stop-color:#a40000;stop-opacity:1"
offset="0"
id="stop3838-8-0" />
<stop
style="stop-color:#ef2929;stop-opacity:1"
offset="1"
id="stop3840-1-9" />
</linearGradient>
<linearGradient
y2="5"
x2="-22"
y1="18"
x1="-18"
gradientUnits="userSpaceOnUse"
id="linearGradient3082-3"
xlink:href="#linearGradient3836-9-7" />
<linearGradient
xlink:href="#linearGradient3836-9-3"
id="linearGradient3801-1-3"
gradientUnits="userSpaceOnUse"
x1="-18"
y1="18"
x2="-22"
y2="5"
gradientTransform="matrix(0.76342439,0,0,0.75750425,-4.596389,2.7525637)" />
<linearGradient
xlink:href="#linearGradient3836-9-3"
id="linearGradient3801-1-3-2"
gradientUnits="userSpaceOnUse"
x1="-18"
y1="18"
x2="-22"
y2="5"
gradientTransform="matrix(0.84956703,0,0,0.84301394,-2.927337,1.7790378)" />
<linearGradient
xlink:href="#linearGradient3838"
id="linearGradient3844"
x1="36"
y1="1039.3622"
x2="32"
y2="1003.3622"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(2.0563921e-6,-988.36218)" />
<linearGradient
id="linearGradient3838">
<stop
style="stop-color:#d3d7cf;stop-opacity:1;"
offset="0"
id="stop3840" />
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="1"
id="stop3842" />
</linearGradient>
<linearGradient
xlink:href="#linearGradient3830"
id="linearGradient3836"
x1="36"
y1="1037.3622"
x2="32"
y2="1005.3622"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(2.0563921e-6,-988.36218)" />
<linearGradient
id="linearGradient3830">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3832" />
<stop
style="stop-color:#d3d7cf;stop-opacity:1;"
offset="1"
id="stop3834" />
</linearGradient>
<linearGradient
x1="10.504496"
y1="16.48678"
x2="5.9349072"
y2="1.6356685"
id="linearGradient-1"
gradientTransform="scale(0.99999018,1.0000098)"
gradientUnits="userSpaceOnUse">
<stop
stop-color="#A40000"
offset="0%"
id="stop6-9" />
<stop
stop-color="#EF2929"
offset="100%"
id="stop8" />
</linearGradient>
<linearGradient
xlink:href="#linearGradient3815"
id="linearGradient3856"
gradientUnits="userSpaceOnUse"
x1="80"
y1="58"
x2="79"
y2="42" />
<linearGradient
id="linearGradient3815">
<stop
style="stop-color:#3465a4;stop-opacity:1"
offset="0"
id="stop3817" />
<stop
style="stop-color:#729fcf;stop-opacity:1"
offset="1"
id="stop3819" />
</linearGradient>
<linearGradient
xlink:href="#linearGradient3841"
id="linearGradient3858"
gradientUnits="userSpaceOnUse"
x1="109"
y1="51"
x2="105"
y2="38" />
<linearGradient
id="linearGradient3841">
<stop
style="stop-color:#204a87;stop-opacity:1"
offset="0"
id="stop3843" />
<stop
style="stop-color:#3465a4;stop-opacity:1"
offset="1"
id="stop3845" />
</linearGradient>
<linearGradient
y2="5"
x2="-22"
y1="18"
x1="-18"
gradientTransform="matrix(0.77114848,0,0,0.77113937,-4.4090973,2.5859051)"
gradientUnits="userSpaceOnUse"
id="linearGradient3898"
xlink:href="#linearGradient3836-9-3" />
<linearGradient
xlink:href="#linearGradient3815"
id="linearGradient3978"
gradientUnits="userSpaceOnUse"
x1="-15"
y1="37"
x2="-19"
y2="37"
gradientTransform="rotate(135.18861,5.7426909,37.969029)" />
<linearGradient
xlink:href="#linearGradient17"
id="linearGradient3898-0"
x1="37.429146"
y1="41.590584"
x2="24.483221"
y2="4.9104676"
gradientUnits="userSpaceOnUse" />
<linearGradient
id="linearGradient17">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop16" />
<stop
style="stop-color:#ffffff;stop-opacity:0"
offset="1"
id="stop17" />
</linearGradient>
<linearGradient
xlink:href="#linearGradient17"
id="linearGradient3856-9"
x1="22.84341"
y1="4.8241611"
x2="30.783579"
y2="28.644661"
gradientUnits="userSpaceOnUse" />
<linearGradient
id="linearGradient2">
<stop
style="stop-color:#73d216;stop-opacity:1;"
offset="0"
id="stop1" />
<stop
style="stop-color:#8ae234;stop-opacity:1;"
offset="1"
id="stop2" />
</linearGradient>
<linearGradient
xlink:href="#linearGradient3836-9-3"
id="linearGradient3187"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.53559025,0,0,0.53556875,-6.4812797,2.8041108)"
x1="-18"
y1="18"
x2="-22"
y2="5" />
<linearGradient
xlink:href="#linearGradient3836-9-3"
id="linearGradient3155"
gradientUnits="userSpaceOnUse"
x1="-24.890066"
y1="10.114055"
x2="-12.869251"
y2="13.649589" />
<linearGradient
xlink:href="#linearGradient3836-9-3"
id="linearGradient3157"
gradientUnits="userSpaceOnUse"
x1="-25.073793"
y1="8.5160742"
x2="-11.638764"
y2="13.465822" />
<linearGradient
xlink:href="#linearGradient3836-9-3"
id="linearGradient53"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.82607043,0,0,0.82533448,-4.0098079,1.346708)"
x1="-18"
y1="18"
x2="-22"
y2="5" />
<linearGradient
y2="13.649589"
x2="-12.869251"
y1="10.114055"
x1="-24.890066"
gradientUnits="userSpaceOnUse"
id="linearGradient3091"
xlink:href="#linearGradient3836-9-3" />
<linearGradient
gradientTransform="rotate(-135,22.98116,18.358513)"
y2="13.465822"
x2="-11.638764"
y1="8.5160742"
x1="-25.073793"
gradientUnits="userSpaceOnUse"
id="linearGradient3093"
xlink:href="#linearGradient3836-9-3" />
<linearGradient
xlink:href="#linearGradient3836-9-3"
id="linearGradient3792-1"
x1="22"
y1="27"
x2="9"
y2="30"
gradientUnits="userSpaceOnUse" />
<linearGradient
xlink:href="#linearGradient62"
id="linearGradient3792"
x1="18"
y1="39"
x2="12"
y2="11"
gradientUnits="userSpaceOnUse" />
<linearGradient
id="linearGradient3786">
<stop
style="stop-color:#4e9a06;stop-opacity:1"
offset="0"
id="stop3788" />
<stop
style="stop-color:#8ae234;stop-opacity:1"
offset="1"
id="stop3790" />
</linearGradient>
<linearGradient
xlink:href="#linearGradient3786"
id="linearGradient3896"
x1="20.785244"
y1="58.824768"
x2="12.00527"
y2="36.247696"
gradientUnits="userSpaceOnUse" />
<linearGradient
xlink:href="#linearGradient3836-9-3"
id="linearGradient63"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.82607043,0,0,0.82533448,-4.0098079,1.346708)"
x1="-18"
y1="18"
x2="-22"
y2="5" />
<linearGradient
xlink:href="#linearGradient3836-9-3"
id="linearGradient65"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.82607043,0,0,0.82533448,-4.0098079,1.346708)"
x1="-18"
y1="18"
x2="-22"
y2="5" />
<linearGradient
xlink:href="#linearGradient3836-9-3"
id="linearGradient76"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.82607043,0,0,0.82533448,-4.0098079,1.346708)"
x1="-18"
y1="18"
x2="-22"
y2="5" />
<linearGradient
xlink:href="#linearGradient3836-9-3"
id="linearGradient77"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.82607043,0,0,0.82533448,-4.0098079,1.346708)"
x1="-18"
y1="18"
x2="-22"
y2="5" />
<linearGradient
xlink:href="#linearGradient3836-9-3"
id="linearGradient78"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.82607043,0,0,0.82533448,-4.0098079,1.346708)"
x1="-18"
y1="18"
x2="-22"
y2="5" />
</defs>
<metadata
id="metadata2874">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:creator>
<cc:Agent>
<dc:title>[maxwxyz]</dc:title>
</cc:Agent>
</dc:creator>
<dc:relation>https://www.freecad.org/wiki/index.php?title=Artwork</dc:relation>
<dc:publisher>
<cc:Agent>
<dc:title>FreeCAD</dc:title>
</cc:Agent>
</dc:publisher>
<dc:identifier>FreeCAD/src/Mod/Sketcher/Gui/Resources/icons/Sketcher_CreateArc.svg</dc:identifier>
<dc:rights>
<cc:Agent>
<dc:title>FreeCAD LGPL2+</dc:title>
</cc:Agent>
</dc:rights>
<dc:date>2023-12-19</dc:date>
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer3"
style="display:inline"
transform="translate(0,-1.1650101)">
<g
id="g78"
transform="translate(0.99999179,-2.00013)">
<g
transform="translate(-25,15.16501)"
id="g3529-4">
<path
id="path3491-6"
d="M 56,8 V 32"
style="fill:none;stroke:#151819;stroke-width:8;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
id="path3491-4-07"
d="M 56,8 V 32"
style="fill:none;stroke:#d3d7cf;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
id="path3491-4-1-17"
d="M 55,8 V 32"
style="fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
</g>
<g
transform="matrix(0.77869459,0,0,0.77869445,46.548272,14.762768)"
id="g63"
style="stroke-width:1.2842">
<path
style="fill:none;stroke:#2e0000;stroke-width:2.56841;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path62"
d="M -26.310778,5.3580033 A 8.3519646,8.3515832 0.02039876 1 1 -13.623399,16.222662 8.3519646,8.3515832 0.02039876 1 1 -26.310778,5.3580033 Z" />
<path
style="fill:url(#linearGradient63);fill-opacity:1;stroke:#ef2929;stroke-width:2.56842;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path63"
d="m -24.358888,7.0362241 a 5.782493,5.7773415 0 1 1 8.784093,7.5158349 5.782493,5.7773415 0 0 1 -8.784093,-7.5158349 z" />
</g>
<g
transform="matrix(0.77869459,0,0,0.77869445,46.548272,38.762768)"
id="g71"
style="stroke-width:1.2842">
<path
style="fill:none;stroke:#2e0000;stroke-width:2.56841;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path70"
d="M -26.310778,5.3580033 A 8.3519646,8.3515832 0.02039876 1 1 -13.623399,16.222662 8.3519646,8.3515832 0.02039876 1 1 -26.310778,5.3580033 Z" />
<path
style="fill:url(#linearGradient77);fill-opacity:1;stroke:#ef2929;stroke-width:2.56842;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path71"
d="m -24.358888,7.0362241 a 5.782493,5.7773415 0 1 1 8.784093,7.5158349 5.782493,5.7773415 0 0 1 -8.784093,-7.5158349 z" />
</g>
</g>
<g
id="g79">
<g
transform="translate(-3.0000002,3.1650101)"
id="g3529-2">
<path
id="path3491-0"
d="M 56,8 V 32"
style="fill:none;stroke:#000000;stroke-width:8;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
id="path3491-4-0"
d="M 56,8 V 32"
style="fill:none;stroke:#d3d7cf;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
id="path3491-4-1-1"
d="M 55,8 V 32"
style="fill:none;stroke:#ffffff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
</g>
<g
transform="matrix(0.77869459,0,0,0.77869445,68.548264,2.762638)"
id="g65"
style="stroke-width:1.2842">
<path
style="fill:none;stroke:#2e0000;stroke-width:2.56841;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path64"
d="M -26.310778,5.3580033 A 8.3519646,8.3515832 0.02039876 1 1 -13.623399,16.222662 8.3519646,8.3515832 0.02039876 1 1 -26.310778,5.3580033 Z" />
<path
style="fill:url(#linearGradient65);fill-opacity:1;stroke:#ef2929;stroke-width:2.56842;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path65"
d="m -24.358888,7.0362241 a 5.782493,5.7773415 0 1 1 8.784093,7.5158349 5.782493,5.7773415 0 0 1 -8.784093,-7.5158349 z" />
</g>
<g
transform="matrix(0.77869459,0,0,0.77869445,68.548264,26.762638)"
id="g73"
style="stroke-width:1.2842">
<path
style="fill:none;stroke:#2e0000;stroke-width:2.56841;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path72"
d="M -26.310778,5.3580033 A 8.3519646,8.3515832 0.02039876 1 1 -13.623399,16.222662 8.3519646,8.3515832 0.02039876 1 1 -26.310778,5.3580033 Z" />
<path
style="fill:url(#linearGradient76);fill-opacity:1;stroke:#ef2929;stroke-width:2.56842;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path73"
d="m -24.358888,7.0362241 a 5.782493,5.7773415 0 1 1 8.784093,7.5158349 5.782493,5.7773415 0 0 1 -8.784093,-7.5158349 z" />
</g>
</g>
<g
id="g80">
<g
transform="translate(-45,23.16501)"
id="g3529-7">
<path
id="path3491-7"
d="M 56,8 V 32"
style="fill:none;stroke:#162c02;stroke-width:8;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
id="path3491-4-7"
d="M 56,8 V 32"
style="fill:none;stroke:#73d216;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
id="path3491-4-1-3"
d="M 55,8 V 32"
style="fill:none;stroke:#8ae234;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
</g>
<g
transform="matrix(0.77869459,0,0,0.77869445,26.548264,46.762638)"
id="g69"
style="stroke-width:1.2842">
<path
style="fill:none;stroke:#2e0000;stroke-width:2.56841;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path68"
d="M -26.310778,5.3580033 A 8.3519646,8.3515832 0.02039876 1 1 -13.623399,16.222662 8.3519646,8.3515832 0.02039876 1 1 -26.310778,5.3580033 Z" />
<path
style="fill:url(#linearGradient78);fill-opacity:1;stroke:#ef2929;stroke-width:2.56842;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path69"
d="m -24.358888,7.0362241 a 5.782493,5.7773415 0 1 1 8.784093,7.5158349 5.782493,5.7773415 0 0 1 -8.784093,-7.5158349 z" />
</g>
<g
transform="matrix(0.77869459,0,0,0.77869445,26.548264,22.762638)"
id="g53"
style="stroke-width:1.2842">
<path
style="fill:none;stroke:#2e0000;stroke-width:2.56841;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path52"
d="M -26.310778,5.3580033 A 8.3519646,8.3515832 0.02039876 1 1 -13.623399,16.222662 8.3519646,8.3515832 0.02039876 1 1 -26.310778,5.3580033 Z" />
<path
style="fill:url(#linearGradient53);fill-opacity:1;stroke:#ef2929;stroke-width:2.56842;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path53"
d="m -24.358888,7.0362241 a 5.782493,5.7773415 0 1 1 8.784093,7.5158349 5.782493,5.7773415 0 0 1 -8.784093,-7.5158349 z" />
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 19 KiB

View File

@@ -537,6 +537,7 @@ inline void SketcherAddWorkbenchTools<Gui::MenuItem>(Gui::MenuItem& consaccel)
<< "Sketcher_Rotate"
<< "Sketcher_Scale"
<< "Sketcher_Symmetry"
<< "Sketcher_Translate"
<< "Sketcher_Clone"
<< "Sketcher_Copy"
<< "Sketcher_Move"
@@ -567,6 +568,7 @@ inline void SketcherAddWorkbenchTools<Gui::ToolBarItem>(Gui::ToolBarItem& consac
<< "Sketcher_Rotate"
<< "Sketcher_Scale"
<< "Sketcher_Symmetry"
<< "Sketcher_Translate"
<< "Sketcher_CompCopy"
<< "Sketcher_RectangularArray"
<< "Sketcher_RemoveAxesAlignment";