CSGModel
- class compas_gmsh.models.CSGModel(tree: dict, name: str, **kwargs)[source]
Bases:
compas_gmsh.models.model.ModelModel for shape generation through Constructive Solid Geometry.
- Parameters
tree (dict) – The CSG tree as a dictionary mapping operations to operands. The operations have to be one of {‘union’, ‘intersection’, ‘difference’}. The operands have to be lists of shapes or lists of dicts that are CSG trees themselves. At every level of the tree, there can be only one operation.
name (str) – The name of the model.
Methods
add(shape)Add a shape to the underlying OCC model.
Comute the compound shape resulting from the operations on shape primitives in the tree.
generate_mesh([dim, verbose, algorithm])Generate a mesh of the current model.
info()Print information about the current model.
Convert the model mesh to a COMPAS mesh data structure.
Convert the model mesh to a COMPAS mesh data structure.
Convert the model mesh to a COMPAS mesh data structure.
Convert the model mesh to a COMPAS mesh data structure.
optimize_mesh([algo, niter])Optimize the model mesh using the specified method.
Recombine the mesh into quadrilateral faces.
Refine the model mesh by uniformly splitting the edges.