ShapeModel

class compas_gmsh.models.ShapeModel(name: Optional[str] = None, verbose: bool = False, mesh_algorithm: compas_gmsh.options.MeshAlgorithm = MeshAlgorithm.FrontalDelaunay)[source]

Bases: compas_gmsh.models.model.Model

Model for shape combinations.

Methods

add_box(box)

Add a box to the model.

add_cylinder(cylinder)

Add a cylinder to the model.

add_sphere(sphere)

Add a sphere to the model.

boolean_difference(A, B)

Boolean difference of two shapes.

boolean_intersection(A, B)

Boolean intersection of two shapes.

boolean_union(A, B)

Boolean union of two shapes.

generate_mesh([dim, verbose, algorithm])

Generate a mesh of the current model.

info()

Print information about the current model.

mesh_to_compas()

Convert the model mesh to a COMPAS mesh data structure.

mesh_to_openmesh()

Convert the model mesh to a COMPAS mesh data structure.

mesh_to_tets()

Convert the model mesh to a COMPAS mesh data structure.

mesh_to_volmesh()

Convert the model mesh to a COMPAS mesh data structure.

optimize_mesh([algo, niter])

Optimize the model mesh using the specified method.

recombine_mesh()

Recombine the mesh into quadrilateral faces.

refine_mesh()

Refine the model mesh by uniformly splitting the edges.