ImageMap→Ultra FULL PR2: slicer hooks (Print/ToolOrdering/MMS/LayerRegion/Fill) - #11
Draft
aceRage wants to merge 3 commits into
Draft
ImageMap→Ultra FULL PR2: slicer hooks (Print/ToolOrdering/MMS/LayerRegion/Fill)#11aceRage wants to merge 3 commits into
aceRage wants to merge 3 commits into
Conversation
…S LUT. Extract TextureMapping/Contoning/Offset/Remap/ImportedTexture and ColorSolver vendors from OrcaSlicer-ImageMap @ 9254838. Track lut_wide.png.c with Git LFS. Register six texture_mapping_* keys only; leave paint_depth_* untouched. Co-authored-by: aceRage <aceRage@users.noreply.github.com>
Print apply loads texture_mapping_definitions, ToolOrdering resolves virtual zone IDs, and MMS nests TM outer-wall width around the Ultra paint-depth clamp. LayerRegion side modulation and Contoning gates live in LayerRegionTextureMapping; Fill gets a Contoning schedule driver rather than ImageMap's full geometry dump. Co-authored-by: aceRage <aceRage@users.noreply.github.com>
try_make_texture_mapping_perimeters is a free function, so *this leftovers from the ImageMap member extract would not compile. Fill now keys top-surface TM off solid_infill_filament, make_fills matches ImageMap's 5-arg cancel+cache form, and Contoning tests seed filament colours. Co-authored-by: aceRage <aceRage@users.noreply.github.com>
This was referenced Sep 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
ImageMap→Ultra FULL PR2 slicer hooks. Wires TextureMapping into the slicer (Print apply, ToolOrdering zone resolve, MMS nested with paint-depth, LayerRegion side+Contoning, Fill Contoning schedule driver, ExtrusionEntityCollection overrides).
Depends on FULL PR1 libs already on
cursor/imagemap-full-pr1-libs-lfs-f6e3(PR #10,3cdeb9b). This branch starts from that commit, so a merge tomainincludes both PR1 + PR2. If PR #10 merges first, this PR rebases cleanly onto main.Feature-patch extract from OrcaSlicer-ImageMap
@92548381056. Does not merge ImageMapmain.Locked product rules
cut_segmented_layers. Not a marketing “supported” claim.PaintDepth.*andpaint_depth_*formulas are untouched.has_bounded_paint_depthis preserved. IM modulation lives inLayerRegionTextureMapping+ ToolOrdering + Fill tagging.What landed
Printtexture_mapping_manager()+texture_mapping_global_settings().Print::applyloadstexture_mapping_definitions. Preview-only JSON keys do not invalidate G-code. No prime-tower images.ToolOrdering/LayerToolsresolve_filament_id). Virtual TM IDs → physical components when manager present; no-op when empty. Mixed IDs still resolve after TM. Wipe-tower skip whenhas_texture_mapping_zone && extruders.size() <= 1.texture_mapping_outer_wall_gradient_max_line_widthbefore paint-depth clamp uses the width.num_total_filaments = max(mixed, tm). Clamp code paths unchanged.LayerRegionModulationLineWidth/PerimeterPath/PerimeterPathV2extracted toLayerRegionTextureMapping.*. Contoning perimeter branches gated ontop_surface_contoning_perimeters_active().FillTextureMapping.*+SurfaceFillParamsfields + collection tagging). Does not boil ImageMap’s ~13k Contoning geometry dump. Solver remains PR1TextureMappingContoningSolver.Layer::make_fillsis the ImageMap 5-arg form (octrees, lightning,throw_if_canceled, optional cache).ExtrusionEntityCollectiontexture_mapping_extruder_override+ top-surface flags (default off).Modulation enums:
ModulationLineWidth=0,ModulationPerimeterPath=1,ModulationPerimeterPathV2=2.MMS nesting (critical)
Ultra paint-depth clamp wins for painted claims. The TM branch only adds outer-wall width / filament-count awareness around that clamp. Dual-gate every MMS change with
[paintdepth]tests.Contoning Fill scope
ImageMap
Fill.cppis ~15k lines with ~1198 Contoning hits. This PR ports the schedule driver (params, stack-plan cache, 5-argmake_fills, EEC tagging). It does not copy ImageMap debug SVG export or the polygonization/raster dump. Full infill patterning of Contoning images remains a later thickening of this driver (still without GCode emission here).Follow-up compile fix (
f28ab966b0)try_make_texture_mapping_perimetersis a free function extracted from ImageMap’sLayerRegion::make_perimeters. The first extract still used*this/[this]/return;(void). Those are nowlayer_region/return true. Fill keys TM top surfaces offsolid_infill_filament(1-based zone ID), notextruder()+1.Out of scope (intentionally)
MMUPaintedTexturePreview,GLGizmo*, Plater (PR4)bbs_3mf(PR3)Format/GLTF*, tinygltf, prime-tower image assetspaint_depth_band_*/PaintDepthhelpersPerimeterGeneratorrewriteC3 spike
After these hooks, hardening C3 beyond best-effort still looks non-cheap: paint-depth clamp,
cut_segmented_layers, and TM outer-wall width sharecompute_layer_color_stat, but painted-claim geometry is still owned by Ultra paint-depth. A dedicated C3 product mode would need fixtures that paint and attach a TM zone on one object, then assert clamp bounds vs TM width — not just “doesn’t crash”.See
docs/imagemap-full-pr2.md.Screenshots/Recordings/Graphs
N/A (no GUI in this PR).
Tests
tests/libslic3r/test_texture_mapping.cppwith empty-manager no-op, virtual zone resolve, Contoning solvercomponent_for_depth([texturemapping][pr2]), andLayerTools::resolve_filament_idno-op without a manager.[paintdepth]/ clamp tests are untouched. Cloud agent snapshot has no builtlibslic3r_testsbinary; please run:./tests/libslic3r/libslic3r_tests '[paintdepth],[texturemapping]'.