UnionMesher¶
(Source code, svg)
- class otmeshing.UnionMesher¶
Union of disjoint meshes.
Methods
CompressMesh(mesh)Deduplicate mesh vertices.
build(coll)Generate a mesh from the union of disjoint meshes.
Accessor to the object's name.
getName()Accessor to the object's name.
hasName()Test if the object is named.
setName(name)Accessor to the object's name.
Examples
>>> import openturns as ot >>> import otmeshing >>> mesher = otmeshing.UnionMesher() >>> dim = 2 >>> mesh1 = ot.IntervalMesher([1] * dim).build(ot.Interval(dim)) >>> mesh2 = ot.IntervalMesher([1] * dim).build(ot.Interval([2.0] * dim, [3.0] * dim)) >>> union = 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:
- mesh
openturns.Mesh A mesh.
- mesh
- Returns:
- compressedMesh
openturns.Mesh The crompressed mesh.
- compressedMesh
- build(coll)¶
Generate a mesh from the union of disjoint meshes.
- Parameters:
- collsequence of
openturns.Mesh Non-overlapping meshes.
- collsequence of
- Returns:
- mesh
openturns.Mesh The mesh of the union.
- mesh
- 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.
- 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.
otmeshing