Version: 8.3.0
Home
 All Data Structures Namespaces Files Functions Variables Groups
1D Meshing Hypotheses

Functions

def ReversedEdgeIndices
 Transform a list of either edges or tuples (edge, 1st_vertex_of_edge) into a list acceptable to SetReversedEdges() of some 1D hypotheses. More...
 
def LocalLength
 Defines "LocalLength" hypothesis to cut an edge in several segments with the same length. More...
 
def MaxSize
 Defines "MaxSize" hypothesis to cut an edge into segments not longer than given value. More...
 
def NumberOfSegments
 Defines "NumberOfSegments" hypothesis to cut an edge in a fixed number of segments. More...
 
def Adaptive
 Defines "Adaptive" hypothesis to cut an edge into segments keeping segment size within the given range and considering (1) deflection of segments from the edge and (2) distance from segments to closest edges and faces to have segment length not longer than two times shortest distances to edges and faces. More...
 
def Arithmetic1D
 Defines "Arithmetic1D" hypothesis to cut an edge in several segments with a length that changes in arithmetic progression. More...
 
def GeometricProgression
 Defines "GeometricProgression" hypothesis to cut an edge in several segments with a length that changes in Geometric progression. More...
 
def FixedPoints1D
 Defines "FixedPoints1D" hypothesis to cut an edge using parameter 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 values are 1) More...
 
def StartEndLength
 Defines "StartEndLength" hypothesis to cut an edge in several segments with increasing geometric length. More...
 
def Deflection1D
 Defines "Deflection1D" hypothesis. More...
 
def AutomaticLength
 Defines "AutomaticLength" hypothesis. More...
 
def PythonSplit1D
 Defines "PythonSplit1D" hypothesis. More...
 

Detailed Description

Function Documentation

def ReversedEdgeIndices (   self,
  reverseList 
)

Transform a list of either edges or tuples (edge, 1st_vertex_of_edge) into a list acceptable to SetReversedEdges() of some 1D hypotheses.

References smeshBuilder.FirstVertexOnCurve(), Mesh_Algorithm.mesh, Mesh.mesh, submeshProxy.mesh, meshEditor.mesh, and algoCreator.mesh.

def LocalLength (   self,
  l,
  UseExisting = 0,
  p = 1e-07 
)

Defines "LocalLength" hypothesis to cut an edge in several segments with the same length.

Parameters
lfor the length of segments that cut an edge
UseExistingif ==true - searches for an existing hypothesis created with the same parameters, else (default) - creates a new one
pprecision, used for calculation of the number of segments. The precision should be a positive, meaningful value within the range [0,1]. In general, the number of segments is calculated with the formula: nb = ceil((edge_length / l) - p) Function ceil rounds its argument to the higher integer. So, p=0 means rounding of (edge_length / l) to the higher integer, p=0.5 means rounding of (edge_length / l) to the nearest integer, p=1 means rounding of (edge_length / l) to the lower integer. Default value is 1e-07.
Returns
an instance of StdMeshers_LocalLength hypothesis

References Mesh_Algorithm.Hypothesis(), and smeshBuilder.IsEqual().

def MaxSize (   self,
  length = 0.0,
  UseExisting = 0 
)

Defines "MaxSize" hypothesis to cut an edge into segments not longer than given value.

Parameters
lengthis optional maximal allowed length of segment, if it is omitted the preestimated length is used that depends on geometry size
UseExistingif ==true - searches for an existing hypothesis created with the same parameters, else (default) - creates a new one
Returns
an instance of StdMeshers_MaxLength hypothesis

References Mesh_Algorithm.Hypothesis().

def NumberOfSegments (   self,
  n,
  s = [],
  reversedEdges = [],
  UseExisting = 0 
)

Defines "NumberOfSegments" hypothesis to cut an edge in a fixed number of segments.

Parameters
nfor the number of segments that cut an edge
sfor the scale factor (optional)
reversedEdgesis a list of edges to mesh using reversed orientation. A list item can also be a tuple (edge, 1st_vertex_of_edge)
UseExistingif ==true - searches for an existing hypothesis created with the same parameters, else (default) - create a new one
Returns
an instance of StdMeshers_NumberOfSegments hypothesis

References StdMeshersBuilder_Segment._compareNumberOfSegments(), Mesh_Algorithm.Hypothesis(), Mesh_Algorithm.MainShapeEntry(), and Mesh_Algorithm.ReversedEdgeIndices().

def Adaptive (   self,
  minSize,
  maxSize,
  deflection,
  UseExisting = False 
)

Defines "Adaptive" hypothesis to cut an edge into segments keeping segment size within the given range and considering (1) deflection of segments from the edge and (2) distance from segments to closest edges and faces to have segment length not longer than two times shortest distances to edges and faces.

Parameters
minSizedefines the minimal allowed segment length
maxSizedefines the maximal allowed segment length
deflectiondefines the maximal allowed distance from a segment to an edge
UseExistingif ==true - searches for an existing hypothesis created with the same parameters, else (default) - creates a new one
Returns
an instance of StdMeshers_Adaptive1D hypothesis

References Mesh_Algorithm.Hypothesis(), and smeshBuilder.IsEqual().

def Arithmetic1D (   self,
  start,
  end,
  reversedEdges = [],
  UseExisting = 0 
)

Defines "Arithmetic1D" hypothesis to cut an edge in several segments with a length that changes in arithmetic progression.

Parameters
startdefines the length of the first segment
enddefines the length of the last segment
reversedEdgesis a list of edges to mesh using reversed orientation. A list item can also be a tuple (edge, 1st_vertex_of_edge)
UseExistingif ==true - searches for an existing hypothesis created with the same parameters, else (default) - creates a new one
Returns
an instance of StdMeshers_Arithmetic1D hypothesis

References Mesh_Algorithm.Hypothesis(), smeshBuilder.IsEqual(), Mesh_Algorithm.MainShapeEntry(), and Mesh_Algorithm.ReversedEdgeIndices().

def GeometricProgression (   self,
  start,
  ratio,
  reversedEdges = [],
  UseExisting = 0 
)

Defines "GeometricProgression" hypothesis to cut an edge in several segments with a length that changes in Geometric progression.

Parameters
startdefines the length of the first segment
ratiodefines the common ratio of the geometric progression
reversedEdgesis a list of edges to mesh using reversed orientation. A list item can also be a tuple (edge, 1st_vertex_of_edge)
UseExistingif ==true - searches for an existing hypothesis created with the same parameters, else (default) - creates a new one
Returns
an instance of StdMeshers_Geometric1D hypothesis

References Mesh_Algorithm.Hypothesis(), smeshBuilder.IsEqual(), Mesh_Algorithm.MainShapeEntry(), and Mesh_Algorithm.ReversedEdgeIndices().

def FixedPoints1D (   self,
  points,
  nbSegs = [1],
  reversedEdges = [],
  UseExisting = 0 
)

Defines "FixedPoints1D" hypothesis to cut an edge using parameter 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 values are 1)

Parameters
pointsdefines the list of parameters on curve
nbSegsdefines the list of numbers of segments
reversedEdgesis a list of edges to mesh using reversed orientation. A list item can also be a tuple (edge, 1st_vertex_of_edge)
UseExistingif ==true - searches for an existing hypothesis created with the same parameters, else (default) - creates a new one
Returns
an instance of StdMeshers_FixedPoints1D hypothesis

References Mesh_Algorithm.Hypothesis(), Mesh_Algorithm.MainShapeEntry(), and Mesh_Algorithm.ReversedEdgeIndices().

def StartEndLength (   self,
  start,
  end,
  reversedEdges = [],
  UseExisting = 0 
)

Defines "StartEndLength" hypothesis to cut an edge in several segments with increasing geometric length.

Parameters
startdefines the length of the first segment
enddefines the length of the last segment
reversedEdgesis a list of edges to mesh using reversed orientation. A list item can also be a tuple (edge, 1st_vertex_of_edge)
UseExistingif ==true - searches for an existing hypothesis created with the same parameters, else (default) - creates a new one
Returns
an instance of StdMeshers_StartEndLength hypothesis

References Mesh_Algorithm.Hypothesis(), smeshBuilder.IsEqual(), Mesh_Algorithm.MainShapeEntry(), and Mesh_Algorithm.ReversedEdgeIndices().

def Deflection1D (   self,
  d,
  UseExisting = 0 
)

Defines "Deflection1D" hypothesis.

Parameters
dfor the deflection
UseExistingif ==true - searches for an existing hypothesis created with the same parameters, else (default) - create a new one

References Mesh_Algorithm.Hypothesis(), and smeshBuilder.IsEqual().

def AutomaticLength (   self,
  fineness = 0,
  UseExisting = 0 
)

Defines "AutomaticLength" hypothesis.

Parameters
finenessfor the fineness [0-1]
UseExistingif ==true - searches for an existing hypothesis created with the same parameters, else (default) - create a new one

References Mesh_Algorithm.Hypothesis(), and smeshBuilder.IsEqual().

def PythonSplit1D (   self,
  n,
  func,
  UseExisting = 0 
)

Defines "PythonSplit1D" hypothesis.

Parameters
nfor the number of segments that cut an edge
funcfor the python function that calculates the length of all segments
UseExistingif ==true - searches for the existing hypothesis created with the same parameters, else (default) - creates a new one

References Mesh_Algorithm.Hypothesis().