# @return SMESH.AxisStruct
# @ingroup l1_auxiliary
def GetAxisStruct(self,theObj):
- edges = self.geompyD.ExtractShapes( theObj, geompyDC.ShapeType["EDGE"] )
+ edges = self.geompyD.SubShapeAll( theObj, geompyDC.ShapeType["EDGE"] )
if len(edges) > 1:
vertex1, vertex2 = self.geompyD.SubShapeAll( edges[0], geompyDC.ShapeType["VERTEX"] )
vertex3, vertex4 = self.geompyD.SubShapeAll( edges[1], geompyDC.ShapeType["VERTEX"] )
else:
print "Error: The treshold should be a shape."
return None
+ if isinstance(UnaryOp,float):
+ aCriterion.Tolerance = UnaryOp
+ UnaryOp = FT_Undefined
+ pass
elif CritType == FT_RangeOfIds:
# Checks the treshold
if isinstance(aTreshold, str):
shape = geom
if shape==0:
shape = self.geom
- nbSolids = len( self.geompyD.ExtractShapes( shape, geompyDC.ShapeType["SOLID"] ))
- nbShells = len( self.geompyD.ExtractShapes( shape, geompyDC.ShapeType["SHELL"] ))
+ nbSolids = len( self.geompyD.SubShapeAll( shape, geompyDC.ShapeType["SOLID"] ))
+ nbShells = len( self.geompyD.SubShapeAll( shape, geompyDC.ShapeType["SHELL"] ))
if nbSolids == 0 or nbSolids == nbShells:
return Mesh_Prism3D(self, geom)
return Mesh_RadialPrism3D(self, geom)
def CutListOfGroups(self, main_groups, tool_groups, name):
return self.mesh.CutListOfGroups(main_groups, tool_groups, name)
- ## Produces a group of elements with specified element type using list of existing groups
+ ## Produces a group of elements of specified type using list of existing groups
# A new group is created. System
- # 1) extract all nodes on which groups elements are built
- # 2) combine all elements of specified dimension laying on these nodes
+ # 1) extracts all nodes on which groups elements are built
+ # 2) combines all elements of specified dimension laying on these nodes
# @return an instance of SMESH_Group
# @ingroup l2_grps_operon
def CreateDimGroup(self, groups, elem_type, name):
self.params = self.Hypothesis("NETGEN_Parameters", [],
"libNETGENEngine.so", UseExisting=0)
- if self.algoType == NETGEN:
+ elif self.algoType == NETGEN:
self.params = self.Hypothesis("NETGEN_Parameters_3D", [],
"libNETGENEngine.so", UseExisting=0)
self.params = self.Hypothesis("GHS3DPRL_Parameters", [],
"libGHS3DPRLEngine.so", UseExisting=0)
else:
- print "Algo supports no multi-parameter hypothesis"
+ print "Warning: %s supports no multi-parameter hypothesis"%self.algo.GetName()
return self.params