constraint: support cylindrical face in MultiParallel

This commit is contained in:
Zheng, Lei 2020-10-26 20:37:34 +08:00
parent 4edc0fbca6
commit 9f4fa40b8f
2 changed files with 9 additions and 3 deletions

View File

@ -689,7 +689,9 @@ class AsmElement(AsmBase):
info = None
try:
info = self.getInfo(False)
except Exception:
except Exception as e:
logger.warn(str(e))
self.updatePlacement()
if not gui.AsmCmdManager.AutoFixElement:

View File

@ -245,11 +245,15 @@ def _lw(solver,partInfo,subname,shape,retAll=False):
'return a handle for either a line or a plane depending on the shape'
_ = retAll
if not solver:
if utils.isLinearEdge(shape) or utils.isPlanar(shape):
if utils.isLinearEdge(shape) or \
utils.isPlanar(shape) or \
utils.isCylindricalPlane(shape):
return
return 'a linear edge or edge/face with planar surface'
return 'a linear edge or edge/face with planar or cylindrical surface'
if utils.isLinearEdge(shape):
return _l(solver,partInfo,subname,shape,False)
if utils.isCylindricalPlane(shape):
return _n(solver,partInfo,subname,shape,False)
return _wa(solver,partInfo,subname,shape)
def _w(solver,partInfo,subname,shape,retAll=False,noCheck=False):