PrintPoint

class compas_slicer.geometry.PrintPoint(pt, layer_height, mesh_normal)[source]

Bases: object

A PrintPoint consists of a compas.geometry.Point, and additional attributes related to the printing process.

Attributes
  • pt (compas.geometry.Point) – A compas Point consisting out of x, y, z coordinates.

  • layer_height (float) – The distance between the point on this layer and the previous layer. For planar slicing this is the vertical distance, for curved slicing this is absolute distance.

  • mesh_normal (compas.geometry.Vector) – Normal of the mesh at this PrintPoint. For planar_slicing it is the projection of the normal on the XY plane. # TODO: should we change that?

  • up_vector (compas.geometry.Vector) – Vector in up direction. For planar slicing this corresponds to the z axis, for curved slicing it varies.

  • frame (compas.geometry.Frame) – Frame with x-axis pointing up, y-axis pointing towards the mesh normal.

  • extruder_toggle (bool) – True if extruder should be on (when printing), False if it should be off (when travelling).

  • velocity (float) – Velocity to use for printing (print speed), in mm/s.

  • wait_time (float) – Time in seconds to wait at this PrintPoint.

Methods

__init__(pt, layer_height, mesh_normal)

from_data(data)

Construct a PrintPoint from its data representation.

get_frame()

Returns a Frame with x-axis pointing up, y-axis pointing towards the mesh normal.

to_data()

Returns a dictionary of structured data representing the data structure.

Inherited Methods