mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-16 04:11:13 +00:00
The bake frame took its orientation from the world, so turning a part on the plate slid the decoration across its surface. Turning a part is a print-time decision - clearance, supports, warping - and it should not be a design one. The frame now takes its orientation from the model and keeps world scale, so a tile is still tiling_scale printed millimetres whatever the instance's scale. The rotation is separated out by polar decomposition rather than by assuming the linear part is a rotation times a scale, since a sheared or mirrored placement is legal here. A reflection is deliberately left with the scale, so a mirrored instance still makes the frame's determinant negative and the bake still flips the normals it derives. The preview shaders rebuild that frame themselves from a world position, so they take the same rotation through a uniform; without it the fast preview and the bake would disagree, which is the class of bug this is fixing. The gizmo's own way back out to world carries the rotation too, which it did not need to when the frame was world-aligned. Tiling in the fast preview: - the sampler wrap mode was set on the height texture but not on the colour texture, which sits on its own unit and is sampled at the same uv. So with Tile off the relief stopped at one placement while the colour carried on repeating around it. - outside a single placement the colour then came out black, because a zero texture border cannot say "no colour here", only "the colour is black here". The shader now tests the uv the way sample_layer_color() does and leaves the surface its own colour. The placement gizmo is a tile of a planar projection, so it is offered only for the mappings that have one. An unwrap cuts the surface into islands and packs them, and a model's own UV channel is whatever its author drew: one tile lands there as an arbitrary curved patch with no rectangle to take hold of. Those two say so and point at the UV editor instead.