Misc. typo fixes
This commit is contained in:
parent
f07c01cc81
commit
fd1851a38b
34
assembly.py
34
assembly.py
|
@ -307,7 +307,7 @@ class AsmElement(AsmBase):
|
||||||
|
|
||||||
If there are two selections, then first one shall be either the
|
If there are two selections, then first one shall be either the
|
||||||
element group or an individual element. The second selection shall
|
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
|
the first selected element/element group
|
||||||
'''
|
'''
|
||||||
sels = FreeCADGui.Selection.getSelectionEx('',False)
|
sels = FreeCADGui.Selection.getSelectionEx('',False)
|
||||||
|
@ -320,10 +320,10 @@ class AsmElement(AsmBase):
|
||||||
sel = sels[0]
|
sel = sels[0]
|
||||||
subs = list(sel.SubElementNames)
|
subs = list(sel.SubElementNames)
|
||||||
if not subs:
|
if not subs:
|
||||||
raise RuntimeError('no sub object in selection')
|
raise RuntimeError('no sub-object in selection')
|
||||||
if len(subs)>2:
|
if len(subs)>2:
|
||||||
raise RuntimeError('At most two selection is allowed.\n'
|
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 '
|
'assembly. The optional second selection must be an element '
|
||||||
'belonging to the same assembly of the first selection')
|
'belonging to the same assembly of the first selection')
|
||||||
if len(subs)==2:
|
if len(subs)==2:
|
||||||
|
@ -332,7 +332,7 @@ class AsmElement(AsmBase):
|
||||||
|
|
||||||
if subs[0][-1] == '.':
|
if subs[0][-1] == '.':
|
||||||
if not utils.isElement((sel.Object,subs[0])):
|
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]))
|
'{}.{}'.format(sel.Object.Name,subs[0]))
|
||||||
subElement = utils.deduceSelectedElement(sel.Object,subs[0])
|
subElement = utils.deduceSelectedElement(sel.Object,subs[0])
|
||||||
if subElement:
|
if subElement:
|
||||||
|
@ -341,7 +341,7 @@ class AsmElement(AsmBase):
|
||||||
link = Assembly.findPartGroup(sel.Object,subs[0])
|
link = Assembly.findPartGroup(sel.Object,subs[0])
|
||||||
if not link:
|
if not link:
|
||||||
raise RuntimeError(
|
raise RuntimeError(
|
||||||
'Selected sub element does not belong to an assembly')
|
'Selected sub-element does not belong to an assembly')
|
||||||
|
|
||||||
element = None
|
element = None
|
||||||
if len(subs)>1:
|
if len(subs)>1:
|
||||||
|
@ -540,7 +540,7 @@ def getElementInfo(parent, subname):
|
||||||
if isTypeOf(child,(AsmElementGroup,AsmConstraintGroup)):
|
if isTypeOf(child,(AsmElementGroup,AsmConstraintGroup)):
|
||||||
child = parent.getSubObject(subname,1)
|
child = parent.getSubObject(subname,1)
|
||||||
if not child:
|
if not child:
|
||||||
raise RuntimeError('Invalid sub object {}, {}'.format(
|
raise RuntimeError('Invalid sub-object {}, {}'.format(
|
||||||
objName(parent), subname))
|
objName(parent), subname))
|
||||||
if not isTypeOf(child,(AsmElement,AsmElementLink)):
|
if not isTypeOf(child,(AsmElement,AsmElementLink)):
|
||||||
raise RuntimeError('{} cannot be moved'.format(objName(child)))
|
raise RuntimeError('{} cannot be moved'.format(objName(child)))
|
||||||
|
@ -554,7 +554,7 @@ def getElementInfo(parent, subname):
|
||||||
subname = '.'.join(names)
|
subname = '.'.join(names)
|
||||||
|
|
||||||
if not partGroup:
|
if not partGroup:
|
||||||
raise RuntimeError('Invalid sub object {}, {}'.format(
|
raise RuntimeError('Invalid sub-object {}, {}'.format(
|
||||||
objName(parent), subname))
|
objName(parent), subname))
|
||||||
|
|
||||||
elif isTypeOf(parent,AsmPartGroup):
|
elif isTypeOf(parent,AsmPartGroup):
|
||||||
|
@ -565,7 +565,7 @@ def getElementInfo(parent, subname):
|
||||||
|
|
||||||
part = partGroup.getSubObject(names[0]+'.',1)
|
part = partGroup.getSubObject(names[0]+'.',1)
|
||||||
if not part:
|
if not part:
|
||||||
raise RuntimeError('Invalid sub object {}, {}'.format(
|
raise RuntimeError('Invalid sub-object {}, {}'.format(
|
||||||
objName(parent), subnameRef))
|
objName(parent), subnameRef))
|
||||||
|
|
||||||
# For storing the shape of the element with proper transformation
|
# For storing the shape of the element with proper transformation
|
||||||
|
@ -700,10 +700,10 @@ class AsmElementLink(AsmBase):
|
||||||
if assembly == self.getAssembly():
|
if assembly == self.getAssembly():
|
||||||
return element.getElementSubname()
|
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
|
# 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
|
# 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
|
# 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
|
# the last two names are element group and element label. So just pop
|
||||||
# two names.
|
# two names.
|
||||||
|
@ -713,7 +713,7 @@ class AsmElementLink(AsmBase):
|
||||||
element.getElementSubname())
|
element.getElementSubname())
|
||||||
|
|
||||||
def setLink(self,owner,subname,checkOnly=False):
|
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)
|
ret = Assembly.find(owner,subname)
|
||||||
if not ret:
|
if not ret:
|
||||||
# if not, add/get an element in our own element group
|
# if not, add/get an element in our own element group
|
||||||
|
@ -723,7 +723,7 @@ class AsmElementLink(AsmBase):
|
||||||
owner = element.Proxy.parent.Object
|
owner = element.Proxy.parent.Object
|
||||||
subname = '${}.'.format(element.Label)
|
subname = '${}.'.format(element.Label)
|
||||||
else:
|
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,
|
sel = AsmElement.Selection(Element=None, Group=ret.Object,
|
||||||
Subname=ret.Subname)
|
Subname=ret.Subname)
|
||||||
element = AsmElement.make(sel)
|
element = AsmElement.make(sel)
|
||||||
|
@ -988,9 +988,9 @@ class AsmConstraint(AsmGroup):
|
||||||
sub = sub[sub.index('.')+1:]
|
sub = sub[sub.index('.')+1:]
|
||||||
if sub[-1] == '.' and \
|
if sub[-1] == '.' and \
|
||||||
not isTypeOf(sobj,(AsmElement,AsmElementLink)):
|
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)):
|
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))
|
'{}.{}'.format(found.Object.Name,sub))
|
||||||
subElement = utils.deduceSelectedElement(found.Object,sub)
|
subElement = utils.deduceSelectedElement(found.Object,sub)
|
||||||
if subElement:
|
if subElement:
|
||||||
|
@ -1524,8 +1524,8 @@ class Assembly(AsmGroup):
|
||||||
|
|
||||||
obj: the parent object
|
obj: the parent object
|
||||||
|
|
||||||
subname: '.' separted sub-object reference, or string list of sub-object
|
subname: '.' separated sub-object reference, or string list of sub-object
|
||||||
names. Must contain no sub element name.
|
names. Must contain no sub-element name.
|
||||||
|
|
||||||
childType: optional checking of the child type.
|
childType: optional checking of the child type.
|
||||||
|
|
||||||
|
@ -1548,7 +1548,7 @@ class Assembly(AsmGroup):
|
||||||
for i,name in enumerate(subs[:-1]):
|
for i,name in enumerate(subs[:-1]):
|
||||||
sobj = obj.getSubObject(name+'.',1)
|
sobj = obj.getSubObject(name+'.',1)
|
||||||
if not sobj:
|
if not sobj:
|
||||||
raise RuntimeError('Cannot find sub object {}, '
|
raise RuntimeError('Cannot find sub-object {}, '
|
||||||
'{}'.format(objName(obj),name))
|
'{}'.format(objName(obj),name))
|
||||||
obj = sobj
|
obj = sobj
|
||||||
if assembly and isTypeOf(obj,childType):
|
if assembly and isTypeOf(obj,childType):
|
||||||
|
|
2
mover.py
2
mover.py
|
@ -227,7 +227,7 @@ def getMovingElementInfo():
|
||||||
raise RuntimeError('no selection')
|
raise RuntimeError('no selection')
|
||||||
|
|
||||||
if not sels[0].SubElementNames:
|
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:
|
if len(sels)>1 or len(sels[0].SubElementNames)>2:
|
||||||
raise RuntimeError('too many selection')
|
raise RuntimeError('too many selection')
|
||||||
|
|
|
@ -156,7 +156,7 @@ class _AlgoTNC(_AlgoBase):
|
||||||
_makeProp('minifev','Minimum function value estimate. Defaults to 0.',
|
_makeProp('minifev','Minimum function value estimate. Defaults to 0.',
|
||||||
'App::PropertyInteger'),
|
'App::PropertyInteger'),
|
||||||
_makeProp('ftol',
|
_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.'),
|
'If ftol < 0.0, ftol is set to 0.0 defaults to -1.'),
|
||||||
_makeProp('xtol',
|
_makeProp('xtol',
|
||||||
'Precision goal for the value of x in the stopping criterion\n'
|
'Precision goal for the value of x in the stopping criterion\n'
|
||||||
|
@ -1141,7 +1141,7 @@ class _SystemSymPy(SystemExtension):
|
||||||
# restart equation generation if any equation can be solved earlier
|
# restart equation generation if any equation can be solved earlier
|
||||||
restart = False
|
restart = False
|
||||||
while True:
|
while True:
|
||||||
params = {} # symobl -> value
|
params = {} # symbol -> value
|
||||||
param_table = {} # symbol -> _Param object
|
param_table = {} # symbol -> _Param object
|
||||||
for e in self.Params:
|
for e in self.Params:
|
||||||
e.reset(group)
|
e.reset(group)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user