source typo fixes pt1 (only on py3 merged code)

issue 0002914
This commit is contained in:
Kunda 2017-02-26 17:39:03 -05:00 committed by wmayer
parent 681b6a398c
commit dde52952f4
59 changed files with 118 additions and 118 deletions

View File

@ -1,7 +1,7 @@
# - Try to find OpenCV library installation # - Try to find OpenCV library installation
# See http://sourceforge.net/projects/opencvlibrary/ # See http://sourceforge.net/projects/opencvlibrary/
# #
# The follwoing variables are optionally searched for defaults # The following variables are optionally searched for defaults
# OpenCV_ROOT_DIR: Base directory of OpenCv tree to use. # OpenCV_ROOT_DIR: Base directory of OpenCv tree to use.
# OpenCV_FIND_REQUIRED_COMPONENTS : FIND_PACKAGE(OpenCV COMPONENTS ..) # OpenCV_FIND_REQUIRED_COMPONENTS : FIND_PACKAGE(OpenCV COMPONENTS ..)
# compatible interface. typically CV CXCORE CVAUX HIGHGUI CVCAM .. etc. # compatible interface. typically CV CXCORE CVAUX HIGHGUI CVCAM .. etc.

View File

@ -1,7 +1,7 @@
# - Try to find Windows Installer XML # - Try to find Windows Installer XML
# See http://wix.sourceforge.net # See http://wix.sourceforge.net
# #
# The follwoing variables are optionally searched for defaults # The following variables are optionally searched for defaults
# WIX_ROOT_DIR: Base directory of WIX2 tree to use. # WIX_ROOT_DIR: Base directory of WIX2 tree to use.
# #
# The following are set after configuration is done: # The following are set after configuration is done:

View File

@ -644,7 +644,7 @@ QDockWidget QListView,
QDockWidget QTableView { QDockWidget QTableView {
margin: 6px; margin: 6px;
border: 1px solid #505050; /* same as regular QTreeView, QListView and QTableView */ border: 1px solid #505050; /* same as regular QTreeView, QListView and QTableView */
min-height: 40px; /* neccesary in some areas of FreeCAD */ min-height: 40px; /* necessary in some areas of FreeCAD */
} }
/* Buttons to scroll tabs if there is not space to show all of them: */ /* Buttons to scroll tabs if there is not space to show all of them: */
@ -1666,7 +1666,7 @@ QTreeView::indicator {
border-radius:2px; border-radius:2px;
} }
/* fix for QTreeView::indicator loosing its margin */ /* fix for QTreeView::indicator losing its margin */
QTreeView::indicator { QTreeView::indicator {
margin: 3px; margin: 3px;
} }
@ -1680,8 +1680,8 @@ QListWidget::indicator:checked:selected,
QListWidget::indicator:indeterminate:selected, QListWidget::indicator:indeterminate:selected,
QTreeView::indicator:checked:selected, QTreeView::indicator:checked:selected,
QTreeView::indicator:indeterminate:selected { QTreeView::indicator:indeterminate:selected {
background-color: #7cabf9; /* slighly lighter than default */ background-color: #7cabf9; /* slightly lighter than default */
border-color: #2053c0; /* slighly darker than default */ border-color: #2053c0; /* slightly darker than default */
} }
QListWidget::indicator:pressed, QListWidget::indicator:pressed,
@ -2082,7 +2082,7 @@ QTableView > QWidget > QDateTimeEdit:read-only {
EXPERIMENTAL EXPERIMENTAL
==================================================================================================*/ ==================================================================================================*/
/* Fix for preventing elements in different rows to accidentaly overlap */ /* Fix for preventing elements in different rows to accidentally overlap */
QDialog QGroupBox QFrame { QDialog QGroupBox QFrame {
margin: 2px 0px; margin: 2px 0px;
} }

View File

@ -644,7 +644,7 @@ QDockWidget QListView,
QDockWidget QTableView { QDockWidget QTableView {
margin: 6px; margin: 6px;
border: 1px solid #505050; /* same as regular QTreeView, QListView and QTableView */ border: 1px solid #505050; /* same as regular QTreeView, QListView and QTableView */
min-height: 40px; /* neccesary in some areas of FreeCAD */ min-height: 40px; /* necessary in some areas of FreeCAD */
} }
/* Buttons to scroll tabs if there is not space to show all of them: */ /* Buttons to scroll tabs if there is not space to show all of them: */
@ -1666,7 +1666,7 @@ QTreeView::indicator {
border-radius:2px; border-radius:2px;
} }
/* fix for QTreeView::indicator loosing its margin */ /* fix for QTreeView::indicator losing its margin */
QTreeView::indicator { QTreeView::indicator {
margin: 3px; margin: 3px;
} }
@ -1680,8 +1680,8 @@ QListWidget::indicator:checked:selected,
QListWidget::indicator:indeterminate:selected, QListWidget::indicator:indeterminate:selected,
QTreeView::indicator:checked:selected, QTreeView::indicator:checked:selected,
QTreeView::indicator:indeterminate:selected { QTreeView::indicator:indeterminate:selected {
background-color: #a5c61a; /* slighly lighter than default */ background-color: #a5c61a; /* slightly lighter than default */
border-color: #74831d; /* slighly darker than default */ border-color: #74831d; /* slightly darker than default */
} }
QListWidget::indicator:pressed, QListWidget::indicator:pressed,
@ -2082,7 +2082,7 @@ QTableView > QWidget > QDateTimeEdit:read-only {
EXPERIMENTAL EXPERIMENTAL
==================================================================================================*/ ==================================================================================================*/
/* Fix for preventing elements in different rows to accidentaly overlap */ /* Fix for preventing elements in different rows to accidentally overlap */
QDialog QGroupBox QFrame { QDialog QGroupBox QFrame {
margin: 2px 0px; margin: 2px 0px;
} }

View File

@ -644,7 +644,7 @@ QDockWidget QListView,
QDockWidget QTableView { QDockWidget QTableView {
margin: 6px; margin: 6px;
border: 1px solid #505050; /* same as regular QTreeView, QListView and QTableView */ border: 1px solid #505050; /* same as regular QTreeView, QListView and QTableView */
min-height: 40px; /* neccesary in some areas of FreeCAD */ min-height: 40px; /* necessary in some areas of FreeCAD */
} }
/* Buttons to scroll tabs if there is not space to show all of them: */ /* Buttons to scroll tabs if there is not space to show all of them: */
@ -1666,7 +1666,7 @@ QTreeView::indicator {
border-radius:2px; border-radius:2px;
} }
/* fix for QTreeView::indicator loosing its margin */ /* fix for QTreeView::indicator losing its margin */
QTreeView::indicator { QTreeView::indicator {
margin: 3px; margin: 3px;
} }
@ -1680,8 +1680,8 @@ QListWidget::indicator:checked:selected,
QListWidget::indicator:indeterminate:selected, QListWidget::indicator:indeterminate:selected,
QTreeView::indicator:checked:selected, QTreeView::indicator:checked:selected,
QTreeView::indicator:indeterminate:selected { QTreeView::indicator:indeterminate:selected {
background-color: #e3b64d; /* slighly lighter than default */ background-color: #e3b64d; /* slightly lighter than default */
border-color: #b28416; /* slighly darker than default */ border-color: #b28416; /* slightly darker than default */
} }
QListWidget::indicator:pressed, QListWidget::indicator:pressed,
@ -2082,7 +2082,7 @@ QTableView > QWidget > QDateTimeEdit:read-only {
EXPERIMENTAL EXPERIMENTAL
==================================================================================================*/ ==================================================================================================*/
/* Fix for preventing elements in different rows to accidentaly overlap */ /* Fix for preventing elements in different rows to accidentally overlap */
QDialog QGroupBox QFrame { QDialog QGroupBox QFrame {
margin: 2px 0px; margin: 2px 0px;
} }

View File

@ -643,7 +643,7 @@ QDockWidget QListView,
QDockWidget QTableView { QDockWidget QTableView {
margin: 6px; margin: 6px;
border: 1px solid #c3c3c3; /* same as regular QTreeView, QListView and QTableView */ border: 1px solid #c3c3c3; /* same as regular QTreeView, QListView and QTableView */
min-height: 40px; /* neccesary in some areas of FreeCAD */ min-height: 40px; /* necessary in some areas of FreeCAD */
} }
/* Buttons to scroll tabs if there is not space to show all of them: */ /* Buttons to scroll tabs if there is not space to show all of them: */
@ -1664,7 +1664,7 @@ QTreeView::indicator {
border-radius:2px; border-radius:2px;
} }
/* fix for QTreeView::indicator loosing its margin */ /* fix for QTreeView::indicator losing its margin */
QTreeView::indicator { QTreeView::indicator {
margin: 3px; margin: 3px;
} }
@ -1678,8 +1678,8 @@ QListWidget::indicator:checked:selected,
QListWidget::indicator:indeterminate:selected, QListWidget::indicator:indeterminate:selected,
QTreeView::indicator:checked:selected, QTreeView::indicator:checked:selected,
QTreeView::indicator:indeterminate:selected { QTreeView::indicator:indeterminate:selected {
background-color: #7cabf9; /* slighly lighter than default */ background-color: #7cabf9; /* slightly lighter than default */
border-color: #2053c0; /* slighly darker than default */ border-color: #2053c0; /* slightly darker than default */
} }
QListWidget::indicator:pressed, QListWidget::indicator:pressed,
@ -2080,7 +2080,7 @@ QTableView > QWidget > QDateTimeEdit:read-only {
EXPERIMENTAL EXPERIMENTAL
==================================================================================================*/ ==================================================================================================*/
/* Fix for preventing elements in different rows to accidentaly overlap */ /* Fix for preventing elements in different rows to accidentally overlap */
QDialog QGroupBox QFrame { QDialog QGroupBox QFrame {
margin: 2px 0px; margin: 2px 0px;
} }

View File

@ -643,7 +643,7 @@ QDockWidget QListView,
QDockWidget QTableView { QDockWidget QTableView {
margin: 6px; margin: 6px;
border: 1px solid #c3c3c3; /* same as regular QTreeView, QListView and QTableView */ border: 1px solid #c3c3c3; /* same as regular QTreeView, QListView and QTableView */
min-height: 40px; /* neccesary in some areas of FreeCAD */ min-height: 40px; /* necessary in some areas of FreeCAD */
} }
/* Buttons to scroll tabs if there is not space to show all of them: */ /* Buttons to scroll tabs if there is not space to show all of them: */
@ -1664,7 +1664,7 @@ QTreeView::indicator {
border-radius:2px; border-radius:2px;
} }
/* fix for QTreeView::indicator loosing its margin */ /* fix for QTreeView::indicator losing its margin */
QTreeView::indicator { QTreeView::indicator {
margin: 3px; margin: 3px;
} }
@ -1678,8 +1678,8 @@ QListWidget::indicator:checked:selected,
QListWidget::indicator:indeterminate:selected, QListWidget::indicator:indeterminate:selected,
QTreeView::indicator:checked:selected, QTreeView::indicator:checked:selected,
QTreeView::indicator:indeterminate:selected { QTreeView::indicator:indeterminate:selected {
background-color: #a5c61a; /* slighly lighter than default */ background-color: #a5c61a; /* slightly lighter than default */
border-color: #74831d; /* slighly darker than default */ border-color: #74831d; /* slightly darker than default */
} }
QListWidget::indicator:pressed, QListWidget::indicator:pressed,
@ -2080,7 +2080,7 @@ QTableView > QWidget > QDateTimeEdit:read-only {
EXPERIMENTAL EXPERIMENTAL
==================================================================================================*/ ==================================================================================================*/
/* Fix for preventing elements in different rows to accidentaly overlap */ /* Fix for preventing elements in different rows to accidentally overlap */
QDialog QGroupBox QFrame { QDialog QGroupBox QFrame {
margin: 2px 0px; margin: 2px 0px;
} }

View File

@ -643,7 +643,7 @@ QDockWidget QListView,
QDockWidget QTableView { QDockWidget QTableView {
margin: 6px; margin: 6px;
border: 1px solid #c3c3c3; /* same as regular QTreeView, QListView and QTableView */ border: 1px solid #c3c3c3; /* same as regular QTreeView, QListView and QTableView */
min-height: 40px; /* neccesary in some areas of FreeCAD */ min-height: 40px; /* necessary in some areas of FreeCAD */
} }
/* Buttons to scroll tabs if there is not space to show all of them: */ /* Buttons to scroll tabs if there is not space to show all of them: */
@ -1664,7 +1664,7 @@ QTreeView::indicator {
border-radius:2px; border-radius:2px;
} }
/* fix for QTreeView::indicator loosing its margin */ /* fix for QTreeView::indicator losing its margin */
QTreeView::indicator { QTreeView::indicator {
margin: 3px; margin: 3px;
} }
@ -1678,8 +1678,8 @@ QListWidget::indicator:checked:selected,
QListWidget::indicator:indeterminate:selected, QListWidget::indicator:indeterminate:selected,
QTreeView::indicator:checked:selected, QTreeView::indicator:checked:selected,
QTreeView::indicator:indeterminate:selected { QTreeView::indicator:indeterminate:selected {
background-color: #e3b64d; /* slighly lighter than default */ background-color: #e3b64d; /* slightly lighter than default */
border-color: #b28416; /* slighly darker than default */ border-color: #b28416; /* slightly darker than default */
} }
QListWidget::indicator:pressed, QListWidget::indicator:pressed,
@ -2080,7 +2080,7 @@ QTableView > QWidget > QDateTimeEdit:read-only {
EXPERIMENTAL EXPERIMENTAL
==================================================================================================*/ ==================================================================================================*/
/* Fix for preventing elements in different rows to accidentaly overlap */ /* Fix for preventing elements in different rows to accidentally overlap */
QDialog QGroupBox QFrame { QDialog QGroupBox QFrame {
margin: 2px 0px; margin: 2px 0px;
} }

View File

@ -528,7 +528,7 @@ def loadSvgPatterns():
FreeCAD.svgpatterns.update(p) FreeCAD.svgpatterns.update(p)
def svgpatterns(): def svgpatterns():
"""svgpatterns(): returns a dictionnary with installed SVG patterns""" """svgpatterns(): returns a dictionary with installed SVG patterns"""
if hasattr(FreeCAD,"svgpatterns"): if hasattr(FreeCAD,"svgpatterns"):
return FreeCAD.svgpatterns return FreeCAD.svgpatterns
else: else:
@ -1940,7 +1940,7 @@ def getSVG(obj,scale=1,linewidth=0.35,fontsize=12,fillstyle="shape color",direct
rot -=180 rot -=180
if rot < -90: if rot < -90:
rot += 180 rot += 180
#be carefull with the sweep flag #be careful with the sweep flag
flag_large_arc = (((e.ParameterRange[1] - \ flag_large_arc = (((e.ParameterRange[1] - \
e.ParameterRange[0]) / math.pi) % 2) > 1 e.ParameterRange[0]) / math.pi) % 2) > 1
#flag_sweep = (c.Axis * drawing_plane_normal >= 0) \ #flag_sweep = (c.Axis * drawing_plane_normal >= 0) \
@ -3006,7 +3006,7 @@ def upgrade(objects,delete=False,force=None):
force a certain way of upgrading. It can be: makeCompound, closeGroupWires, force a certain way of upgrading. It can be: makeCompound, closeGroupWires,
makeSolid, closeWire, turnToParts, makeFusion, makeShell, makeFaces, draftify, makeSolid, closeWire, turnToParts, makeFusion, makeShell, makeFaces, draftify,
joinFaces, makeSketchFace, makeWires joinFaces, makeSketchFace, makeWires
Returns a dictionnary containing two lists, a list of new objects and a list Returns a dictionary containing two lists, a list of new objects and a list
of objects to be deleted""" of objects to be deleted"""
import Part, DraftGeomUtils import Part, DraftGeomUtils
@ -3366,7 +3366,7 @@ def downgrade(objects,delete=False,force=None):
The force attribute can be used to The force attribute can be used to
force a certain way of downgrading. It can be: explode, shapify, subtr, force a certain way of downgrading. It can be: explode, shapify, subtr,
splitFaces, cut2, getWire, splitWires, splitCompounds. splitFaces, cut2, getWire, splitWires, splitCompounds.
Returns a dictionnary containing two lists, a list of new objects and a list Returns a dictionary containing two lists, a list of new objects and a list
of objects to be deleted""" of objects to be deleted"""
import Part, DraftGeomUtils import Part, DraftGeomUtils

View File

@ -1683,7 +1683,7 @@ def fillet(lEdges,r,chamfer=False):
Returns a list of sorted edges describing a round corner''' Returns a list of sorted edges describing a round corner'''
def getCurveType(edge,existingCurveType = None): def getCurveType(edge,existingCurveType = None):
'''Builds or completes a dictionnary containing edges with keys "Arc" and "Line"''' '''Builds or completes a dictionary containing edges with keys "Arc" and "Line"'''
if not existingCurveType : if not existingCurveType :
existingCurveType = { 'Line' : [], 'Arc' : [] } existingCurveType = { 'Line' : [], 'Arc' : [] }
if issubclass(type(edge.Curve),Part.LineSegment) : if issubclass(type(edge.Curve),Part.LineSegment) :
@ -2541,7 +2541,7 @@ def circleFrom3CircleTangents(circle1, circle2, circle3):
# @todo Calc. the intersection points (max. 8) of 4 lines (trough each inversion pole and the radical center) with the circle. # @todo Calc. the intersection points (max. 8) of 4 lines (trough each inversion pole and the radical center) with the circle.
# This gives us all the tangent points. # This gives us all the tangent points.
else: else:
# Some circles are inside each other or an error has occured. # Some circles are inside each other or an error has occurred.
return None return None
else: else:

View File

@ -3976,7 +3976,7 @@ class Edit(Modifier):
self.editing == len(pts)-1: #last pole self.editing == len(pts)-1: #last pole
knot = 0 knot = 0
changep = 1 changep = 1
if knot is not None: # we need to modify the oposite pole if knot is not None: # we need to modify the opposite pole
segment = knot / self.obj.Degree -1 segment = knot / self.obj.Degree -1
cont=self.obj.Continuity[segment] if \ cont=self.obj.Continuity[segment] if \
len(self.obj.Continuity) > segment else 0 len(self.obj.Continuity) > segment else 0
@ -4223,7 +4223,7 @@ class Edit(Modifier):
msg(translate("draft", "Endpoint of BezCurve can't be smoothed\n"),'warning') msg(translate("draft", "Endpoint of BezCurve can't be smoothed\n"),'warning')
return return
segment = knot // deg #segment index segment = knot // deg #segment index
newcont=self.obj.Continuity[:] #dont edit a property inplace !!! newcont=self.obj.Continuity[:] #don't edit a property inplace !!!
if not self.obj.Closed and (len(self.obj.Continuity) == segment -1 or \ if not self.obj.Closed and (len(self.obj.Continuity) == segment -1 or \
segment == 0) : pass # open curve segment == 0) : pass # open curve
elif len(self.obj.Continuity) >= segment or \ elif len(self.obj.Continuity) >= segment or \

View File

@ -258,14 +258,14 @@
</dc:contributor> </dc:contributor>
<dc:subject> <dc:subject>
<rdf:Bag> <rdf:Bag>
<rdf:li>perpindicular</rdf:li> <rdf:li>perpendicular</rdf:li>
<rdf:li>point</rdf:li> <rdf:li>point</rdf:li>
<rdf:li>line</rdf:li> <rdf:li>line</rdf:li>
<rdf:li>dot</rdf:li> <rdf:li>dot</rdf:li>
<rdf:li>circle</rdf:li> <rdf:li>circle</rdf:li>
</rdf:Bag> </rdf:Bag>
</dc:subject> </dc:subject>
<dc:description>The perpindicular symbol above and to the left of a dot at the midpoint of a line</dc:description> <dc:description>The perpendicular symbol above and to the left of a dot at the midpoint of a line</dc:description>
</cc:Work> </cc:Work>
</rdf:RDF> </rdf:RDF>
</metadata> </metadata>

Before

Width:  |  Height:  |  Size: 9.3 KiB

After

Width:  |  Height:  |  Size: 9.3 KiB

View File

@ -154,10 +154,10 @@
<dc:title>[agryson] Alexander Gryson</dc:title> <dc:title>[agryson] Alexander Gryson</dc:title>
</cc:Agent> </cc:Agent>
</dc:contributor> </dc:contributor>
<dc:description>Perpindicular symbol</dc:description> <dc:description>Perpendicular symbol</dc:description>
<dc:subject> <dc:subject>
<rdf:Bag> <rdf:Bag>
<rdf:li>perpindicular</rdf:li> <rdf:li>perpendicular</rdf:li>
</rdf:Bag> </rdf:Bag>
</dc:subject> </dc:subject>
</cc:Work> </cc:Work>

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

View File

@ -44,7 +44,7 @@
<item> <item>
<widget class="Gui::PrefComboBox" name="gui::prefcombobox_3"> <widget class="Gui::PrefComboBox" name="gui::prefcombobox_3">
<property name="toolTip"> <property name="toolTip">
<string>This is the method choosed for importing SVG object color into FreeCAD.</string> <string>This is the method chosen for importing SVG object color into FreeCAD.</string>
</property> </property>
<property name="currentIndex"> <property name="currentIndex">
<number>0</number> <number>0</number>

View File

@ -85,7 +85,7 @@ def process(doc,filename):
# Collect the data for the upper and the lower side seperately if possible # Collect the data for the upper and the lower side separately if possible
for lin in afile: for lin in afile:
curdat = regex.match(lin) curdat = regex.match(lin)
if curdat != None: if curdat != None:

View File

@ -240,7 +240,7 @@ def getcolor(color):
def transformCopyShape(shape,m): def transformCopyShape(shape,m):
"""apply transformation matrix m on given shape """apply transformation matrix m on given shape
since OCCT 6.8.0 transformShape can be used to apply certian non-orthogonal since OCCT 6.8.0 transformShape can be used to apply certain non-orthogonal
transformations on shapes. This way a conversion to BSplines in transformations on shapes. This way a conversion to BSplines in
transformGeometry can be avoided.""" transformGeometry can be avoided."""
if abs(m.A11**2+m.A12**2 -m.A21**2-m.A22**2) < 1e-8 and \ if abs(m.A11**2+m.A12**2 -m.A21**2-m.A22**2) < 1e-8 and \
@ -1160,7 +1160,7 @@ def decodeName(name):
return decodedName return decodedName
def getContents(filename,tag,stringmode=False): def getContents(filename,tag,stringmode=False):
"gets the contents of all the occurences of the given tag in the given file" "gets the contents of all the occurrences of the given tag in the given file"
result = {} result = {}
if stringmode: if stringmode:
contents = filename contents = filename

View File

@ -383,7 +383,7 @@ def place_steps(doc,placement,board_thickness):
model_file.writelines(str(place_item[0])+" "+str(place_item[2])+"\n") model_file.writelines(str(place_item[0])+" "+str(place_item[2])+"\n")
model_file.close() model_file.close()
def toQuaternion(heading, attitude,bank): # rotation heading=arround Y, attitude =arround Z, bank attitude =arround X def toQuaternion(heading, attitude,bank): # rotation heading=around Y, attitude =around Z, bank attitude =around X
"""toQuaternion(heading, attitude,bank)->FreeCAD.Base.Rotation(Quternion)""" """toQuaternion(heading, attitude,bank)->FreeCAD.Base.Rotation(Quternion)"""
c1 = cos(heading/2) c1 = cos(heading/2)
s1 = sin(heading/2) s1 = sin(heading/2)

View File

@ -121,8 +121,8 @@ void CmdCreateImagePlane::activated(int iMsg)
QImage impQ(s); QImage impQ(s);
if (impQ.isNull()) { if (impQ.isNull()) {
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Error open image"), QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Error opening image"),
QObject::tr("Could not load the choosen image")); QObject::tr("Could not load the chosen image"));
return; return;
} }

View File

@ -312,13 +312,13 @@ def endpointdistancedebuglist(debuglist):
def edgestowires(edgelist,eps=0.001): def edgestowires(edgelist,eps=0.001):
'''takes list of edges and returns a list of wires''' '''takes list of edges and returns a list of wires'''
import Part, Draft import Part, Draft
# todo remove double edges # TODO remove double edges
wirelist=[] wirelist=[]
#for path in findConnectedEdges(edgelist,eps=eps): #for path in findConnectedEdges(edgelist,eps=eps):
for path,debug in zip(*findConnectedEdges(edgelist,eps=eps,debug=True)): for path,debug in zip(*findConnectedEdges(edgelist,eps=eps,debug=True)):
maxd,mind,outerd = endpointdistancedebuglist(debug) maxd,mind,outerd = endpointdistancedebuglist(debug)
assert(maxd <= eps*2) # Assume the input to be broken assert(maxd <= eps*2) # Assume the input to be broken
if maxd < eps*2 and maxd > 0.000001: #OCC wont like it if maxd > 0.02: if maxd < eps*2 and maxd > 0.000001: # OCC won't like it if maxd > 0.02:
print('endpointdistance max:%f min:%f, ends:%f' %(maxd,mind,outerd)) print('endpointdistance max:%f min:%f, ends:%f' %(maxd,mind,outerd))
if True: if True:

View File

@ -142,7 +142,7 @@ def process_object(csg,ob):
import math import math
f = str(ob.Polygon) f = str(ob.Polygon)
# r = str(ob.Length/2.0/math.sin(math.pi/ob.Polygon)) # r = str(ob.Length/2.0/math.sin(math.pi/ob.Polygon))
r = str(ob.Circumradius) #length seems to be the outer radius r = str(ob.Circumradius) # length seems to be the outer radius
h = str(ob.Height.Value) h = str(ob.Height.Value)
mm = check_multmatrix(csg,ob,0,0,-float(h)/2) mm = check_multmatrix(csg,ob,0,0,-float(h)/2)
csg.write("cylinder($fn = "+f+", "+fafs+", h = "+h+", r1 = "+r+\ csg.write("cylinder($fn = "+f+", "+fafs+", h = "+h+", r1 = "+r+\
@ -199,7 +199,7 @@ def process_object(csg,ob):
elif ob.Base.Name.startswith('this_is_a_bad_idea'): elif ob.Base.Name.startswith('this_is_a_bad_idea'):
pass pass
else: else:
pass #There should be a fallback solution pass # There should be a fallback solution
elif ob.TypeId == "Part::Cut" : elif ob.TypeId == "Part::Cut" :
print("Cut") print("Cut")
@ -243,13 +243,13 @@ def process_object(csg,ob):
if mm == 1 : csg.write("}\n") if mm == 1 : csg.write("}\n")
def export(exportList,filename): def export(exportList,filename):
"called when freecad exports a file" "called when FreeCAD exports a file"
# process Objects # process Objects
print("\nStart Export 0.1d\n") print("\nStart Export 0.1d\n")
print("Open Output File") print("Open Output File")
csg = pythonopen(filename,'w') csg = pythonopen(filename,'w')
print("Write Inital Output") print("Write Initial Output")
# Not sure if comments as per scad are allowed in csg file # Not sure if comments as per scad are allowed in csg file
csg.write("// CSG file generated from FreeCAD %s\n" % \ csg.write("// CSG file generated from FreeCAD %s\n" % \
'.'.join(FreeCAD.Version()[0:3])) '.'.join(FreeCAD.Version()[0:3]))

View File

@ -220,7 +220,7 @@ def p_anymodifier(p):
''' '''
#just return the plain modifier for now #just return the plain modifier for now
#has to be changed when the modifiers are inplemented #has to be changed when the modifiers are inplemented
#please note that disabled objects usualy are stript of the CSG ouput during compilation #please note that disabled objects usually are stript of the CSG ouput during compilation
p[0] = p[1] p[0] = p[1]
def p_statementwithmod(p): def p_statementwithmod(p):
@ -1140,7 +1140,7 @@ def p_projection_action(p) :
if printverbose: print('Projection') if printverbose: print('Projection')
if p[3]['cut']=='true' : if p[3]['cut']=='true' :
planedim=1e9 # large but finite planedim=1e9 # large but finite
#inifinite planes look bad in the GUI #infinite planes look bad in the GUI
planename='xy_plane_used_for_project_cut' planename='xy_plane_used_for_project_cut'
obj=doc.addObject('Part::MultiCommon','projection_cut') obj=doc.addObject('Part::MultiCommon','projection_cut')
plane = doc.getObject(planename) plane = doc.getObject(planename)

View File

@ -32,7 +32,7 @@
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# #
# This implements an LR parser that is constructed from grammar rules defined # This implements an LR parser that is constructed from grammar rules defined
# as Python functions. The grammer is specified by supplying the BNF inside # as Python functions. The grammar is specified by supplying the BNF inside
# Python documentation strings. The inspiration for this technique was borrowed # Python documentation strings. The inspiration for this technique was borrowed
# from John Aycock's Spark parsing system. PLY might be viewed as cross between # from John Aycock's Spark parsing system. PLY might be viewed as cross between
# Spark and the GNU bison utility. # Spark and the GNU bison utility.
@ -1341,7 +1341,7 @@ class Grammar(object):
self.Precedence = { } # Precedence rules for each terminal. Contains tuples of the self.Precedence = { } # Precedence rules for each terminal. Contains tuples of the
# form ('right',level) or ('nonassoc', level) or ('left',level) # form ('right',level) or ('nonassoc', level) or ('left',level)
self.UsedPrecedence = { } # Precedence rules that were actually used by the grammer. self.UsedPrecedence = { } # Precedence rules that were actually used by the grammar.
# This is only used to provide error checking and to generate # This is only used to provide error checking and to generate
# a warning about unused precedence rules. # a warning about unused precedence rules.

View File

@ -38,11 +38,11 @@ def openscadmesh(doc,scadstr,objname):
print(scadstr) print(scadstr)
class Node: class Node:
#fnmin=12 # maximal fn for implicit polygon renderfing #fnmin=12 # maximal fn for implicit polygon rendering
fnmin= FreeCAD.ParamGet(\ fnmin= FreeCAD.ParamGet(\
"User parameter:BaseApp/Preferences/Mod/OpenSCAD").\ "User parameter:BaseApp/Preferences/Mod/OpenSCAD").\
GetInt('useMaxFN') GetInt('useMaxFN')
planedim=1e10 #size of the sqaure used as x-y-plane planedim=1e10 #size of the square used as x-y-plane
def __init__(self,name,arguments=None,children=None,): def __init__(self,name,arguments=None,children=None,):
pass pass
self.name=name self.name=name
@ -58,7 +58,7 @@ class Node:
return str1+')' return str1+')'
def __nonzero__(self): def __nonzero__(self):
'''a Node is not obsolent if doesn't have children. Only if as neither name children or '''a Node is not obsolete if doesn't have children. Only if as neither name children or
arguments''' arguments'''
return bool(self.name or self.arguments or self.children) return bool(self.name or self.arguments or self.children)
@ -67,7 +67,7 @@ class Node:
return len(self.children) return len(self.children)
def __getitem__(self,key): def __getitem__(self,key):
'''dirct access to the children''' '''direct access to the children'''
return self.children.__getitem__(key) return self.children.__getitem__(key)
def rlen(self,checkmultmarix=False): def rlen(self,checkmultmarix=False):
@ -365,8 +365,8 @@ class Node:
elif extension in ['dxf']: elif extension in ['dxf']:
layera = self.arguments.get('layer') layera = self.arguments.get('layer')
featname='import_dxf_%s_%s'%(objname,layera) featname='import_dxf_%s_%s'%(objname,layera)
# reusing an allready imported object does not work if the # reusing an already imported object does not work if the
#shape in not yet calculated # shape in not yet calculated
import importDXF import importDXF
global dxfcache global dxfcache
layers=dxfcache.get(id(doc),[]) layers=dxfcache.get(id(doc),[])
@ -405,7 +405,7 @@ class Node:
if obj: #handle origin and scale if obj: #handle origin and scale
if scale is not None and scale !=1: if scale is not None and scale !=1:
if origin is not None and any([c != 0 for c in origin]): if origin is not None and any([c != 0 for c in origin]):
raise(NotImplementedError)# order of transformations unkown raise(NotImplementedError)# order of transformations unknown
child = obj child = obj
m1=FreeCAD.Matrix() m1=FreeCAD.Matrix()
m1.scale(scale,scale,scale) m1.scale(scale,scale,scale)

View File

@ -50,7 +50,7 @@ def replaceobj(parent,oldchild,newchild):
parent.touch() parent.touch()
def replaceobjfromselection(objs): def replaceobjfromselection(objs):
# The Parent can be ommited as long as one object is orphaned # The Parent can be omitted as long as one object is orphaned
if len(objs)==2: if len(objs)==2:
InListLength= tuple((len(obj.InList)) for obj in objs) InListLength= tuple((len(obj.InList)) for obj in objs)
if InListLength == (0,1): if InListLength == (0,1):

View File

@ -128,7 +128,7 @@ public:
); );
add_keyword_method("sortWires",&Module::sortWires, add_keyword_method("sortWires",&Module::sortWires,
"sortWires(shapes, start=Vector(), " PARAM_PY_ARGS_DOC(ARG,AREA_PARAMS_SORT) ", key=value...)\n" "sortWires(shapes, start=Vector(), " PARAM_PY_ARGS_DOC(ARG,AREA_PARAMS_SORT) ", key=value...)\n"
"\nReturns (wires,end), where 'wires' is sorted accross Z value and with optimized travel distance,\n" "\nReturns (wires,end), where 'wires' is sorted across Z value and with optimized travel distance,\n"
"and 'end' is the ending position of the whole wires\n" "and 'end' is the ending position of the whole wires\n"
"\n* shapes: input shape list\n" "\n* shapes: input shape list\n"
"\n* start (Vector()): optional start position.\n" "\n* start (Vector()): optional start position.\n"

View File

@ -90,7 +90,7 @@ CAreaConfig::CAreaConfig(const CAreaParams &p, bool noFitArcs)
PARAM_FOREACH(AREA_CONF_SAVE_AND_APPLY,AREA_PARAMS_CAREA) PARAM_FOREACH(AREA_CONF_SAVE_AND_APPLY,AREA_PARAMS_CAREA)
// Arc fitting is lossy. we shall reduce the number of unecessary fit // Arc fitting is lossy. We shall reduce the number of unnecessary fit
if(noFitArcs) if(noFitArcs)
CArea::set_fit_arcs(false); CArea::set_fit_arcs(false);

View File

@ -83,7 +83,7 @@
((double,clipper_clean_distance,CleanDistance,0.0,\ ((double,clipper_clean_distance,CleanDistance,0.0,\
"Clean polygon smaller than this distance. See https://goo.gl/jox3JY"))\ "Clean polygon smaller than this distance. See https://goo.gl/jox3JY"))\
((double,accuracy,Accuracy,0.01,"Arc fitting accuracy"))\ ((double,accuracy,Accuracy,0.01,"Arc fitting accuracy"))\
((double,units,Unit,1.0,"Scaling factor for convertion to inch"))\ ((double,units,Unit,1.0,"Scaling factor for conversion to inch"))\
((short,min_arc_points,MinArcPoints,4,"Minimum segments for arc discretization"))\ ((short,min_arc_points,MinArcPoints,4,"Minimum segments for arc discretization"))\
((short,max_arc_points,MaxArcPoints,100,"Maximum segments for arc discretization"))\ ((short,max_arc_points,MaxArcPoints,100,"Maximum segments for arc discretization"))\
((double,clipper_scale,ClipperScale,10000.0,\ ((double,clipper_scale,ClipperScale,10000.0,\
@ -123,7 +123,7 @@
"'Absolute' means the absolute Z height to start section.\n"\ "'Absolute' means the absolute Z height to start section.\n"\
"'BoundBox' means relative Z height to the bounding box of all the children shape. Only\n"\ "'BoundBox' means relative Z height to the bounding box of all the children shape. Only\n"\
"positive value is allowed, which specifies the offset below the top Z of the bounding box.\n"\ "positive value is allowed, which specifies the offset below the top Z of the bounding box.\n"\
"Note that OCC has trouble getting the minimumi bounding box of some solids, particually\n"\ "Note that OCC has trouble getting the minimumi bounding box of some solids, particularly\n"\
"those with non-planar surface.\n"\ "those with non-planar surface.\n"\
"'Workplane' means relative to workplane.",\ "'Workplane' means relative to workplane.",\
(Absolute)(BoundBox)(Workplane))) (Absolute)(BoundBox)(Workplane)))

View File

@ -29,7 +29,7 @@
* \section Motivation * \section Motivation
* *
* For an application like FreeCAD, there are often cases where the same set of * For an application like FreeCAD, there are often cases where the same set of
* parameters are refered in dozons of different places. The macros here is * parameters are referred in dozons of different places. The macros here is
* designed to help managing those parameters, so that you can define groups of * designed to help managing those parameters, so that you can define groups of
* parameters once, and refer them everywhere in groups with simple macro calls for * parameters once, and refer them everywhere in groups with simple macro calls for
* all kinds of purposes. Any changing, adding and removing of parameters in the * all kinds of purposes. Any changing, adding and removing of parameters in the
@ -44,7 +44,7 @@
* *
* \section Debugging * \section Debugging
* *
* Extensive use of macros has one noticable disadvantage, though. If some thing * Extensive use of macros has one noticeable disadvantage, though. If some thing
* goes wrong, the compiler error message is kind of cryptic. If so, first * goes wrong, the compiler error message is kind of cryptic. If so, first
* double check your macro definition of the parameter is correctly, not missing * double check your macro definition of the parameter is correctly, not missing
* or having extra parathesis or comma. Then, you can use the CMake * or having extra parathesis or comma. Then, you can use the CMake
@ -145,7 +145,7 @@
* *
* See struct AreaDoc for an example of doc string generation. * See struct AreaDoc for an example of doc string generation.
* *
* Each field of the parameter can be refered to with various * Each field of the parameter can be referred to with various
* \ref ParamAccessor "various accessor macros", and can be easily * \ref ParamAccessor "various accessor macros", and can be easily
* \ref ParamStringizer "stringified". * \ref ParamStringizer "stringified".
* *
@ -154,14 +154,14 @@
* And #PARAM_FIELD_STR to stringify. * And #PARAM_FIELD_STR to stringify.
* *
* Here \a _param is the parameter definition described above in the form of a * Here \a _param is the parameter definition described above in the form of a
* Boost.PP tuple, and is usally supplied by various \ref ParamLooper "looper macros" * Boost.PP tuple, and is usually supplied by various \ref ParamLooper "looper macros"
* *
* You can of course directly use various Boost.PP sequence looper to pass * You can of course directly use various Boost.PP sequence looper to pass
* aditional arguments to the operation macro. See #PARAM_PY_DICT_SET_VALUE for * aditional arguments to the operation macro. See #PARAM_PY_DICT_SET_VALUE for
* an example of using tuple, and the more complex example #PARAM_ENUM_CONVERT * an example of using tuple, and the more complex example #PARAM_ENUM_CONVERT
* *
* Note that when generating comma separated list, the first and last comma are * Note that when generating comma separated list, the first and last comma are
* conveniently ommited, so that the macros can be mixed with others intuitively * conveniently omited, so that the macros can be mixed with others intuitively
*/ */
#include <boost/preprocessor/cat.hpp> #include <boost/preprocessor/cat.hpp>

View File

@ -111,7 +111,7 @@
<item row="2" column="1"> <item row="2" column="1">
<widget class="QComboBox" name="incisionCombo"> <widget class="QComboBox" name="incisionCombo">
<property name="toolTip"> <property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Determines the incision length of the bone to be inserted into the profile.&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600; font-style:italic;&quot;&gt;adaptive&lt;/span&gt; ... the lenght is adapted to cover the corner based on the angle of it's edges, taking the current tool radius into account (default)&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600; font-style:italic;&quot;&gt;fixed&lt;/span&gt; ... is the same as adaptive for straight angles. For T-bones it's the radius of the tool (R) and for dogbones it's R * (2/√2 - 1).&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600; font-style:italic;&quot;&gt;custom&lt;/span&gt; ... let's you sepcify a custom (fixed) length below&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Determines the incision length of the bone to be inserted into the profile.&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600; font-style:italic;&quot;&gt;adaptive&lt;/span&gt; ... the length is adapted to cover the corner based on the angle of it's edges, taking the current tool radius into account (default)&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600; font-style:italic;&quot;&gt;fixed&lt;/span&gt; ... is the same as adaptive for straight angles. For T-bones it's the radius of the tool (R) and for dogbones it's R * (2/√2 - 1).&lt;/p&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600; font-style:italic;&quot;&gt;custom&lt;/span&gt; ... let's you sepcify a custom (fixed) length below&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
<property name="currentIndex"> <property name="currentIndex">
<number>2</number> <number>2</number>

View File

@ -288,7 +288,7 @@ def make_smaller(curve, start=None, finish=None, end_beyond=False):
'''The following procedures are copied almost directly from heekscnc '''The following procedures are copied almost directly from heekscnc
kurve_funcs.py. They depend on nc directory existing below PathScripts kurve_funcs.py. They depend on nc directory existing below PathScripts
and have not been throughly optimized, understood, or tested for FreeCAD.''' and have not been thoroughly optimized, understood, or tested for FreeCAD.'''
def profile2(curve, direction="on", radius=1.0, vertfeed=0.0, def profile2(curve, direction="on", radius=1.0, vertfeed=0.0,

View File

@ -880,7 +880,7 @@ class depth_params:
def __fixed_steps(self, start, stop, size): def __fixed_steps(self, start, stop, size):
'''returns a list of depths beginning with the bottom (included), ending '''returns a list of depths beginning with the bottom (included), ending
with the top (not included). with the top (not included).
all steps are of size 'size' except the one at the bottom wich can be all steps are of size 'size' except the one at the bottom which can be
smaller.''' smaller.'''
fullsteps = int((start - stop) / size) fullsteps = int((start - stop) / size)

View File

@ -121,7 +121,7 @@ def export(objectslist,filename,argstring):
gcode = "" gcode = ""
#Find the machine. #Find the machine.
#The user my have overriden post processor defaults in the GUI. Make sure we're using the current values in the Machine Def. #The user my have overridden post processor defaults in the GUI. Make sure we're using the current values in the Machine Def.
myMachine = None myMachine = None
for pathobj in objectslist: for pathobj in objectslist:
if hasattr(pathobj,"MachineName"): if hasattr(pathobj,"MachineName"):

View File

@ -125,7 +125,7 @@ def export(objectslist, filename, argstring):
gcode = "" gcode = ""
# Find the machine. # Find the machine.
# The user my have overriden post processor defaults in the GUI. Make # The user my have overridden post processor defaults in the GUI. Make
# sure we're using the current values in the Machine Def. # sure we're using the current values in the Machine Def.
myMachine = None myMachine = None
for pathobj in objectslist: for pathobj in objectslist:

View File

@ -42,7 +42,7 @@ class Creator(recreator.Redirector):
path.append(ocl.Line(ocl.Point(self.x, self.y, self.z), ocl.Point(self.x, self.y, self.z))) path.append(ocl.Line(ocl.Point(self.x, self.y, self.z), ocl.Point(self.x, self.y, self.z)))
self.setPdcfIfNotSet() self.setPdcfIfNotSet()
if (self.z>self.minz): if (self.z>self.minz):
self.pdcf.setZ(self.z) # Adjust Z if we have gotten a higher limit (Fix pocketing loosing steps when using attach?) self.pdcf.setZ(self.z) # Adjust Z if we have gotten a higher limit (Fix pocketing losing steps when using attach?)
else: else:
self.pdcf.setZ(self.minz/units) # Else use minz self.pdcf.setZ(self.minz/units) # Else use minz
self.pdcf.setPath(path) self.pdcf.setPath(path)
@ -56,7 +56,7 @@ class Creator(recreator.Redirector):
self.setPdcfIfNotSet() self.setPdcfIfNotSet()
if (self.z>self.minz): if (self.z>self.minz):
self.pdcf.setZ(self.z) # Adjust Z if we have gotten a higher limit (Fix pocketing loosing steps when using attach?) self.pdcf.setZ(self.z) # Adjust Z if we have gotten a higher limit (Fix pocketing losing steps when using attach?)
else: else:
self.pdcf.setZ(self.minz/units) # Else use minz self.pdcf.setZ(self.minz/units) # Else use minz

View File

@ -26,7 +26,7 @@ class CreatorEMC2tap(emc2.CreatorEMC2):
def tap(self, x=None, y=None, z=None, zretract=None, depth=None, standoff=None, dwell_bottom=None, pitch=None, stoppos=None, spin_in=None, spin_out=None, tap_mode=None, direction=None): def tap(self, x=None, y=None, z=None, zretract=None, depth=None, standoff=None, dwell_bottom=None, pitch=None, stoppos=None, spin_in=None, spin_out=None, tap_mode=None, direction=None):
# mystery parameters: # mystery parameters:
# zretract=None, dwell_bottom=None,pitch=None, stoppos=None, spin_in=None, spin_out=None): # zretract=None, dwell_bottom=None,pitch=None, stoppos=None, spin_in=None, spin_out=None):
# I dont see how to map these to EMC Gcode # I don't see how to map these to EMC Gcode
if (standoff == None): if (standoff == None):
# This is a bad thing. All the drilling cycles need a retraction (and starting) height. # This is a bad thing. All the drilling cycles need a retraction (and starting) height.

View File

@ -855,7 +855,7 @@ class Creator(nc.Creator):
def tap(self, x=None, y=None, z=None, zretract=None, depth=None, standoff=None, dwell_bottom=None, pitch=None, stoppos=None, spin_in=None, spin_out=None, tap_mode=None, direction=None): def tap(self, x=None, y=None, z=None, zretract=None, depth=None, standoff=None, dwell_bottom=None, pitch=None, stoppos=None, spin_in=None, spin_out=None, tap_mode=None, direction=None):
# mystery parameters: # mystery parameters:
# zretract=None, dwell_bottom=None,pitch=None, stoppos=None, spin_in=None, spin_out=None): # zretract=None, dwell_bottom=None,pitch=None, stoppos=None, spin_in=None, spin_out=None):
# I dont see how to map these to EMC Gcode # I don't see how to map these to EMC Gcode
if (standoff == None): if (standoff == None):
# This is a bad thing. All the drilling cycles need a retraction (and starting) height. # This is a bad thing. All the drilling cycles need a retraction (and starting) height.

View File

@ -189,7 +189,7 @@ SPINDLE_DECIMALS = 0
# The header is divided into two parts, one is dynamic, the other is a static GCode header. # The header is divided into two parts, one is dynamic, the other is a static GCode header.
# If the current selection and the current time should be included in the header, # If the current selection and the current time should be included in the header,
# it has to be generated at execution time, and thus it cannot be held in constant values. # it has to be generated at execution time, and thus it cannot be held in constant values.
# The last linefeed should be ommitted, it is inserted automatically # The last linefeed should be omitted, it is inserted automatically
# linenumbers are inserted automatically if LINENUMBERS is True # linenumbers are inserted automatically if LINENUMBERS is True
# if you don't want to use this header you have to provide a minimal function # if you don't want to use this header you have to provide a minimal function
# def mkHeader(selection): # def mkHeader(selection):

View File

@ -31,7 +31,7 @@ from FreeCAD import Vector
from PathScripts.PathGeom import Side from PathScripts.PathGeom import Side
class PathTestBase(unittest.TestCase): class PathTestBase(unittest.TestCase):
"""Base test class with some addtional asserts.""" """Base test class with some additional asserts."""
def assertRoughly(self, f1, f2): def assertRoughly(self, f1, f2):
"""Verify that two float values are approximately the same.""" """Verify that two float values are approximately the same."""

View File

@ -65,7 +65,7 @@ Point CArc::MidParam(double param)const {
} }
//segments - number of segments per full revolution! //segments - number of segments per full revolution!
//d_angle - determines the direction and the ammount of the arc to draw //d_angle - determines the direction and the amount of the arc to draw
void CArc::GetSegments(void(*callbackfunc)(const double *p), double pixels_per_mm)const void CArc::GetSegments(void(*callbackfunc)(const double *p), double pixels_per_mm)const
{ {
if(m_s == m_e) if(m_s == m_e)

View File

@ -808,11 +808,11 @@ void CArea::InsideCurves(const CCurve& curve, std::list<CCurve> &curves_inside)c
std::list<Point> pts; std::list<Point> pts;
CurveIntersections(curve, pts); CurveIntersections(curve, pts);
//2.seperate curve2 in multiple curves between these intersections. //2.separate curve2 in multiple curves between these intersections.
std::list<CCurve> separate_curves; std::list<CCurve> separate_curves;
curve.ExtractSeparateCurves(pts, separate_curves); curve.ExtractSeparateCurves(pts, separate_curves);
//3. if the midpoint of a seperate curve lies in a1, then we return it. //3. if the midpoint of a separate curve lies in a1, then we return it.
for(std::list<CCurve>::iterator It = separate_curves.begin(); It != separate_curves.end(); It++) for(std::list<CCurve>::iterator It = separate_curves.begin(); It != separate_curves.end(); It++)
{ {
CCurve &curve = *It; CCurve &curve = *It;

View File

@ -1516,7 +1516,7 @@ void Clipper::DisposeOutRec(PolyOutList::size_type index)
void Clipper::SetWindingCount(TEdge &edge) void Clipper::SetWindingCount(TEdge &edge)
{ {
TEdge *e = edge.PrevInAEL; TEdge *e = edge.PrevInAEL;
//find the edge of the same polytype that immediately preceeds 'edge' in AEL //find the edge of the same polytype that immediately precedes 'edge' in AEL
while (e && ((e->PolyTyp != edge.PolyTyp) || (e->WindDelta == 0))) e = e->PrevInAEL; while (e && ((e->PolyTyp != edge.PolyTyp) || (e->WindDelta == 0))) e = e->PrevInAEL;
if (!e) if (!e)
{ {

View File

@ -40,7 +40,7 @@
//improve performance but coordinate values are limited to the range +/- 46340 //improve performance but coordinate values are limited to the range +/- 46340
//#define use_int32 //#define use_int32
//use_xyz: adds a Z member to IntPoint. Adds a minor cost to perfomance. //use_xyz: adds a Z member to IntPoint. Adds a minor cost to performance.
//#define use_xyz //#define use_xyz
//use_lines: Enables line clipping. Adds a very minor cost to performance. //use_lines: Enables line clipping. Adds a very minor cost to performance.

View File

@ -510,7 +510,7 @@ namespace geoff_geometry {
// Triangle3d methods // Triangle3d methods
bool Triangle3d::Intof(const Line& l, Point3d& intof)const { bool Triangle3d::Intof(const Line& l, Point3d& intof)const {
// returns intersection triangle to line in intof // returns intersection triangle to line in intof
// funtion returns true for intersection, false for no intersection // function returns true for intersection, false for no intersection
// method based on Möller & Trumbore(1997) (Barycentric coordinates) // method based on Möller & Trumbore(1997) (Barycentric coordinates)
// based on incorrect Pseudo code from "Geometric Tools for Computer Graphics" p.487 // based on incorrect Pseudo code from "Geometric Tools for Computer Graphics" p.487
if(box.outside(l.box) == true) return false; if(box.outside(l.box) == true) return false;

View File

@ -546,7 +546,7 @@ namespace geoff_geometry {
void Vector3d::arbitrary_axes(Vector3d& x, Vector3d& y){ void Vector3d::arbitrary_axes(Vector3d& x, Vector3d& y){
// arbitrary axis algorithm - acad method of generating an arbitrary but // arbitrary axis algorithm - acad method of generating an arbitrary but
// consistant set of axes from a single normal ( z ) // consistent set of axes from a single normal ( z )
// arbitrary x & y axes // arbitrary x & y axes
if ( ( fabs ( this->getx() ) < 1.0/64.0 ) && (fabs(this->gety()) < 1.0/64.0)) if ( ( fabs ( this->getx() ) < 1.0/64.0 ) && (fabs(this->gety()) < 1.0/64.0))

View File

@ -186,7 +186,7 @@ namespace geoff_geometry {
sp0.dir = k.Get(kinVertex, sp0.p0, sp0.pc); sp0.dir = k.Get(kinVertex, sp0.p0, sp0.pc);
sp0.ID = k.GetSpanID(kinVertex++); sp0.ID = k.GetSpanID(kinVertex++);
if (kinVertex == 1) { if (kinVertex == 1) {
ko.Start(sp0.p0); // start point mustn't dissappear for this simple method ko.Start(sp0.p0); // start point mustn't disappear for this simple method
ko.AddSpanID(sp0.ID); ko.AddSpanID(sp0.ID);
} }
if (kinVertex <= k.nSpans()) { // any more? if (kinVertex <= k.nSpans()) { // any more?

View File

@ -325,7 +325,7 @@ class TaskPanel:
def onRemove(self): def onRemove(self):
"""Executed when axes must be deleted.""" """Executed when axes must be deleted."""
# Ensure taht we can work # Ensure that we can work
plt = Plot.getPlot() plt = Plot.getPlot()
if not plt: if not plt:
self.updateUI() self.updateUI()

View File

@ -291,7 +291,7 @@ class TaskPanel:
self.skip = False self.skip = False
def onColor(self): def onColor(self):
""" Executed when color pallete is requested. """ """ Executed when color palette is requested. """
plt = Plot.getPlot() plt = Plot.getPlot()
if not plt: if not plt:
self.updateUI() self.updateUI()

View File

@ -157,7 +157,7 @@ class Tank:
"""Return the fluid volume center of gravity, provided the volume of """Return the fluid volume center of gravity, provided the volume of
fluid inside the tank. fluid inside the tank.
The returned center of gravity is refered to the untransformed ship. The returned center of gravity is referred to the untransformed ship.
Keyword arguments: Keyword arguments:
fp -- Part::FeaturePython object affected. fp -- Part::FeaturePython object affected.

View File

@ -34,7 +34,7 @@ class Plot(object):
@param x X coordinates. @param x X coordinates.
@param y Transversal computed areas. @param y Transversal computed areas.
@param disp Ship displacement. @param disp Ship displacement.
@param xcb Bouyancy center length. @param xcb Buoyancy center length.
@param ship Active ship instance. @param ship Active ship instance.
""" """
self.plot(x, y, disp, xcb, ship) self.plot(x, y, disp, xcb, ship)
@ -45,7 +45,7 @@ class Plot(object):
@param x X coordinates. @param x X coordinates.
@param y Transversal areas. @param y Transversal areas.
@param disp Ship displacement. @param disp Ship displacement.
@param xcb Bouyancy center length. @param xcb Buoyancy center length.
@param ship Active ship instance. @param ship Active ship instance.
@return True if error happens. @return True if error happens.
""" """

View File

@ -44,7 +44,7 @@ def createShip(solids, L, B, T):
solids = Gui.ActiveDocument.ActiveObject.Object.Shape.Solids solids = Gui.ActiveDocument.ActiveObject.Object.Shape.Solids
Regarding the Lenght, Breadth, and Draft, it is strongly recommended to use Regarding the Length, Breadth, and Draft, it is strongly recommended to use
Units.parseQuantity method, e.g. The following obfuscated code snippet build Units.parseQuantity method, e.g. The following obfuscated code snippet build
such variables: such variables:

View File

@ -231,7 +231,7 @@ def displacement(ship, draft=None,
B -- Bouyance application point, i.e. Center of mass of the underwater side B -- Bouyance application point, i.e. Center of mass of the underwater side
Cb -- Block coefficient Cb -- Block coefficient
The Bouyance center is refered to the original ship position. The Bouyance center is referred to the original ship position.
""" """
if draft is None: if draft is None:
draft = ship.Draft draft = ship.Draft
@ -363,7 +363,7 @@ def floatingArea(ship, draft=None,
if draft is None: if draft is None:
draft = ship.Draft draft = ship.Draft
# We wanna intersect the whole ship with the free surface, so in this case # We want to intersect the whole ship with the free surface, so in this case
# we must not use the underwater side (or the tool will fail) # we must not use the underwater side (or the tool will fail)
shape, _ = placeShipShape(ship.Shape.copy(), draft, roll, trim) shape, _ = placeShipShape(ship.Shape.copy(), draft, roll, trim)

View File

@ -711,7 +711,7 @@ void Sheet::recomputeCell(CellAddress p)
if (cell) if (cell)
cell->setException(e.what()); cell->setException(e.what());
// Mark as erronous // Mark as erroneous
cellErrors.insert(p); cellErrors.insert(p);
} }
@ -800,7 +800,7 @@ DocumentObjectExecReturn *Sheet::execute(void)
while (i != VertexList.end()) { while (i != VertexList.end()) {
Cell * cell = cells.getValue(i->first); Cell * cell = cells.getValue(i->first);
// Mark as erronous // Mark as erroneous
cellErrors.insert(i->first); cellErrors.insert(i->first);
if (cell) if (cell)
@ -1164,7 +1164,7 @@ std::string Sheet::getAddressFromAlias(const std::string &alias) const
} }
/** /**
* @brief Determine whether a given alias candiate is valid or not. * @brief Determine whether a given alias candidate is valid or not.
* *
* A candidate is valid is the string is syntactically correct, * A candidate is valid is the string is syntactically correct,
* and the alias does not conflict with an existing property. * and the alias does not conflict with an existing property.

View File

@ -102,7 +102,7 @@ class MathParser:
denominator = self.parseParenthesis() denominator = self.parseParenthesis()
if denominator == 0: if denominator == 0:
raise ZeroDivisionError( raise ZeroDivisionError(
"Division by 0 kills baby whales (occured at index " + "Division by 0 kills baby whales (occurred at index " +
str(div_index) + str(div_index) +
")") ")")
values.append(1.0 / denominator) values.append(1.0 / denominator)
@ -1007,7 +1007,7 @@ def makeSpreadsheetController(spreadsheet,cell=None,direction=None):
def makeSpreadsheetPropertyController(spreadsheet,object=None,prop=None,cell=None): def makeSpreadsheetPropertyController(spreadsheet,object=None,prop=None,cell=None):
"""makeSpreadsheetPropertyController(spreadsheet,[object,prop,cell]): adds a """makeSpreadsheetPropertyController(spreadsheet,[object,prop,cell]): adds a
property controller, targetting the given object if any, to the given spreadsheet. property controller, targeting the given object if any, to the given spreadsheet.
You can give a property (such as "Length" or "Proxy.Length") and a cell address You can give a property (such as "Length" or "Proxy.Length") and a cell address
(such as "B6").""" (such as "B6")."""
obj = FreeCAD.ActiveDocument.addObject("App::FeaturePython","PropertyController") obj = FreeCAD.ActiveDocument.addObject("App::FeaturePython","PropertyController")

View File

@ -736,7 +736,7 @@ class SpreadsheetCases(unittest.TestCase):
self.assertIn('Up-to-date',sketch.State) self.assertIn('Up-to-date',sketch.State)
def testCrossDocumentLinks(self): def testCrossDocumentLinks(self):
""" Expressions accross files are not saved (bug #2442) """ """ Expressions across files are not saved (bug #2442) """
# Create a box # Create a box
box = self.doc.addObject('Part::Box', 'Box') box = self.doc.addObject('Part::Box', 'Box')

View File

@ -339,7 +339,7 @@ def handleCells(cellList, actCellSheet, sList):
if refType: if refType:
cellType = getText(refType.childNodes) cellType = getText(refType.childNodes)
else: else:
cellType = 'n' # fix me some cells dont have t and s attributes cellType = 'n' # FIXME: some cells don't have t and s attributes
#print("reference: ", ref, ' Cell type: ', cellType) #print("reference: ", ref, ' Cell type: ', cellType)

View File

@ -171,7 +171,7 @@ DrawProjGroup::~DrawProjGroup()
void DrawProjGroup::onChanged(const App::Property* prop) void DrawProjGroup::onChanged(const App::Property* prop)
{ {
//TODO: For some reason, when the projection type is changed, the isometric views show change appropriately, but the orthographic ones dont... Or vice-versa. WF: why would you change from 1st to 3rd in mid drawing? //TODO: For some reason, when the projection type is changed, the isometric views show change appropriately, but the orthographic ones don't... Or vice-versa. WF: why would you change from 1st to 3rd in mid drawing?
//if group hasn't been added to page yet, can't scale or distribute projItems //if group hasn't been added to page yet, can't scale or distribute projItems
TechDraw::DrawPage *page = getPage(); TechDraw::DrawPage *page = getPage();
if (!isRestoring() && page) { if (!isRestoring() && page) {
@ -280,7 +280,7 @@ Base::BoundBox3d DrawProjGroup::getBoundingBox() const
bb.ScaleX(1. / part->Scale.getValue()); bb.ScaleX(1. / part->Scale.getValue());
bb.ScaleY(1. / part->Scale.getValue()); bb.ScaleY(1. / part->Scale.getValue());
// X and Y of dependant views are relative to the anchorView // X and Y of dependent views are relative to the anchorView
if (part != anchorView) { if (part != anchorView) {
bb.MoveX(part->X.getValue()); bb.MoveX(part->X.getValue());
bb.MoveY(part->Y.getValue()); bb.MoveY(part->Y.getValue());

View File

@ -594,7 +594,7 @@ std::vector<incidenceItem> embedItem::sortIncidenceList (std::vector<incidenceIt
/*static*/bool incidenceItem::iiEqual(const incidenceItem& i1, const incidenceItem& i2) /*static*/bool incidenceItem::iiEqual(const incidenceItem& i1, const incidenceItem& i2)
{ {
//TODO: this should compare edges also but eDesc comparision is by address //TODO: this should compare edges also but eDesc comparison is by address
bool result = false; bool result = false;
if (i1.angle == i2.angle) { if (i1.angle == i2.angle) {
} }

View File

@ -452,7 +452,7 @@ bool GeometryObject::findVertex(Base::Vector2d v)
} }
/// utility non-class member functions /// utility non-class member functions
//! gets a coordinate system that matches view system used in 3D with +Z up (or +Y up if neccessary) //! gets a coordinate system that matches view system used in 3D with +Z up (or +Y up if necessary)
//! used for individual views, but not secondary views in projection groups //! used for individual views, but not secondary views in projection groups
gp_Ax2 TechDrawGeometry::getViewAxis(const Base::Vector3d origin, gp_Ax2 TechDrawGeometry::getViewAxis(const Base::Vector3d origin,
const Base::Vector3d& direction, const Base::Vector3d& direction,

View File

@ -276,7 +276,7 @@ void ViewProviderPage::onSelectionChanged(const Gui::SelectionChanges& msg)
continue; continue;
std::string str = msg.pSubName; std::string str = msg.pSubName;
// If it's a subfeature, dont select feature // If it's a subfeature, don't select feature
if (!str.empty()) { if (!str.empty()) {
if (TechDraw::DrawUtil::getGeomTypeFromName(str) == "Face" || if (TechDraw::DrawUtil::getGeomTypeFromName(str) == "Face" ||
TechDraw::DrawUtil::getGeomTypeFromName(str) == "Edge" || TechDraw::DrawUtil::getGeomTypeFromName(str) == "Edge" ||
@ -293,7 +293,7 @@ void ViewProviderPage::onSelectionChanged(const Gui::SelectionChanges& msg)
App::DocumentObject *obj = doc->getDocument()->getObject(msg.pObjectName); App::DocumentObject *obj = doc->getDocument()->getObject(msg.pObjectName);
if(obj) { if(obj) {
std::string str = msg.pSubName; std::string str = msg.pSubName;
// If it's a subfeature, dont select feature // If it's a subfeature, don't select feature
if (!str.empty()) { if (!str.empty()) {
if (TechDraw::DrawUtil::getGeomTypeFromName(str) == "Face" || if (TechDraw::DrawUtil::getGeomTypeFromName(str) == "Face" ||
TechDraw::DrawUtil::getGeomTypeFromName(str) == "Edge" || TechDraw::DrawUtil::getGeomTypeFromName(str) == "Edge" ||