PathRole

Package: Libraries.Fabrication.Geometry · Inherits from: Libraries.Language.Object

The PathRole class names what a toolpath prints as. PathOrderer stores one of these constants in each Contour's role, and the G-code writer picks speeds, accelerations and the ;TYPE: comment from it.

Example Code

use Libraries.Fabrication.Geometry.Contour
use Libraries.Fabrication.Geometry.PathRole

class Main
    action Main
        PathRole roles
        Contour wall
        wall:role = roles:OUTER_WALL
        output roles:GetFeatureName(wall:role)     // WALL-OUTER
    end
end

Variables

  • integer SUPPORT_WALL: The outline of a support tine or branch.
  • integer SKIN: Solid top / bottom fill, and solid fill in parts too thin for walls.
  • integer INNER_WALL: Solid top / bottom fill, and solid fill in parts too thin for walls.
  • integer SKIRT: Skirt or brim loops.
  • integer INFILL: Sparse infill.
  • integer OUTER_WALL
  • integer SUPPORT_FILL: The lines inside a support tine or branch.

Actions

GetFeatureName(integer role)

The feature name G-code previewers colour by (Cura's ;TYPE: names).

Parameters

  • role integer: One of the constants.

Returns

text: The name; "FILL" for sparse infill and for anything unknown.

Example

use Libraries.Fabrication.Geometry.PathRole

PathRole roles
output roles:GetFeatureName(roles:OUTER_WALL)     // WALL-OUTER

IsSupport(integer role)

Checks whether a role is part of the support.

Parameters

  • role integer: One of the constants.

Returns

boolean: True for SUPPORT_WALL and SUPPORT_FILL.

Example

use Libraries.Fabrication.Geometry.PathRole

PathRole roles
output roles:IsSupport(roles:SUPPORT_FILL)     // true
output roles:IsSupport(roles:INFILL)           // false

Inherited Actions

3 actions from Libraries.Language.Object