mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-12-03 18:27:59 -05:00
0c2f19d4e1e79fc14e391ec22bc1f90b730ef126
639
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
074be951e5 |
Fix: Instances move when a part is added, and assembly view poses break for copies and part changes (#17617)
* init * fix assembly * fix text instances and storing rotated items on assembly * unposed source as new object * simplify comments * update text object * fix object looses positioning after deleting volumes * fix scale properties not used for instances on assembly view * fix undo history for scale not reflected to assembly view * apply exact scaling to assembly view for fixing skewed scalings * fix cant create proper instances from skewed objects * Preserve assembly poses when splitting an object into parts --------- Co-authored-by: Noisyfox <timemanager.rick@gmail.com> |
||
|
|
c56506d68b |
Fix: Non positive volumes of selected or non selected object visible on Texture displacement gizmo (#17656)
The Texture displacement gizmo made every volume visible again on each frame, so modifiers, negative volumes and support blockers/enforcers from other objects and instances showed through. It now restores only the selected instance, and hides the selected object's non-part volumes while the gizmo is open. |
||
|
|
9a285770d4 |
Variable layer height: allow painting directly on objects (#17471)
Co-authored-by: Ian Bassi <ian.bassi@outlook.com> |
||
|
|
5d69ba055f | Round top canvas toolbar corners (#17491) | ||
|
|
3936cd5f6a | Fix black scene cache and FXAA frames under VirtualGL (#17508) | ||
|
|
4b21b29cd2 | Add a Reload from Disk Keyboard Shortcut (#17373) | ||
|
|
db9968b9ee | Painted modifiers (#16213) | ||
|
|
7cb97a82de |
Ignore Modifiers When Focus Mode Decides Which Plate an Object Is On (#17474)
Focus mode hid an object only when its footprint missed the current plate, and the footprint included its modifiers, negative volumes and support enforcers/blockers. A large modifier reaching over another plate kept the object drawn there. Build the footprint from the model parts only, as plate membership does. |
||
|
|
32dbacb423 |
Variable layer height on several objects, and with the prime tower on objects of different heights (#16462)
* Variable layer height on several objects, and with the prime tower on objects of different heights The variable layer height tool now opens with several objects selected. Adaptive, Smooth, Reset and manual edits apply to all of them: they share one profile, the finest layer height any of them asks for at each Z, unless "Each object separately" is ticked. Every selected object is painted with its layer heights. With a profile each, up to three objects get a bar of their own, drawn to one scale, and the bar under the mouse is the one edited. The prime tower check compares the layers objects are sliced at over the height they share, rather than the raw profiles, which never matched once the profile of a lower object ended at its own top. Precise Z height, which fits the last layers of each object to its own height, is left out of such a print, with a warning. * Check the prime tower layers on the sliced objects, and note the new strings for translators * Include what the new tests use * Compare the layers as sliced, before the prime tower is generated from them * Check that precise Z height stays on without a prime tower * Keep each object's layer height texture on the GPU, and mark only lower tops The variable layer height tool sent a 1024x1024 texture to the GPU for every selected object on every frame, and set_config(), run after every edit, dropped the other objects' textures so that each was generated again. Each other object now has a texture of its own on the GPU. It is generated and sent only when its profile, its height or the slicing parameters it shows change, which set_config() now only asks to check. The object shown sends its texture only when it is generated, and while the objects share one profile, those on its layers are drawn with its texture and need none of their own. The textures of objects no longer selected are freed. The bars and the layer height curves are built again only when what they show changes, and each bar is scaled with its own object's layer heights. A lower object's top is marked only when it is lower than the object shown, objects ending at the same height share one label, and a label stays on the canvas and below the one above it. The comment on precise_z_height_overridden() now says what the override trades: the tower can join the off-grid layers to the tower layer below, but a joined layer holds two purges, which makes the tower deeper. * Fix the precise Z warning, shared profiles across first layers and the bar clicked - The precise Z override, and its warning, now need an object with precise Z height on. Every plate with a prime tower and variable layer height on objects of different heights warned about a setting that is off by default. - The objects the override slices again get their slicing parameters back at once, since validate() reads them before slicing. - When the objects share one profile, an object that starts its layers elsewhere than the object shown, with a raft of its own say, keeps its own. The shared profile starts with the first layer of the object shown, and PrintObject::update_layer_height_profile() dropped it on such an object, which then printed at the preset layer height. - Clicking a bar edits its object, even when no frame was drawn since the mouse got there. - Select all is ignored while a profile is painted, and select all plates while the tool is open. - The bars' models are made again, not copied, when their number changes: a copy shares the GPU buffers that the original deletes. - Objects with no height above the bed are left out of the tool, and a profile fitted within EPSILON above one of its entries no longer runs past it. * Keep the object top labels below the toolbar row When the toolbar row ends next to the bar, the label of an object that ends near the top of the tallest one covered the toolbar's last buttons. Such a label now starts below the row, with its arrow pointing up to the line on the bar. * Fill the layer height texture up to the top of the object The last layer can end under the top of the object, by up to half a layer, and no layer wrote the cells there. The top face is drawn with them, so it showed what the buffer held before: black on the texture of an object made for the first time, or the colours of another object. The last layer now fills them, with the shade of its top. * Draw horizontal faces without the layer stripes A horizontal face lies at one height, so the stripes cannot show on it, only the shade they have there. That shade changed whenever a layer under it moved, and the tops flickered at every stroke. Such a face now gets the plain colour of its layer height, from the 2nd level of the texture. That level is now read at its own level of detail instead of with a bias. On a horizontal face the texture coordinates do not change, so the GPU picks the 1st level however large the bias, and read it at the coordinates of the 2nd: the tops showed black, or the colour of another height. The 110 shader does so where GL_ARB_shader_texture_lod is available, and keeps the stripes elsewhere. * Include ObjectID.hpp where ObjectWithTimestamp is used clang-tidy (misc-include-cleaner) asks for the header to be included directly. * Find the horizontal faces with the inverse transpose of the world matrix The variable layer height shader took the normals to world space with the world matrix itself, which is only right under a uniform scale. With a non-uniform scale it drew sloped faces as flat, and once the object was also rotated it missed real flat ones. The normals now go through the inverse transpose of the world matrix, which render_object_volumes() already built for the view normal matrix. * Note why the precise Z override keys on has_wipe_tower() Since #16999 the tower is printed only when slicing finds it is needed, so the override also applies on plates where no tower is printed in the end. |
||
|
|
3c72223aaf |
Don't Crash or Stay Silent When the OpenGL Context Can't Be Activated (#17441)
* Don't Crash or Stay Silent When the OpenGL Context Can't Be Activated When the driver refuses to make the OpenGL context current, no ImGui frame ever runs and OpenGL is never initialized, so ImGui has no current font and the GL functions are never loaded. A notification that measures its text from an event handler (a validation warning, a job's progress, the slicing progress bar) then reads the null font and crashes, and once a slice completes, loading its G-code preview calls the unloaded GL functions and crashes too. Notifications now skip measuring until a frame has set up the font; they stay Unknown, and render() already measures them when it draws. The G-code preview is not loaded while OpenGL cannot be initialized; with OpenGL up, init_opengl() returns at once and nothing changes. On Windows, a shown canvas whose context cannot be made current is reported once: wx drops the wglMakeCurrent error in release builds, so the call is repeated to log GetLastError() with the canvas's pixel format and the display it is on. If OpenGL never came up in the session, the user gets one error dialog instead of an empty 3D view with no explanation. A GTK canvas can fail until its surface is mapped, so other platforms only get the crash fixes. * Name the Display Adapter Instead of Only Suggesting a Driver Upgrade When OpenGL Can't Be Activated A context that can't be made current has several causes: no OpenGL driver behind the display the window is on (a disabled adapter, or one running on the Microsoft Basic Display Adapter), a broken driver, or an overlay. The old advice to upgrade the driver covered only one of them. The dialog now names the adapter Windows reports for the window's display and lists the general checks, and the log line keeps the display device and adapter name. |
||
|
|
6d33e58347 |
Fix panning and rotating from the center of mass details box (#17137)
A drag that starts on the center of mass details box, off its close button, now turns or pans the view like a drag over empty space. Its release no longer opens the canvas context menu. A right click off the box now closes it, the same as a left click. A click inside the box always goes to ImGui, including the click that closes a context menu. |
||
|
|
46f7b0e719 |
Offer the Sliced Objects as a Solid Model While Dragging the Preview (#15818)
* Offer the Sliced Objects as a Solid Model While Dragging The G-code preview draws every toolpath segment as an instanced box, and its frame cost is linear in the number of segments drawn. On a plate of large objects that is enough that dragging the camera or a preview slider cannot keep up, and no amount of per-segment work changes that; only drawing fewer segments does. The objects themselves are cheaper: a mesh costs its triangles once, however many layers it has, and the preview already loads the objects as shells for its translucent ghost. A new preference, "Only render solid model when dragging" (off by default), draws those shells opaque in their filament colours instead of the toolpaths while the user drags. The visible layer range still holds. The shells are cut at the range's top and bottom through the gouraud shader's z range, and libvgcode keeps a second index buffer holding just the range's bottom and top layers, filled in the same walk as the full one, which is drawn afterwards so that it caps the cut with what was really printed there. Switching between the two sets is a buffer binding, never a rebuild. The prime tower is added to the shells from its sliced mesh while the preference is on, positioned as the print placed it; it keeps its opaque colour and so stays out of the translucent ghost. Supports have no mesh and are not shown. Dragging is the camera, the navigator or either slider being held; a slider reports it from ImGui's active id, since its dirty flag is raised and consumed inside one frame. A wheel step holds the solid model for a 150 ms settle time, with the frame that restores the toolpaths scheduled for when it runs out. The switch is decided at the top of the frame, before the cached scene is consulted, and a frame that switches redraws the scene. A drag cut short by focus or capture loss is ended explicitly, and a button release wakes the idle loop, since on some platforms no idle event follows it until the next input. With the preference off, nothing is built and the preview is unchanged. * Release the Reduced Set When Unused and Share the Drag Check With the Scene Cache The reduced index buffers were only re-uploaded while the preference was on, so the last set stayed allocated until the next load once it was switched off, and their size was missing from get_used_gpu_memory(). They are now uploaded on every rebuild, empty when nothing was built, and counted. The scene cache and the solid model both asked whether the user was dragging, with different lists: the cache knew about gizmos and the rectangle selection, the solid model about the navigator and the sliders. One is_user_interacting() now answers both. The tooltip says that negative volumes are not cut out of the solid model, since load_shells() drops every non-model-part volume, and the preferences handler keeps the dimming comment with the branch it documents. * Let the User Choose What the Preview Draws While Dragging The solid model is one answer to a preview that cannot keep up with a drag; a reviewer asked for the two that keep the drag view made of toolpaths. The checkbox is now a combobox, "Simplify preview while dragging", with Off, Solid model, Skip layers and Outer walls, and a spin, "Draw one layer in every N", for the toolpath modes. Off is the default, and with it nothing is built. Skip layers keeps one layer in every N. Outer walls keeps the outer and overhang perimeters of those layers, so the prime tower and supports, whose segments have other roles, drop out of it. Both keep the bottom and top layers of the visible range whole, as the solid model does, so the faces the range cuts open stay what was printed there. libvgcode takes the choice as EReducedDetailMode and a stride; the sets are rebuilt when either changes, and drawing from the reduced one is still a buffer binding. A mode change reaches the loaded preview at once, as the checkbox did. * Add a Shell-Only Drag Mode That Keeps What Can Be Seen From Outside A third mode of the drag preference: the reduced set keeps every role but the sparse infill, internal solid infill, internal bridge infill and gap fill, which lie under the skins or between the walls, on every layer. Walls, top and bottom surfaces, bridges, supports and the prime tower are drawn whole, so from outside the print looks as it does at rest, and the two end layers of the visible range stay whole as in every mode. The roles come from the slicer, so the classification is exact wherever the slicer's is. What a role cannot tell apart is the inside of the prime tower or of a support from its outside; both are kept whole. A profile with no top or bottom shell layers exposes infill, which this mode hides. * Keep Only the Solid Model and Shell Modes While Dragging The skip-layers and outer-walls modes drew one layer in every N, and every visual complaint on the review came from the gaps that leaves at close range. The shell mode draws every layer and looks the same from outside, and the solid model is the one mode whose cost does not depend on the toolpaths, so the two of them cover what the stride modes were for. The layer stride goes with them; a saved preference naming a removed mode falls back to off. * Hide Infill in the Shell Drag Mode Only Where the Profile Covers It A profile with no top or bottom shell layers, or no walls, leaves the infill on the surface, so hiding it changed the picture. The viewer now reads the print's default region settings when it loads a print and leaves the infill in place for such a print; per-object overrides are not consulted. * Keep the Ghost and Cap the Cut of the Solid Model While Dragging In the solid model mode the translucent ghost disappeared for the length of every drag, since the scene drew either it or the solid; it is now drawn in every mode, so the part above the cut stays in view. The cut itself was open: a sparse layer on the cut showed, between its lines, whatever lay below inside the hollow shell, the first layer or the bed, which moved with the camera and read as a flickering shadow; and a face of the model in the cut layer's own plane fought that layer's toolpaths pixel by pixel. The solid now runs from the top of the range's bottom layer to the bottom of its top layer, and a stencil pass caps each cut plane, body by body, with a quad in the body's colour darkened where the cut has opened it: back faces less front faces, counted with the depth test off, which leaves a closed body at zero. * Leave the Preview Untouched While Dragging With the Mode Off The reduced flag was raised on every drag whatever the mode. libvgcode still drew the full set with the mode off, but the canvas reads the flag: it redrew the scene on the first and last frame of each drag, scheduled an extra frame after every wheel burst, and ended a drag that lost focus or capture. The flag is now raised only when a mode is set. The realistic view's shadow-caster pass draws whichever set is bound, and the static shadow map's key did not say which, so a map built during a drag stayed thinned after release; the key now includes it. * Tidy the Drag Mode: Cheaper Caps and No Leftovers The solid model's cap quads are built once per frame and recoloured per body instead of being rebuilt for each, and the stencil count draws each body directly: going through the collection's render built the full preset config and sorted every volume once per body, per frame. A one-line settings wrapper is inlined, the function that added or removed the tower with the mode is folded into its one caller, the two libvgcode getters nobody calls are removed, and the wheel's settle time is set where the wheel is handled. The Shell only tooltip names internal bridges, which the mode hides. * Cut the Solid Model at the Toolpaths' Heights on a Printer With a Z Offset The cut heights took the printer's z offset out of the layer heights, which the G-code processor has already taken it out of, so on a printer with a z offset the solid was cut one offset away from the layers drawn as toolpaths: a gap under the top one and an overlap with the bottom one, and the caps sat off the solid's cut plane. The layer heights are in the shells' frame as they are. * Test That AppConfig Keeps Only the Preview Drag Modes It Knows A missing mode becomes off, the three modes survive, and a value from an earlier revision or an empty one falls back to off. * Hold the Navigator's Drag for as Long as the Button Is Held The navigator reports a drag only on a frame the mouse moved in, and the flag is written by the overlay, after the frame has chosen which toolpath set to draw. A still frame in the middle of a drag dropped the flag, so the next one drew the full set, and a release with no motion left the reduced set on screen until the next mouse event. The flag now holds while the button does, and the drag check reads the button itself. * Keep the Toolpaths While Dragging a Print Whose Layers Do Not Rise The solid model is cut at the heights of the layer range's two ends, one range for the whole plate. Printed object by object, the layer heights start over with each object, so those two heights do not bound the range: an earlier object was cut at a later one's height, and a range across two objects could come out empty. Such a print keeps its toolpaths while dragging, as a plate with no shells does. * Cut the Solid Model Past a Layer With No Extrusion A layer with no extrusion has a height of zero, and the solid model read its cut heights from the layers at the ends of the range as they were: with such a layer under the top of the range the whole solid was cut away. The nearest layer below with a height stands in for it. * Keep the Toolpaths While Dragging a Preview Cut by the Section View The section view cuts the toolpaths open to show their inside. The solid model was drawn with no clipping plane, so while dragging it covered the section whole and the section came back on release. A preview with a section active now keeps its toolpaths while dragging, as a print made object by object does; the shell mode draws through the same plane as the full set and is unaffected. * Keep the Supports While Dragging in the Solid Model Mode The solid model stands in for the sliced objects, which are the only shells the preview loads: a support has no mesh, so the moment a drag started everything under an overhang vanished and the object sat on nothing until release. The reduced set now keeps the support roles whole on every layer, as the shell mode does, and the supports draw as toolpaths beside the solid. * Draw the Layers Down to the Nearest Infill Whole at Each End of the Range The reduced set kept the two end layers of the visible range whole, and the solid model was cut right under the top one, as though every layer carried every role. Infill combination prints the sparse infill of a few layers in one and leaves the others walls alone, and a support layer with no object layer at its height gets a layer of its own, so a cut under such a layer capped the print where at rest the infill of the layer below shows through: a flat disc inside the walls while dragging, the infill grid on release. Each end of the range now runs to the nearest layer with sparse infill, at most eight layers deep, in both modes, and the solid is cut at the edges of those bands. The layer table is the whole plate's, so another object's solid infill on a layer does not end the band while sparse infill is within reach; a print with none in reach falls back to the nearest layer with any infill, else keeps the end layer alone. The layer table records which layers have infill when the toolpaths are loaded, and the bands are covered by tests. * Colour the Solid Model as the View Colours the Toolpaths The solid model and its caps wore the filament colours whatever the view, so a drag in the Line type view turned an orange-walled, red-filled print into a block of its filament colour. The solid stands in for the toolpaths, so it now takes their colours: in a view that colours by something other than the filament, the body the outer wall's, each cap the infill's of the layer it is cut under, sparse before solid, and the prime tower its own role's, each sampled from the first vertex of the role through the viewer. The filament views keep every body its own colour. The colours are resolved when a drag starts and when the view type or the end bands change. * Close the End Bands Object by Object The end bands of the reduced set stopped at the nearest layer with sparse infill anywhere on the plate. Two objects rarely combine their infill on the same layers, so where one object still had sparse infill on a layer the other's walls-only layer closed the band, and that object was capped right under it: a flat disc inside the cone's walls while the funnel beside it printed its last infill. The G-code labels its moves with their object, so the wrapper that feeds libvgcode now tallies walls and infill per object and layer and hands the viewer the layers whose infill closes every object printed on them; the bands stop at those. Sparse infill closes an object on a layer. Solid infill closes it only where the object has no sparse infill left in the direction the band looks from, its top shells as seen from above and its bottom shells as seen from below, since a layer whose sparse infill was combined into another still carries the solid infill under its skins and is open; an object with no sparse infill anywhere is closed by any infill. A range from the print's first layer has no bottom band, as nothing is cut under that layer. A preview built from the print, or one whose G-code labels no object, carries no such list and keeps the judgement by the roles of the whole layer. The G-code processor read the object only from the "start printing object" line that Bambu printers add; every printer writes "printing object <name> id:<n> copy <m>", so it reads that too, and takes the id after the last "id:" so that a colon in the name does not mislead it. The printable-area check that groups extrusions by that id now sees the objects of such a print one by one, as it does for a Bambu print, instead of as one. * Colour the Solid Model From the Grade Most of the Role Was Printed At The solid model took each colour from the first vertex of the role in the sampled layer. The first vertex of an outer wall is the start of its extrusion, still on the acceleration ramp, so under Actual speed and Actual flow the whole solid showed the slowest grade of the legend, and under Fan speed the body colour jumped between drags with whichever layer happened to be the top cut. Viewer::find_extrusion_vertex() now takes a layer interval and, in a view that grades the toolpaths by a value, returns the extrusion of the role at the length-weighted median of that value over up to eight layers spread across the interval; in any other view the first extrusion found, as before. The body and the prime tower are sampled over the layers the solid stands for, each cap in its own cut layer. * Count Each Cap of the Solid Model Against Its Own Cut With the bottom slider above the first layer the solid model is cut at both ends, and the one stencil count that both caps were drawn through counted the body with both cuts applied. An open tube counts a view ray through both openings as closed, so the top cap had a hole through which the infill toolpaths showed, and a ray in through a wall and out through the bottom opening as open, so from a low angle the top cap's quad, which spans the bounding box, was drawn in the air beside the body. Each cap now gets its own count, with the body cut at that cap alone and whole at its other end, which is odd exactly where the cap plane lies inside the body from any viewpoint. The second body pass per volume only runs when the bottom is cut. * Let the Solid Model Cast and Take the Realistic View's Shadows The realistic view's shadow map was built from the toolpath segments alone, and while dragging in the solid model mode those are only the end bands and the supports, so the solid threw no shadow at all. Its own pass also forced the shadow intensity to zero, so it took none either. In that mode the shells, cut at the solid's heights, are now drawn depth-only into the same map through the flat clip shader, and the solid samples the map back with the light the canvas passed on, so a body shades the plate, its neighbours and the end-band toolpaths as the toolpaths it stands in for would, and takes their shadows in turn. The map's key also carries the drag mode, so a map built with the solid is not kept for the shell mode. * Keep the Reduced Set Up While a Navigator Click Turns the Camera A click on a face or a corner of the 3D navigator makes it turn the camera over the forty frames that follow, with no button held. Each of those frames was drawn with the full toolpaths, since nothing counted as a drag, and on a weak GPU the turn took seconds. The overlay reports each of those frames as a change that is not a drag, so the canvas holds a flag for as long as that lasts and counts it as interacting; the frame after the last one is requested so that the full toolpaths come back on their own. * Let the Cut Faces of the Solid Model Cast Their Shadow The solid model was drawn into the shadow map as the shells cut at the same heights, open where it is cut, on the ground that from the light an open body's far wall closes its outline. It does, but not its depth: a ray through the opening passes the end band's sparse infill lines and reaches the far wall, so on a flank below the light's side the solid carried the lattice of those lines, where the toolpaths it stands in for are in one uniform shadow under the opaque layers above. The shells now cast through a shader of their own: a back face that a ray reached through a cut is drawn at the depth of that cut, the nearest of the cut planes on the way back toward the light, and a front face keeps its own depth. A ray reaches a back face through a lit wall as well, and the cut's depth would then shadow that wall, so the front faces are drawn on their own first, into a depth texture of the viewer's, for the shader to tell the two apart. The shadow map has no stencil, so the camera pass's cap count could not be reused here. * Hold the Solid Model's Body Colour While a Slider Drag Moves the Span A slider drag shows the solid model like a camera drag does, and the body took a fresh sample at every step, from eight layers spread over the span of the moment. Where the walls' speed or fan differs from layer to layer, each step fell on another mix of layers and the length-weighted median flipped with it, so the body jumped between the grades of the legend for as long as the slider moved. The body and the tower are now sampled once, as the drag begins, and held until it ends; the next drag samples them afresh over the span it finds. Each cap still follows its own layer, as the toolpaths of that layer would. * Colour Each Body of the Solid Model From Its Own Toolpaths The solid model took one body colour for every object on the plate, sampled from all the walls of the layers it stands for, so an object printed at its own speeds wore the grade of the others while its toolpaths showed another. The viewer's sampler now takes a rectangle of the XY plane and counts only the extrusions that end inside it, and each shell volume samples its body and caps within its own footprint; the tower likewise, from its own role. Objects that overlap in XY share their samples, which is as close as the toolpaths come to naming their object. * Dim and Grey the Solid Model With the Layers It Stands For With "Dim lower layers" on, the toolpaths around the inspected layers are drawn at the preference's brightness, and with it off they go dark grey while the moves slider is short of the top layer's end. The solid model, which stands in for exactly those layers, was drawn at full brightness either way. The layers the solid stands for are never the ones a slider thumb lights, so its bodies, caps and tower now take the same brightness or grey the toolpath shader gives the rest of the print, decided by the rule that shader is given. * Cut the Solid Model by the Section View While the section view was on, a drag kept the full toolpaths, since the solid model would have covered what the view cuts them open to show. That held even where the plane cut nothing, so with the view on the drag mode gave nothing at all. The solid now takes the section plane as the toolpaths do: the bodies are clipped by it, the two height caps are drawn on its kept side, and the section face gets a cap of its own, counted on the body cut by that plane alone and drawn between the two heights, in the body's colour darkened like the others. What the plane cuts away casts no shadow. * Keep the Travels Between the End Layers of the Solid Model With Travel shown in the legend, the solid model kept the travels only on the layers at the ends of the range, so they vanished on every drag. They are kept on every layer now, as the supports are. The rule moves into Utils so the cases can be tested. * Drag Belt Printer Previews With the Toolpaths Instead of the Solid Model The solid model is cut by horizontal planes at the end layers' heights, but a belt printer's layers are planes tilted at the belt angle, with heights in the G-code's frame, so the cuts missed the body. On belt printers a drag keeps the toolpaths, as it does for a print whose layer heights start over per object. * Cast the Solid Model's Cut Faces Into the Shadow Map A band cut at both ends let the light in through the top cut and out through the bottom one past every wall, so only the top band's infill lines cast and the bed showed their grid. The cut faces are now counted and drawn into the shadow map as the visible pass draws them: in a depth and stencil target of the viewer's, since the map has no stencil, then copied into the map. This replaces the back-face depth rewrite of the cut caster shader, and both passes build the caps through one helper. * Describe the Solid Model's Cut-Face Shadows, Travels, Belt Fallback and Section Cut * Keep Parts Above the Visible Range Out of the Solid Model's Cut-Face Shadow The light's frustum ends at the highest visible layer, so its near plane cut through parts above the range (a bunny's ears) during the cut-face stencil count: only their far faces were counted, the count read them as open and the bottom cap cast an ear-shaped shadow on the bed. Clamp depth during the count so every face is counted. * Say in the Drag Option That Belt Printers Keep Their Toolpaths The solid model handles the section view, and belt printers fall back to the toolpaths; the description said the opposite of both. --------- Co-authored-by: Rodrigo Faselli <162915171+RF47@users.noreply.github.com> |
||
|
|
b1d8c5da60 | Section view: percent depth, wheel on the panel, start at 50% and Follow camera (#17338) | ||
|
|
7906d7e02a |
Check the prime tower requirements only when a tower is printed (#16999)
A plate whose parts use one filament, with only the support on another, was refused for prime tower rules before slicing even when no part needed support and no tower would be printed. - The layering checks run before slicing only when a tower is certain: the parts use more than one filament, custom G-code changes the tool, or wrapping detection or a smooth timelapse forces one. Otherwise they run in _make_wipe_tower() once the tool changes are known, and only if a tower is generated. - The "No sparse layers" check before slicing still refuses objects next to the tower. Objects away from it are judged after slicing against the real tower height, and the drag preview draws the height limit plane only on objects the check before slicing refuses. - The fake tower is reset at each slicing, and the conflict check only uses it when a tower is generated. It was read uninitialized on plates with no tool change. Fixes #16936 |
||
|
|
4a01d5dda3 | Outline options (#17319) | ||
|
|
b2978d1c73 |
Fix: Prevent deselecting object and closing widget while clicking to toolbar background / divider (#15548)
* init * simplify code * simplify comments * update * update |
||
|
|
670db4b772 |
Faster and better outline (#17111)
Co-authored-by: Rodrigo Faselli <162915171+RF47@users.noreply.github.com> |
||
|
|
3aedd50bcb |
Draw the Section View Cut Face in Its Part's Color (#17105)
Co-authored-by: Rodrigo Faselli <162915171+RF47@users.noreply.github.com> |
||
|
|
b1953ab423 |
Fix transform gizmos not updating after pressing Tab (#16921)
Fix transform gizmo refresh after tabbing |
||
|
|
9e5110d593 |
Keep the Canvas Printable State When the Scene Reloads a Volume (#17003)
Deleting the last modifier of an unprintable object painted it in its normal colour again: ModelObject::delete_volume gives the remaining volume a new id, reload_scene then builds a fresh GLVolume for it, and nothing copied the instance's printable flag into the new volume. The object list and the slice were right; only the 3D view went stale. reload_scene now copies ModelInstance::printable into every GLVolume it creates or reuses, so the canvas follows the model on every reload instead of relying on each call site to refresh it afterwards. Checked on Linux with a cube plus a block modifier saved as unprintable: deleting the modifier turned the cube from grey to its normal colour before, and leaves it grey now; toggling Printable from the object's context menu still switches it both ways. |
||
|
|
2e562e8b9e |
Fix camera orbit speed multiplier ignoring decimals in non-English languages (#16967)
The orbit multiplier preference is stored with a decimal point, but was parsed with std::stod, which follows the C locale set by the interface language. With a comma-decimal language, 0.99 parsed as 0 (frozen camera) and 1.99 as 1. Parse it with string_to_double_decimal_point instead. Fixes #11534 |
||
|
|
e66569a966 |
Fix center of mass details, belt preview and section view bugs (#16958)
* Fix center of mass details, belt preview and section view bugs Fixes the center of mass bugs from #16781 (center of mass a-d and rendering b). - The details box follows its marker, so zooming toward the cursor could slide it under the mouse, where ImGui took the wheel and zooming stopped. The wheel now zooms over the box. - Esc closes the details box. A click on a marker now focuses the 3D view first, so Esc reaches it after typing in a sidebar field. - On belt printers the Preview markers stayed in the raw G-code frame while the upright view draws the toolpaths back-transformed. The masses now get the toolpaths' transform. It shears, so the second moments are kept as a full 3x3 matrix to keep the moments of inertia right, and the bounding box rows are left out for a map that mixes the axes, where the box of the mapped corners would be far too large. - At the top layer of the slider the solid marker of what is printed so far covered the faded finished-print one, which could not be clicked. At the top layer only the finished print's markers show, drawn solid. - The section view cuts a marker away when its center is on the cut side, as it does the toolpaths' option markers. * Keep the belt bounding box and store six second moments - Belt prints keep the bounding box rows in the details. The G-code back-transform moves from GCodeViewer into BeltTransformPipeline::build_gcode_back_transform(), and on a belt print the processor keeps a second box per mass, of each segment's ends and bead height mapped by its linear part. ObjectMass::transform() moves that box by the translation, instead of dropping the box that the shear would blow up. - A mass stores its second moments as the diagonal and the three cross terms instead of a full matrix, which is built only to transform it. |
||
|
|
9c3b0a86e1 |
Fix realistic view shadows for by-object prints and the section view (#16942)
Co-authored-by: Ian Bassi <ian.bassi@outlook.com> |
||
|
|
c7bc1b27a5 |
Fix extruder printable area placement checks for non-BBL multi-nozzle printers (#14140)
Non-Bambu printers do not regroup filaments, but the placement check before slicing treated them as if they did. In auto map mode it only flagged a filament that fits on no extruder, so an object outside its own extruder's printable area got no warning until slicing failed. On these printers the check now uses the filament map from get_effective_exclusion_filament_maps(), the same map the exclusion-volume check and arrange use. A conflict on a third or later extruder now shows a generic message. Before, it blocked slicing with no message. The "Click here to regroup" link is hidden on non-Bambu printers. Fixes #14070 |
||
|
|
7bbb18cbf4 |
Make gizmo +/- buttons repeat while held (#16525)
Holding a +/- step button on a gizmo input changed the value only once. ImGui repeats a held button only on new frames, and the canvas draws only when an event arrives, so a mouse held still produced no repeats. - Add ImGuiWrapper::request_frames_while_held() and call it after the Emboss Height and Depth, SVG Depth, and Cut groove Count inputs. - Set io.DeltaTime from a real clock in ImGuiWrapper::new_frame(), capped at 1/60 s, so the repeat rate does not depend on the frame rate. - Handle wxEVT_MOUSE_CAPTURE_LOST on the canvas, so a lost button-up does not leave an ImGui widget active. - Cut groove Count no longer rebuilds when the value is already at its limit. |
||
|
|
00444ae4d7 |
Add 3Dconnexion Settings to the View Menu (#16345)
* Add 3Dconnexion Settings to the View Menu The 3Dconnexion settings overlay could only be opened with its keyboard shortcut. On macOS that is Cmd+Shift+M, because plain Cmd+M is the system Minimize shortcut, so users who pressed Cmd+M minimized the window and never found the dialog (#5484). Add a "3Dconnexion settings" check item to the View menu. It toggles the overlay and shows the shortcut bound to it, and its label follows the key if the user rebinds it. It is enabled only on Prepare and Preview when a device is connected (on Windows, also only with the legacy 3Dconnexion option enabled). Move that availability test into Mouse3DController::can_show_settings_dialog() so the menu item and the canvas shortcut share it. * Rename and move the 3Dconnexion Settings menu item Label it "Show 3Dconnexion Settings" to match the other View menu items, and move it below "Reset Window Layout" in its own separated group since it opens a settings window. --------- Co-authored-by: yw4z <ywsyildiz@gmail.com> |
||
|
|
258ddc15e8 | Fix a crash from the Russian extruder range warning, and check plural placeholders in CI (#16815) | ||
|
|
c44779966b | Support Chinese and other input methods in canvas text fields on macOS | ||
|
|
7319a2c54c | Draw translucent filaments translucent in Preview (#16776) | ||
|
|
3f8ff53e65 |
Keep keys away from the 3D view while ImGui has the keyboard (#16673)
The 3D view decided whether to run its shortcuts from ImGui's "wants the keyboard" flag, which is updated a frame late. The first key typed after clicking into a field could still reach the canvas. The canvas now leaves every key to ImGui while an ImGui text field is active, while a popup (dropdown, menu or modal) is open, or while a slider or button is held with the mouse. A focused sidebar text field works the same way. Global shortcuts still run unless they edit text. Every key still goes to ImGui. - ImGuiWrapper::claim_key_event() decides on the key-down. The key's repeats, char event and release follow that decision, so a key never both runs a shortcut and types. - Esc closes an open dropdown or menu before the gizmo. - Esc and Tab during a slider drag no longer close the gizmo or switch views. - text_input_active() reads ImGui's text input request, so a slider that once had a value typed into it no longer counts as a text field when dragged. - A modifier whose key-up went to a dialog no longer stays stuck. The canvas releases held modifiers when it loses the focus, and ImGui takes its modifiers from each mouse event. - The macOS Edit menu's key equivalents follow the same rule. |
||
|
|
f92f75e0fa |
Feat: Add multiple and 3D bed exclusion volumes (#13777)
# Description This PR adds opt-in, height-aware exclusion volumes to OrcaSlicer, including multi-nozzle handling, object and generated-geometry validation, final G-code collision checking, and travel rerouting. It grew from the original object-placement prototype into a collision-aware slicing pipeline with documented limitations. The central compatibility decision is that Orca's existing `bed_exclude_area` keeps its historical meaning, while the new `bed_exclude_volumes` setting explicitly enables the stronger collision-aware behavior. <img width="935" height="707" alt="Travel paths routed around exclusion volumes" src="https://github.com/user-attachments/assets/22925e5c-a3b1-4c26-be1a-8a89d9970cb5" /> Related issues: #5922, #10579, #10638 and #12774. ## Why this is useful The existing 2D exclusion area prevents object placement in areas such as the filament-cutter corner on Bambu printers. It cannot describe low bed clips, raised tool docks, camera arms, flying-gantry hardware, or other obstacles that occupy only part of the printer's Z range. Treating every existing area as a physical motion obstacle would also be unsafe for compatibility: some printers deliberately move into their excluded material area. This PR therefore separates the two concepts rather than changing the meaning of existing profiles. | Setting | Purpose | Existing motion affected? | | --- | --- | --- | | `bed_exclude_area` | Existing bed-fixed material/placement keep-out | No G-code checking or travel rerouting | | `bed_exclude_volumes` | Shared 3D collision volumes | Object/generated-material checks, G-code validation and travel rerouting | | `extruder_bed_exclude_volumes` | Per-extruder 3D collision volumes | Same collision behavior, resolved for the active physical nozzle | Bed areas and collision volumes are additive. A printer can retain an existing cutter/material keep-out while adding separate physical collision volumes. Belt printers retain the existing projection of bed areas onto the tilted belt surface; collision volumes remain in model coordinates. ## Configuration and syntax `bed_exclude_volumes` accepts one or more polygonal prisms: ```text XxY,XxY,... ``` defines a full-height collision volume. ```text REGION|REGION|REGION ``` defines multiple independent volumes. ```text ZMIN..ZMAX;XxY,XxY,... ``` defines a volume active only across that Z range. Either Z bound may be omitted: ```text ..10;20x20,40x20,40x40,20x40 30..;20x20,40x20,40x40,20x40 ``` For example: ```text 20x0,45x0,45x18,20x18|8..22;115x20,145x20,145x48,115x48 ``` defines one full-height volume and one volume active from Z=8 mm to Z=22 mm. Z ranges are validated and clamped against the configured printable height, and decimal parsing is locale-independent. The CLI exposes the same distinction: ```text --bed-exclude-area --bed-exclude-volumes ``` Existing scripts using `--bed-exclude-area` retain the original polygon format and behavior. ## Backward compatibility and migration - Existing profiles and projects using only `bed_exclude_area` keep its material/placement keep-out meaning; they do not implicitly enable collision-volume checking or travel rerouting. - Stock printer motion is not checked or rerouted against bed areas. This is important for machines that deliberately enter an excluded material area during cutting or loading. - The new syntax is stored under separate config keys, so an older Orca build does not try to deserialize a volumetric string as the existing point-list option. - In **Printer settings → Basic information → Printable space**, **Excluded bed area** remains a normal editable field with Orca's standard reset controls. **Toolhead collision volumes** is a separate field directly below it. There is no Convert/Copy button and neither setting clears the other. - A bed-area polygon can be manually copied into the collision-volume field to describe a full-height physical obstacle. Pasting volume syntax into the bed-area field instead prompts for confirmation before adding it to the appropriate volume definitions. The saved bed area, existing volumes and selected nozzle mode are preserved; cancelling leaves them unchanged. - If a user does not configure the new volume keys, the new G-code checker, rerouter, support trimming and nozzle-specific brim behavior remain inactive. This gives existing profiles a stable compatibility boundary while allowing users and maintainers to migrate deliberately to full collision checking over time. ## Multi-nozzle behavior For multi-nozzle printers, the collision-volume mode selects one of three behaviours. In individual mode, each extruder's definition is edited on its own Extruder settings page. These modes apply only to collision volumes; the excluded bed area stays shared and bed-fixed. Collision volumes support three modes: <img width="549" height="441" alt="Exclusion volume behavior selector" src="https://github.com/user-attachments/assets/6ca8c2e2-d00e-4b32-9b12-bfbff0928966" /> ### Shared Every physical nozzle uses the same collision-volume definition. <img width="2353" height="1633" alt="Shared exclusion volumes" src="https://github.com/user-attachments/assets/96fe938b-07b4-4cd9-b587-e31f2ebba5f8" /> ### Toolhead-relative (nozzle offsets) The shared definition is treated as relative to the toolhead. Orca derives the other nozzles' collision regions using their configured XY offset from the reference nozzle. This is useful where the same physical carriage must avoid an obstacle but its position changes when a different offset nozzle prints at the same model coordinate. <img width="1084" height="803" alt="Toolhead-relative exclusion volumes" src="https://github.com/user-attachments/assets/e0790ee4-68b5-444f-90ac-22a5eba05eec" /> ### Individual per extruder Each physical extruder/nozzle has its own independent volume definition. This supports machines whose valid region differs by tool and cannot be derived from a simple nozzle offset. <img width="1123" height="761" alt="Independent exclusion volumes for three extruders" src="https://github.com/user-attachments/assets/c6404ceb-9958-4df8-93ed-5ff2ac7dc658" /> Object validation resolves logical filament assignments to the physical nozzle or nozzles that may print the object, including automatic Bambu mapping. If an object may use several nozzles through painting, feature-level assignments, modifiers, support or interface material, the complete object is conservatively checked against every relevant nozzle's volumes. ## Object validation and 3D preview Object collision detection uses a cheap XY/Z broad phase followed by an exact mesh-versus-prism test. The exact test: - Avoids rejecting an object whose XY shadow overlaps a raised volume while its real mesh remains clear. - Detects normal surface crossings. - Detects a volume completely enclosed inside a solid model. - Respects object-instance and model-volume transforms. - Separates the collision decision from optional preview-mesh generation. When a collision is found, Orca reports the relevant extruder where possible and renders the intersecting model surface in red. The bed preview shows a neutral grey footprint, a thin nozzle-colored ownership border where appropriate, and a translucent 3D prism when a nearby object makes the volume relevant. Raised volumes keep their ownership outline on the bed rather than floating at their starting Z. <img width="578" height="534" alt="Red model and exclusion-volume intersection preview" src="https://github.com/user-attachments/assets/d409f574-1790-48e5-b4a3-703273439954" /> Single-nozzle/shared geometry remains visually neutral; nozzle colors are used when they convey distinct tool ownership. The default automatic preview limits the translucent 3D geometry to nearby object height to avoid obscuring the workspace. **View → Show all collision volumes** displays the complete configured Z ranges, including on an empty bed. Its default shortcut is **Ctrl+Shift+V** (**Command+Shift+V** on macOS), and it can be changed in the shortcut settings. Orca remembers this application-level display preference independently of printer presets; it does not change collision checks or slicing. ## Arrange and Fill Bed Arrange and Fill Bed receive Z-aware, nozzle-aware obstacles, so an object may occupy a footprint belonging only to another nozzle or pass below a raised volume when its height permits it. - Existing objects remain obstacles when Fill Bed creates new copies. - Convex volume footprints are passed through accurately. - Orca's current libnest2d path supports convex NFP obstacles only, so non-convex volumes use a documented conservative bounding box until convex decomposition is implemented. - Orca's existing final alignment and normal unplaced-item behavior are retained. <img width="1097" height="846" alt="Fill Bed with multiple tools and exclusion volumes" src="https://github.com/user-attachments/assets/8c0ee5cf-624b-42a6-b57a-13c73400ac5c" /> ## Brim and support generation When collision volumes are enabled, object and support brims are clipped against the relevant first-layer volume footprints before their final extrusion paths are generated. Brim ownership is retained so touching object and support brims cannot be merged and silently reassigned to a nozzle whose volume they intersect. Established bed-edge and bed-area brim clipping remains unchanged when collision volumes are not configured. <img width="1139" height="770" alt="Object and support brims clipped around nozzle-specific volumes" src="https://github.com/user-attachments/assets/2913ff31-53e4-4e43-8b27-1afba7e3bafb" /> Normal support and raft polygon categories are trimmed against the relevant volumes over each support layer's actual vertical slab. Support-material resolution accounts for explicit support/interface tools, “current filament” behavior, alternating material layers, automatic physical-nozzle mapping, support brims, and shared support geometry. TreeSupport3D receives active exclusion geometry during branch planning so its existing avoidance machinery can steer branches around obstacles rather than merely cutting finished paths. ## Final G-code collision validation The final emitted G-code is checked as a safety backstop after slicing. The checker tracks: - The active physical nozzle and its XY offset. - Absolute and relative XY/Z motion. - Travel, extrusion and other parsed motion types. - Tool selection and physical/nozzle mapping. - Explicit motion in start, filament-change and tool-change G-code. - Coordinate resets and common `G28` forms, including bare, spaced, compact and parameterized axis selections. Material keep-outs from `bed_exclude_area` are deliberately ignored by the motion checker. Only explicit collision volumes constrain motion. If Z is genuinely unknown, the check is conservative across all relevant heights and the warning identifies that fact and includes the relevant G-code line. The artificial first segment that the preview draws from `(0,0)` is not treated as a real machine move. ## Travel rerouting Generated travel moves are rerouted around active collision volumes when a valid route exists. Routing is: - Aware of the travel's actual Z slab and planned lift/Z-hop. - Resolved for the active physical nozzle. - Constrained so any detour vertices added by Orca remain inside the printable bed. - Able to accept firmware-established start/end points on or beyond the nominal bed edge. - Revalidated before the replacement path is emitted. The implementation covers ordinary generated travels, the first generated move after start G-code, and moves following physical or same-nozzle filament changes. Explicit movement commands in custom start/tool-change G-code update the tracked position so the next generated travel begins from the correct point without defeating Orca's post-toolchange Z restoration. Obstacle geometry is cached by extruder and active Z-region set, with bounding-box rejection before expensive polygon work. Clear travels therefore avoid repeatedly unioning and offsetting the same obstacles. If no safe route can be found, Orca leaves the original move for the final checker to report rather than emitting an assumed-safe detour. Extrusion paths are validated but never rerouted. <img width="1286" height="706" alt="Travel rerouting from start G-code across multiple Z-aware volumes" src="https://github.com/user-attachments/assets/a68cd98f-5576-4f78-af43-697e9f687a9b" /> And here is an example of independent nozzle travel rerouting: <img width="2532" height="876" alt="image" src="https://github.com/user-attachments/assets/28b0c26e-59d6-42b9-a64f-4c2205c4ea3f" /> ## Testing and review status Targeted Catch2 coverage now includes: - Bed-area/volume parsing, validation, confirmed paste handling, additive behavior and CLI options. - Belt-surface projection of bed areas through both static and dynamic region resolution, including the reported cube positions, with collision volumes left unprojected. - Shared, toolhead-relative and individual per-extruder resolution. - Physical-nozzle and filament mapping. - Exact object intersection, including fully enclosed prisms and transformed instances. - 3MF persistence. - Arrange behavior for convex and non-convex obstacles. - Brim bed-boundary and volume clipping regressions. - Support and interface-material masks across support polygon categories. - G-code motion classification, coordinate tracking, homing forms and tool selection. - Safe travel rerouting, Z-aware activation, nozzle selection, off-bed firmware endpoints and failure cases. The reviewed `929beaee15` revision passed the CI checks, and review testing confirmed that the unit tests and earlier arrange, tool-change Z restoration, support, brim and brim-ownership regressions still pass. Stock-output comparisons covered 12 printers × 3 jobs plus 17 project files and produced G-code identical to `main` when the new feature was not configured. The belt projection correction and its regression coverage are included in the latest update. Please use the checks below for the current head's build and test status; earlier successful runs do not substitute for validation of a new revision. Review also compared CLI output against `main` across stock printers and multi-filament projects. The compatibility regressions found during that review—including stock Bambu cutter motion, preset dirty state, unintended bed-area brim/support changes, tool-change Z restoration, stale post-change origins, arrange rejection, router cost, locale parsing and bed-edge brim clipping—have been addressed. ## Known limitations and follow-up work The implementation deliberately favors conservative safety. A false positive or some unused build volume is preferable to emitting a movement that may collide with the machine. Collision warnings are not an automatic repair or a guarantee of safe output. - Skirts and draft shields are not regenerated or detoured around collision volumes. The final checker can report an intersection, but producing a valid closed loop around internal obstacles while remaining inside the bed needs a dedicated solution. - Extrusion paths are checked but not rerouted. - Spiral Z-hop's circular XY sweep is generated after the primary travel route has been planned. That sweep is not currently rerouted; the final G-code checker can report a collision, but does not repair it. - Orca cannot infer movement hidden inside an opaque firmware macro. A deterministic macro endpoint should be exposed with explicit `G90`/`G91` and `G0`/`G1` motion in Orca's custom G-code so the following travel can be routed from a known position. Movements inside custom G-code are checked, but only the generated travel after them is rerouted. - Negative model parts are not applied to the raw object-intersection mesh, so geometry removed only by a negative part can produce a conservative false positive. - Multi-nozzle object validation applies every relevant nozzle's volume to the complete object rather than only its visibly painted surface. - Support shared by several instances uses a conservative union of relevant plate-space exclusions. - Support avoidance trims or steers generated geometry but does not perform structural support re-planning. Support above a raised volume may resume over a void; native tree-support paths not using TreeSupport3D are not yet volume-aware. - Raised-only collision volumes are not yet fully represented in prime/wipe-tower placement validation; the final G-code checker remains the safety backstop. - Existing cross-object support-to-support overlap behavior is outside this PR. - “No tool selected” carriage-only exclusions are not represented by Orca's current backend and remain a possible future extension. ## Origin This work began with the [Muon3D M1](https://www.youtube.com/watch?v=jBatFQpTM6g), whose notched glass bed leaves usable print volume above a low obstruction. Upstreaming the capability lets other printers describe low clips, raised docks, toolchanger hardware and per-tool clearance limits without requiring a permanent fork. Thank you to everyone who tested the implementation, reviewed the architecture, identified regressions and helped improve the test coverage—especially the multi-tool and macOS testers. Further real-hardware feedback remains welcome, but the current implementation and compatibility behavior are ready to merge. Harry Loud Muon3D |
||
|
|
7fa9c4b4fa |
Move a Re-Placed Prime Tower Clear of Objects and Say So (#16728)
When a saved prime tower position no longer fits the estimated tower, the load-time clamp moved it to the comfort-margin bound with no regard for the objects on the plate, and stored it without telling the user. A tower saved in a corner could land on the model and produce a G-code conflict the user never caused. The GUI reload clamp and the CLI pre-slice clamp now keep the re-placed spot only when it is clear of every printable object and its brim. Otherwise they take the clear spot nearest the saved position, keeping the comfort margin where the plate allows, and only fall back to the old spot when no space is left. The GUI shows a notification whenever a saved tower is moved, and the CLI logs a warning. |
||
|
|
a06ed2d182 |
Unify the below-plate view across the painting gizmos
The painting gizmos clip the selected instance at the plate, so a sinking object stopped at the bed with nothing to show how it continues below it, and the plate disappeared along with the bed mesh. Give every paint tool the same view of that region: - Draw the part of the selected instance below the plate at 50% opacity with depth writes off, so it reads as the object going through the plate. - Keep the plate and its grid while the bed mesh is hidden, instead of losing every reference plane in the scene. - Mark the plate intersection with a 0.4 mm outline rather than an opaque filled cap, which covered the model and hid the ghost from above. - Gate the bed mesh and the below-plate pass on the same predicate. Texture displacement derives from GLGizmoPainterBase like the other painters but was missing from the gizmo type list in is_bed_visible(), so it kept its bed. - Add GLVolume::simple_render()'s ban_color_volume so the ghost keeps its alpha for volumes with MMU segmentation facets, whose sub-models carry their own opaque filament colours, and stop gating the ghost on is_active: the colour painter marks the whole instance inactive and draws it in its own pass. |
||
|
|
2457173764 |
Fix: Instance position not syncs after drop and Object list sink icon/button not appears or non functional (#16501)
* sync instances on drop * fix sinking object not works while auto drop is off |
||
|
|
c67a46a277 | Merge branch 'main' into feat-3D-Exclusion-Volumes | ||
|
|
b00237807d |
Fix crash when dragging objects in sequential printing mode (#16029)
The clearance preview shown while dragging sorted instances with a comparator that is not a strict weak ordering, which aborts with libc++ debug hardening. The preview now uses object-list order, with each object's copies in their last validated print order, which is the order print validation uses. The height check is now in SequentialPrintClearance.hpp, with unit tests. |
||
|
|
247e903cbe | Merge upstream/main and resolve exclusion volume integration conflicts | ||
|
|
303d7a1a07 |
Option: Focus Mode (Show/ Hide inactive plates) (#16325)
* Option: Show/ Hide inactive plates * Hide inactive plate volumes by bounds Switch inactive-plate volume hiding to use geometric overlap with the current plate bounding box instead of object and wipe tower ID mapping. This also guards against a missing current plate and keeps any active volume visible when its transformed bounds overlap the current plate footprint. * Hide inactive plates per instance and keep them unpickable Decide what is shown per object instance, from its footprint over the current plate, so the parts of an object are never split; a selected instance stays visible. Keep the hidden state between frames instead of restoring it after each one. GLVolume::on_hidden_plate records what this update hid, so it only shows that again and leaves the volumes gizmos hide alone, and the raycasts made while handling the mouse see the same scene as the frame. Nothing runs while the inactive plates are shown. Deactivate the raycasters of the other plates, whose icons still took clicks where nothing was drawn, move the axes to the current plate, and limit the option to Prepare, as Preview already shows the current plate alone. * Follow the selected plate with the camera while the others are hidden Selecting a plate in Prepare while the inactive plates are hidden moves the camera target over it and keeps the angle, distance and height, so the plate comes into view where the previous one was. A zoom to all plates, as after loading a project or adding a plate, frames the current plate instead. * Add a compact plate switcher while inactive plates are hidden The hidden plates can no longer be clicked, and the object list gets crowded on large projects. While they are hidden in Prepare, a column of numbered buttons in the top left corner, a compact counterpart of the Preview plate toolbar, selects the plate to show. It highlights the current plate, dims the empty ones and gives the plate name in the tooltip. * Simplify the inactive plates update and the plate switcher layout Decide and apply each volume's state in one pass instead of filling a per-volume vector first, and hoist the switcher's loop-invariant colors. Keep the height the bottom-left corner takes next to the constants it is made of, with the canvas toolbar's button spacing named, rather than repeating that layout in the switcher. * Rename the option to Focus mode The canvas menu entry reads Focus mode, lit while the other plates are hidden, and is off by default, so nothing changes until it is turned on. The app config key is focus_mode. Turning it on zooms to the current plate, so the plate fills the view. * Show plate thumbnails in the plate switcher The switcher shows the thumbnails of the Preview plate toolbar instead of numbered buttons, with rounded corners concentric with the window's. Plater::plate_toolbar_image_version() lets it refresh them without clearing the Preview toolbar's dirty flag. * Don't draw the sinking contours of inactive volumes GLVolume::render() skips an inactive volume, but its sinking contour was still drawn, so an object on a hidden plate left its outline behind. * Show the plate switcher's scrollbar only on hover, as in Preview The plate switcher now shares the Preview plate toolbar's scrollbar: the same width and colors, shown only while the mouse is over the column or drags the bar, with the mouse wheel scrolling it either way, and tighter window corners while it shows. Both toolbars draw it through the same helpers, so they cannot drift apart; the Preview toolbar behaves as before. Drop the frame style the switcher no longer uses since it draws thumbnails instead of buttons. * Make the plate switcher's thumbnails cheaper and match the Preview toolbar The thumbnail version moves after almost every edit, and the switcher redrew both thumbnails of every plate each time. It now redraws only the current plate's, the only one edited while the others are hidden, and the other plates' once their thumbnails are invalidated, through the new Plater::update_plate_thumbnails(). IMToolbarItem::set_thumbnail() uploads a plate thumbnail without keeping a copy of its pixels, a megabyte per plate, and replaces the item setup the Preview toolbar and the switcher each repeated. The switcher's hover border takes the Preview toolbar's color. --------- Co-authored-by: Ian Bassi <ian.bassi@outlook.com> |
||
|
|
987c57dc15 | Add align and distribute to the Move gizmo | ||
|
|
4e7fa93981 | Fix align and distribute on copies, rotated parts and Z | ||
|
|
ea90f45127 |
Add Align/Distribute objects on the print plate (#13373)
* Add Align/Distribute objects on the print plate Ports the Align/Distribute feature from BambuStudio 2.5 (AGPLv3, same license as OrcaSlicer). Adds a new GLGizmoAlignment helper that operates on the GLCanvas3D selection, twelve thin Plater wrappers, and an Align/Distribute submenu attached to the same five context menus BambuStudio attaches it to: object menu, text part, BBL part, and the single/multi-volume context menus. GLCanvas3D::do_move gains a defaulted force_volume_move parameter so the helper can move multiple selected volumes within a single object even when selection mode is Instance. GLGizmosManager gains check_object_located_outside_plate, which switches the active plate to the one containing the selection before align/distribute runs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix build errors --------- Co-authored-by: yw4z <ywsyildiz@gmail.com> Co-authored-by: SoftFever <103989404+SoftFever@users.noreply.github.com> |
||
|
|
a338f6ca7d | Fix instance Z synchronization (#15465) | ||
|
|
e821665e4b |
Add orca-translations Claude skill and PO tool (#16436)
* Add orca-translations Claude skill and PO tool
Add a .claude skill that guides translation passes over the localization/i18n gettext catalogs. It covers the workflow: run gettext, settle new glossary terms, translate in batches, verify, and report.
Includes translation-rules.md, which condenses the placeholder, line-break and glossary rules plus the guidance on review notes.
Also adds scripts/po_tool.py (standard library only). It lists pending entries with glossary hints, validates and applies translations, adding '# AI Translated' and '# Needs human review' comments, and rewrites only the entries it changes. It can also check catalogs, look up existing translations, suggest glossary candidates and update the wiki glossary TSV.
* Let po_tool apply translations by entry id
pending now gives each entry a short id, so a translation file can name
entries by id instead of repeating the English msgid. apply accepts either.
A "review": "" item clears an earlier review note when overwriting an
entry, and check gives each msgfmt run its own temporary output file so
parallel checks do not collide.
* Fill all empty translations
Regenerate the template with run_gettext --full and translate every empty
entry in the 22 catalogs (7,089 entries) with the orca-translations skill,
following the localization glossary, including the new belt printer,
IDEX/IQEX and plugin terms. Every new entry is marked "# AI Translated";
122 also carry "# Needs human review" with what to check.
* Show entry ids in po_tool lookup and search translations
lookup now prints each entry's id, so an entry found there can be
rewritten with apply --overwrite without repeating the English, and
--msgstr searches the translations instead of the msgids, which finds
every entry that still uses a term being changed.
SKILL.md describes how to change an established term: check the
catalog's usage first, update the glossary cell, then rewrite only the
entries where the term has that meaning.
* Fix mistranslated terms and align catalogs with the glossary
Correct labels that the glossary had copied, and the entries that used
them:
- ca: Raft was rendered as the Brim term; it is now "Rai". Exhaust fan,
Monotonic line, Unretract, Slice, Lateral Honeycomb and PA Tower
labels fixed.
- cs: Lightning infill is "Blesk", not "Osvětlení" (illumination).
- sv: Retraction is "Retraktion", not "Reduktion"; Unretract,
Lagerhöjd, Delkylningsfläkt, Utsugsfläkt, Aligned Rectilinear and the
Preset label fixed.
- de: Brim is "Rand" and Skirt is "Umrandung", as most entries already
had them.
- lt: brim entries used the Skirt word "apvadas"; they now use "kraštas".
- es: Sparse infill is "relleno de baja densidad", the catalog majority.
- eu: nozzle wipe is "garbiketa", not purge.
- th: the project plate is "เพลต", distinct from the bed.
- uk: Quarter Cubic, Latin "PA" in PA Tower, and Belt purge tower.
- pl: Cross Hatch, Tri-hexagon, Volumetric speed and Raft labels.
- zh_TW: Brim stays "Brim", as the existing labels have it.
- tr: "Prime Tower" read "Prime Minister Tower".
- ko: the plugin "Capabilities" label read "performance".
- Build Volume labels fixed in tr, de, cs and eu.
All 242 rewritten entries are marked "# AI Translated".
* Make more UI text translatable and fix pluralization and context
Audit the sources for text that translators could not translate
correctly and fix it.
Mark text that reached users in English only: IDEX/IQEX role names,
plugin permission prompts and errors, 3MF/preset loading errors, G-code
placeholder parser errors, calibration and device messages, notification
texts, file dialog filters, and the config validation messages.
Replace sentences built from translated fragments, such as the prime
tower warnings, "left"/"right" nozzle names, and "Filament " + number,
with single msgids that have placeholders, so translators can reorder
and inflect them.
Use plural forms for texts with a count ("%1% mixed filaments",
"%d objects", "%1% triangles") instead of "(s)" and mismatched verbs.
Fix the swapped singular/plural pair in "The following presets inherit
this preset".
Add translation contexts where one English word has several meanings
(Subscribed/Local, Standard, Pause, View, Step, Model, Camera, Flow,
Filter, Others, Prepare, the Design tools). Show "Size" instead of
"Build Volume" in the Cut tool, which displays the object size.
Fix code that compared translated text with English (the Edit G-code
dialog group, the plugin registration failure check), and add the
bundled web pages' missing string-table entries. Use the single
character for degrees Celsius, say "G-code", and describe the head
filament map without internal jargon.
Install the libslic3r translate callback before the presets load, so
their load errors are translated, and list the 28 source files that had
marked strings but were never extracted into localization/i18n/list.txt.
* Suggest earlier translations and list fuzzy entries in po_tool pending
pending now attaches the closest earlier translation of a similar
English text (from obsolete or translated entries), so a reworded or
split string keeps its wording, and it lists fuzzy entries by default,
since users never see them. A fuzzy entry also carries its stale
translation as previous_translation.
* Fix wording of the non-boolean operands error
The logical operation error said "operators" where it means the
operands the operation was applied to.
* Translate the newly translatable strings in all languages
Regenerate the template after the translatability changes and fill every
new or changed entry in the 22 catalogs (about 12,800 entries): the
strings that became translatable, the plural forms, the entries split by
context, and the previously fuzzy singular entries that became plurals.
Every new entry is marked "# AI Translated", and about 360 also carry a
"# Needs human review" note saying what to check. Terms follow the
localization glossary. Earlier translations of reworded strings were
reused where the meaning was unchanged. Existing entries were not
changed, and obsolete entries are kept.
* Document the source translatability audit in the orca-translations skill
Add a reference describing how strings reach translators, what to look
for (untranslated text, spliced sentences, missing plurals, ambiguous
words), what not to translate, where a context cannot be carried, and
what to do after the edits, plus a scanner that lists untranslated
user-facing string literals.
* Document how to write translatable strings in AGENTS.md
Tell developers to keep each message complete in one msgid: use
placeholders instead of concatenating translated fragments, plural forms
for counts, and contexts for ambiguous words, and to list new source
files in localization/i18n/list.txt. Add a matching code review item.
* Translate the strings added since the rebase
Regenerate the template against the current main and translate the 26
new entries per language: the Fix Model commands and messages, and the
texture displacement image adjustment panel. Each new entry is marked
"# AI Translated"; existing entries are unchanged.
* tidy
|
||
|
|
01499e536e |
fix(gui): stop the UV editor pane from hijacking the shared GL context
The texture-displacement gizmo pushes pane state to the UV editor from the preview rebuild that runs on every frame of a slider drag. Tile size is the only one of the layer card's sliders whose value appears in that pane state, so dragging it changes the "N.N mm tile" label, the panel relays out, and the UV canvas receives a synchronous wxEVT_SIZE. Its on_size() flushes a paint with Update(), and render() then makes the app's single shared wxGLContext current on the UV drawable in the middle of the 3D canvas's frame. On X11/GLX that out-of-turn context activation is fatal: the drawable the 3D canvas later swaps no longer belongs to the current context, the server returns BadMatch, and GDK turns the unhandled X error into g_error(). EGL on Wayland reports only a status, so the same theft silently corrupts the frame instead of aborting - which is why the guard is not conditioned on the display backend. Add GLCanvas3D::is_frame_in_progress(), backed by a counter that _render_frame() maintains through its existing scope guard, and let the UV canvas skip the synchronous paint while a frame is on the stack, re-queueing it with Refresh() so nothing is dropped. Rebind the context with _set_current() before SwapBuffers() as well, so a surface that steals it by some other route - a modal GL dialog a gizmo opens from its panel - cannot turn the swap into the same fatal error. |
||
|
|
8b5280098f |
Merge upstream main: center of mass markers, adaptive TPMS, texture bake color mixing, post-processing preview fix, GLEW/OpenCSG removal
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
0f3e8fbf27 |
Add center of mass markers to Prepare and Preview (#16291)
Co-authored-by: Rodrigo Faselli <162915171+RF47@users.noreply.github.com> Co-authored-by: Kris Austin <kris.austin@gmail.com> |
||
|
|
2c0ce5c38b | Merge upstream/main and refine exclusion-volume configuration UI | ||
|
|
f970a607ae |
Merge upstream main: belt printing, texture displacement color mixing, 3MF component cycle checks, undo blocked during background jobs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
5072f6b614 | Merge branch 'main' into belt-printer | ||
|
|
d09850c528 | Merge branch 'main' into main |