source typo fixes pt1 (only on py3 merged code)
issue 0002914
This commit is contained in:
parent
681b6a398c
commit
dde52952f4
|
@ -1,7 +1,7 @@
|
|||
# - Try to find OpenCV library installation
|
||||
# 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_FIND_REQUIRED_COMPONENTS : FIND_PACKAGE(OpenCV COMPONENTS ..)
|
||||
# compatible interface. typically CV CXCORE CVAUX HIGHGUI CVCAM .. etc.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# - Try to find Windows Installer XML
|
||||
# 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.
|
||||
#
|
||||
# The following are set after configuration is done:
|
||||
|
|
|
@ -644,7 +644,7 @@ QDockWidget QListView,
|
|||
QDockWidget QTableView {
|
||||
margin: 6px;
|
||||
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: */
|
||||
|
@ -1666,7 +1666,7 @@ QTreeView::indicator {
|
|||
border-radius:2px;
|
||||
}
|
||||
|
||||
/* fix for QTreeView::indicator loosing its margin */
|
||||
/* fix for QTreeView::indicator losing its margin */
|
||||
QTreeView::indicator {
|
||||
margin: 3px;
|
||||
}
|
||||
|
@ -1680,8 +1680,8 @@ QListWidget::indicator:checked:selected,
|
|||
QListWidget::indicator:indeterminate:selected,
|
||||
QTreeView::indicator:checked:selected,
|
||||
QTreeView::indicator:indeterminate:selected {
|
||||
background-color: #7cabf9; /* slighly lighter than default */
|
||||
border-color: #2053c0; /* slighly darker than default */
|
||||
background-color: #7cabf9; /* slightly lighter than default */
|
||||
border-color: #2053c0; /* slightly darker than default */
|
||||
}
|
||||
|
||||
QListWidget::indicator:pressed,
|
||||
|
@ -2082,7 +2082,7 @@ QTableView > QWidget > QDateTimeEdit:read-only {
|
|||
EXPERIMENTAL
|
||||
==================================================================================================*/
|
||||
|
||||
/* Fix for preventing elements in different rows to accidentaly overlap */
|
||||
/* Fix for preventing elements in different rows to accidentally overlap */
|
||||
QDialog QGroupBox QFrame {
|
||||
margin: 2px 0px;
|
||||
}
|
||||
|
|
|
@ -644,7 +644,7 @@ QDockWidget QListView,
|
|||
QDockWidget QTableView {
|
||||
margin: 6px;
|
||||
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: */
|
||||
|
@ -1666,7 +1666,7 @@ QTreeView::indicator {
|
|||
border-radius:2px;
|
||||
}
|
||||
|
||||
/* fix for QTreeView::indicator loosing its margin */
|
||||
/* fix for QTreeView::indicator losing its margin */
|
||||
QTreeView::indicator {
|
||||
margin: 3px;
|
||||
}
|
||||
|
@ -1680,8 +1680,8 @@ QListWidget::indicator:checked:selected,
|
|||
QListWidget::indicator:indeterminate:selected,
|
||||
QTreeView::indicator:checked:selected,
|
||||
QTreeView::indicator:indeterminate:selected {
|
||||
background-color: #a5c61a; /* slighly lighter than default */
|
||||
border-color: #74831d; /* slighly darker than default */
|
||||
background-color: #a5c61a; /* slightly lighter than default */
|
||||
border-color: #74831d; /* slightly darker than default */
|
||||
}
|
||||
|
||||
QListWidget::indicator:pressed,
|
||||
|
@ -2082,7 +2082,7 @@ QTableView > QWidget > QDateTimeEdit:read-only {
|
|||
EXPERIMENTAL
|
||||
==================================================================================================*/
|
||||
|
||||
/* Fix for preventing elements in different rows to accidentaly overlap */
|
||||
/* Fix for preventing elements in different rows to accidentally overlap */
|
||||
QDialog QGroupBox QFrame {
|
||||
margin: 2px 0px;
|
||||
}
|
||||
|
|
|
@ -644,7 +644,7 @@ QDockWidget QListView,
|
|||
QDockWidget QTableView {
|
||||
margin: 6px;
|
||||
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: */
|
||||
|
@ -1666,7 +1666,7 @@ QTreeView::indicator {
|
|||
border-radius:2px;
|
||||
}
|
||||
|
||||
/* fix for QTreeView::indicator loosing its margin */
|
||||
/* fix for QTreeView::indicator losing its margin */
|
||||
QTreeView::indicator {
|
||||
margin: 3px;
|
||||
}
|
||||
|
@ -1680,8 +1680,8 @@ QListWidget::indicator:checked:selected,
|
|||
QListWidget::indicator:indeterminate:selected,
|
||||
QTreeView::indicator:checked:selected,
|
||||
QTreeView::indicator:indeterminate:selected {
|
||||
background-color: #e3b64d; /* slighly lighter than default */
|
||||
border-color: #b28416; /* slighly darker than default */
|
||||
background-color: #e3b64d; /* slightly lighter than default */
|
||||
border-color: #b28416; /* slightly darker than default */
|
||||
}
|
||||
|
||||
QListWidget::indicator:pressed,
|
||||
|
@ -2082,7 +2082,7 @@ QTableView > QWidget > QDateTimeEdit:read-only {
|
|||
EXPERIMENTAL
|
||||
==================================================================================================*/
|
||||
|
||||
/* Fix for preventing elements in different rows to accidentaly overlap */
|
||||
/* Fix for preventing elements in different rows to accidentally overlap */
|
||||
QDialog QGroupBox QFrame {
|
||||
margin: 2px 0px;
|
||||
}
|
||||
|
|
|
@ -643,7 +643,7 @@ QDockWidget QListView,
|
|||
QDockWidget QTableView {
|
||||
margin: 6px;
|
||||
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: */
|
||||
|
@ -1664,7 +1664,7 @@ QTreeView::indicator {
|
|||
border-radius:2px;
|
||||
}
|
||||
|
||||
/* fix for QTreeView::indicator loosing its margin */
|
||||
/* fix for QTreeView::indicator losing its margin */
|
||||
QTreeView::indicator {
|
||||
margin: 3px;
|
||||
}
|
||||
|
@ -1678,8 +1678,8 @@ QListWidget::indicator:checked:selected,
|
|||
QListWidget::indicator:indeterminate:selected,
|
||||
QTreeView::indicator:checked:selected,
|
||||
QTreeView::indicator:indeterminate:selected {
|
||||
background-color: #7cabf9; /* slighly lighter than default */
|
||||
border-color: #2053c0; /* slighly darker than default */
|
||||
background-color: #7cabf9; /* slightly lighter than default */
|
||||
border-color: #2053c0; /* slightly darker than default */
|
||||
}
|
||||
|
||||
QListWidget::indicator:pressed,
|
||||
|
@ -2080,7 +2080,7 @@ QTableView > QWidget > QDateTimeEdit:read-only {
|
|||
EXPERIMENTAL
|
||||
==================================================================================================*/
|
||||
|
||||
/* Fix for preventing elements in different rows to accidentaly overlap */
|
||||
/* Fix for preventing elements in different rows to accidentally overlap */
|
||||
QDialog QGroupBox QFrame {
|
||||
margin: 2px 0px;
|
||||
}
|
||||
|
|
|
@ -643,7 +643,7 @@ QDockWidget QListView,
|
|||
QDockWidget QTableView {
|
||||
margin: 6px;
|
||||
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: */
|
||||
|
@ -1664,7 +1664,7 @@ QTreeView::indicator {
|
|||
border-radius:2px;
|
||||
}
|
||||
|
||||
/* fix for QTreeView::indicator loosing its margin */
|
||||
/* fix for QTreeView::indicator losing its margin */
|
||||
QTreeView::indicator {
|
||||
margin: 3px;
|
||||
}
|
||||
|
@ -1678,8 +1678,8 @@ QListWidget::indicator:checked:selected,
|
|||
QListWidget::indicator:indeterminate:selected,
|
||||
QTreeView::indicator:checked:selected,
|
||||
QTreeView::indicator:indeterminate:selected {
|
||||
background-color: #a5c61a; /* slighly lighter than default */
|
||||
border-color: #74831d; /* slighly darker than default */
|
||||
background-color: #a5c61a; /* slightly lighter than default */
|
||||
border-color: #74831d; /* slightly darker than default */
|
||||
}
|
||||
|
||||
QListWidget::indicator:pressed,
|
||||
|
@ -2080,7 +2080,7 @@ QTableView > QWidget > QDateTimeEdit:read-only {
|
|||
EXPERIMENTAL
|
||||
==================================================================================================*/
|
||||
|
||||
/* Fix for preventing elements in different rows to accidentaly overlap */
|
||||
/* Fix for preventing elements in different rows to accidentally overlap */
|
||||
QDialog QGroupBox QFrame {
|
||||
margin: 2px 0px;
|
||||
}
|
||||
|
|
|
@ -643,7 +643,7 @@ QDockWidget QListView,
|
|||
QDockWidget QTableView {
|
||||
margin: 6px;
|
||||
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: */
|
||||
|
@ -1664,7 +1664,7 @@ QTreeView::indicator {
|
|||
border-radius:2px;
|
||||
}
|
||||
|
||||
/* fix for QTreeView::indicator loosing its margin */
|
||||
/* fix for QTreeView::indicator losing its margin */
|
||||
QTreeView::indicator {
|
||||
margin: 3px;
|
||||
}
|
||||
|
@ -1678,8 +1678,8 @@ QListWidget::indicator:checked:selected,
|
|||
QListWidget::indicator:indeterminate:selected,
|
||||
QTreeView::indicator:checked:selected,
|
||||
QTreeView::indicator:indeterminate:selected {
|
||||
background-color: #e3b64d; /* slighly lighter than default */
|
||||
border-color: #b28416; /* slighly darker than default */
|
||||
background-color: #e3b64d; /* slightly lighter than default */
|
||||
border-color: #b28416; /* slightly darker than default */
|
||||
}
|
||||
|
||||
QListWidget::indicator:pressed,
|
||||
|
@ -2080,7 +2080,7 @@ QTableView > QWidget > QDateTimeEdit:read-only {
|
|||
EXPERIMENTAL
|
||||
==================================================================================================*/
|
||||
|
||||
/* Fix for preventing elements in different rows to accidentaly overlap */
|
||||
/* Fix for preventing elements in different rows to accidentally overlap */
|
||||
QDialog QGroupBox QFrame {
|
||||
margin: 2px 0px;
|
||||
}
|
||||
|
|
|
@ -528,7 +528,7 @@ def loadSvgPatterns():
|
|||
FreeCAD.svgpatterns.update(p)
|
||||
|
||||
def svgpatterns():
|
||||
"""svgpatterns(): returns a dictionnary with installed SVG patterns"""
|
||||
"""svgpatterns(): returns a dictionary with installed SVG patterns"""
|
||||
if hasattr(FreeCAD,"svgpatterns"):
|
||||
return FreeCAD.svgpatterns
|
||||
else:
|
||||
|
@ -1940,7 +1940,7 @@ def getSVG(obj,scale=1,linewidth=0.35,fontsize=12,fillstyle="shape color",direct
|
|||
rot -=180
|
||||
if rot < -90:
|
||||
rot += 180
|
||||
#be carefull with the sweep flag
|
||||
#be careful with the sweep flag
|
||||
flag_large_arc = (((e.ParameterRange[1] - \
|
||||
e.ParameterRange[0]) / math.pi) % 2) > 1
|
||||
#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,
|
||||
makeSolid, closeWire, turnToParts, makeFusion, makeShell, makeFaces, draftify,
|
||||
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"""
|
||||
|
||||
import Part, DraftGeomUtils
|
||||
|
@ -3366,7 +3366,7 @@ def downgrade(objects,delete=False,force=None):
|
|||
The force attribute can be used to
|
||||
force a certain way of downgrading. It can be: explode, shapify, subtr,
|
||||
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"""
|
||||
|
||||
import Part, DraftGeomUtils
|
||||
|
|
|
@ -1683,7 +1683,7 @@ def fillet(lEdges,r,chamfer=False):
|
|||
Returns a list of sorted edges describing a round corner'''
|
||||
|
||||
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 :
|
||||
existingCurveType = { 'Line' : [], 'Arc' : [] }
|
||||
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.
|
||||
# This gives us all the tangent points.
|
||||
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
|
||||
|
||||
else:
|
||||
|
|
|
@ -3976,7 +3976,7 @@ class Edit(Modifier):
|
|||
self.editing == len(pts)-1: #last pole
|
||||
knot = 0
|
||||
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
|
||||
cont=self.obj.Continuity[segment] if \
|
||||
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')
|
||||
return
|
||||
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 \
|
||||
segment == 0) : pass # open curve
|
||||
elif len(self.obj.Continuity) >= segment or \
|
||||
|
|
|
@ -258,14 +258,14 @@
|
|||
</dc:contributor>
|
||||
<dc:subject>
|
||||
<rdf:Bag>
|
||||
<rdf:li>perpindicular</rdf:li>
|
||||
<rdf:li>perpendicular</rdf:li>
|
||||
<rdf:li>point</rdf:li>
|
||||
<rdf:li>line</rdf:li>
|
||||
<rdf:li>dot</rdf:li>
|
||||
<rdf:li>circle</rdf:li>
|
||||
</rdf:Bag>
|
||||
</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>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
|
|
Before Width: | Height: | Size: 9.3 KiB After Width: | Height: | Size: 9.3 KiB |
|
@ -154,10 +154,10 @@
|
|||
<dc:title>[agryson] Alexander Gryson</dc:title>
|
||||
</cc:Agent>
|
||||
</dc:contributor>
|
||||
<dc:description>Perpindicular symbol</dc:description>
|
||||
<dc:description>Perpendicular symbol</dc:description>
|
||||
<dc:subject>
|
||||
<rdf:Bag>
|
||||
<rdf:li>perpindicular</rdf:li>
|
||||
<rdf:li>perpendicular</rdf:li>
|
||||
</rdf:Bag>
|
||||
</dc:subject>
|
||||
</cc:Work>
|
||||
|
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
|
@ -44,7 +44,7 @@
|
|||
<item>
|
||||
<widget class="Gui::PrefComboBox" name="gui::prefcombobox_3">
|
||||
<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 name="currentIndex">
|
||||
<number>0</number>
|
||||
|
|
|
@ -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:
|
||||
curdat = regex.match(lin)
|
||||
if curdat != None:
|
||||
|
|
|
@ -240,7 +240,7 @@ def getcolor(color):
|
|||
|
||||
def transformCopyShape(shape,m):
|
||||
"""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
|
||||
transformGeometry can be avoided."""
|
||||
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
|
||||
|
||||
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 = {}
|
||||
if stringmode:
|
||||
contents = filename
|
||||
|
|
|
@ -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.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)"""
|
||||
c1 = cos(heading/2)
|
||||
s1 = sin(heading/2)
|
||||
|
|
|
@ -121,8 +121,8 @@ void CmdCreateImagePlane::activated(int iMsg)
|
|||
|
||||
QImage impQ(s);
|
||||
if (impQ.isNull()) {
|
||||
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Error open image"),
|
||||
QObject::tr("Could not load the choosen image"));
|
||||
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Error opening image"),
|
||||
QObject::tr("Could not load the chosen image"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -312,13 +312,13 @@ def endpointdistancedebuglist(debuglist):
|
|||
def edgestowires(edgelist,eps=0.001):
|
||||
'''takes list of edges and returns a list of wires'''
|
||||
import Part, Draft
|
||||
# todo remove double edges
|
||||
# TODO remove double edges
|
||||
wirelist=[]
|
||||
#for path in findConnectedEdges(edgelist,eps=eps):
|
||||
for path,debug in zip(*findConnectedEdges(edgelist,eps=eps,debug=True)):
|
||||
maxd,mind,outerd = endpointdistancedebuglist(debug)
|
||||
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))
|
||||
|
||||
if True:
|
||||
|
|
|
@ -142,7 +142,7 @@ def process_object(csg,ob):
|
|||
import math
|
||||
f = str(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)
|
||||
mm = check_multmatrix(csg,ob,0,0,-float(h)/2)
|
||||
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'):
|
||||
pass
|
||||
else:
|
||||
pass #There should be a fallback solution
|
||||
pass # There should be a fallback solution
|
||||
|
||||
elif ob.TypeId == "Part::Cut" :
|
||||
print("Cut")
|
||||
|
@ -243,13 +243,13 @@ def process_object(csg,ob):
|
|||
if mm == 1 : csg.write("}\n")
|
||||
|
||||
def export(exportList,filename):
|
||||
"called when freecad exports a file"
|
||||
"called when FreeCAD exports a file"
|
||||
|
||||
# process Objects
|
||||
print("\nStart Export 0.1d\n")
|
||||
print("Open Output File")
|
||||
csg = pythonopen(filename,'w')
|
||||
print("Write Inital Output")
|
||||
print("Write Initial Output")
|
||||
# Not sure if comments as per scad are allowed in csg file
|
||||
csg.write("// CSG file generated from FreeCAD %s\n" % \
|
||||
'.'.join(FreeCAD.Version()[0:3]))
|
||||
|
|
|
@ -220,7 +220,7 @@ def p_anymodifier(p):
|
|||
'''
|
||||
#just return the plain modifier for now
|
||||
#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]
|
||||
|
||||
def p_statementwithmod(p):
|
||||
|
@ -1140,7 +1140,7 @@ def p_projection_action(p) :
|
|||
if printverbose: print('Projection')
|
||||
if p[3]['cut']=='true' :
|
||||
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'
|
||||
obj=doc.addObject('Part::MultiCommon','projection_cut')
|
||||
plane = doc.getObject(planename)
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
# -----------------------------------------------------------------------------
|
||||
#
|
||||
# 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
|
||||
# from John Aycock's Spark parsing system. PLY might be viewed as cross between
|
||||
# Spark and the GNU bison utility.
|
||||
|
@ -1341,7 +1341,7 @@ class Grammar(object):
|
|||
self.Precedence = { } # Precedence rules for each terminal. Contains tuples of the
|
||||
# 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
|
||||
# a warning about unused precedence rules.
|
||||
|
||||
|
|
|
@ -38,11 +38,11 @@ def openscadmesh(doc,scadstr,objname):
|
|||
print(scadstr)
|
||||
|
||||
class Node:
|
||||
#fnmin=12 # maximal fn for implicit polygon renderfing
|
||||
#fnmin=12 # maximal fn for implicit polygon rendering
|
||||
fnmin= FreeCAD.ParamGet(\
|
||||
"User parameter:BaseApp/Preferences/Mod/OpenSCAD").\
|
||||
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,):
|
||||
pass
|
||||
self.name=name
|
||||
|
@ -58,7 +58,7 @@ class Node:
|
|||
return str1+')'
|
||||
|
||||
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'''
|
||||
return bool(self.name or self.arguments or self.children)
|
||||
|
||||
|
@ -67,7 +67,7 @@ class Node:
|
|||
return len(self.children)
|
||||
|
||||
def __getitem__(self,key):
|
||||
'''dirct access to the children'''
|
||||
'''direct access to the children'''
|
||||
return self.children.__getitem__(key)
|
||||
|
||||
def rlen(self,checkmultmarix=False):
|
||||
|
@ -365,8 +365,8 @@ class Node:
|
|||
elif extension in ['dxf']:
|
||||
layera = self.arguments.get('layer')
|
||||
featname='import_dxf_%s_%s'%(objname,layera)
|
||||
# reusing an allready imported object does not work if the
|
||||
#shape in not yet calculated
|
||||
# reusing an already imported object does not work if the
|
||||
# shape in not yet calculated
|
||||
import importDXF
|
||||
global dxfcache
|
||||
layers=dxfcache.get(id(doc),[])
|
||||
|
@ -405,7 +405,7 @@ class Node:
|
|||
if obj: #handle origin and scale
|
||||
if scale is not None and scale !=1:
|
||||
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
|
||||
m1=FreeCAD.Matrix()
|
||||
m1.scale(scale,scale,scale)
|
||||
|
|
|
@ -50,7 +50,7 @@ def replaceobj(parent,oldchild,newchild):
|
|||
parent.touch()
|
||||
|
||||
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:
|
||||
InListLength= tuple((len(obj.InList)) for obj in objs)
|
||||
if InListLength == (0,1):
|
||||
|
|
|
@ -128,7 +128,7 @@ public:
|
|||
);
|
||||
add_keyword_method("sortWires",&Module::sortWires,
|
||||
"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"
|
||||
"\n* shapes: input shape list\n"
|
||||
"\n* start (Vector()): optional start position.\n"
|
||||
|
|
|
@ -90,7 +90,7 @@ CAreaConfig::CAreaConfig(const CAreaParams &p, bool noFitArcs)
|
|||
|
||||
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)
|
||||
CArea::set_fit_arcs(false);
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@
|
|||
((double,clipper_clean_distance,CleanDistance,0.0,\
|
||||
"Clean polygon smaller than this distance. See https://goo.gl/jox3JY"))\
|
||||
((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,max_arc_points,MaxArcPoints,100,"Maximum segments for arc discretization"))\
|
||||
((double,clipper_scale,ClipperScale,10000.0,\
|
||||
|
@ -123,7 +123,7 @@
|
|||
"'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"\
|
||||
"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"\
|
||||
"'Workplane' means relative to workplane.",\
|
||||
(Absolute)(BoundBox)(Workplane)))
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
* \section Motivation
|
||||
*
|
||||
* 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
|
||||
* 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
|
||||
|
@ -44,7 +44,7 @@
|
|||
*
|
||||
* \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
|
||||
* double check your macro definition of the parameter is correctly, not missing
|
||||
* 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.
|
||||
*
|
||||
* 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 ParamStringizer "stringified".
|
||||
*
|
||||
|
@ -154,14 +154,14 @@
|
|||
* And #PARAM_FIELD_STR to stringify.
|
||||
*
|
||||
* 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
|
||||
* 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
|
||||
*
|
||||
* 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>
|
||||
|
|
|
@ -111,7 +111,7 @@
|
|||
<item row="2" column="1">
|
||||
<widget class="QComboBox" name="incisionCombo">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Determines the incision length of the bone to be inserted into the profile.</p><p><span style=" font-weight:600; font-style:italic;">adaptive</span> ... the lenght is adapted to cover the corner based on the angle of it's edges, taking the current tool radius into account (default)</p><p><span style=" font-weight:600; font-style:italic;">fixed</span> ... 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).</p><p><span style=" font-weight:600; font-style:italic;">custom</span> ... let's you sepcify a custom (fixed) length below</p></body></html></string>
|
||||
<string><html><head/><body><p>Determines the incision length of the bone to be inserted into the profile.</p><p><span style=" font-weight:600; font-style:italic;">adaptive</span> ... the length is adapted to cover the corner based on the angle of it's edges, taking the current tool radius into account (default)</p><p><span style=" font-weight:600; font-style:italic;">fixed</span> ... 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).</p><p><span style=" font-weight:600; font-style:italic;">custom</span> ... let's you sepcify a custom (fixed) length below</p></body></html></string>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>2</number>
|
||||
|
|
|
@ -288,7 +288,7 @@ def make_smaller(curve, start=None, finish=None, end_beyond=False):
|
|||
|
||||
'''The following procedures are copied almost directly from heekscnc
|
||||
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,
|
||||
|
|
|
@ -880,7 +880,7 @@ class depth_params:
|
|||
def __fixed_steps(self, start, stop, size):
|
||||
'''returns a list of depths beginning with the bottom (included), ending
|
||||
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.'''
|
||||
|
||||
fullsteps = int((start - stop) / size)
|
||||
|
|
|
@ -121,7 +121,7 @@ def export(objectslist,filename,argstring):
|
|||
gcode = ""
|
||||
|
||||
#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
|
||||
for pathobj in objectslist:
|
||||
if hasattr(pathobj,"MachineName"):
|
||||
|
|
|
@ -125,7 +125,7 @@ def export(objectslist, filename, argstring):
|
|||
gcode = ""
|
||||
|
||||
# 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.
|
||||
myMachine = None
|
||||
for pathobj in objectslist:
|
||||
|
|
|
@ -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)))
|
||||
self.setPdcfIfNotSet()
|
||||
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:
|
||||
self.pdcf.setZ(self.minz/units) # Else use minz
|
||||
self.pdcf.setPath(path)
|
||||
|
@ -56,7 +56,7 @@ class Creator(recreator.Redirector):
|
|||
self.setPdcfIfNotSet()
|
||||
|
||||
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:
|
||||
self.pdcf.setZ(self.minz/units) # Else use minz
|
||||
|
||||
|
|
|
@ -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):
|
||||
# mystery parameters:
|
||||
# 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):
|
||||
# This is a bad thing. All the drilling cycles need a retraction (and starting) height.
|
||||
|
|
|
@ -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):
|
||||
# mystery parameters:
|
||||
# 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):
|
||||
# This is a bad thing. All the drilling cycles need a retraction (and starting) height.
|
||||
|
|
|
@ -189,7 +189,7 @@ SPINDLE_DECIMALS = 0
|
|||
# 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,
|
||||
# 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
|
||||
# if you don't want to use this header you have to provide a minimal function
|
||||
# def mkHeader(selection):
|
||||
|
|
|
@ -31,7 +31,7 @@ from FreeCAD import Vector
|
|||
from PathScripts.PathGeom import Side
|
||||
|
||||
class PathTestBase(unittest.TestCase):
|
||||
"""Base test class with some addtional asserts."""
|
||||
"""Base test class with some additional asserts."""
|
||||
|
||||
def assertRoughly(self, f1, f2):
|
||||
"""Verify that two float values are approximately the same."""
|
||||
|
|
|
@ -65,7 +65,7 @@ Point CArc::MidParam(double param)const {
|
|||
}
|
||||
|
||||
//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
|
||||
{
|
||||
if(m_s == m_e)
|
||||
|
|
|
@ -808,11 +808,11 @@ void CArea::InsideCurves(const CCurve& curve, std::list<CCurve> &curves_inside)c
|
|||
std::list<Point> 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;
|
||||
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++)
|
||||
{
|
||||
CCurve &curve = *It;
|
||||
|
|
|
@ -1516,7 +1516,7 @@ void Clipper::DisposeOutRec(PolyOutList::size_type index)
|
|||
void Clipper::SetWindingCount(TEdge &edge)
|
||||
{
|
||||
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;
|
||||
if (!e)
|
||||
{
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
//improve performance but coordinate values are limited to the range +/- 46340
|
||||
//#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
|
||||
|
||||
//use_lines: Enables line clipping. Adds a very minor cost to performance.
|
||||
|
|
|
@ -510,7 +510,7 @@ namespace geoff_geometry {
|
|||
// Triangle3d methods
|
||||
bool Triangle3d::Intof(const Line& l, Point3d& intof)const {
|
||||
// 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)
|
||||
// based on incorrect Pseudo code from "Geometric Tools for Computer Graphics" p.487
|
||||
if(box.outside(l.box) == true) return false;
|
||||
|
|
|
@ -546,7 +546,7 @@ namespace geoff_geometry {
|
|||
|
||||
void Vector3d::arbitrary_axes(Vector3d& x, Vector3d& y){
|
||||
// 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
|
||||
|
||||
if ( ( fabs ( this->getx() ) < 1.0/64.0 ) && (fabs(this->gety()) < 1.0/64.0))
|
||||
|
|
|
@ -186,7 +186,7 @@ namespace geoff_geometry {
|
|||
sp0.dir = k.Get(kinVertex, sp0.p0, sp0.pc);
|
||||
sp0.ID = k.GetSpanID(kinVertex++);
|
||||
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);
|
||||
}
|
||||
if (kinVertex <= k.nSpans()) { // any more?
|
||||
|
|
|
@ -325,7 +325,7 @@ class TaskPanel:
|
|||
|
||||
def onRemove(self):
|
||||
"""Executed when axes must be deleted."""
|
||||
# Ensure taht we can work
|
||||
# Ensure that we can work
|
||||
plt = Plot.getPlot()
|
||||
if not plt:
|
||||
self.updateUI()
|
||||
|
|
|
@ -291,7 +291,7 @@ class TaskPanel:
|
|||
self.skip = False
|
||||
|
||||
def onColor(self):
|
||||
""" Executed when color pallete is requested. """
|
||||
""" Executed when color palette is requested. """
|
||||
plt = Plot.getPlot()
|
||||
if not plt:
|
||||
self.updateUI()
|
||||
|
|
|
@ -157,7 +157,7 @@ class Tank:
|
|||
"""Return the fluid volume center of gravity, provided the volume of
|
||||
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:
|
||||
fp -- Part::FeaturePython object affected.
|
||||
|
|
|
@ -34,7 +34,7 @@ class Plot(object):
|
|||
@param x X coordinates.
|
||||
@param y Transversal computed areas.
|
||||
@param disp Ship displacement.
|
||||
@param xcb Bouyancy center length.
|
||||
@param xcb Buoyancy center length.
|
||||
@param ship Active ship instance.
|
||||
"""
|
||||
self.plot(x, y, disp, xcb, ship)
|
||||
|
@ -45,7 +45,7 @@ class Plot(object):
|
|||
@param x X coordinates.
|
||||
@param y Transversal areas.
|
||||
@param disp Ship displacement.
|
||||
@param xcb Bouyancy center length.
|
||||
@param xcb Buoyancy center length.
|
||||
@param ship Active ship instance.
|
||||
@return True if error happens.
|
||||
"""
|
||||
|
|
|
@ -44,7 +44,7 @@ def createShip(solids, L, B, T):
|
|||
|
||||
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
|
||||
such variables:
|
||||
|
||||
|
|
|
@ -231,7 +231,7 @@ def displacement(ship, draft=None,
|
|||
B -- Bouyance application point, i.e. Center of mass of the underwater side
|
||||
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:
|
||||
draft = ship.Draft
|
||||
|
@ -363,7 +363,7 @@ def floatingArea(ship, draft=None,
|
|||
if draft is None:
|
||||
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)
|
||||
shape, _ = placeShipShape(ship.Shape.copy(), draft, roll, trim)
|
||||
|
||||
|
|
|
@ -711,7 +711,7 @@ void Sheet::recomputeCell(CellAddress p)
|
|||
if (cell)
|
||||
cell->setException(e.what());
|
||||
|
||||
// Mark as erronous
|
||||
// Mark as erroneous
|
||||
cellErrors.insert(p);
|
||||
}
|
||||
|
||||
|
@ -800,7 +800,7 @@ DocumentObjectExecReturn *Sheet::execute(void)
|
|||
while (i != VertexList.end()) {
|
||||
Cell * cell = cells.getValue(i->first);
|
||||
|
||||
// Mark as erronous
|
||||
// Mark as erroneous
|
||||
cellErrors.insert(i->first);
|
||||
|
||||
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,
|
||||
* and the alias does not conflict with an existing property.
|
||||
|
|
|
@ -102,7 +102,7 @@ class MathParser:
|
|||
denominator = self.parseParenthesis()
|
||||
if denominator == 0:
|
||||
raise ZeroDivisionError(
|
||||
"Division by 0 kills baby whales (occured at index " +
|
||||
"Division by 0 kills baby whales (occurred at index " +
|
||||
str(div_index) +
|
||||
")")
|
||||
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):
|
||||
"""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
|
||||
(such as "B6")."""
|
||||
obj = FreeCAD.ActiveDocument.addObject("App::FeaturePython","PropertyController")
|
||||
|
|
|
@ -736,7 +736,7 @@ class SpreadsheetCases(unittest.TestCase):
|
|||
self.assertIn('Up-to-date',sketch.State)
|
||||
|
||||
def testCrossDocumentLinks(self):
|
||||
""" Expressions accross files are not saved (bug #2442) """
|
||||
""" Expressions across files are not saved (bug #2442) """
|
||||
|
||||
# Create a box
|
||||
box = self.doc.addObject('Part::Box', 'Box')
|
||||
|
|
|
@ -339,7 +339,7 @@ def handleCells(cellList, actCellSheet, sList):
|
|||
if refType:
|
||||
cellType = getText(refType.childNodes)
|
||||
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)
|
||||
|
||||
|
|
|
@ -171,7 +171,7 @@ DrawProjGroup::~DrawProjGroup()
|
|||
|
||||
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
|
||||
TechDraw::DrawPage *page = getPage();
|
||||
if (!isRestoring() && page) {
|
||||
|
@ -280,7 +280,7 @@ Base::BoundBox3d DrawProjGroup::getBoundingBox() const
|
|||
bb.ScaleX(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) {
|
||||
bb.MoveX(part->X.getValue());
|
||||
bb.MoveY(part->Y.getValue());
|
||||
|
|
|
@ -594,7 +594,7 @@ std::vector<incidenceItem> embedItem::sortIncidenceList (std::vector<incidenceIt
|
|||
|
||||
/*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;
|
||||
if (i1.angle == i2.angle) {
|
||||
}
|
||||
|
|
|
@ -452,7 +452,7 @@ bool GeometryObject::findVertex(Base::Vector2d v)
|
|||
}
|
||||
|
||||
/// 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
|
||||
gp_Ax2 TechDrawGeometry::getViewAxis(const Base::Vector3d origin,
|
||||
const Base::Vector3d& direction,
|
||||
|
|
|
@ -276,7 +276,7 @@ void ViewProviderPage::onSelectionChanged(const Gui::SelectionChanges& msg)
|
|||
continue;
|
||||
|
||||
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 (TechDraw::DrawUtil::getGeomTypeFromName(str) == "Face" ||
|
||||
TechDraw::DrawUtil::getGeomTypeFromName(str) == "Edge" ||
|
||||
|
@ -293,7 +293,7 @@ void ViewProviderPage::onSelectionChanged(const Gui::SelectionChanges& msg)
|
|||
App::DocumentObject *obj = doc->getDocument()->getObject(msg.pObjectName);
|
||||
if(obj) {
|
||||
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 (TechDraw::DrawUtil::getGeomTypeFromName(str) == "Face" ||
|
||||
TechDraw::DrawUtil::getGeomTypeFromName(str) == "Edge" ||
|
||||
|
|
Loading…
Reference in New Issue
Block a user