InterpolationSlicer
- class compas_slicer.slicers.InterpolationSlicer(mesh, preprocessor=None, parameters=None)[source]
Bases:
BaseSlicerGenerates non-planar contours that interpolate user-defined boundaries.
- Attributes:
mesh (:class: ‘compas.datastructures.Mesh’) – Input mesh, it must be a triangular mesh (i.e. no quads or n-gons allowed) Note that the topology of the mesh matters, irregular tesselation can lead to undesired results. We recommend to 1)re-topologize, 2) triangulate, and 3) weld your mesh in advance.
preprocessor (:class: ‘compas_slicer.pre_processing.InterpolationSlicingPreprocessor’)
parameters (dict)
Attributes
Inherited Attributes
horizontal_layersReturns a list of all the layers stored in the slicer that are NOT vertical.
number_of_layersTotal number of layers.
number_of_pathsTotal number of paths, number of open paths, number of closed paths.
number_of_pointsTotal number of points in the slicer.
vertical_layersReturns a list of all the vertical layers stored in the slicer.
Methods
__init__(mesh[, preprocessor, parameters])Generates curved paths.
Inherited Methods
For paths that are labeled as closed, it makes sure that the first and the last point are identical.
from_data(data)Construct a slicer from its data representation.
Returns a dictionary consisting of the layers.
Applies standard post-processing operations: seams_align and unify_paths.
Prints out information from the slicing process.
Removes invalid layers and paths from the slicer.
slice_model(*args, **kwargs)Slices the model and applies standard post-processing and removing of invalid paths.
to_data()Returns a dictionary of structured data representing the data structure.
to_json(filepath, name)Writes the slicer to a JSON file.