PolyInput¶
The PolyInput class contains information about polygons that you would like to mesh using the
MultiPolyMesherIo
class. This class defines the
polygon to be meshed. A polygon is made up of an outer polygon
(outside_poly
), and a list of inner polygons
(inside_polys
) representing
holes in the outer polygon. The other options available in this class help define
features of the polygons, such as seed_poins
,
relaxation_method
, and many more
that are described below.
-
class
xmsmesh.meshing.
PolyInput
¶ -
__init__
(self: xmsmesh.meshing.PolyInput, outside_polygon: iterable, inside_polygons: iterable=(), bias: float=1.0, const_size_bias: object=None, const_size_fuction: object=None, bound_pts_to_remove: object=None, relaxation_method: object=None, remove_interal_four_triangle_pts: object=None, seed_points: object=None, size_function: object=None, patch_polygon_corners: iterable=(), elev_function: object=None) → None¶ PolyInput initializer
Parameters: - outside_polygon (iterable) – Point locations of outer polygon. Clockwise
- inside_polygons (iterable optional) – Point locations of inner polygons (holes). Counter clockwise. 1st pt != last. Defaults to empty tuple.
- bias (Float optional) – Factor for transitioning between areas of high refinement to less refinement. Defaults to 0.3.
- const_size_bias (Float optional) – Transition factor for constant size function.
- const_size_function (Float optional) – Constat to be used for size function.
- bound_pts_to_remove (iterable optional) – Outer boundary locations to remove after the paving process.
- relaxation_method (str optional) – The relaxation method to be used.
- remove_internal_four_triangle_pts (bool optional) – Remove internal points that are only connected to 4 cells.
- seed_points (iterable optional) – A list of seed points.
- size_function (
InterpBase
optional) – Size function for scalar paving. Default to None - patch_polygon_corners (iterable optional) – Corner nodes for creating meshes using the patch algorithm. 3 per outer poly (not 4 - outer poly index point [0] is assumed to be a corner). Defaults to empty tuple.
- elev_function (
InterpBase
optional) – Elevation function for interpolating z coordinate of mesh points. Deafults to None.
-
bias
¶ Factor for transitioning between areas of high refinement to less refinement.
-
bound_pts_to_remove
¶ Outer boundary locations to remove after the paving process.
-
const_size_bias
¶ Transition factor for constant size function.
-
const_size_function
¶ Constant to be used for size function.
-
elev_function
¶ Elevation function for interpolating z coordinate of mesh points.
-
inside_polygons
¶ A list of polygons representing holes in the PolyInput
The polygons should be in clockwise order and the first point must not equal the last point.
-
outside_polygon
¶ List of points defining the outside polygon.
Warning
These points must be in clockwise order, and the first point must not equal the last point.
-
patch_polygon_corners
¶ Corner nodes for creating meshes using the patch algorithm.
There can be 3 patch_polygon_corners per outer_poly not 4. The outer_poly point at index 0 is assumed to be a corner
-
relaxation_method
¶ Relaxation method. The default relaxation method is an area relax. Set the value to “spring_relaxation”. See MeRelaxer.cpp for details on spring relaxation.
-
remove_internal_four_triangle_pts
¶ Remove internal points that are only connected to 4 cells.
-
seed_points
¶ A list of seed points. If the user has some methodology for creating points inside the polygon then those points can be specified here. If these points are specified then the paving is not performed. These points will not be used if the meshing option is patch.
-
size_function
¶ Size function for scalar paving.
-