refactor(plugin): prefix SlicingPipelineStepPlugin values with pos/ps to mirror Print steps

This commit is contained in:
SoftFever
2026-07-10 17:28:26 +08:00
parent 11dd078f64
commit 21ed68963f
10 changed files with 70 additions and 70 deletions

View File

@@ -10,12 +10,12 @@
# ///
"""Inset Every Slice -- a small, WORKING SlicingPipeline sample plugin.
At Step.Slice, for every layer/region of the sliced object, this shrinks each
At Step.posSlice, for every layer/region of the sliced object, this shrinks each
sliced surface by INSET_MM using a real polygon offset (ExPolygon.offset) and
writes the result back with SurfaceCollection.set(). After the per-region edits,
layer.make_slices() re-derives the layer's merged islands (lslices) so
overhang/bridge detection, skirt/brim and support stay coherent with the inset
geometry. At Step.Slice the split slice loop runs make_perimeters() right after
geometry. At Step.posSlice the split slice loop runs make_perimeters() right after
the hook, so the change cascades into perimeters, infill and the final G-code
-- the toolpath preview shrinks.
@@ -35,7 +35,7 @@ class InsetEverySlice(orca.slicing.SlicingPipelineCapabilityBase):
return "Inset Every Slice"
def execute(self, ctx):
if ctx.step != orca.slicing.Step.Slice or ctx.object is None:
if ctx.step != orca.slicing.Step.posSlice or ctx.object is None:
return orca.ExecutionResult.success()
# Millimeters -> scaled integer units via the *live* scale (never hardcode 1e6).

View File

@@ -17,7 +17,7 @@
# ///
"""Twistify -- twist/taper/wobble any model at slice time.
At Step.Slice, every layer's sliced surfaces are transformed by a similarity
At Step.posSlice, every layer's sliced surfaces are transformed by a similarity
about the object's bounding-box center as a function of Z -- edited IN PLACE
through the host geometry classes (ExPolygon.rotate/scale/translate). Each
surface is rotated about the center, then (if tapering) translated to the
@@ -81,7 +81,7 @@ class Twistify(orca.slicing.SlicingPipelineCapabilityBase):
return "Twistify"
def execute(self, ctx):
if ctx.step != orca.slicing.Step.Slice or ctx.object is None:
if ctx.step != orca.slicing.Step.posSlice or ctx.object is None:
return orca.ExecutionResult.success()
p = _params(ctx)