IntersectionMesher

(Source code, svg)

../../_images/IntersectionMesher.svg
class otmeshing.IntersectionMesher

Intersection meshing algorithm.

Methods

CompressMesh(mesh)

Deduplicate mesh vertices.

build(coll)

Generate the mesh of the intersection.

buildConvex(coll)

Generate the mesh of the intersection of convexes.

buildCylinder(coll)

Generate the mesh of the intersection of cylinders.

getClassName()

Accessor to the object's name.

getName()

Accessor to the object's name.

getRecompress()

Recompression flag accessor.

hasName()

Test if the object is named.

setName(name)

Accessor to the object's name.

setRecompress(recompress)

Recompression flag accessor.

Examples

Triangulate a parallelogram:

>>> import otmeshing
>>> import openturns as ot
>>> mesher = otmeshing.IntersectionMesher()
>>> dim = 2
>>> mesh1 = ot.IntervalMesher([1] * dim).build(ot.Interval([0.0] * dim, [3.0] * dim))
>>> mesh2 = ot.IntervalMesher([1] * dim).build(ot.Interval([1.0] * dim, [4.0] * dim))
>>> intersection = mesher.build([mesh1, mesh2])
__init__()
static CompressMesh(mesh)

Deduplicate mesh vertices.

A k-D tree radius search is used to filter out duplicate vertices.

Parameters:
meshopenturns.Mesh

A mesh.

Returns:
compressedMeshopenturns.Mesh

The crompressed mesh.

build(coll)

Generate the mesh of the intersection.

Parameters:
collsequence of openturns.Mesh

Input meshes.

Returns:
meshopenturns.Mesh

The mesh of the intersection.

buildConvex(coll)

Generate the mesh of the intersection of convexes.

Parameters:
collsequence of openturns.Mesh

Input convex meshes.

Returns:
meshopenturns.Mesh

The mesh of the intersection.

buildCylinder(coll)

Generate the mesh of the intersection of cylinders.

Parameters:
collsequence of Cylinder

Input cylinders.

Returns:
meshopenturns.Mesh

The mesh of the intersection.

getClassName()

Accessor to the object’s name.

Returns:
class_namestr

The object class name (object.__class__.__name__).

getName()

Accessor to the object’s name.

Returns:
namestr

The name of the object.

getRecompress()

Recompression flag accessor.

Returns:
recompressbool

Whether to eliminate duplicate vertices.

hasName()

Test if the object is named.

Returns:
hasNamebool

True if the name is not empty.

setName(name)

Accessor to the object’s name.

Parameters:
namestr

The name of the object.

setRecompress(recompress)

Recompression flag accessor.

Parameters:
recompressbool

Whether to eliminate duplicate vertices.

Examples using the class

Cylinder meshing

Cylinder meshing