mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-12 01:30:34 +05:00
0020702: [CEA] Problem with Segment function of SMESH module
This commit is contained in:
parent
3d1a536674
commit
4bb95af61f
@ -390,8 +390,6 @@ def IsEqual(val1, val2, tol=PrecisionConfusion):
|
|||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
NO_NAME = "NoName"
|
|
||||||
|
|
||||||
## Gets object name
|
## Gets object name
|
||||||
def GetName(obj):
|
def GetName(obj):
|
||||||
if isinstance(obj, SALOMEDS._objref_SObject):
|
if isinstance(obj, SALOMEDS._objref_SObject):
|
||||||
@ -3711,10 +3709,13 @@ class Mesh_Algorithm:
|
|||||||
self.geom = piece
|
self.geom = piece
|
||||||
else:
|
else:
|
||||||
self.geom = geom
|
self.geom = geom
|
||||||
name = GetName(geom)
|
try:
|
||||||
if name==NO_NAME:
|
name = GetName(geom)
|
||||||
|
pass
|
||||||
|
except:
|
||||||
name = mesh.geompyD.SubShapeName(geom, piece)
|
name = mesh.geompyD.SubShapeName(geom, piece)
|
||||||
mesh.geompyD.addToStudyInFather(piece, geom, name)
|
mesh.geompyD.addToStudyInFather(piece, geom, name)
|
||||||
|
pass
|
||||||
self.subm = mesh.mesh.GetSubMesh(geom, algo.GetName())
|
self.subm = mesh.mesh.GetSubMesh(geom, algo.GetName())
|
||||||
|
|
||||||
self.algo = algo
|
self.algo = algo
|
||||||
@ -4036,11 +4037,14 @@ class Mesh_Segment(Mesh_Algorithm):
|
|||||||
### 0D algorithm
|
### 0D algorithm
|
||||||
if self.geom is None:
|
if self.geom is None:
|
||||||
raise RuntimeError, "Attemp to create SegmentAroundVertex_0D algoritm on None shape"
|
raise RuntimeError, "Attemp to create SegmentAroundVertex_0D algoritm on None shape"
|
||||||
name = GetName(self.geom)
|
try:
|
||||||
if name == NO_NAME:
|
name = GetName(self.geom)
|
||||||
|
pass
|
||||||
|
except:
|
||||||
piece = self.mesh.geom
|
piece = self.mesh.geom
|
||||||
name = self.mesh.geompyD.SubShapeName(self.geom, piece)
|
name = self.mesh.geompyD.SubShapeName(self.geom, piece)
|
||||||
self.mesh.geompyD.addToStudyInFather(piece, self.geom, name)
|
self.mesh.geompyD.addToStudyInFather(piece, self.geom, name)
|
||||||
|
pass
|
||||||
algo = self.FindAlgorithm("SegmentAroundVertex_0D", self.mesh.smeshpyD)
|
algo = self.FindAlgorithm("SegmentAroundVertex_0D", self.mesh.smeshpyD)
|
||||||
if algo is None:
|
if algo is None:
|
||||||
algo = self.mesh.smeshpyD.CreateHypothesis("SegmentAroundVertex_0D", "libStdMeshersEngine.so")
|
algo = self.mesh.smeshpyD.CreateHypothesis("SegmentAroundVertex_0D", "libStdMeshersEngine.so")
|
||||||
|
Loading…
Reference in New Issue
Block a user