-# Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# @package StdMeshersBuilder
# Python API for the standard meshing plug-in module.
+LIBRARY = "libStdMeshersEngine.so"
+
from salome.smesh.smesh_algorithm import Mesh_Algorithm
import StdMeshers
shape = geom
if not shape:
shape = mesh.geom
- from salome.geom import geomBuilder
- nbSolids = len( geomBuilder.geom.SubShapeAll( shape, geomBuilder.geomBuilder.ShapeType["SOLID"] ))
- nbShells = len( geomBuilder.geom.SubShapeAll( shape, geomBuilder.geomBuilder.ShapeType["SHELL"] ))
- if nbSolids == 0 or nbSolids == nbShells:
+ isRadial = mesh.smeshpyD.IsApplicable("RadialPrism_3D", LIBRARY, shape, False )
+ if not isRadial:
self.Create(mesh, geom, "Prism_3D")
pass
else:
pass # end of StdMeshersBuilder_Prism3D class
-## Defines a Prism 3D algorithm
+## Defines Radial Prism 3D algorithm
#
# It is created by calling smeshBuilder.Mesh.Prism(geom=0)
#
# @param UseExisting if ==true - searches for the existing hypothesis created with
# the same parameters, else (default) - creates a new one
def SourceFaces(self, groups, toCopyMesh=False, toCopyGroups=False, UseExisting=False):
+ import SMESH
compFun = lambda hyp, args: ( hyp.GetSourceFaces() == args[0] and \
hyp.GetCopySourceMesh() == args[1], args[2] )
hyp = self.Hypothesis("ImportSource2D", [groups, toCopyMesh, toCopyGroups],
UseExisting=UseExisting, CompareMethod=compFun, toAdd=False)
+ if groups and isinstance( groups, SMESH._objref_SMESH_GroupBase ):
+ groups = [groups]
hyp.SetSourceFaces(groups)
hyp.SetCopySourceMesh(toCopyMesh, toCopyGroups)
self.mesh.AddHypothesis(hyp, self.geom)