Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 18, 2026

PR #104 added the adhesion framework with 'circular' and 'shape' skirt subtypes, but only circular was implemented. Shape skirt now follows the actual first layer outline instead of using a circular approximation.

Changes

Slicing pipeline

  • Extract first layer paths during mesh slicing and pass to adhesion module
  • Compute paths before adhesion generation to enable shape-following

Shape skirt implementation

  • Custom polygon offset algorithm (createOutsetPath) expands paths outward using perpendicular normals
  • Filters holes by point-in-polygon testing, processes only outer boundaries
  • Generates concentric loops at adhesionDistance + (loopIndex × nozzleDiameter)
  • Falls back to circular skirt when first layer paths unavailable

API consistency

  • Updated brim and raft modules to accept firstLayerPaths parameter for future use
  • Maintains uniform interface across all adhesion types

Usage

const slicer = new Polyslice({
  adhesionEnabled: true,
  adhesionType: 'skirt',
  adhesionSkirtType: 'shape',  // or 'circular'
  adhesionDistance: 5,
  adhesionLineCount: 3
});

const gcode = slicer.slice(mesh);

Shape skirt adapts to geometry (box → square, cylinder → circular, complex → follows outline), while circular skirt uses fixed radius regardless of shape.

Original prompt

Excellent work in PR 104 (#104) adding the necessary framework for an adhesion module. We successfully added a ‘skirt’ adhesion type with two subtypes ‘circular’ skirt and ‘shape’ skirt. However, only the circular skirt has been implemented. Could you now please attempt to implement the ‘shape’ skirt? Thanks!


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Implement shape skirt adhesion type Implement shape skirt adhesion type Jan 18, 2026
Copilot AI requested a review from jgphilpott January 18, 2026 06:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants