+ issue #0001475: Implement a 3 point arc similar to solidworks in sketcher
This commit is contained in:
parent
23462b70d1
commit
ea4abcb57a
|
@ -61,6 +61,7 @@ public:
|
|||
inline bool operator== (const Vector2D &rclVct) const;
|
||||
inline Vector2D operator+ (const Vector2D &rclVct) const;
|
||||
inline Vector2D operator- (const Vector2D &rclVct) const;
|
||||
inline Vector2D operator/ (const double x) const;
|
||||
|
||||
inline void Set (double fPX, double fPY);
|
||||
inline void Scale (double fS);
|
||||
|
@ -221,6 +222,11 @@ inline double Vector2D::operator* (const Vector2D &rclVct) const
|
|||
return (fX * rclVct.fX) + (fY * rclVct.fY);
|
||||
}
|
||||
|
||||
inline Vector2D Vector2D::operator/ (const double x) const
|
||||
{
|
||||
return Vector2D(fX / x, fY / x);
|
||||
}
|
||||
|
||||
inline void Vector2D::Scale (double fS)
|
||||
{
|
||||
fX *= fS;
|
||||
|
|
|
@ -241,6 +241,7 @@ Gui::MenuItem* Workbench::setupMenuBar() const
|
|||
geom->setCommand("Sketcher geometries");
|
||||
*geom << "Sketcher_CreatePoint"
|
||||
<< "Sketcher_CreateArc"
|
||||
<< "Sketcher_Create3PointArc"
|
||||
<< "Sketcher_CreateCircle"
|
||||
<< "Sketcher_CreateLine"
|
||||
<< "Sketcher_CreatePolyline"
|
||||
|
@ -503,6 +504,7 @@ Gui::ToolBarItem* Workbench::setupToolBars() const
|
|||
<< "Separator"
|
||||
<< "Sketcher_CreatePoint"
|
||||
<< "Sketcher_CreateArc"
|
||||
<< "Sketcher_Create3PointArc"
|
||||
<< "Sketcher_CreateCircle"
|
||||
<< "Sketcher_CreateLine"
|
||||
<< "Sketcher_CreatePolyline"
|
||||
|
|
|
@ -167,6 +167,7 @@ Gui::MenuItem* Workbench::setupMenuBar() const
|
|||
geom->setCommand("Sketcher geometries");
|
||||
*geom << "Sketcher_CreatePoint"
|
||||
<< "Sketcher_CreateArc"
|
||||
<< "Sketcher_Create3PointArc"
|
||||
<< "Sketcher_CreateCircle"
|
||||
<< "Sketcher_CreateLine"
|
||||
<< "Sketcher_CreatePolyline"
|
||||
|
@ -260,6 +261,7 @@ Gui::ToolBarItem* Workbench::setupToolBars() const
|
|||
geom->setCommand("Sketcher geometries");
|
||||
*geom << "Sketcher_CreatePoint"
|
||||
<< "Sketcher_CreateArc"
|
||||
<< "Sketcher_Create3PointArc"
|
||||
<< "Sketcher_CreateCircle"
|
||||
<< "Sketcher_CreateLine"
|
||||
<< "Sketcher_CreatePolyline"
|
||||
|
|
|
@ -49,6 +49,40 @@ using namespace SketcherGui;
|
|||
|
||||
/* helper functions ======================================================*/
|
||||
|
||||
// Return counter-clockwise angle from horizontal out of p1 to p2 in radians.
|
||||
double GetPointAngle (const Base::Vector2D &p1, const Base::Vector2D &p2)
|
||||
{
|
||||
double dX = p2.fX - p1.fX;
|
||||
double dY = p2.fY - p1.fY;
|
||||
return dY >= 0 ? atan2(dY, dX) : atan2(dY, dX) + 2*M_PI;
|
||||
}
|
||||
|
||||
/*
|
||||
Find the centerpoint of a circle drawn through any 3 points:
|
||||
|
||||
Given points p1-3, draw 2 lines: S12 and S23 which each connect two points. From the
|
||||
midpoint of each line, draw a perpendicular line (S12p/S23p) across the circle. These
|
||||
lines will cross at the centerpoint.
|
||||
|
||||
Mathematically, line S12 will have a slope of m12 which can be determined. Therefore,
|
||||
the slope m12p is -1/m12. Line S12p will have an equation of y = m12p*x + b12p. b12p can
|
||||
be solved for using the midpoint of the line. This can be done for both lines. Since
|
||||
both S12p and S23p cross at the centerpoint, solving the two equations together will give
|
||||
the location of the centerpoint.
|
||||
*/
|
||||
Base::Vector2D GetCircleCenter (const Base::Vector2D &p1, const Base::Vector2D &p2, const Base::Vector2D &p3)
|
||||
{
|
||||
double m12p = (p1.fX - p2.fX) / (p2.fY - p1.fY);
|
||||
double m23p = (p2.fX - p3.fX) / (p3.fY - p2.fY);
|
||||
double x = 1/( 2*(m12p - m23p) ) * ( (pow(p3.fX, 2) - pow(p2.fX, 2)) / (p3.fY - p2.fY) -
|
||||
(pow(p2.fX, 2) - pow(p1.fX, 2)) / (p2.fY - p1.fY) +
|
||||
p3.fY - p1.fY );
|
||||
double y = m12p * ( x - (p1.fX + p2.fX)/2 ) + (p1.fY + p2.fY)/2;
|
||||
|
||||
return Base::Vector2D(x, y);
|
||||
}
|
||||
|
||||
|
||||
void ActivateHandler(Gui::Document *doc,DrawSketchHandler *handler)
|
||||
{
|
||||
if (doc) {
|
||||
|
@ -1214,6 +1248,261 @@ bool CmdSketcherCreateArc::isActive(void)
|
|||
return isCreateGeoActive(getActiveGuiDocument());
|
||||
}
|
||||
|
||||
|
||||
// ======================================================================================
|
||||
|
||||
/* XPM */
|
||||
static const char *cursor_create3pointarc[]={
|
||||
"32 32 3 1",
|
||||
"+ c white",
|
||||
"# c red",
|
||||
". c None",
|
||||
"......+...........###...........",
|
||||
"......+...........#.#...........",
|
||||
"......+...........###...........",
|
||||
"......+..............##.........",
|
||||
"......+...............##........",
|
||||
".......................#........",
|
||||
"+++++...+++++...........#.......",
|
||||
"........................##......",
|
||||
"......+..................#......",
|
||||
"......+..................#......",
|
||||
"......+...................#.....",
|
||||
"......+...................#.....",
|
||||
"......+...................#.....",
|
||||
"..........................#.....",
|
||||
"..........................#.....",
|
||||
"..........................#.....",
|
||||
"..........................#.....",
|
||||
".........................#......",
|
||||
".......................###......",
|
||||
".......................#.#......",
|
||||
".......................###......",
|
||||
"...###.................#........",
|
||||
"...#.#................#.........",
|
||||
"...###...............#..........",
|
||||
"......##...........##...........",
|
||||
".......###.......##.............",
|
||||
"..........#######...............",
|
||||
"................................",
|
||||
"................................",
|
||||
"................................",
|
||||
"................................",
|
||||
"................................"};
|
||||
|
||||
class DrawSketchHandler3PointArc : public DrawSketchHandler
|
||||
{
|
||||
public:
|
||||
DrawSketchHandler3PointArc()
|
||||
: Mode(STATUS_SEEK_First),EditCurve(2){}
|
||||
virtual ~DrawSketchHandler3PointArc(){}
|
||||
/// mode table
|
||||
enum SelectMode {
|
||||
STATUS_SEEK_First, /**< enum value ----. */
|
||||
STATUS_SEEK_Second, /**< enum value ----. */
|
||||
STATUS_SEEK_Third, /**< enum value ----. */
|
||||
STATUS_End
|
||||
};
|
||||
|
||||
virtual void activated(ViewProviderSketch *sketchgui)
|
||||
{
|
||||
setCursor(QPixmap(cursor_create3pointarc),7,7);
|
||||
}
|
||||
|
||||
virtual void mouseMove(Base::Vector2D onSketchPos)
|
||||
{
|
||||
if (Mode==STATUS_SEEK_First) {
|
||||
setPositionText(onSketchPos);
|
||||
if (seekAutoConstraint(sugConstr1, onSketchPos, Base::Vector2D(0.f,0.f))) {
|
||||
renderSuggestConstraintsCursor(sugConstr1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (Mode==STATUS_SEEK_Second) {
|
||||
CenterPoint = EditCurve[0] = (onSketchPos - FirstPoint)/2 + FirstPoint;
|
||||
EditCurve[1] = EditCurve[33] = onSketchPos;
|
||||
radius = (onSketchPos - CenterPoint).Length();
|
||||
double lineAngle = GetPointAngle(CenterPoint, onSketchPos);
|
||||
|
||||
// Build a 32 point circle ignoring already constructed points
|
||||
for (int i=1; i <= 32; i++) {
|
||||
// Start at current angle
|
||||
double angle = (i-1)*2*M_PI/32.0 + lineAngle; // N point closed circle has N segments
|
||||
if (i != 1 && i != 17 ) {
|
||||
EditCurve[i] = Base::Vector2D(CenterPoint.fX + radius*cos(angle),
|
||||
CenterPoint.fY + radius*sin(angle));
|
||||
}
|
||||
}
|
||||
|
||||
// Display radius and start angle
|
||||
// This lineAngle will report counter-clockwise from +X, not relatively
|
||||
SbString text;
|
||||
text.sprintf(" (%.1fR,%.1fdeg)", (float) radius, (float) lineAngle * 180 / M_PI);
|
||||
setPositionText(onSketchPos, text);
|
||||
|
||||
sketchgui->drawEdit(EditCurve);
|
||||
if (seekAutoConstraint(sugConstr2, onSketchPos, Base::Vector2D(0.f,0.f))) {
|
||||
renderSuggestConstraintsCursor(sugConstr2);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (Mode==STATUS_SEEK_Third) {
|
||||
/*
|
||||
Centerline inverts when the arc flips sides. Easily taken care of by replacing
|
||||
centerline with a point. It happens because the direction the curve is being drawn
|
||||
reverses.
|
||||
*/
|
||||
CenterPoint = EditCurve[30] = GetCircleCenter(FirstPoint, SecondPoint, onSketchPos);
|
||||
radius = (SecondPoint - CenterPoint).Length();
|
||||
|
||||
double angle1 = GetPointAngle(CenterPoint, FirstPoint);
|
||||
double angle2 = GetPointAngle(CenterPoint, SecondPoint);
|
||||
double angle3 = GetPointAngle(CenterPoint, onSketchPos);
|
||||
|
||||
// angle3 == angle1 or angle2 shouldn't be allowed but not sure...catch/try?
|
||||
// Point 3 is between Point 1 and 2
|
||||
if ( angle3 > min(angle1, angle2) && angle3 < max(angle1, angle2) ) {
|
||||
EditCurve[0] = angle2 > angle1 ? FirstPoint : SecondPoint;
|
||||
EditCurve[29] = angle2 > angle1 ? SecondPoint : FirstPoint;
|
||||
startAngle = min(angle1, angle2);
|
||||
endAngle = max(angle1, angle2);
|
||||
arcAngle = endAngle - startAngle;
|
||||
}
|
||||
// Point 3 is not between Point 1 and 2
|
||||
else {
|
||||
EditCurve[0] = angle2 > angle1 ? SecondPoint : FirstPoint;
|
||||
EditCurve[29] = angle2 > angle1 ? FirstPoint : SecondPoint;
|
||||
startAngle = max(angle1, angle2);
|
||||
endAngle = min(angle1, angle2);
|
||||
arcAngle = 2*M_PI - (startAngle - endAngle);
|
||||
}
|
||||
|
||||
// Build a 30 point circle ignoring already constructed points
|
||||
for (int i=1; i <= 28; i++) {
|
||||
double angle = startAngle + i*arcAngle/29.0; // N point arc has N-1 segments
|
||||
EditCurve[i] = Base::Vector2D(CenterPoint.fX + radius*cos(angle),
|
||||
CenterPoint.fY + radius*sin(angle));
|
||||
}
|
||||
|
||||
SbString text;
|
||||
text.sprintf(" (%.1fR,%.1fdeg)", (float) radius, (float) arcAngle * 180 / M_PI);
|
||||
setPositionText(onSketchPos, text);
|
||||
|
||||
sketchgui->drawEdit(EditCurve);
|
||||
if (seekAutoConstraint(sugConstr3, onSketchPos, Base::Vector2D(0.0,0.0))) {
|
||||
renderSuggestConstraintsCursor(sugConstr3);
|
||||
return;
|
||||
}
|
||||
}
|
||||
applyCursor();
|
||||
}
|
||||
|
||||
virtual bool pressButton(Base::Vector2D onSketchPos)
|
||||
{
|
||||
if (Mode==STATUS_SEEK_First){
|
||||
// 32 point curve + center + endpoint
|
||||
EditCurve.resize(34);
|
||||
// 17 is circle halfway point (1+32/2)
|
||||
FirstPoint = EditCurve[17] = onSketchPos;
|
||||
|
||||
Mode = STATUS_SEEK_Second;
|
||||
}
|
||||
else if (Mode==STATUS_SEEK_Second){
|
||||
// 30 point arc and center point
|
||||
EditCurve.resize(31);
|
||||
SecondPoint = onSketchPos;
|
||||
|
||||
Mode = STATUS_SEEK_Third;
|
||||
}
|
||||
else {
|
||||
EditCurve.resize(30);
|
||||
|
||||
sketchgui->drawEdit(EditCurve);
|
||||
applyCursor();
|
||||
Mode = STATUS_End;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool releaseButton(Base::Vector2D onSketchPos)
|
||||
{
|
||||
// Need to look at. rx might need fixing.
|
||||
if (Mode==STATUS_End) {
|
||||
unsetCursor();
|
||||
resetPositionText();
|
||||
Gui::Command::openCommand("Add sketch arc");
|
||||
Gui::Command::doCommand(Gui::Command::Doc,
|
||||
"App.ActiveDocument.%s.addGeometry(Part.ArcOfCircle"
|
||||
"(Part.Circle(App.Vector(%f,%f,0),App.Vector(0,0,1),%f),"
|
||||
"%f,%f))",
|
||||
sketchgui->getObject()->getNameInDocument(),
|
||||
CenterPoint.fX, CenterPoint.fY, radius,
|
||||
startAngle, endAngle);
|
||||
|
||||
Gui::Command::commitCommand();
|
||||
Gui::Command::updateActive();
|
||||
|
||||
// Auto Constraint center point
|
||||
if (sugConstr1.size() > 0) {
|
||||
createAutoConstraints(sugConstr1, getHighestCurveIndex(), Sketcher::mid);
|
||||
sugConstr1.clear();
|
||||
}
|
||||
|
||||
// Auto Constraint first picked point
|
||||
if (sugConstr2.size() > 0) {
|
||||
createAutoConstraints(sugConstr2, getHighestCurveIndex(), (arcAngle > 0) ? Sketcher::start : Sketcher::end );
|
||||
sugConstr2.clear();
|
||||
}
|
||||
|
||||
// Auto Constraint second picked point
|
||||
if (sugConstr3.size() > 0) {
|
||||
createAutoConstraints(sugConstr3, getHighestCurveIndex(), (arcAngle > 0) ? Sketcher::end : Sketcher::start);
|
||||
sugConstr3.clear();
|
||||
}
|
||||
|
||||
EditCurve.clear();
|
||||
sketchgui->drawEdit(EditCurve);
|
||||
sketchgui->purgeHandler(); // no code after this line, Handler get deleted in ViewProvider
|
||||
}
|
||||
return true;
|
||||
}
|
||||
protected:
|
||||
SelectMode Mode;
|
||||
std::vector<Base::Vector2D> EditCurve;
|
||||
Base::Vector2D CenterPoint, FirstPoint, SecondPoint;
|
||||
double radius, startAngle, endAngle, arcAngle;
|
||||
std::vector<AutoConstraint> sugConstr1, sugConstr2, sugConstr3;
|
||||
};
|
||||
|
||||
|
||||
DEF_STD_CMD_A(CmdSketcherCreate3PointArc);
|
||||
|
||||
CmdSketcherCreate3PointArc::CmdSketcherCreate3PointArc()
|
||||
: Command("Sketcher_Create3PointArc")
|
||||
{
|
||||
sAppModule = "Sketcher";
|
||||
sGroup = QT_TR_NOOP("Sketcher");
|
||||
sMenuText = QT_TR_NOOP("Create a 3 point arc");
|
||||
sToolTipText = QT_TR_NOOP("Create an arc in the sketch");
|
||||
sWhatsThis = sToolTipText;
|
||||
sStatusTip = sToolTipText;
|
||||
sPixmap = "Sketcher_Create3PointArc";
|
||||
eType = ForEdit;
|
||||
}
|
||||
|
||||
void CmdSketcherCreate3PointArc::activated(int iMsg)
|
||||
{
|
||||
ActivateHandler(getActiveGuiDocument(),new DrawSketchHandler3PointArc() );
|
||||
}
|
||||
|
||||
bool CmdSketcherCreate3PointArc::isActive(void)
|
||||
{
|
||||
return isCreateGeoActive(getActiveGuiDocument());
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ======================================================================================
|
||||
|
||||
/* XPM */
|
||||
|
@ -2135,6 +2424,7 @@ void CreateSketcherCommandsCreateGeo(void)
|
|||
|
||||
rcCmdMgr.addCommand(new CmdSketcherCreatePoint());
|
||||
rcCmdMgr.addCommand(new CmdSketcherCreateArc());
|
||||
rcCmdMgr.addCommand(new CmdSketcherCreate3PointArc());
|
||||
rcCmdMgr.addCommand(new CmdSketcherCreateCircle());
|
||||
rcCmdMgr.addCommand(new CmdSketcherCreateLine());
|
||||
rcCmdMgr.addCommand(new CmdSketcherCreatePolyline());
|
||||
|
|
|
@ -61,6 +61,7 @@ icons/Constraint_PointOnObject.svg \
|
|||
icons/Sketcher_ConstrainLock.svg \
|
||||
icons/Sketcher_ConstrainVertical.svg \
|
||||
icons/Sketcher_CreateArc.svg \
|
||||
icons/Sketcher_Create3PointArc.svg \
|
||||
icons/Sketcher_CreateCircle.svg \
|
||||
icons/Sketcher_CreateLine.svg \
|
||||
icons/Sketcher_CreatePoint.svg \
|
||||
|
|
|
@ -51,6 +51,7 @@
|
|||
<file>icons/Sketcher_ConstrainParallel.svg</file>
|
||||
<file>icons/Sketcher_ConstrainVertical.svg</file>
|
||||
<file>icons/Sketcher_CreateArc.svg</file>
|
||||
<file>icons/Sketcher_Create3PointArc.svg</file>
|
||||
<file>icons/Sketcher_CreateCircle.svg</file>
|
||||
<file>icons/Sketcher_CreateLine.svg</file>
|
||||
<file>icons/Sketcher_CreatePoint.svg</file>
|
||||
|
|
|
@ -0,0 +1,280 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="64px"
|
||||
height="64px"
|
||||
id="svg2869"
|
||||
sodipodi:version="0.32"
|
||||
inkscape:version="0.48.3.1 r9886"
|
||||
sodipodi:docname="Sketcher_Create_Arc_from_3_points.svg"
|
||||
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
||||
version="1.1"
|
||||
inkscape:export-filename="/home/user/Downloads/cad/mystuff/icons/sketcher/Sketcher_Create_Arc_from_3_points_16px.png"
|
||||
inkscape:export-xdpi="22.5"
|
||||
inkscape:export-ydpi="22.5">
|
||||
<defs
|
||||
id="defs2871">
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3144"
|
||||
id="radialGradient2378"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1,0,0,0.6985294,0,202.82863)"
|
||||
cx="225.26402"
|
||||
cy="672.79736"
|
||||
fx="225.26402"
|
||||
fy="672.79736"
|
||||
r="34.345188" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3144"
|
||||
id="radialGradient2368"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1,0,0,0.6985294,0,202.82863)"
|
||||
cx="225.26402"
|
||||
cy="672.79736"
|
||||
fx="225.26402"
|
||||
fy="672.79736"
|
||||
r="34.345188" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
id="linearGradient3144">
|
||||
<stop
|
||||
style="stop-color:#ffffff;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop3146" />
|
||||
<stop
|
||||
style="stop-color:#ffffff;stop-opacity:0;"
|
||||
offset="1"
|
||||
id="stop3148" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3144"
|
||||
id="radialGradient2370"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1,0,0,0.6985294,0,202.82863)"
|
||||
cx="225.26402"
|
||||
cy="672.79736"
|
||||
fx="225.26402"
|
||||
fy="672.79736"
|
||||
r="34.345188" />
|
||||
<inkscape:perspective
|
||||
sodipodi:type="inkscape:persp3d"
|
||||
inkscape:vp_x="0 : 32 : 1"
|
||||
inkscape:vp_y="0 : 1000 : 0"
|
||||
inkscape:vp_z="64 : 32 : 1"
|
||||
inkscape:persp3d-origin="32 : 21.333333 : 1"
|
||||
id="perspective2877" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3144"
|
||||
id="radialGradient3014"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1,0,0,0.6985294,0,202.82863)"
|
||||
cx="225.26402"
|
||||
cy="672.79736"
|
||||
fx="225.26402"
|
||||
fy="672.79736"
|
||||
r="34.345188" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3144"
|
||||
id="radialGradient3016"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1,0,0,0.6985294,0,202.82863)"
|
||||
cx="225.26402"
|
||||
cy="672.79736"
|
||||
fx="225.26402"
|
||||
fy="672.79736"
|
||||
r="34.345188" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3144"
|
||||
id="radialGradient3018"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1,0,0,0.6985294,0,202.82863)"
|
||||
cx="225.26402"
|
||||
cy="672.79736"
|
||||
fx="225.26402"
|
||||
fy="672.79736"
|
||||
r="34.345188" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3144"
|
||||
id="radialGradient3040"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1,0,0,0.6985294,0,202.82863)"
|
||||
cx="225.26402"
|
||||
cy="672.79736"
|
||||
fx="225.26402"
|
||||
fy="672.79736"
|
||||
r="34.345188" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3144"
|
||||
id="radialGradient3048"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1,0,0,0.6985294,0,202.82863)"
|
||||
cx="225.26402"
|
||||
cy="672.79736"
|
||||
fx="225.26402"
|
||||
fy="672.79736"
|
||||
r="34.345188" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient3144"
|
||||
id="radialGradient3054"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1,0,0,0.6985294,0,202.82863)"
|
||||
cx="225.26402"
|
||||
cy="672.79736"
|
||||
fx="225.26402"
|
||||
fy="672.79736"
|
||||
r="34.345188" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="13.21875"
|
||||
inkscape:cx="20.312057"
|
||||
inkscape:cy="32"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
inkscape:document-units="px"
|
||||
inkscape:grid-bbox="true"
|
||||
inkscape:window-width="1280"
|
||||
inkscape:window-height="1004"
|
||||
inkscape:window-x="1278"
|
||||
inkscape:window-y="-3"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:snap-global="false" />
|
||||
<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:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1"
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer">
|
||||
<path
|
||||
id="path3030"
|
||||
d="m 41.158396,21.820361 c -3.738351,0.100094 -6.690585,3.218276 -6.590489,6.956628 0.100094,3.738351 3.21392,6.690579 6.952269,6.590489 3.738351,-0.100093 6.690582,-3.218278 6.59049,-6.956628 -0.100094,-3.738351 -3.213916,-6.690581 -6.95227,-6.590489 z"
|
||||
style="fill:#000000;fill-opacity:0.5098038;fill-rule:evenodd;stroke:none;stroke-width:5.80000019;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="sssss" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#000000;fill-opacity:0.5098038;fill-rule:evenodd;stroke:none;stroke-width:5.80000019;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
|
||||
d="m 16.977304,11.284084 c -3.581371,0.100355 -6.499481,2.999105 -6.581772,6.621 -0.08494,3.738728 2.882274,6.841175 6.621001,6.926118 2.579428,0.0586 4.858043,-1.332863 6.05,-3.430369 14.528773,2.447923 26.060584,13.167264 29.003382,26.850142 -1.939629,1.237203 -3.199987,3.431726 -3.133968,5.897443 0.100093,3.738351 3.213915,6.690579 6.952269,6.590489 3.738351,-0.100093 6.690583,-3.218278 6.590489,-6.956628 -0.09151,-3.417828 -2.702348,-6.175032 -6.006412,-6.546901 C 53.210113,31.759076 40.21362,19.638739 23.855473,16.959227 23.33879,13.804853 20.636828,11.359304 17.326007,11.284084 c -0.116836,-0.0027 -0.233175,-0.0032 -0.348703,0 z"
|
||||
id="path3354"
|
||||
sodipodi:nodetypes="cssccssscccc" />
|
||||
<path
|
||||
style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.85008866;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
|
||||
d="m 10.016755,9.7903906 0,4.6947244 c 20.78437,0.15052 37.603596,16.223507 37.603596,36.00968 0,0.02271 3.8e-5,0.04244 0,0.06412 l 4.690144,0.0458 c 0.0015,-0.141997 0,-0.261059 0,-0.403059 0,-22.306658 -18.946877,-40.411269 -42.29374,-40.4112704 z"
|
||||
id="path2380"
|
||||
inkscape:connector-curvature="0" />
|
||||
<g
|
||||
id="g2337"
|
||||
transform="matrix(-0.14652919,-0.00332905,0.00332905,-0.14652919,36.886248,108.19492)"
|
||||
inkscape:export-filename="/home/yorik/Documents/Lab/Draft/icons/line.png"
|
||||
inkscape:export-xdpi="7.0721951"
|
||||
inkscape:export-ydpi="7.0721951">
|
||||
<path
|
||||
d="m 245.71428,655.2193 c 0,26.82526 -21.74617,48.57143 -48.57143,48.57143 -26.82526,0 -48.57143,-21.74617 -48.57143,-48.57143 0,-26.82526 21.74617,-48.57143 48.57143,-48.57143 26.82526,0 48.57143,21.74617 48.57143,48.57143 z"
|
||||
sodipodi:ry="48.57143"
|
||||
sodipodi:rx="48.57143"
|
||||
sodipodi:cy="655.2193"
|
||||
sodipodi:cx="197.14285"
|
||||
id="path2339"
|
||||
style="fill:#ff2000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:5.80000019;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
|
||||
sodipodi:type="arc" />
|
||||
<path
|
||||
transform="matrix(0.8513023,-0.5246754,0.5246754,0.8513023,-338.69692,214.19328)"
|
||||
d="m 259.60921,672.79736 c 0,13.24993 -15.37686,23.99113 -34.34519,23.99113 -18.96832,0 -34.34519,-10.7412 -34.34519,-23.99113 0,-13.24993 15.37687,-23.99112 34.34519,-23.99112 18.96833,0 34.34519,10.74119 34.34519,23.99112 z"
|
||||
sodipodi:ry="23.991123"
|
||||
sodipodi:rx="34.345188"
|
||||
sodipodi:cy="672.79736"
|
||||
sodipodi:cx="225.26402"
|
||||
id="path2341"
|
||||
style="fill:url(#radialGradient3016);fill-opacity:1;stroke:none"
|
||||
sodipodi:type="arc" />
|
||||
</g>
|
||||
<g
|
||||
id="g2372"
|
||||
transform="matrix(-0.14651449,0.00392289,-0.00392289,-0.14651449,82.129327,144.48617)"
|
||||
inkscape:export-filename="/home/yorik/Documents/Lab/Draft/icons/line.png"
|
||||
inkscape:export-xdpi="7.0721951"
|
||||
inkscape:export-ydpi="7.0721951">
|
||||
<path
|
||||
d="m 245.71428,655.2193 c 0,26.82526 -21.74617,48.57143 -48.57143,48.57143 -26.82526,0 -48.57143,-21.74617 -48.57143,-48.57143 0,-26.82526 21.74617,-48.57143 48.57143,-48.57143 26.82526,0 48.57143,21.74617 48.57143,48.57143 z"
|
||||
sodipodi:ry="48.57143"
|
||||
sodipodi:rx="48.57143"
|
||||
sodipodi:cy="655.2193"
|
||||
sodipodi:cx="197.14285"
|
||||
id="path2374"
|
||||
style="fill:#ff2000;fill-opacity:1;stroke:#000000;stroke-width:5.80000019;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
sodipodi:type="arc" />
|
||||
<path
|
||||
transform="matrix(0.8513023,-0.5246754,0.5246754,0.8513023,-338.69692,214.19328)"
|
||||
d="m 259.60921,672.79736 c 0,13.24993 -15.37686,23.99113 -34.34519,23.99113 -18.96832,0 -34.34519,-10.7412 -34.34519,-23.99113 0,-13.24993 15.37687,-23.99112 34.34519,-23.99112 18.96833,0 34.34519,10.74119 34.34519,23.99112 z"
|
||||
sodipodi:ry="23.991123"
|
||||
sodipodi:rx="34.345188"
|
||||
sodipodi:cy="672.79736"
|
||||
sodipodi:cx="225.26402"
|
||||
id="path2376"
|
||||
style="fill:url(#radialGradient3018);fill-opacity:1;stroke:none"
|
||||
sodipodi:type="arc" />
|
||||
</g>
|
||||
<g
|
||||
id="g3056">
|
||||
<g
|
||||
id="g3034"
|
||||
transform="matrix(-0.14651449,0.00392289,-0.00392289,-0.14651449,68.871732,118.23558)"
|
||||
inkscape:export-filename="/home/yorik/Documents/Lab/Draft/icons/line.png"
|
||||
inkscape:export-xdpi="7.0721951"
|
||||
inkscape:export-ydpi="7.0721951">
|
||||
<path
|
||||
d="m 245.71428,655.2193 c 0,26.82526 -21.74617,48.57143 -48.57143,48.57143 -26.82526,0 -48.57143,-21.74617 -48.57143,-48.57143 0,-26.82526 21.74617,-48.57143 48.57143,-48.57143 26.82526,0 48.57143,21.74617 48.57143,48.57143 z"
|
||||
sodipodi:ry="48.57143"
|
||||
sodipodi:rx="48.57143"
|
||||
sodipodi:cy="655.2193"
|
||||
sodipodi:cx="197.14285"
|
||||
id="path3036"
|
||||
style="fill:#ff2000;fill-opacity:1;stroke:#000000;stroke-width:5.80000019;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
sodipodi:type="arc" />
|
||||
<path
|
||||
transform="matrix(0.8513023,-0.5246754,0.5246754,0.8513023,-338.69692,214.19328)"
|
||||
d="m 259.60921,672.79736 c 0,13.24993 -15.37686,23.99113 -34.34519,23.99113 -18.96832,0 -34.34519,-10.7412 -34.34519,-23.99113 0,-13.24993 15.37687,-23.99112 34.34519,-23.99112 18.96833,0 34.34519,10.74119 34.34519,23.99112 z"
|
||||
sodipodi:ry="23.991123"
|
||||
sodipodi:rx="34.345188"
|
||||
sodipodi:cy="672.79736"
|
||||
sodipodi:cx="225.26402"
|
||||
id="path3038"
|
||||
style="fill:url(#radialGradient3054);fill-opacity:1;stroke:none"
|
||||
sodipodi:type="arc" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 12 KiB |
|
@ -62,6 +62,7 @@ Gui::MenuItem* Workbench::setupMenuBar() const
|
|||
geom->setCommand("Sketcher geometries");
|
||||
*geom << "Sketcher_CreatePoint"
|
||||
<< "Sketcher_CreateArc"
|
||||
<< "Sketcher_Create3PointArc"
|
||||
<< "Sketcher_CreateCircle"
|
||||
<< "Sketcher_CreateLine"
|
||||
<< "Sketcher_CreatePolyline"
|
||||
|
@ -122,6 +123,7 @@ Gui::ToolBarItem* Workbench::setupToolBars() const
|
|||
geom->setCommand("Sketcher geometries");
|
||||
*geom << "Sketcher_CreatePoint"
|
||||
<< "Sketcher_CreateArc"
|
||||
<< "Sketcher_Create3PointArc"
|
||||
<< "Sketcher_CreateCircle"
|
||||
<< "Sketcher_CreateLine"
|
||||
<< "Sketcher_CreatePolyline"
|
||||
|
|
Loading…
Reference in New Issue
Block a user