#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# on curve from 0 to 1 (additionally it is neecessary to check
# orientation of edges and create list of reversed edges if it is
# needed) and sets numbers of segments between given points (default
# on curve from 0 to 1 (additionally it is neecessary to check
# orientation of edges and create list of reversed edges if it is
# needed) and sets numbers of segments between given points (default
# @param points defines the list of parameters on curve
# @param nbSegs defines the list of numbers of segments
# @param reversedEdges is a list of edges to mesh using reversed orientation.
# @param points defines the list of parameters on curve
# @param nbSegs defines the list of numbers of segments
# @param reversedEdges is a list of edges to mesh using reversed orientation.
from salome.smesh.smeshBuilder import AssureGeomPublished, GetName, TreatHypoStatus
AssureGeomPublished( self.mesh, self.geom )
name = GetName(self.geom)
from salome.smesh.smeshBuilder import AssureGeomPublished, GetName, TreatHypoStatus
AssureGeomPublished( self.mesh, self.geom )
name = GetName(self.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:
## Return 3D hypothesis holding the 1D one
def Get3DHypothesis(self):
if self.algoType != "RadialPrism_3D":
## Return 3D hypothesis holding the 1D one
def Get3DHypothesis(self):
if self.algoType != "RadialPrism_3D":
# hypothesis. Returns the created hypothesis
def OwnHypothesis(self, hypType, args=[], so="libStdMeshersEngine.so"):
if self.algoType != "RadialPrism_3D":
# hypothesis. Returns the created hypothesis
def OwnHypothesis(self, hypType, args=[], so="libStdMeshersEngine.so"):
if self.algoType != "RadialPrism_3D":
return None
if not self.nbLayers is None:
self.mesh.GetMesh().RemoveHypothesis( self.geom, self.nbLayers )
return None
if not self.nbLayers is None:
self.mesh.GetMesh().RemoveHypothesis( self.geom, self.nbLayers )
# the same parameters, else (default) - creates a new one
def NumberOfLayers(self, n, UseExisting=0):
if self.algoType != "RadialPrism_3D":
# the same parameters, else (default) - creates a new one
def NumberOfLayers(self, n, UseExisting=0):
if self.algoType != "RadialPrism_3D":
return None
self.mesh.RemoveHypothesis( self.distribHyp, self.geom )
from salome.smesh.smeshBuilder import IsEqual
return None
self.mesh.RemoveHypothesis( self.distribHyp, self.geom )
from salome.smesh.smeshBuilder import IsEqual
# @param p the precision of rounding
def LocalLength(self, l, p=1e-07):
if self.algoType != "RadialPrism_3D":
# @param p the precision of rounding
def LocalLength(self, l, p=1e-07):
if self.algoType != "RadialPrism_3D":
# @param s the scale factor (optional)
def NumberOfSegments(self, n, s=[]):
if self.algoType != "RadialPrism_3D":
# @param s the scale factor (optional)
def NumberOfSegments(self, n, s=[]):
if self.algoType != "RadialPrism_3D":
# @param end the length of the last segment
def Arithmetic1D(self, start, end ):
if self.algoType != "RadialPrism_3D":
# @param end the length of the last segment
def Arithmetic1D(self, start, end ):
if self.algoType != "RadialPrism_3D":
# @param ratio the common ratio of the geometric progression
def GeometricProgression(self, start, ratio ):
if self.algoType != "RadialPrism_3D":
# @param ratio the common ratio of the geometric progression
def GeometricProgression(self, start, ratio ):
if self.algoType != "RadialPrism_3D":
return None
hyp = self.OwnHypothesis("GeometricProgression", [start, ratio])
hyp.SetStartLength( start )
return None
hyp = self.OwnHypothesis("GeometricProgression", [start, ratio])
hyp.SetStartLength( start )
# @param end for the length of the last segment
def StartEndLength(self, start, end):
if self.algoType != "RadialPrism_3D":
# @param end for the length of the last segment
def StartEndLength(self, start, end):
if self.algoType != "RadialPrism_3D":
# @param fineness defines the quality of the mesh within the range [0-1]
def AutomaticLength(self, fineness=0):
if self.algoType != "RadialPrism_3D":
# @param fineness defines the quality of the mesh within the range [0-1]
def AutomaticLength(self, fineness=0):
if self.algoType != "RadialPrism_3D":
# @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):
# @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):
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)
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)
hyp.SetSourceFaces(groups)
hyp.SetCopySourceMesh(toCopyMesh, toCopyGroups)
self.mesh.AddHypothesis(hyp, self.geom)
hyp.SetSourceFaces(groups)
hyp.SetCopySourceMesh(toCopyMesh, toCopyGroups)
self.mesh.AddHypothesis(hyp, self.geom)
# several functions, they must be accompanied by relative coordinates of
# points dividing the whole shape into ranges where the functions apply; points
# coodrinates should vary within (0.0, 1.0) range. Parameter \a t of the spacing
# several functions, they must be accompanied by relative coordinates of
# points dividing the whole shape into ranges where the functions apply; points
# coodrinates should vary within (0.0, 1.0) range. Parameter \a t of the spacing
# Examples:
# - "10.5" - defines a grid with a constant spacing
# - [["1", "1+10*t", "11"] [0.1, 0.6]] - defines different spacing in 3 ranges.
# Examples:
# - "10.5" - defines a grid with a constant spacing
# - [["1", "1+10*t", "11"] [0.1, 0.6]] - defines different spacing in 3 ranges.
pass # end of StdMeshersBuilder_Cartesian_3D class
## Defines a stub 1D algorithm, which enables "manual" creation of nodes and
pass # end of StdMeshersBuilder_Cartesian_3D class
## Defines a stub 1D algorithm, which enables "manual" creation of nodes and
pass # end of StdMeshersBuilder_UseExisting_1D class
## Defines a stub 2D algorithm, which enables "manual" creation of nodes and
pass # end of StdMeshersBuilder_UseExisting_1D class
## Defines a stub 2D algorithm, which enables "manual" creation of nodes and