return True
return False
-NO_NAME = "NoName"
-
## Gets object name
def GetName(obj):
if isinstance(obj, SALOMEDS._objref_SObject):
self.geom = piece
else:
self.geom = geom
- name = GetName(geom)
- if name==NO_NAME:
+ try:
+ name = GetName(geom)
+ pass
+ except:
name = mesh.geompyD.SubShapeName(geom, piece)
mesh.geompyD.addToStudyInFather(piece, geom, name)
+ pass
self.subm = mesh.mesh.GetSubMesh(geom, algo.GetName())
self.algo = algo
### 0D algorithm
if self.geom is None:
raise RuntimeError, "Attemp to create SegmentAroundVertex_0D algoritm on None shape"
- name = GetName(self.geom)
- if name == NO_NAME:
+ try:
+ name = GetName(self.geom)
+ pass
+ except:
piece = self.mesh.geom
name = self.mesh.geompyD.SubShapeName(self.geom, piece)
self.mesh.geompyD.addToStudyInFather(piece, self.geom, name)
+ pass
algo = self.FindAlgorithm("SegmentAroundVertex_0D", self.mesh.smeshpyD)
if algo is None:
algo = self.mesh.smeshpyD.CreateHypothesis("SegmentAroundVertex_0D", "libStdMeshersEngine.so")