mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-19 04:40:32 +05:00
0020693: EDF 1288 SMESH: Problem to recompute a mesh with a sub-mesh and a conversion linear-quadratic
## Computes the mesh and returns the status of the computation + # @param discardModifs if True and the mesh has been edited since + # a last total re-compute and that may prevent successful partial re-compute, + # then the mesh is cleaned before Compute() # @return True or False # @ingroup l2_construct - def Compute(self, geom=0): + def Compute(self, geom=0, discardModifs=False):
This commit is contained in:
parent
475c43c868
commit
0611264223
@ -438,6 +438,7 @@ def TreatHypoStatus(status, hypName, geomName, isAlgo):
|
|||||||
elif status == HYP_NOTCONFORM :
|
elif status == HYP_NOTCONFORM :
|
||||||
reason = "a non-conform mesh would be built"
|
reason = "a non-conform mesh would be built"
|
||||||
elif status == HYP_ALREADY_EXIST :
|
elif status == HYP_ALREADY_EXIST :
|
||||||
|
if isAlgo: return # it does not influence anything
|
||||||
reason = hypType + " of the same dimension is already assigned to this shape"
|
reason = hypType + " of the same dimension is already assigned to this shape"
|
||||||
elif status == HYP_BAD_DIM :
|
elif status == HYP_BAD_DIM :
|
||||||
reason = hypType + " mismatches the shape"
|
reason = hypType + " mismatches the shape"
|
||||||
@ -1164,9 +1165,12 @@ class Mesh:
|
|||||||
|
|
||||||
|
|
||||||
## Computes the mesh and returns the status of the computation
|
## Computes the mesh and returns the status of the computation
|
||||||
|
# @param discardModifs if True and the mesh has been edited since
|
||||||
|
# a last total re-compute and that may prevent successful partial re-compute,
|
||||||
|
# then the mesh is cleaned before Compute()
|
||||||
# @return True or False
|
# @return True or False
|
||||||
# @ingroup l2_construct
|
# @ingroup l2_construct
|
||||||
def Compute(self, geom=0):
|
def Compute(self, geom=0, discardModifs=False):
|
||||||
if geom == 0 or not isinstance(geom, geompyDC.GEOM._objref_GEOM_Object):
|
if geom == 0 or not isinstance(geom, geompyDC.GEOM._objref_GEOM_Object):
|
||||||
if self.geom == 0:
|
if self.geom == 0:
|
||||||
geom = self.mesh.GetShapeToMesh()
|
geom = self.mesh.GetShapeToMesh()
|
||||||
@ -1174,6 +1178,8 @@ class Mesh:
|
|||||||
geom = self.geom
|
geom = self.geom
|
||||||
ok = False
|
ok = False
|
||||||
try:
|
try:
|
||||||
|
if discardModifs and self.mesh.HasModificationsToDiscard(): # issue 0020693
|
||||||
|
self.mesh.Clear()
|
||||||
ok = self.smeshpyD.Compute(self.mesh, geom)
|
ok = self.smeshpyD.Compute(self.mesh, geom)
|
||||||
except SALOME.SALOME_Exception, ex:
|
except SALOME.SALOME_Exception, ex:
|
||||||
print "Mesh computation failed, exception caught:"
|
print "Mesh computation failed, exception caught:"
|
||||||
@ -1197,6 +1203,8 @@ class Mesh:
|
|||||||
if not s: continue
|
if not s: continue
|
||||||
mainSO = s.FindObjectIOR(mainIOR)
|
mainSO = s.FindObjectIOR(mainIOR)
|
||||||
if not mainSO: continue
|
if not mainSO: continue
|
||||||
|
if err.subShapeID == 1:
|
||||||
|
shapeText = ' on "%s"' % mainSO.GetName()
|
||||||
subIt = s.NewChildIterator(mainSO)
|
subIt = s.NewChildIterator(mainSO)
|
||||||
while subIt.More():
|
while subIt.More():
|
||||||
subSO = subIt.Value()
|
subSO = subIt.Value()
|
||||||
|
Loading…
Reference in New Issue
Block a user