Sketcher: remove trailing whitespace

This commit is contained in:
luz paz
2022-11-16 17:53:42 -05:00
committed by wwmayer
parent dc5b3cb495
commit 875f9eaad6
10 changed files with 27 additions and 26 deletions

View File

@@ -2073,7 +2073,7 @@ void CmdSketcherConstrainCoincident::applyConstraint(std::vector<SelIdPair> &sel
case 4: // {SelExternalEdge, SelEdge}
//Concentric for circles, ellipse, arc, arcofEllipse only.
if (!isGeoConcentricCompatible(Obj->getGeometry(GeoId1)) || !isGeoConcentricCompatible(Obj->getGeometry(GeoId2))) {
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"),
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Wrong selection"),
QObject::tr("Select two vertices from the sketch for a coincident constraint, or two circles, ellipses, arcs or arcs of ellipse for a concentric constraint."));
return;
}

View File

@@ -109,7 +109,7 @@ void PropertyConstraintListItem::initialize()
item->setObjectName(internalName);
this->appendChild(item);
}
item->bind(list->createPath(id-1));
item->setAutoApply(false);
}

View File

@@ -32,7 +32,7 @@
#include <Mod/Sketcher/App/SketchAnalysis.h>
class SoGroup;
namespace Sketcher { class SketchObject; }
namespace Sketcher { class SketchObject; }
namespace SketcherGui {

View File

@@ -47,7 +47,7 @@ class SketcherWorkbench ( Workbench ):
import Profiles
except ImportError:
print("Error in Profiles module")
def GetClassName(self):
return "SketcherGui::Workbench"

View File

@@ -31,9 +31,9 @@ App = FreeCAD
Gui = FreeCADGui
def makeRegularPolygon(
sketch,
sides,
centerPoint=App.Vector(0,0,0),
sketch,
sides,
centerPoint=App.Vector(0,0,0),
firstCornerPoint=App.Vector(-20.00,34.64,0),
construction=False):
@@ -58,7 +58,7 @@ def makeRegularPolygon(
0 ))
geoList = []
for i in range(0,sides-1):
for i in range(0,sides-1):
geoList.append(Part.LineSegment(pointList[i],pointList[i+1]))
geoList.append(Part.LineSegment(pointList[sides-1],pointList[0]))
geoList.append(Part.Circle(centerPoint,App.Vector(0,0,1),diffVec.Length))

View File

@@ -54,7 +54,7 @@ class _CommandProfileHexagon1:
'Accel': "",
'CmdType': "ForEdit",
'ToolTip': QtCore.QT_TRANSLATE_NOOP("Sketcher_ProfilesHexagon1","Creates a hexagonal profile in the sketch")}
def Activated(self):
FreeCAD.ActiveDocument.openTransaction("Create hexagon profile")
FreeCADGui.addModule("ProfileLib.Hexagon")

View File

@@ -56,8 +56,8 @@ class TestSketchExpression(unittest.TestCase):
sketch.addConstraint(conList)
del geoList, conList
length = sketch.addConstraint(Sketcher.Constraint('Distance',0,6.0))
height = sketch.addConstraint(Sketcher.Constraint('Distance',3,5.0))
length = sketch.addConstraint(Sketcher.Constraint('Distance',0,6.0))
height = sketch.addConstraint(Sketcher.Constraint('Distance',3,5.0))
sketch.renameConstraint(length, u'Length')
sketch.setExpression('Constraints[{}]'.format(height), u'.Constraints.Length')

View File

@@ -45,7 +45,7 @@ def BoxCircle(SketchFeature):
right_midpoint = App.Vector(2, 1, 0)
circle = int(SketchFeature.GeometryCount)
SketchFeature.addGeometry(Part.Circle(App.Vector(0,0,0), App.Vector(0,0,1), 1),False)
SketchFeature.addConstraint(Sketcher.Constraint('Radius',circle,1))
SketchFeature.addConstraint(Sketcher.Constraint('Radius',circle,1))
SketchFeature.addConstraint(Sketcher.Constraint('Coincident',top_edge,2,circle,3))
# Since the circle center is coincident with the corner, there are three coincident points
# and thus the simpler fillet() call would get confused. Instead we'll need to point at the two
@@ -59,7 +59,7 @@ def PointOnObject(SketchFeature):
CreateRectangleSketch(SketchFeature, [0, 0], [2, 2])
circle = int(SketchFeature.GeometryCount)
SketchFeature.addGeometry(Part.Circle(App.Vector(12,3,0), App.Vector(0,0,1), 1),False)
SketchFeature.addConstraint(Sketcher.Constraint('Radius',circle,1))
SketchFeature.addConstraint(Sketcher.Constraint('Radius',circle,1))
SketchFeature.addConstraint(Sketcher.Constraint('PointOnObject',top_edge,2,circle))
SketchFeature.fillet(top_edge, 2, 0.25, True, True)

View File

@@ -1,4 +1,5 @@
# (c) Juergen Riegel (FreeCAD@juergen-riegel.net) 2011 LGPL *
#**************************************************************************
# Copyright (c) 2011 Juergen Riegel <FreeCAD@juergen-riegel.net> *
# *
# This file is part of the FreeCAD CAx development system. *
# *

View File

@@ -28,16 +28,16 @@
#class SketcherGuiTestCases(unittest.TestCase):
# def setUp(self):
# self.Doc = FreeCAD.newDocument("SketchGuiTest")
# def setUp(self):
# self.Doc = FreeCAD.newDocument("SketchGuiTest")
#
# def testBoxCase(self):
# self.Box = self.Doc.addObject('Sketcher::SketchObject','SketchBox')
# self.Box.addGeometry(Part.LineSegment(App.Vector(-99.230339,36.960674,0),App.Vector(69.432587,36.960674,0)))
# self.Box.addGeometry(Part.LineSegment(App.Vector(69.432587,36.960674,0),App.Vector(69.432587,-53.196629,0)))
# self.Box.addGeometry(Part.LineSegment(App.Vector(69.432587,-53.196629,0),App.Vector(-99.230339,-53.196629,0)))
# self.Box.addGeometry(Part.LineSegment(App.Vector(-99.230339,-53.196629,0),App.Vector(-99.230339,36.960674,0)))
#
# def tearDown(self):
# #closing doc
# FreeCAD.closeDocument("SketchGuiTest")
# def testBoxCase(self):
# self.Box = self.Doc.addObject('Sketcher::SketchObject','SketchBox')
# self.Box.addGeometry(Part.LineSegment(App.Vector(-99.230339,36.960674,0),App.Vector(69.432587,36.960674,0)))
# self.Box.addGeometry(Part.LineSegment(App.Vector(69.432587,36.960674,0),App.Vector(69.432587,-53.196629,0)))
# self.Box.addGeometry(Part.LineSegment(App.Vector(69.432587,-53.196629,0),App.Vector(-99.230339,-53.196629,0)))
# self.Box.addGeometry(Part.LineSegment(App.Vector(-99.230339,-53.196629,0),App.Vector(-99.230339,36.960674,0)))
#
# def tearDown(self):
# #closing doc
# FreeCAD.closeDocument("SketchGuiTest")