Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misc. typo fixes #9

Merged
merged 1 commit into from
Feb 6, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions assembly.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ def getSelection():

If there are two selections, then first one shall be either the
element group or an individual element. The second selection shall
be a sub element belong to a child assembly of the parent assembly of
be a sub-element belong to a child assembly of the parent assembly of
the first selected element/element group
'''
sels = FreeCADGui.Selection.getSelectionEx('',False)
Expand All @@ -320,10 +320,10 @@ def getSelection():
sel = sels[0]
subs = list(sel.SubElementNames)
if not subs:
raise RuntimeError('no sub object in selection')
raise RuntimeError('no sub-object in selection')
if len(subs)>2:
raise RuntimeError('At most two selection is allowed.\n'
'The first selection must be a sub element belonging to some '
'The first selection must be a sub-element belonging to some '
'assembly. The optional second selection must be an element '
'belonging to the same assembly of the first selection')
if len(subs)==2:
Expand All @@ -332,7 +332,7 @@ def getSelection():

if subs[0][-1] == '.':
if not utils.isElement((sel.Object,subs[0])):
raise RuntimeError('no sub element (face, edge, vertex) in '
raise RuntimeError('no sub-element (face, edge, vertex) in '
'{}.{}'.format(sel.Object.Name,subs[0]))
subElement = utils.deduceSelectedElement(sel.Object,subs[0])
if subElement:
Expand All @@ -341,7 +341,7 @@ def getSelection():
link = Assembly.findPartGroup(sel.Object,subs[0])
if not link:
raise RuntimeError(
'Selected sub element does not belong to an assembly')
'Selected sub-element does not belong to an assembly')

element = None
if len(subs)>1:
Expand Down Expand Up @@ -540,7 +540,7 @@ def getElementInfo(parent, subname):
if isTypeOf(child,(AsmElementGroup,AsmConstraintGroup)):
child = parent.getSubObject(subname,1)
if not child:
raise RuntimeError('Invalid sub object {}, {}'.format(
raise RuntimeError('Invalid sub-object {}, {}'.format(
objName(parent), subname))
if not isTypeOf(child,(AsmElement,AsmElementLink)):
raise RuntimeError('{} cannot be moved'.format(objName(child)))
Expand All @@ -554,7 +554,7 @@ def getElementInfo(parent, subname):
subname = '.'.join(names)

if not partGroup:
raise RuntimeError('Invalid sub object {}, {}'.format(
raise RuntimeError('Invalid sub-object {}, {}'.format(
objName(parent), subname))

elif isTypeOf(parent,AsmPartGroup):
Expand All @@ -565,7 +565,7 @@ def getElementInfo(parent, subname):

part = partGroup.getSubObject(names[0]+'.',1)
if not part:
raise RuntimeError('Invalid sub object {}, {}'.format(
raise RuntimeError('Invalid sub-object {}, {}'.format(
objName(parent), subnameRef))

# For storing the shape of the element with proper transformation
Expand Down Expand Up @@ -700,10 +700,10 @@ def getElementSubname(self):
if assembly == self.getAssembly():
return element.getElementSubname()

# The reference stored inside this ElementLink. We need the sub assembly
# The reference stored inside this ElementLink. We need the sub-assembly
# name, which is the name before the first dot. This name may be
# different from the actual assembly object's name, in case where the
# assembly is accessed through a link. And the sub assembly may be
# assembly is accessed through a link. And the sub-assembly may be
# inside a link array, which we don't know for sure. But we do know that
# the last two names are element group and element label. So just pop
# two names.
Expand All @@ -713,7 +713,7 @@ def getElementSubname(self):
element.getElementSubname())

def setLink(self,owner,subname,checkOnly=False):
# check if there is any sub assembly in the reference
# check if there is any sub-assembly in the reference
ret = Assembly.find(owner,subname)
if not ret:
# if not, add/get an element in our own element group
Expand All @@ -723,7 +723,7 @@ def setLink(self,owner,subname,checkOnly=False):
owner = element.Proxy.parent.Object
subname = '${}.'.format(element.Label)
else:
# if so, add/get an element from the sub assembly
# if so, add/get an element from the sub-assembly
sel = AsmElement.Selection(Element=None, Group=ret.Object,
Subname=ret.Subname)
element = AsmElement.make(sel)
Expand Down Expand Up @@ -988,9 +988,9 @@ def getSelection(typeid=0,sels=None):
sub = sub[sub.index('.')+1:]
if sub[-1] == '.' and \
not isTypeOf(sobj,(AsmElement,AsmElementLink)):
# Too bad, its a full selection, let's guess the sub element
# Too bad, its a full selection, let's guess the sub-element
if not utils.isElement((found.Object,sub)):
raise RuntimeError('no sub element (face, edge, vertex) in '
raise RuntimeError('no sub-element (face, edge, vertex) in '
'{}.{}'.format(found.Object.Name,sub))
subElement = utils.deduceSelectedElement(found.Object,sub)
if subElement:
Expand Down Expand Up @@ -1524,8 +1524,8 @@ def find(obj,subname,childType=None,

obj: the parent object

subname: '.' separted sub-object reference, or string list of sub-object
names. Must contain no sub element name.
subname: '.' separated sub-object reference, or string list of sub-object
names. Must contain no sub-element name.

childType: optional checking of the child type.

Expand All @@ -1548,7 +1548,7 @@ def find(obj,subname,childType=None,
for i,name in enumerate(subs[:-1]):
sobj = obj.getSubObject(name+'.',1)
if not sobj:
raise RuntimeError('Cannot find sub object {}, '
raise RuntimeError('Cannot find sub-object {}, '
'{}'.format(objName(obj),name))
obj = sobj
if assembly and isTypeOf(obj,childType):
Expand Down
2 changes: 1 addition & 1 deletion mover.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ def getMovingElementInfo():
raise RuntimeError('no selection')

if not sels[0].SubElementNames:
raise RuntimeError('no sub object in selection')
raise RuntimeError('no sub-object in selection')

if len(sels)>1 or len(sels[0].SubElementNames)>2:
raise RuntimeError('too many selection')
Expand Down
4 changes: 2 additions & 2 deletions sys_sympy.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ class _AlgoTNC(_AlgoBase):
_makeProp('minifev','Minimum function value estimate. Defaults to 0.',
'App::PropertyInteger'),
_makeProp('ftol',
'Precision goal for the value of f in the stoping criterion.\n'
'Precision goal for the value of f in the stopping criterion.\n'
'If ftol < 0.0, ftol is set to 0.0 defaults to -1.'),
_makeProp('xtol',
'Precision goal for the value of x in the stopping criterion\n'
Expand Down Expand Up @@ -1141,7 +1141,7 @@ def solve(self, group=0, reportFailed=False):
# restart equation generation if any equation can be solved earlier
restart = False
while True:
params = {} # symobl -> value
params = {} # symbol -> value
param_table = {} # symbol -> _Param object
for e in self.Params:
e.reset(group)
Expand Down