forked from upstream-mirrors/OrcaSlicer
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0f947c8a99 |
+23
-12
@@ -1,5 +1,5 @@
|
||||
---
|
||||
allowed-tools: Bash(./scripts/gh.sh:*), Bash(./scripts/comment-on-duplicates.sh:*)
|
||||
allowed-tools: Bash(gh issue view:*), Bash(gh search:*), Bash(gh issue list:*), Bash(gh api:*), Bash(gh issue comment:*)
|
||||
description: Find duplicate GitHub issues
|
||||
---
|
||||
|
||||
@@ -11,17 +11,28 @@ To do this, follow these steps precisely:
|
||||
2. Use an agent to view a Github issue, and ask the agent to return a summary of the issue
|
||||
3. Then, launch 5 parallel agents to search Github for duplicates of this issue, using diverse keywords and search approaches, using the summary from #1
|
||||
4. Next, feed the results from #1 and #2 into another agent, so that it can filter out false positives, that are likely not actually duplicates of the original issue. If there are no duplicates remaining, do not proceed.
|
||||
5. Finally, use the comment script to post duplicates:
|
||||
```
|
||||
./scripts/comment-on-duplicates.sh --potential-duplicates <dup1> <dup2> <dup3>
|
||||
```
|
||||
5. Finally, comment back on the issue with a list of up to three duplicate issues (or zero, if there are no likely duplicates)
|
||||
|
||||
Notes (be sure to tell this to your agents, too):
|
||||
|
||||
- Use `./scripts/gh.sh` to interact with Github, rather than web fetch or raw `gh`. Examples:
|
||||
- `./scripts/gh.sh issue view 123` — view an issue
|
||||
- `./scripts/gh.sh issue view 123 --comments` — view only the comments (prints nothing when there are none)
|
||||
- `./scripts/gh.sh issue list --state open --limit 20` — list issues
|
||||
- `./scripts/gh.sh search issues "query" --limit 10` — search for issues
|
||||
- Run each script call as a plain command like the examples, with no `cd`, environment variables, pipes, redirects or `;`/`&&` chains: anything else is refused
|
||||
- Do not use other tools, beyond `./scripts/gh.sh` and the comment script (eg. don't use other MCP servers, file edit, etc.)
|
||||
- Use `gh` to interact with Github, rather than web fetch
|
||||
- Do not use other tools, beyond `gh` (eg. don't use other MCP servers, file edit, etc.)
|
||||
- Make a todo list first
|
||||
- For your comment, follow the following format precisely (assuming for this example that you found 3 suspected duplicates):
|
||||
|
||||
---
|
||||
|
||||
Found 3 possible duplicate issues:
|
||||
|
||||
1. <link to issue>
|
||||
2. <link to issue>
|
||||
3. <link to issue>
|
||||
|
||||
This issue will be automatically closed as a duplicate in 3 days.
|
||||
|
||||
- If your issue is a duplicate, please close it and 👍 the existing issue instead
|
||||
- To prevent auto-closure, add a comment or 👎 this comment
|
||||
|
||||
🤖 OrcaSlicer bot
|
||||
|
||||
---
|
||||
|
||||
@@ -81,11 +81,6 @@ Contents: [Rules](#rules) · [1. Choosing the window kind](#1-choosing-the-windo
|
||||
tooltip of a widget in that popup, or in a popup opened from it, is on screen: the tooltip has taken the
|
||||
keyboard while the user is still on the popup. `PopupWindow::topWindowActiavate` does it for every Orca popup;
|
||||
a popup outside `PopupWindow` with such a hook must do it itself. (§9)
|
||||
31. When a dialog that hides on deactivation closes by itself, find the code that activated another window
|
||||
instead of hardening the hook: on wxGTK, `SetFocus()` on a child of a visible, inactive toplevel presents
|
||||
that toplevel. A handler bound on a book control acts only on events whose object is that book, because a
|
||||
page-changed event from a book inside a page propagates up to it. A deferred, re-checked hide tolerates only
|
||||
a focus bounce shorter than its delay. (§10)
|
||||
|
||||
## 1. Choosing the window kind
|
||||
|
||||
@@ -832,9 +827,8 @@ created with `wxBORDER_NONE | wxFRAME_NO_TASKBAR | wxFRAME_FLOAT_ON_PARENT | wxF
|
||||
- `wxFRAME_NO_TASKBAR` gives no taskbar entry on MSW/GTK, on GTK only when the WM supports
|
||||
`_NET_WM_STATE_SKIP_TASKBAR` (`interface/wx/frame.h:97-103`).
|
||||
- `wxFRAME_FLOAT_ON_PARENT` requires a non-null parent (`interface/wx/frame.h:104-106`).
|
||||
- Its `wxEVT_ACTIVATE` handler focuses the web view on activation, because modeless focus is granted
|
||||
asynchronously and a focus request made right after `Show()` is dropped. It hides on deactivation after a
|
||||
short settle delay and a re-check of `gtk_window_is_active()` (Pitfalls below), and it `Skip()`s.
|
||||
- Its `wxEVT_ACTIVATE` handler hides on deactivation and `Skip()`s. On activation it focuses the web view, because
|
||||
modeless focus is granted asynchronously and a focus request made right after `Show()` is dropped.
|
||||
- On Linux `focus_webview` grabs focus on the WebKit native widget (`gtk_widget_grab_focus` on
|
||||
`GetNativeBackend()`). `browser()->SetFocus()` focuses only the container.
|
||||
- Display-only web content can stay in a transient popup (`MarkdownTip`).
|
||||
@@ -853,39 +847,13 @@ created with `wxBORDER_NONE | wxFRAME_NO_TASKBAR | wxFRAME_FLOAT_ON_PARENT | wxF
|
||||
wxBORDER_NONE | wxFRAME_NO_TASKBAR | wxFRAME_FLOAT_ON_PARENT | wxFRAME_SHAPED)
|
||||
{
|
||||
Bind(wxEVT_ACTIVATE, [this](wxActivateEvent& e) {
|
||||
if (!IsShown()) { e.Skip(); return; }
|
||||
if (e.GetActive()) { m_hide_timer.Stop(); focus_webview(browser(), m_page_ready); }
|
||||
else schedule_hide(); // validated, see the next rule
|
||||
if (e.GetActive() && IsShown()) focus_webview(browser(), m_page_ready);
|
||||
else if (!e.GetActive() && IsShown()) Hide();
|
||||
e.Skip();
|
||||
});
|
||||
}
|
||||
```
|
||||
Cite: f142716e51, a86202b45b (`SpeedDialPopup.cpp` replaced by `SpeedDialDialog.{hpp,cpp}`; `GUI_App.cpp`).
|
||||
- **Rule:** When a dialog that hides on deactivation closes by itself, find the code that activated another
|
||||
window; do not harden the dismissal hook. A handler bound on a book control checks that `e.GetEventObject()`
|
||||
is that book before acting.
|
||||
**Why:** On wxGTK, `wxWindow::SetFocus()` on a child of a visible but inactive toplevel calls
|
||||
`gtk_window_present` on that toplevel (`src/gtk/window.cpp:5157-5162`), so an unexpected `SetFocus()` anywhere
|
||||
in the main frame takes the keyboard from a modeless dialog that hides on deactivation. The Speed Dial closed
|
||||
by itself a moment after the first Space on Linux (GNOME and KDE, X11 and Wayland): the idle builder
|
||||
constructed the Calibration page, whose `Tabbook::InsertPage` emitted `wxEVT_BOOKCTRL_PAGE_CHANGED`; the event
|
||||
propagated, as every `wxNotifyEvent` does, to the main frame's `m_tabpanel` handler
|
||||
(`wxEVT_NOTEBOOK_PAGE_CHANGED` is the same type, `include/wx/bookctrl.h:434`), which treated it as a main tab
|
||||
change and ended with `panel->SetFocus()`. Found with a 10 ms focus poller and a backtrace on
|
||||
`gtk_window_present`. MSW and macOS `SetFocus()` do not activate the toplevel, so the bug was Linux-only. The
|
||||
dial's deferred, re-checked hide (`kHideSettleMs`, `gtk_window_is_active()`, since `wxTopLevelWindowGTK::IsActive()`
|
||||
answers from `g_activeFrame`, which the deactivation has already cleared) absorbs only a focus bounce shorter
|
||||
than the delay; it did not stop this.
|
||||
```cpp
|
||||
// Wrong: the main book's handler acts on every page-changed event that reaches it
|
||||
m_tabpanel->Bind(wxEVT_NOTEBOOK_PAGE_CHANGED, [this](wxBookCtrlEvent& e) { /* ... */ panel->SetFocus(); });
|
||||
// Right: only the book's own events
|
||||
m_tabpanel->Bind(wxEVT_NOTEBOOK_PAGE_CHANGED, [this](wxBookCtrlEvent& e) {
|
||||
if (e.GetEventObject() != m_tabpanel) { e.Skip(); return; }
|
||||
/* ... */
|
||||
});
|
||||
```
|
||||
Cite: #17245 (`MainFrame::init_tabpanel`; `SpeedDialWebDialog::on_hide_timer`).
|
||||
- **Rule:** When restoring the main frame after hiding a popup or overlay frame, call `Show()` only if
|
||||
`!IsShown()`, and `Raise()` unconditionally (top-level `Show`/`Raise` are owned by
|
||||
`references/windows-dialogs.md`).
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
# Description
|
||||
|
||||
<!--
|
||||
> Please read How to Contribute: https://www.orcaslicer.com/wiki/developer_reference/how_to_contribute
|
||||
> Please provide a summary of the changes made in this PR. Include details such as:
|
||||
> * What issue does this PR address or fix?
|
||||
> * What new features or enhancements does this PR introduce?
|
||||
@@ -11,9 +10,8 @@
|
||||
# Screenshots/Recordings/Graphs
|
||||
|
||||
<!--
|
||||
> UI changes need before and after screenshots, on each platform you tested.
|
||||
> See what each kind of PR needs: https://github.com/OrcaSlicer/OrcaSlicer/blob/main/CONTRIBUTING.md#what-each-kind-of-pr-needs
|
||||
> For other changes, please attach images that can help explain them.
|
||||
> Please attach relevant screenshots to showcase the UI changes.
|
||||
> Please attach images that can help explain the changes.
|
||||
-->
|
||||
|
||||
## Tests
|
||||
|
||||
@@ -4,20 +4,10 @@ description: Triggers duplicate detection for old issues that don't have duplica
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
min_issue_number:
|
||||
description: 'Lowest issue number to process'
|
||||
days_back:
|
||||
description: 'How many days back to look for old issues'
|
||||
required: false
|
||||
default: '1'
|
||||
type: string
|
||||
max_issue_number:
|
||||
description: 'Only process issues below this number (empty for no upper bound); the previous run logs the value to continue from'
|
||||
required: false
|
||||
default: ''
|
||||
type: string
|
||||
limit:
|
||||
description: 'Maximum number of dedupe runs to start, one every 30 seconds'
|
||||
required: false
|
||||
default: '100'
|
||||
default: '90'
|
||||
type: string
|
||||
dry_run:
|
||||
description: 'Dry run mode (true to only log what would be done)'
|
||||
@@ -31,8 +21,7 @@ on:
|
||||
jobs:
|
||||
backfill-duplicate-comments:
|
||||
runs-on: ubuntu-latest
|
||||
# Dispatches are spaced 30 seconds apart, so a large limit runs for hours
|
||||
timeout-minutes: 360
|
||||
timeout-minutes: 30
|
||||
permissions:
|
||||
contents: read
|
||||
issues: read
|
||||
@@ -51,7 +40,5 @@ jobs:
|
||||
run: bun run scripts/backfill-duplicate-comments.ts
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
MIN_ISSUE_NUMBER: ${{ inputs.min_issue_number }}
|
||||
MAX_ISSUE_NUMBER: ${{ inputs.max_issue_number }}
|
||||
LIMIT: ${{ inputs.limit }}
|
||||
DAYS_BACK: ${{ inputs.days_back }}
|
||||
DRY_RUN: ${{ inputs.dry_run }}
|
||||
@@ -268,10 +268,6 @@ jobs:
|
||||
- /opt/ghc:/opt/ghc1
|
||||
- /usr/local/share/boost:/usr/local/share/boost1
|
||||
- /opt/hostedtoolcache:/opt/hostedtoolcache1
|
||||
# Updating a runtime renames its old deployment, which fails with
|
||||
# "Invalid cross-device link" on hosts whose Docker overlay cannot
|
||||
# rename directories from an image layer. A volume is not overlay.
|
||||
- /var/lib/flatpak
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
|
||||
@@ -23,35 +23,22 @@ jobs:
|
||||
uses: actions/checkout@v7
|
||||
|
||||
- name: Run Claude Code slash command
|
||||
uses: anthropics/claude-code-action@v1
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
CLAUDE_CODE_SCRIPT_CAPS: '{"comment-on-duplicates.sh":1}'
|
||||
# The action stops at Claude's first result, so a turn that ends while a background agent
|
||||
# still works would drop the rest of the dedupe; keep agents in the foreground.
|
||||
CLAUDE_CODE_DISABLE_BACKGROUND_TASKS: "1"
|
||||
uses: anthropics/claude-code-base-action@beta
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
# Issues are opened by users without write access; the job's permissions and the
|
||||
# allowed-tools list in .claude/commands/dedupe.md keep what Claude can do narrow.
|
||||
allowed_non_write_users: "*"
|
||||
# The backfill workflow dispatches this one with GITHUB_TOKEN, so those runs come from github-actions[bot]
|
||||
allowed_bots: "github-actions"
|
||||
prompt: "/dedupe ${{ github.repository }}/issues/${{ github.event.issue.number || inputs.issue_number }}"
|
||||
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
|
||||
# The allowed-tools in .claude/commands/dedupe.md cover only the command's own turn, not the
|
||||
# agents it starts, so the same two scripts are allowed for the whole session here.
|
||||
claude_args: '--model claude-haiku-5-5 --allowedTools "Bash(./scripts/gh.sh:*),Bash(./scripts/comment-on-duplicates.sh:*)" --disallowedTools "WebFetch,WebSearch,Write,Edit,MultiEdit,NotebookEdit"'
|
||||
model: "claude-sonnet-4-5-20250929"
|
||||
claude_env: |
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Log duplicate comment event to Statsig
|
||||
if: always()
|
||||
env:
|
||||
STATSIG_API_KEY: ${{ secrets.STATSIG_API_KEY }}
|
||||
ISSUE_NUMBER: ${{ github.event.issue.number || inputs.issue_number }}
|
||||
REPO: ${{ github.repository }}
|
||||
TRIGGERED_BY: ${{ github.event_name }}
|
||||
WORKFLOW_RUN_ID: ${{ github.run_id }}
|
||||
run: |
|
||||
ISSUE_NUMBER=${{ github.event.issue.number || inputs.issue_number }}
|
||||
REPO=${{ github.repository }}
|
||||
|
||||
if [ -z "$STATSIG_API_KEY" ]; then
|
||||
echo "STATSIG_API_KEY not found, skipping Statsig logging"
|
||||
exit 0
|
||||
@@ -61,8 +48,7 @@ jobs:
|
||||
EVENT_PAYLOAD=$(jq -n \
|
||||
--arg issue_number "$ISSUE_NUMBER" \
|
||||
--arg repo "$REPO" \
|
||||
--arg triggered_by "$TRIGGERED_BY" \
|
||||
--arg workflow_run_id "$WORKFLOW_RUN_ID" \
|
||||
--arg triggered_by "${{ github.event_name }}" \
|
||||
'{
|
||||
events: [{
|
||||
eventName: "github_duplicate_comment_added",
|
||||
@@ -71,7 +57,7 @@ jobs:
|
||||
repository: $repo,
|
||||
issue_number: ($issue_number | tonumber),
|
||||
triggered_by: $triggered_by,
|
||||
workflow_run_id: $workflow_run_id
|
||||
workflow_run_id: "${{ github.run_id }}"
|
||||
},
|
||||
time: (now | floor | tostring)
|
||||
}]
|
||||
|
||||
@@ -158,7 +158,7 @@ jobs:
|
||||
sudo apt-get install -y --no-install-recommends \
|
||||
libopengl0 libgl1 libegl1 libwebkit2gtk-4.1-0
|
||||
|
||||
- uses: actions/setup-python@v6
|
||||
- uses: actions/setup-python@v7
|
||||
with:
|
||||
python-version: "3.12"
|
||||
|
||||
|
||||
@@ -3073,19 +3073,6 @@ namespace IMGUIZMO_NAMESPACE
|
||||
}
|
||||
isInside = gContext.mbMouseOver && ImRect(position, position + size).Contains(io.MousePos);
|
||||
|
||||
// The navigator is drawn into the NoInputs "gizmo" window, so ImGui never owns the press
|
||||
// (mouse_avail_to_imgui is false) and WantCaptureMouse only reflects what the previous frame asked
|
||||
// for. Hold the capture for the whole gesture, otherwise a still frame drops it and the next motion
|
||||
// event reaches the canvas, which adopts it as a camera drag.
|
||||
if ((isClicking || isDraging) && io.MouseDown[0])
|
||||
{
|
||||
#if IMGUI_VERSION_NUM >= 18723
|
||||
ImGui::SetNextFrameWantCaptureMouse(true);
|
||||
#else
|
||||
ImGui::CaptureMouseFromApp();
|
||||
#endif
|
||||
}
|
||||
|
||||
if (io.MouseDown[0] && (fabsf(io.MouseDelta[0]) || fabsf(io.MouseDelta[1])) && isClicking)
|
||||
{
|
||||
isClicking = false;
|
||||
|
||||
@@ -95,16 +95,9 @@ declaration order at static init — cannot: inserting one option into the middl
|
||||
*succeeds on the wrong option*, silently, wherever the two share a type. Because a
|
||||
name-keyed payload instead drops the individual options this build cannot place, the
|
||||
file as a whole stays readable, and there is no schema fingerprint — no checksum over
|
||||
the option schema that would reject every cache on every release. An option this build no
|
||||
longer defines gets exactly what it gets from a JSON profile: read, dropped, and the rest
|
||||
of the preset loads. An option this build now defines with a different type is read by the
|
||||
type the writer recorded and handed to `set_deserialize` as its text, again as a JSON
|
||||
profile's value would be: `handle_legacy` maps an old spelling (a bool's `1` onto an
|
||||
enum's `enabled`) and an enum name a bool cannot parse is substituted. Only a text this
|
||||
build cannot parse into the new type is dropped, that option alone. Dropping a retyped
|
||||
option outright would leave the key at the collection default in every preset that sets
|
||||
it, which is not what the JSON says, and an installed cache outlives the app upgrade that
|
||||
retyped the key.
|
||||
the option schema that would reject every cache on every release. An option this build
|
||||
no longer defines, or now defines with a different type, gets exactly what it gets from
|
||||
a JSON profile: read, dropped, and the rest of the preset loads.
|
||||
|
||||
The ordinal-keyed cereal hooks in `PrintConfig.hpp` are untouched — they are also the
|
||||
undo/redo wire format, where the process cannot change underneath them. The cache has
|
||||
@@ -372,11 +365,8 @@ The system is designed so that no cache problem is fatal:
|
||||
- **Corrupt, truncated or foreign file** — rejected at the header, vendor parsed. A
|
||||
cache is written to a temp file beside its target and moved into place, so a write
|
||||
that dies partway leaves the previous cache intact rather than a truncated one.
|
||||
- **An option this build no longer has** — that option alone is dropped, exactly as a
|
||||
JSON profile's would be. The preset and the file load.
|
||||
- **An option this build now types differently** — its value is read as the writer
|
||||
typed it and parsed from its text as a JSON profile's would be, legacy conversions
|
||||
included; only a text this build cannot parse into the new type is dropped.
|
||||
- **An option this build no longer has, or now types differently** — that option alone
|
||||
is dropped, exactly as a JSON profile's would be. The preset and the file load.
|
||||
- **Cache from a build with a different cache layout** — rejected on `CACHE_VERSION`.
|
||||
A vendor with JSONs beside it is parsed and re-cached; a cache-only vendor reads as
|
||||
not installed and the updater reinstalls it.
|
||||
@@ -403,10 +393,7 @@ enumerates only `*.json` will find no vendors at all in a packaged build.
|
||||
- **Adding, removing, retyping or reordering a config option** needs nothing. The
|
||||
payload names its keys and its enum values, so an option a cache carries and this
|
||||
build does not is dropped; one this build has and the cache does not is simply
|
||||
absent, as it would be from a JSON that predates it. A retyped option is read
|
||||
through `handle_legacy`, so give it the same conversion a JSON profile needs and the
|
||||
cache follows; an installed cache survives the upgrade that retyped the key, so that
|
||||
conversion is what every user who upgrades reads.
|
||||
absent, as it would be from a JSON that predates it.
|
||||
- **Changing a hand-written `serialize()`** — `VendorProfile` or its nested types — or
|
||||
the `CachedPreset` field list — written and read by `visit_entry` in
|
||||
`PresetCacheFormat.cpp`, one list for the save, the load and the name peek alike — or
|
||||
|
||||
@@ -29,32 +29,7 @@ the tower is continuous from the bed to its last purge. `wipe_tower_layer_height
|
||||
is the distance from the previous tower layer, which is the object's layer height
|
||||
whenever the tower prints on every layer.
|
||||
|
||||
A tower layer thinner than the printer's minimum layer height (by more than
|
||||
`EPSILON`, so layers sliced at exactly the minimum stay apart; never less than the
|
||||
towers' own 1e-3 mm merge) is not printed on its own: it joins the tower layer
|
||||
below. Precise Z height leaves such layers when it ends each object at its exact
|
||||
top, moving one object's last layers off another's by anything up to a layer
|
||||
height; a purge sized for a layer a few microns thick would run hundreds of mm.
|
||||
A joined layer takes `wipe_tower_print_z` and `wipe_tower_layer_height` from the
|
||||
tower layer below, and its purges print down at that tower layer's z: the emitter
|
||||
travels over the tower first, descends, and climbs back to the object layer, the
|
||||
same sequence it uses for a tower compacted below the objects. After a custom
|
||||
`change_filament_gcode` the descent happens wherever the macro leaves the head, so
|
||||
a macro has to end over the tower, as it already must for the compacted tower.
|
||||
Layers from the minimum layer height up stay tower layers of their own, sized for
|
||||
their height.
|
||||
|
||||
The emitter takes one tower result per toolchange, and a layer without one takes
|
||||
a result only to finish the tower layer. So `wipe_tower_layer_ends` marks the last
|
||||
of the tower layer and its joined layers that changes tools, or the last of them
|
||||
when none does: a joined layer that changes nothing after the results are all
|
||||
taken has nothing left to finish with. A joined layer also does not reset the
|
||||
Type 1 tower's first print, so smooth timelapse prints each tower layer's wall
|
||||
once.
|
||||
|
||||
`Print::_make_wipe_tower` plans every such object layer at its
|
||||
`wipe_tower_print_z`: one tower layer per object layer, except that a joined
|
||||
layer's toolchanges land in the tower layer below. A layer
|
||||
`Print::_make_wipe_tower` plans one tower layer per such object layer. A layer
|
||||
whose only call keeps the current filament leaves no toolchange in the plan, and
|
||||
the layer it generates is a single result whose initial and new tool are equal.
|
||||
That is what `wipe_tower_layer_is_sparse` recognises, and it is the unit both
|
||||
@@ -62,8 +37,8 @@ settings work on.
|
||||
|
||||
The plan stays one entry per tower layer in every case. The G-code emitter walks
|
||||
`WipeTowerData::tool_changes` by layer index, advancing once per object layer
|
||||
that carries a tower and does not join the one below, so a planner that removed
|
||||
entries would silently shift every later layer onto the wrong tower geometry. Layers that print nothing are
|
||||
that carries a tower, so a planner that removed entries would silently shift
|
||||
every later layer onto the wrong tower geometry. Layers that print nothing are
|
||||
therefore still planned and still generated; they are marked, and the emitter
|
||||
drops them.
|
||||
|
||||
@@ -167,12 +142,18 @@ its accumulation points; Type 2 guards the equivalent block in `finish_layer`,
|
||||
which also stops a merged-away layer from adding height of its own — the layer
|
||||
that prints the run carries all of it.
|
||||
|
||||
A merged tower layer can be thicker than the object layer it sits on. Both
|
||||
generators declare the tower's layer height in their own G-code blocks.
|
||||
`Print::_make_wipe_tower` selects the printer's tag format before either
|
||||
generator runs, so the G-code processor recognises the tower's height and
|
||||
extrusion role. The object's height returns on the next object path, because
|
||||
emission forces the processor role to the tower on any layer that carries one.
|
||||
A merged layer is the only case where the tower's layer height differs from the
|
||||
object layer it sits on, and therefore the only case where the height the
|
||||
exporter already emitted for that layer is wrong for the tower. Both generators
|
||||
do declare a height, but each hardcodes a tag dialect — the block tower forces
|
||||
the BBL tag, the other writes the compatible one — while the G-code processor
|
||||
reads only the tag its printer uses. On a non-BBL printer with a Type 1 tower the
|
||||
declaration is dropped, and the merged layer is drawn and costed as a thin one.
|
||||
`WipeTowerIntegration::tower_height_tag` therefore declares it at export time,
|
||||
where the printer is known, and only when the tower's own G-code does not already
|
||||
carry the tag that will be read. The object's height returns on the next object
|
||||
path, because emission forces the processor role to the tower on any layer that
|
||||
carries one.
|
||||
|
||||
## Constraints
|
||||
|
||||
@@ -212,9 +193,5 @@ read as off rather than compacting or merging in one place and not another.
|
||||
and the clearance geometry the plater draws.
|
||||
- [Slicing tests](../../tests/fff_print/test_wipe_tower.cpp) slice a real print
|
||||
and check that a run folds, that the tower still covers the object exactly
|
||||
once, that a run too thin for the cap is left alone, that a merged layer
|
||||
declares its height in the tag the printer's processor reads, and that layers
|
||||
precise Z height moves less than a minimum layer height off another object's
|
||||
join the tower layer below and print at its z, with and without their own
|
||||
toolchange and with smooth timelapse, while layers sliced at exactly the
|
||||
minimum height do not join.
|
||||
once, that a run too thin for the cap is left alone, and that a merged layer
|
||||
declares its height in the tag the printer's processor reads.
|
||||
|
||||
@@ -100,8 +100,14 @@ the active printer agent because a normal LAN agent represents one physical prin
|
||||
## Agent registration and selection
|
||||
|
||||
`NetworkAgentFactory` maintains the printer-agent registry. Each registry entry contains an agent ID,
|
||||
a display name, and a factory function. Built-in agents register during application initialization.
|
||||
Python printer-agent capabilities register dynamically and contribute an agent ID and factory entry.
|
||||
a display name, a factory function, and whether the native Device and Calibration tabs apply to the
|
||||
agent's printers. Built-in agents register during application initialization. Python printer-agent
|
||||
capabilities register dynamically and contribute an agent ID and factory entry.
|
||||
|
||||
The tab flag is read from the registry rather than the live agent because the main window lays out its
|
||||
tabs before the newly selected preset's agent is installed. It defaults to true. An agent that clears
|
||||
it is one whose printers have their own web interface and nothing the Bambu-shaped Device and
|
||||
Calibration tabs can show; for those printers the web Device page takes the Device tab's place.
|
||||
|
||||
The selected printer preset contains the printer-agent choice. If no explicit choice is stored, the
|
||||
application preserves the existing default behavior: Bambu presets select the Bambu agent and other
|
||||
|
||||
@@ -1,102 +0,0 @@
|
||||
# Selection outline — High Level Design
|
||||
|
||||
## Purpose and scope
|
||||
|
||||
When the Outline view option is on, the selected volumes of the 3D canvas are outlined: a ring of
|
||||
constant screen width around their silhouette, and thinner lines along their inner edges, the creases
|
||||
between faces, the contours where one part of the selection hides another, and the seams between
|
||||
neighboring parts. It is a view setting. It changes nothing in the model or the project, and it reaches
|
||||
neither the picking pass nor thumbnails.
|
||||
|
||||
`SelectionOutline` draws it once per frame for the whole selection, after the object passes of
|
||||
`GLCanvas3D::_render_scene()`. Its cost depends on the screen area of the selection, not on its triangle
|
||||
count, apart from one extra draw of the selected volumes.
|
||||
|
||||
## Passes
|
||||
|
||||
`GLVolumeCollection::render()` collects the selected volumes it draws, when the canvas passes it a list,
|
||||
and sets bit `SelectionOutline::StencilBit` of the canvas stencil wherever one of them passes the depth
|
||||
test. The stencil is cleared with the depth buffer at the start of the frame. `SelectionOutline::render()`
|
||||
then runs three passes, restricted by the scissor to the screen box of the selection, padded by how far
|
||||
each pass reads the one before it.
|
||||
|
||||
1. **Mask** (`outline_mask`). The selected volumes are drawn again, with the clipping of the object
|
||||
passes, into a 16 bit RGBA target with a depth texture of its own. Each texel packs, in two bytes per
|
||||
channel, the octahedral encoded view normal turned towards the camera, the part index of its volume,
|
||||
and the distances from the texel center to the edge of its triangle along +x, -x,
|
||||
+y and -y. GLModel gives every triangle three vertices of its own, so `gl_VertexID % 3` yields the
|
||||
barycentrics, and their screen derivatives the distances.
|
||||
2. **Edges** (`outline_edges`). For every texel, and each pair it forms with its right and upper neighbor,
|
||||
an inner edge is classified and located, and packed as a 4 bit strength and a 4 bit crossing position
|
||||
between the two texel centers. Along its row, the pass also finds the nearest covered texel and sums
|
||||
the coverage under a gaussian.
|
||||
3. **Composite** (`outline`). A full screen quad, drawn twice into the canvas framebuffer. The ring pass
|
||||
draws where the stencil bit is clear, so its inner edge is the multisampled silhouette of the
|
||||
selection itself. The lines pass draws where it is set, so inner lines stop exactly at the silhouette.
|
||||
|
||||
The targets, 16 bytes a pixel at canvas size, are allocated when something is outlined and kept from frame
|
||||
to frame, and they are freed in the first frame with nothing to outline.
|
||||
|
||||
## Inner edges
|
||||
|
||||
A pair of covered texels makes an edge when its normals differ by more than 25 degrees, fully at 40,
|
||||
when one surface hides the other, or when the texels belong to different parts. One surface hides the
|
||||
other when the view space step between the texels lies more than a few pixels off their planes, and
|
||||
each texel lies more than a pixel off the surface of the other side carried on over the pair. A curved
|
||||
surface seen edge on carries on smoothly, so it does not break into lines, nor does a fillet whose facets
|
||||
turn a little at every texel on both sides. A texel on a triangle smaller than a pixel both ways
|
||||
takes the normal of a neighbor beside it: the normals of such slivers can be far off their surface and
|
||||
would otherwise show as dots.
|
||||
|
||||
The crossing is placed between the texel centers, in this order of preference:
|
||||
|
||||
- where the triangles under both texels end, when they agree: the edge they share;
|
||||
- where the depth planes of the two sides meet, extrapolated from two texels on each side, when each side
|
||||
is flat over them and the planes part clearly along the axis;
|
||||
- for a hidden surface, where the triangle of the nearer one ends, when the texel behind it or the two
|
||||
beside it end on the same straight line, as a curved contour made of strips narrower than a pixel does
|
||||
not;
|
||||
- otherwise half way.
|
||||
|
||||
The lines pass takes the nearest crossing along the row of the pixel and the nearest along its column.
|
||||
For a straight line at distance d, they lie at d / |cos| and d / |sin| of its normal, so
|
||||
1 / d² = 1 / dx² + 1 / dy², which gives the distance at any angle without knowing it. The line is drawn
|
||||
with a smooth edge around its half width.
|
||||
|
||||
## Ring
|
||||
|
||||
The binary mask places the silhouette only within half a texel, which would show as a ripple along the
|
||||
outer edge of the ring. The coverage of the mask under a gaussian, summed over the rows by the edges pass
|
||||
and over the columns by the ring pass, is the normal tail beyond d / sigma for a straight silhouette at
|
||||
distance d, which the ring pass inverts for a sub-texel distance. Corners and features thinner than the
|
||||
gaussian lose coverage faster, so the distance is kept within half a texel of the one to the nearest
|
||||
covered texel, which the same two passes find exactly.
|
||||
|
||||
## Occlusion
|
||||
|
||||
The composite is depth tested against the canvas, so what stands in front of the selection hides its
|
||||
outline. It writes the depth of the selection at each pixel, from the mask, moved forward by the spread
|
||||
of that depth over the pixel, so that the selection passes the test on every sample. The ring takes the
|
||||
depth of the nearest covered texel, brought forward with its distance from the silhouette, so that it
|
||||
also shows over the plate the object stands on, which lies in front of the silhouette right below it.
|
||||
|
||||
The outline sets `SelectionOutline::DrawnBit` of the stencil wherever it draws, and the screen space
|
||||
ambient occlusion pass of the realistic view, which runs after it, leaves those samples as they are. The
|
||||
outline lies on top of the surfaces, so their occlusion would only darken it, unevenly, in the creases it
|
||||
marks.
|
||||
|
||||
## Colors and sizes
|
||||
|
||||
The outline is white. Its lines have a width on the model, 0.35 mm for the ring and 0.18 mm for the inner
|
||||
lines, so they grow as the camera closes in, kept between 2.5 and 5 pixels for the ring and 1.2 and 2.4 for
|
||||
the inner lines, scaled by the canvas scale. An inner line that would be thinner than 1.2 pixels fades
|
||||
instead, down to 40%, so that a far selection does not turn into lines. Inner lines are drawn at 75%
|
||||
opacity. Both have a smooth edge 1.2 pixels wide.
|
||||
|
||||
## Requirements
|
||||
|
||||
The outline needs ARB framebuffer objects, a 16 bit RGBA color renderable texture and the outline
|
||||
shaders, and it is not drawn without them. Under GLSL 1.10 there is no `gl_VertexID`: crossings fall
|
||||
back on the depth planes and the half way point, and slivers are not detected. Without 8 stencil bits,
|
||||
which the two bits used need, the ring stays off the pixels the mask covers and loses the exact inner
|
||||
edge, and the occlusion pass shades the outline too.
|
||||
@@ -108,16 +108,12 @@ order, such as monotonic, would print all of its lines and then come back for
|
||||
every piece of gap fill, most of which lies at the walls where the lines end.
|
||||
|
||||
So each piece, in turn, goes between the two extrusions of the fill where it
|
||||
adds the least travel, flipped when that is shorter. A piece fills what the
|
||||
extrusions around it left, so it only goes after the last extrusion of the fill
|
||||
that passes within half its widest width and a line spacing of it: a spiral
|
||||
that starts at a gap in its middle prints that gap when it is done. A closed
|
||||
piece counts from its point nearest the nozzle, where `GCode::extrude_loop()`
|
||||
starts it. The two ends of the fill cost nothing, since the travel to and from
|
||||
them depends on what is printed before and after. The fill's own extrusions keep
|
||||
their order and direction, so a monotonic fill stays monotonic. When the result
|
||||
travels no less than the gap fill printed after the lines in its own order, that
|
||||
order is kept.
|
||||
adds the least travel, flipped when that is shorter. A closed piece counts from
|
||||
its point nearest the nozzle, where `GCode::extrude_loop()` starts it. The two
|
||||
ends of the fill cost nothing, since the travel to and from them depends on what
|
||||
is printed before and after. The fill's own extrusions keep their order and
|
||||
direction, so a monotonic fill stays monotonic. When the result travels no less
|
||||
than the gap fill printed after the lines in its own order, that order is kept.
|
||||
|
||||
## The search
|
||||
|
||||
|
||||
+32
-62
@@ -24,22 +24,11 @@ millimeters. Using the path width makes Auto width and Arachne's variable widths
|
||||
meaningful. The effective offset is limited by that width and the spacing to the
|
||||
adjacent wall. A zero distance disables the offset.
|
||||
|
||||
Only external perimeters with an adjacent inner perimeter are eligible. A
|
||||
configured wall count alone cannot establish eligibility: the local geometry
|
||||
may contain fewer walls. With Inner/Outer order the adjacent wall must already
|
||||
be printed. Walls scheduled later never support the path.
|
||||
|
||||
Outer/Inner and Inner/Outer/Inner wall orders print the adjacent inner wall
|
||||
after the external wall. Its geometry still identifies the inward side and the
|
||||
presence of an adjacent wall, but an inward wipe can then use the external
|
||||
bead's own material only up to half its actual width. Larger requested offsets
|
||||
are limited to this half-width, even if a more distant inner perimeter was
|
||||
printed earlier: the third wall in Inner/Outer/Inner order, or the inner wall
|
||||
of another loop across a thin section in Outer/Inner order. The limit follows
|
||||
the configured order, so it also applies on the first layer, where sandwich
|
||||
order is not used.
|
||||
It applies to percentages and equivalent absolute distances, using the actual
|
||||
extrusion width rather than the configured Auto width.
|
||||
Only external perimeters with a suitable, previously printed inner perimeter
|
||||
are eligible. A configured wall count alone cannot establish eligibility:
|
||||
the local geometry may contain fewer walls, and walls scheduled later do not
|
||||
provide support. Outer/Inner wall order therefore normally retains the regular
|
||||
wipe path.
|
||||
|
||||
Retraction and pressure advance calibrations disable inward wiping so it cannot
|
||||
mask the behavior being measured. The calibration settings turn it off, and
|
||||
@@ -50,10 +39,7 @@ G-code generation enforces this even if a profile or object override enables it.
|
||||
The planner identifies an adjacent inner perimeter on the material side of the
|
||||
outgoing wall. Contour winding and the distinction between outer contours and
|
||||
holes establish a preferred direction; local printed geometry resolves ambiguous
|
||||
or self-touching contours. Sampling farther along the wall identifies its adjacent
|
||||
branch, while the available offset is measured from a nearby support point at the
|
||||
extrusion endpoint. This local search has the same bounded corner reach as support
|
||||
validation; a displacement measured at the sample cannot substitute for local support.
|
||||
or self-touching contours.
|
||||
|
||||
Candidate paths offset or translate the portion needed for the configured wipe
|
||||
distance. A wide seam gap can prevent a supported forward path; following the
|
||||
@@ -65,25 +51,19 @@ complete executable path, including its connector from the nozzle position,
|
||||
against the current and earlier printed perimeters. Nearby endpoints alone do
|
||||
not establish support across a gap.
|
||||
|
||||
Each region of an island accumulates its printed perimeter prefix once, in
|
||||
extrusion order. Every entity contributes its geometry only after it is printed,
|
||||
and the prefix is discarded when that region of the island ends. This collection
|
||||
is skipped when inward wiping is disabled or its configured distance is zero.
|
||||
With Outer/Inner and Inner/Outer/Inner order, all inner walls of the region are
|
||||
collected as targets before printing; they do not support the path until printed.
|
||||
A mixed inner-wall loop remains an eligible target even when its first path is
|
||||
an overhang: ordinary inner-wall
|
||||
Each region accumulates its printed perimeter prefix once, in extrusion order.
|
||||
Every entity contributes its geometry only after it is printed, and the prefix
|
||||
is discarded when the region ends. This collection is skipped when inward wiping
|
||||
is disabled or its configured distance is zero. A mixed inner-wall loop remains
|
||||
an eligible target even when its first path is an overhang: ordinary inner-wall
|
||||
paths elsewhere in the loop identify it. Likewise, an external loop with an
|
||||
overhanging start remains eligible when other segments identify the external
|
||||
wall. It is available for support checks but is not an inner-wall target.
|
||||
Candidate-specific support filtering and AABB trees are built only for eligible
|
||||
external loops, then reused across their candidate paths. They contain only the
|
||||
printed walls within the wipe length plus twice the corner reach of the support
|
||||
checks around the seam, so an island with many holes does not rebuild trees of
|
||||
its whole printed prefix for every loop.
|
||||
external loops, then reused across their candidate paths.
|
||||
|
||||
Material-side validation applies with or without a seam gap. Along each
|
||||
candidate, local wall normals point toward the adjacent inner wall;
|
||||
candidate, local wall normals point toward the adjacent printed inner wall;
|
||||
samples on the opposite side are rejected even when they remain close enough
|
||||
to the external wall to pass the support check. This uses the open wall geometry
|
||||
without treating it as a closed polygon. Full paths at a zero-gap seam also
|
||||
@@ -93,10 +73,9 @@ material-side and support checks apply without that additional clearance rule.
|
||||
|
||||
An accepted candidate replaces the stored wipe path as a whole. A short direct
|
||||
inward move is also eligible when longer candidates fail validation. It may
|
||||
waive full wall clearance, but must pass the material-side check. Every candidate's
|
||||
initial direction is checked from the actual nozzle position, including the seam
|
||||
gap and any loop pre-move; its construction origin is retained separately for
|
||||
intersection checks. The short direct move takes
|
||||
waive full wall clearance, but must pass the material-side check. Its initial
|
||||
direction is checked from the actual nozzle position after any loop pre-move;
|
||||
the original wall endpoint is retained separately for intersection checks. It takes
|
||||
priority over the alternate offset when the preferred and translated paths
|
||||
are unusable. A longer reversed path may replace the selected candidate only
|
||||
when its distance to the target inner wall is no worse within tolerance.
|
||||
@@ -105,10 +84,9 @@ when its distance to the target inner wall is no worse within tolerance.
|
||||
|
||||
The original wipe path is retained when:
|
||||
|
||||
- The external wall has no suitable adjacent inner wall near the seam, as in
|
||||
single-wall areas or where inner walls are locally missing. With Inner/Outer
|
||||
order it must already be printed. A distant wall or a wall on the air side
|
||||
does not qualify.
|
||||
- No suitable adjacent inner wall has already been printed near the seam. This
|
||||
includes single-wall areas, locally missing inner walls and normally Outer/Inner
|
||||
wall order. A distant wall or a wall on the air side does not qualify.
|
||||
- The requested or available offset, or the configured wipe distance, is zero
|
||||
or too small at the geometry's coordinate precision.
|
||||
- Degenerate geometry prevents construction of a usable candidate, or all
|
||||
@@ -150,19 +128,18 @@ Joins that already backtrack across the seam gap are not adjusted this way.
|
||||
|
||||
## Execution and retraction
|
||||
|
||||
Regular and inward wipe paths use a sentinel first point, replaced by the
|
||||
actual nozzle position during execution. Selecting an inward path changes only
|
||||
the stored wipe geometry. Seam selection and travel planning retain the actual
|
||||
post-extrusion position, including any Wipe on loop move.
|
||||
The stored wipe path uses a sentinel first point. Execution starts from the
|
||||
actual nozzle position and proceeds to the second stored point. Path selection,
|
||||
support validation and wipe-length calculation must all use this same executable
|
||||
geometry, especially after a Wipe on loop move.
|
||||
|
||||
The next travel applies the normal minimum-travel threshold and retraction/lift
|
||||
rules from that position. If retraction is needed, the ordinary retract operation
|
||||
executes the selected wipe with the configured before/during/after split, then
|
||||
replans travel from the wipe's endpoint when necessary. If a regular wipe would
|
||||
be skipped, the inward wipe is skipped too. In particular, a short travel or an
|
||||
extrusion starting at the current position does not execute an inward move,
|
||||
retract or Z-hop. A consumed or replaced path is cleared so it cannot execute
|
||||
twice. Layer and tool-change retractions can also consume the stored path.
|
||||
An accepted inward path executes at the end of the external loop, after any
|
||||
Wipe on loop move, without retracting filament. It consumes the stored path and
|
||||
updates the nozzle position before travel planning. A short travel to the next
|
||||
wall cannot discard this wipe or force a retraction or Z-hop. Subsequent travel
|
||||
uses the normal minimum-travel threshold and retraction/lift settings from the
|
||||
new position. The regular wipe, including fallback, remains deferred until a
|
||||
normal retraction uses it.
|
||||
|
||||
Retraction is divided into portions before, during and after wiping. The amount
|
||||
that can be retracted during the wipe depends on its executable length, wipe
|
||||
@@ -170,10 +147,8 @@ speed and the active filament's retraction speed. Fractional retraction speeds
|
||||
are retained in this calculation. For a 2 mm wipe at 100 mm/s and a retraction
|
||||
speed of 25.5 mm/s, the wipe can retract 0.51 mm. With a total retraction of 0.8 mm
|
||||
and both before/after percentages set to zero, the remaining 0.29 mm is retracted
|
||||
before wiping. This split applies to regular and inward wipes whenever normal
|
||||
travel planning or an explicit layer/tool-change retraction calls for a retract.
|
||||
A travel that needs no retraction does not execute either wipe geometry,
|
||||
irrespective of the configured retraction percentages.
|
||||
before wiping. This split applies to regular deferred wipes, including fallback;
|
||||
an accepted inward wipe executes separately without retraction.
|
||||
|
||||
## Implementation and verification
|
||||
|
||||
@@ -188,11 +163,6 @@ irrespective of the configured retraction percentages.
|
||||
across path subdivisions.
|
||||
- [FFF tests](../../tests/fff_print/test_wipe.cpp) cover emitted trajectories,
|
||||
fallback, minimum-travel retraction and Z-hop rules, and export invalidation.
|
||||
Inward-wipe checks cover before/during/after retraction splits, including 100%
|
||||
before or after wiping, with both E modes and Wipe on loop. Short travels
|
||||
skip the wipe, retraction and Z-hop for every split. A threshold between the
|
||||
original travel length and the distance from an inward wipe's endpoint also
|
||||
verifies that selecting the inward path cannot create a retraction.
|
||||
With Wipe inward disabled, they check the loop move's direction and magnitude
|
||||
for Classic and Arachne, the subsequent wipe's start and length, and fractional
|
||||
retraction splitting in absolute and relative E modes.
|
||||
|
||||
@@ -17747,11 +17747,11 @@ msgid "Wipe inward"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"Applies only to external walls, including hole boundaries. Moves the hot nozzle toward the inner walls during wiping to reduce reheating of freshly printed plastic and seam marks.\n"
|
||||
"Applies only to external walls, including hole boundaries. Moves the hot nozzle toward printed inner walls during wiping to reduce reheating of freshly printed plastic and seam marks.\n"
|
||||
"\n"
|
||||
"Especially useful at layer heights below 0.1 mm, where wipe marks are more visible.\n"
|
||||
"\n"
|
||||
"Uses the regular wipe where the outer wall has no adjacent inner wall, such as in single-wall areas, or if no supported inward path can be found, for example at tight corners or seam gaps."
|
||||
"Uses the regular wipe if no adjacent inner wall is already printed (single-wall areas or Outer/Inner wall order), or if no supported inward path can be found, for example at tight corners or seam gaps."
|
||||
msgstr ""
|
||||
|
||||
msgid "Wipe inward distance"
|
||||
@@ -17761,9 +17761,7 @@ msgstr ""
|
||||
msgid ""
|
||||
"The distance the wipe path is shifted away from the external perimeter, specified in millimeters or as a percentage of the actual outer-wall extrusion width.\n"
|
||||
"\n"
|
||||
"For example, 50% shifts the path by half of the outer-wall width. The effective offset is limited by both the actual outer-wall width and the available spacing to the adjacent wall, so values above 100% or an equivalent absolute distance have no additional effect. Set to 0 to disable the offset.\n"
|
||||
"\n"
|
||||
"With Outer/Inner or Inner/Outer/Inner wall order, the offset is limited to 50% of the actual outer-wall width because the adjacent inner wall is printed after the outer wall. This also applies to equivalent distances specified in millimeters."
|
||||
"For example, 50% shifts the path by half of the outer-wall width. The effective offset is limited by both the actual outer-wall width and the available spacing to the adjacent wall, so values above 100% or an equivalent absolute distance have no additional effect. Set to 0 to disable the offset."
|
||||
msgstr ""
|
||||
|
||||
msgid "Wipe before external loop"
|
||||
@@ -21380,7 +21378,7 @@ msgid "Klipper version => 0.9.0"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"RepRapFirmware version => 3.4.0\n"
|
||||
"RepRap firmware version => 3.4.0\n"
|
||||
"Check your firmware documentation for supported shaper types."
|
||||
msgstr ""
|
||||
|
||||
@@ -21396,7 +21394,7 @@ msgstr ""
|
||||
msgid "Frequency settings"
|
||||
msgstr ""
|
||||
|
||||
msgid "RepRapFirmware uses the same frequency range for both axes."
|
||||
msgid "RepRap firmware uses the same frequency range for both axes."
|
||||
msgstr ""
|
||||
|
||||
msgid "Damp: "
|
||||
@@ -21430,7 +21428,7 @@ msgstr ""
|
||||
msgid "Damp (Start / End): "
|
||||
msgstr ""
|
||||
|
||||
msgid "RepRapFirmware uses the same frequency for both axes."
|
||||
msgid "RepRap firmware uses the same frequency for both axes."
|
||||
msgstr ""
|
||||
|
||||
msgid "Note: Use previously calculated frequencies."
|
||||
|
||||
@@ -20410,17 +20410,17 @@ msgstr "Netejar cap a dins"
|
||||
|
||||
# AI Translated
|
||||
msgid ""
|
||||
"Applies only to external walls, including hole boundaries. Moves the hot nozzle toward the inner walls during wiping to reduce reheating of freshly printed plastic and seam marks.\n"
|
||||
"Applies only to external walls, including hole boundaries. Moves the hot nozzle toward printed inner walls during wiping to reduce reheating of freshly printed plastic and seam marks.\n"
|
||||
"\n"
|
||||
"Especially useful at layer heights below 0.1 mm, where wipe marks are more visible.\n"
|
||||
"\n"
|
||||
"Uses the regular wipe where the outer wall has no adjacent inner wall, such as in single-wall areas, or if no supported inward path can be found, for example at tight corners or seam gaps."
|
||||
"Uses the regular wipe if no adjacent inner wall is already printed (single-wall areas or Outer/Inner wall order), or if no supported inward path can be found, for example at tight corners or seam gaps."
|
||||
msgstr ""
|
||||
"Només s'aplica als perímetres exteriors, inclosos els contorns dels forats. Durant la neteja mou el broquet calent cap als perímetres interiors per reduir el reescalfament del plàstic acabat d'imprimir i les marques de costura.\n"
|
||||
"Només s'aplica als perímetres exteriors, inclosos els contorns dels forats. Durant la neteja mou el broquet calent cap als perímetres interiors ja impresos per reduir el reescalfament del plàstic acabat d'imprimir i les marques de costura.\n"
|
||||
"\n"
|
||||
"És especialment útil amb alçades de capa per sota de 0,1 mm, on les marques de neteja es veuen més.\n"
|
||||
"\n"
|
||||
"Fa servir la neteja normal on el perímetre exterior no té cap perímetre interior contigu, com ara a les zones d'un sol perímetre, o si no es troba cap trajectòria cap a dins amb suport, per exemple a cantonades tancades o a buits de la costura."
|
||||
"Fa servir la neteja normal si no hi ha cap perímetre interior contigu ja imprès (zones d'un sol perímetre o ordre de perímetres Exterior/Interior) o si no es troba cap trajectòria cap a dins amb suport, per exemple a cantonades tancades o a buits de la costura."
|
||||
|
||||
# AI Translated
|
||||
msgid "Wipe inward distance"
|
||||
@@ -20431,15 +20431,11 @@ msgstr "Distància de neteja cap a dins"
|
||||
msgid ""
|
||||
"The distance the wipe path is shifted away from the external perimeter, specified in millimeters or as a percentage of the actual outer-wall extrusion width.\n"
|
||||
"\n"
|
||||
"For example, 50% shifts the path by half of the outer-wall width. The effective offset is limited by both the actual outer-wall width and the available spacing to the adjacent wall, so values above 100% or an equivalent absolute distance have no additional effect. Set to 0 to disable the offset.\n"
|
||||
"\n"
|
||||
"With Outer/Inner or Inner/Outer/Inner wall order, the offset is limited to 50% of the actual outer-wall width because the adjacent inner wall is printed after the outer wall. This also applies to equivalent distances specified in millimeters."
|
||||
"For example, 50% shifts the path by half of the outer-wall width. The effective offset is limited by both the actual outer-wall width and the available spacing to the adjacent wall, so values above 100% or an equivalent absolute distance have no additional effect. Set to 0 to disable the offset."
|
||||
msgstr ""
|
||||
"Distància que es desplaça la trajectòria de neteja allunyant-se del perímetre exterior, indicada en mil·límetres o com a percentatge de l'amplada d'extrusió real del perímetre exterior.\n"
|
||||
"\n"
|
||||
"Per exemple, 50% desplaça la trajectòria la meitat de l'amplada del perímetre exterior. El desplaçament efectiu està limitat tant per l'amplada real del perímetre exterior com per l'espai disponible fins al perímetre contigu, de manera que els valors per sobre de 100% o una distància absoluta equivalent no tenen cap efecte addicional. Poseu-hi 0 per desactivar el desplaçament.\n"
|
||||
"\n"
|
||||
"Amb l'ordre de perímetres Exterior/Interior o Interior/Exterior/Interior, el desplaçament es limita al 50% de l'amplada real del perímetre exterior, perquè el perímetre interior contigu s'imprimeix després del perímetre exterior. Això també s'aplica a les distàncies equivalents indicades en mil·límetres."
|
||||
"Per exemple, 50% desplaça la trajectòria la meitat de l'amplada del perímetre exterior. El desplaçament efectiu està limitat tant per l'amplada real del perímetre exterior com per l'espai disponible fins al perímetre contigu, de manera que els valors per sobre de 100% o una distància absoluta equivalent no tenen cap efecte addicional. Poseu-hi 0 per desactivar el desplaçament."
|
||||
|
||||
msgid "Wipe before external loop"
|
||||
msgstr "Netejar abans del bucle extern"
|
||||
@@ -24760,10 +24756,10 @@ msgid "Klipper version => 0.9.0"
|
||||
msgstr "Versió Klipper => 0.9.0"
|
||||
|
||||
msgid ""
|
||||
"RepRapFirmware version => 3.4.0\n"
|
||||
"RepRap firmware version => 3.4.0\n"
|
||||
"Check your firmware documentation for supported shaper types."
|
||||
msgstr ""
|
||||
"Versió RepRapFirmware => 3.4.0\n"
|
||||
"Versió firmware RepRap => 3.4.0\n"
|
||||
"Consulteu la documentació del firmware per als tipus de shaper compatibles."
|
||||
|
||||
msgid "Frequency (Start / End): "
|
||||
@@ -24780,8 +24776,8 @@ msgstr "Inici / Final Y: "
|
||||
msgid "Frequency settings"
|
||||
msgstr "Configuració de freqüència"
|
||||
|
||||
msgid "RepRapFirmware uses the same frequency range for both axes."
|
||||
msgstr "El RepRapFirmware utilitza el mateix rang de freqüència per a ambdós eixos."
|
||||
msgid "RepRap firmware uses the same frequency range for both axes."
|
||||
msgstr "El firmware RepRap utilitza el mateix rang de freqüència per a ambdós eixos."
|
||||
|
||||
msgid "Damp: "
|
||||
msgstr "Amortiment: "
|
||||
@@ -24820,8 +24816,8 @@ msgstr "Freqüència X / Y: "
|
||||
msgid "Damp (Start / End): "
|
||||
msgstr "Esmorteïment (inici / final): "
|
||||
|
||||
msgid "RepRapFirmware uses the same frequency for both axes."
|
||||
msgstr "El RepRapFirmware utilitza la mateixa freqüència per a ambdós eixos."
|
||||
msgid "RepRap firmware uses the same frequency for both axes."
|
||||
msgstr "El firmware RepRap utilitza la mateixa freqüència per a ambdós eixos."
|
||||
|
||||
msgid "Note: Use previously calculated frequencies."
|
||||
msgstr "Nota: utilitzeu les freqüències calculades anteriorment."
|
||||
|
||||
@@ -20407,17 +20407,17 @@ msgstr "Očištění dovnitř"
|
||||
|
||||
# AI Translated
|
||||
msgid ""
|
||||
"Applies only to external walls, including hole boundaries. Moves the hot nozzle toward the inner walls during wiping to reduce reheating of freshly printed plastic and seam marks.\n"
|
||||
"Applies only to external walls, including hole boundaries. Moves the hot nozzle toward printed inner walls during wiping to reduce reheating of freshly printed plastic and seam marks.\n"
|
||||
"\n"
|
||||
"Especially useful at layer heights below 0.1 mm, where wipe marks are more visible.\n"
|
||||
"\n"
|
||||
"Uses the regular wipe where the outer wall has no adjacent inner wall, such as in single-wall areas, or if no supported inward path can be found, for example at tight corners or seam gaps."
|
||||
"Uses the regular wipe if no adjacent inner wall is already printed (single-wall areas or Outer/Inner wall order), or if no supported inward path can be found, for example at tight corners or seam gaps."
|
||||
msgstr ""
|
||||
"Platí pouze pro vnější stěny včetně obrysů otvorů. Během očištění posouvá horkou trysku směrem k vnitřním stěnám, aby se omezilo opětovné zahřívání čerstvě vytištěného plastu a stopy po švu.\n"
|
||||
"Platí pouze pro vnější stěny včetně obrysů otvorů. Během očištění posouvá horkou trysku směrem k již vytištěným vnitřním stěnám, aby se omezilo opětovné zahřívání čerstvě vytištěného plastu a stopy po švu.\n"
|
||||
"\n"
|
||||
"Obzvláště užitečné při výškách vrstvy pod 0,1 mm, kde jsou stopy po očištění výraznější.\n"
|
||||
"\n"
|
||||
"Použije běžné očištění tam, kde vnější stěna nemá sousední vnitřní stěnu, jako v oblastech s jedinou stěnou, nebo pokud nelze najít podepřenou dráhu dovnitř, například v ostrých rozích nebo v mezerách švu."
|
||||
"Použije běžné očištění, pokud není žádná sousední vnitřní stěna již vytištěná (oblasti s jedinou stěnou nebo pořadí stěn Vnější/Vnitřní) nebo pokud nelze najít podepřenou dráhu dovnitř, například v ostrých rozích nebo v mezerách švu."
|
||||
|
||||
# AI Translated
|
||||
msgid "Wipe inward distance"
|
||||
@@ -20428,15 +20428,11 @@ msgstr "Vzdálenost očištění dovnitř"
|
||||
msgid ""
|
||||
"The distance the wipe path is shifted away from the external perimeter, specified in millimeters or as a percentage of the actual outer-wall extrusion width.\n"
|
||||
"\n"
|
||||
"For example, 50% shifts the path by half of the outer-wall width. The effective offset is limited by both the actual outer-wall width and the available spacing to the adjacent wall, so values above 100% or an equivalent absolute distance have no additional effect. Set to 0 to disable the offset.\n"
|
||||
"\n"
|
||||
"With Outer/Inner or Inner/Outer/Inner wall order, the offset is limited to 50% of the actual outer-wall width because the adjacent inner wall is printed after the outer wall. This also applies to equivalent distances specified in millimeters."
|
||||
"For example, 50% shifts the path by half of the outer-wall width. The effective offset is limited by both the actual outer-wall width and the available spacing to the adjacent wall, so values above 100% or an equivalent absolute distance have no additional effect. Set to 0 to disable the offset."
|
||||
msgstr ""
|
||||
"Vzdálenost, o kterou se dráha očištění posune od vnějšího obvodu, uvedená v milimetrech nebo jako procento skutečné šířky extruze vnější stěny.\n"
|
||||
"\n"
|
||||
"Například 50% posune dráhu o polovinu šířky vnější stěny. Účinný posun je omezen jak skutečnou šířkou vnější stěny, tak dostupnou mezerou k sousední stěně, takže hodnoty nad 100% nebo odpovídající absolutní vzdálenost už nemají další účinek. Nastavením na 0 posun vypnete.\n"
|
||||
"\n"
|
||||
"Při pořadí stěn Vnější/Vnitřní nebo Vnitřní/vnější/vnitřní je posun omezen na 50% skutečné šířky vnější stěny, protože sousední vnitřní stěna se tiskne až po vnější stěně. Platí to i pro odpovídající vzdálenosti zadané v milimetrech."
|
||||
"Například 50% posune dráhu o polovinu šířky vnější stěny. Účinný posun je omezen jak skutečnou šířkou vnější stěny, tak dostupnou mezerou k sousední stěně, takže hodnoty nad 100% nebo odpovídající absolutní vzdálenost už nemají další účinek. Nastavením na 0 posun vypnete."
|
||||
|
||||
msgid "Wipe before external loop"
|
||||
msgstr "Očištění před vnějším okruhem"
|
||||
@@ -24751,7 +24747,7 @@ msgid "Klipper version => 0.9.0"
|
||||
msgstr "Verze Klipper => 0.9.0"
|
||||
|
||||
msgid ""
|
||||
"RepRapFirmware version => 3.4.0\n"
|
||||
"RepRap firmware version => 3.4.0\n"
|
||||
"Check your firmware documentation for supported shaper types."
|
||||
msgstr ""
|
||||
"Verze firmwaru RepRap => 3.4.0\n"
|
||||
@@ -24771,8 +24767,8 @@ msgstr "Y Začátek / Konec: "
|
||||
msgid "Frequency settings"
|
||||
msgstr "Nastavení frekvence"
|
||||
|
||||
msgid "RepRapFirmware uses the same frequency range for both axes."
|
||||
msgstr "RepRapFirmware používá stejný rozsah frekvence pro obě osy."
|
||||
msgid "RepRap firmware uses the same frequency range for both axes."
|
||||
msgstr "Firmware RepRap používá stejný rozsah frekvence pro obě osy."
|
||||
|
||||
msgid "Damp: "
|
||||
msgstr "Tlumení: "
|
||||
@@ -24811,8 +24807,8 @@ msgstr "Frekvence X / Y: "
|
||||
msgid "Damp (Start / End): "
|
||||
msgstr "Tlumení (Začátek / Konec): "
|
||||
|
||||
msgid "RepRapFirmware uses the same frequency for both axes."
|
||||
msgstr "RepRapFirmware používá stejnou frekvenci pro obě osy."
|
||||
msgid "RepRap firmware uses the same frequency for both axes."
|
||||
msgstr "Firmware RepRap používá stejnou frekvenci pro obě osy."
|
||||
|
||||
msgid "Note: Use previously calculated frequencies."
|
||||
msgstr "Poznámka: Použijte dříve vypočítané frekvence."
|
||||
|
||||
@@ -20058,17 +20058,17 @@ msgstr "Reinigen nach innen"
|
||||
|
||||
# AI Translated
|
||||
msgid ""
|
||||
"Applies only to external walls, including hole boundaries. Moves the hot nozzle toward the inner walls during wiping to reduce reheating of freshly printed plastic and seam marks.\n"
|
||||
"Applies only to external walls, including hole boundaries. Moves the hot nozzle toward printed inner walls during wiping to reduce reheating of freshly printed plastic and seam marks.\n"
|
||||
"\n"
|
||||
"Especially useful at layer heights below 0.1 mm, where wipe marks are more visible.\n"
|
||||
"\n"
|
||||
"Uses the regular wipe where the outer wall has no adjacent inner wall, such as in single-wall areas, or if no supported inward path can be found, for example at tight corners or seam gaps."
|
||||
"Uses the regular wipe if no adjacent inner wall is already printed (single-wall areas or Outer/Inner wall order), or if no supported inward path can be found, for example at tight corners or seam gaps."
|
||||
msgstr ""
|
||||
"Gilt nur für Außenwände, einschließlich Lochkonturen. Bewegt die heiße Düse beim Reinigen in Richtung der inneren Wände, um das erneute Aufschmelzen frisch gedruckten Kunststoffs und Nahtmarkierungen zu verringern.\n"
|
||||
"Gilt nur für Außenwände, einschließlich Lochkonturen. Bewegt die heiße Düse beim Reinigen in Richtung bereits gedruckter innerer Wände, um das erneute Aufschmelzen frisch gedruckten Kunststoffs und Nahtmarkierungen zu verringern.\n"
|
||||
"\n"
|
||||
"Besonders nützlich bei Schichthöhen unter 0,1 mm, wo Reinigungsspuren deutlicher sichtbar sind.\n"
|
||||
"\n"
|
||||
"Verwendet die normale Reinigung, wo die Außenwand keine angrenzende innere Wand hat, etwa in Bereichen mit nur einer Wand, oder wenn kein gestützter Weg nach innen gefunden werden kann, zum Beispiel an engen Ecken oder Nahtlücken."
|
||||
"Verwendet die normale Reinigung, wenn keine angrenzende innere Wand bereits gedruckt ist (Bereiche mit nur einer Wand oder die Wandreihenfolge Außen/Innen) oder wenn kein gestützter Weg nach innen gefunden werden kann, zum Beispiel an engen Ecken oder Nahtlücken."
|
||||
|
||||
# AI Translated
|
||||
msgid "Wipe inward distance"
|
||||
@@ -20079,15 +20079,11 @@ msgstr "Abstand für Reinigen nach innen"
|
||||
msgid ""
|
||||
"The distance the wipe path is shifted away from the external perimeter, specified in millimeters or as a percentage of the actual outer-wall extrusion width.\n"
|
||||
"\n"
|
||||
"For example, 50% shifts the path by half of the outer-wall width. The effective offset is limited by both the actual outer-wall width and the available spacing to the adjacent wall, so values above 100% or an equivalent absolute distance have no additional effect. Set to 0 to disable the offset.\n"
|
||||
"\n"
|
||||
"With Outer/Inner or Inner/Outer/Inner wall order, the offset is limited to 50% of the actual outer-wall width because the adjacent inner wall is printed after the outer wall. This also applies to equivalent distances specified in millimeters."
|
||||
"For example, 50% shifts the path by half of the outer-wall width. The effective offset is limited by both the actual outer-wall width and the available spacing to the adjacent wall, so values above 100% or an equivalent absolute distance have no additional effect. Set to 0 to disable the offset."
|
||||
msgstr ""
|
||||
"Der Abstand, um den der Reinigungsweg vom Außenperimeter weg verschoben wird, angegeben in Millimetern oder als Prozentsatz der tatsächlichen Extrusionsbreite der Außenwand.\n"
|
||||
"\n"
|
||||
"Zum Beispiel verschiebt 50% den Weg um die halbe Außenwandbreite. Der wirksame Versatz wird sowohl durch die tatsächliche Außenwandbreite als auch durch den verfügbaren Abstand zur benachbarten Wand begrenzt, sodass Werte über 100% oder ein entsprechender absoluter Abstand keine zusätzliche Wirkung haben. Auf 0 setzen, um den Versatz zu deaktivieren.\n"
|
||||
"\n"
|
||||
"Bei der Wandreihenfolge Außen/Innen oder Innen/Außen/Innen ist der Versatz auf 50% der tatsächlichen Außenwandbreite begrenzt, da die angrenzende innere Wand nach der Außenwand gedruckt wird. Dies gilt auch für entsprechende Abstände in Millimetern."
|
||||
"Zum Beispiel verschiebt 50% den Weg um die halbe Außenwandbreite. Der wirksame Versatz wird sowohl durch die tatsächliche Außenwandbreite als auch durch den verfügbaren Abstand zur benachbarten Wand begrenzt, sodass Werte über 100% oder ein entsprechender absoluter Abstand keine zusätzliche Wirkung haben. Auf 0 setzen, um den Versatz zu deaktivieren."
|
||||
|
||||
msgid "Wipe before external loop"
|
||||
msgstr "Wischbewegung vor äußerer Schleife"
|
||||
@@ -24366,10 +24362,10 @@ msgid "Klipper version => 0.9.0"
|
||||
msgstr "Klipper Version => 0.9.0"
|
||||
|
||||
msgid ""
|
||||
"RepRapFirmware version => 3.4.0\n"
|
||||
"RepRap firmware version => 3.4.0\n"
|
||||
"Check your firmware documentation for supported shaper types."
|
||||
msgstr ""
|
||||
"RepRapFirmware Version => 3.4.0\n"
|
||||
"RepRap-Firmware Version => 3.4.0\n"
|
||||
"Überprüfen Sie die Dokumentation Ihrer Firmware auf unterstützte Shaper-Typen."
|
||||
|
||||
msgid "Frequency (Start / End): "
|
||||
@@ -24386,8 +24382,8 @@ msgstr "Y Start / Ende: "
|
||||
msgid "Frequency settings"
|
||||
msgstr "Frequenz Einstellungen"
|
||||
|
||||
msgid "RepRapFirmware uses the same frequency range for both axes."
|
||||
msgstr "RepRapFirmware verwendet denselben Frequenzbereich für beide Achsen."
|
||||
msgid "RepRap firmware uses the same frequency range for both axes."
|
||||
msgstr "RepRap-Firmware verwendet denselben Frequenzbereich für beide Achsen."
|
||||
|
||||
msgid "Damp: "
|
||||
msgstr "Dämpfung: "
|
||||
@@ -24426,8 +24422,8 @@ msgstr "Frequenz X / Y: "
|
||||
msgid "Damp (Start / End): "
|
||||
msgstr "Dämpfung (Start / Ende): "
|
||||
|
||||
msgid "RepRapFirmware uses the same frequency for both axes."
|
||||
msgstr "RepRapFirmware verwendet dieselbe Frequenz für beide Achsen."
|
||||
msgid "RepRap firmware uses the same frequency for both axes."
|
||||
msgstr "RepRap-Firmware verwendet dieselbe Frequenz für beide Achsen."
|
||||
|
||||
msgid "Note: Use previously calculated frequencies."
|
||||
msgstr "Hinweis: Verwenden Sie zuvor berechnete Frequenzen."
|
||||
|
||||
@@ -17743,11 +17743,11 @@ msgid "Wipe inward"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"Applies only to external walls, including hole boundaries. Moves the hot nozzle toward the inner walls during wiping to reduce reheating of freshly printed plastic and seam marks.\n"
|
||||
"Applies only to external walls, including hole boundaries. Moves the hot nozzle toward printed inner walls during wiping to reduce reheating of freshly printed plastic and seam marks.\n"
|
||||
"\n"
|
||||
"Especially useful at layer heights below 0.1 mm, where wipe marks are more visible.\n"
|
||||
"\n"
|
||||
"Uses the regular wipe where the outer wall has no adjacent inner wall, such as in single-wall areas, or if no supported inward path can be found, for example at tight corners or seam gaps."
|
||||
"Uses the regular wipe if no adjacent inner wall is already printed (single-wall areas or Outer/Inner wall order), or if no supported inward path can be found, for example at tight corners or seam gaps."
|
||||
msgstr ""
|
||||
|
||||
msgid "Wipe inward distance"
|
||||
@@ -17757,9 +17757,7 @@ msgstr ""
|
||||
msgid ""
|
||||
"The distance the wipe path is shifted away from the external perimeter, specified in millimeters or as a percentage of the actual outer-wall extrusion width.\n"
|
||||
"\n"
|
||||
"For example, 50% shifts the path by half of the outer-wall width. The effective offset is limited by both the actual outer-wall width and the available spacing to the adjacent wall, so values above 100% or an equivalent absolute distance have no additional effect. Set to 0 to disable the offset.\n"
|
||||
"\n"
|
||||
"With Outer/Inner or Inner/Outer/Inner wall order, the offset is limited to 50% of the actual outer-wall width because the adjacent inner wall is printed after the outer wall. This also applies to equivalent distances specified in millimeters."
|
||||
"For example, 50% shifts the path by half of the outer-wall width. The effective offset is limited by both the actual outer-wall width and the available spacing to the adjacent wall, so values above 100% or an equivalent absolute distance have no additional effect. Set to 0 to disable the offset."
|
||||
msgstr ""
|
||||
|
||||
msgid "Wipe before external loop"
|
||||
@@ -21376,7 +21374,7 @@ msgid "Klipper version => 0.9.0"
|
||||
msgstr ""
|
||||
|
||||
msgid ""
|
||||
"RepRapFirmware version => 3.4.0\n"
|
||||
"RepRap firmware version => 3.4.0\n"
|
||||
"Check your firmware documentation for supported shaper types."
|
||||
msgstr ""
|
||||
|
||||
@@ -21392,7 +21390,7 @@ msgstr ""
|
||||
msgid "Frequency settings"
|
||||
msgstr ""
|
||||
|
||||
msgid "RepRapFirmware uses the same frequency range for both axes."
|
||||
msgid "RepRap firmware uses the same frequency range for both axes."
|
||||
msgstr ""
|
||||
|
||||
msgid "Damp: "
|
||||
@@ -21426,7 +21424,7 @@ msgstr ""
|
||||
msgid "Damp (Start / End): "
|
||||
msgstr ""
|
||||
|
||||
msgid "RepRapFirmware uses the same frequency for both axes."
|
||||
msgid "RepRap firmware uses the same frequency for both axes."
|
||||
msgstr ""
|
||||
|
||||
msgid "Note: Use previously calculated frequencies."
|
||||
|
||||
@@ -19646,17 +19646,17 @@ msgstr "Purgado hacia dentro"
|
||||
|
||||
# AI Translated
|
||||
msgid ""
|
||||
"Applies only to external walls, including hole boundaries. Moves the hot nozzle toward the inner walls during wiping to reduce reheating of freshly printed plastic and seam marks.\n"
|
||||
"Applies only to external walls, including hole boundaries. Moves the hot nozzle toward printed inner walls during wiping to reduce reheating of freshly printed plastic and seam marks.\n"
|
||||
"\n"
|
||||
"Especially useful at layer heights below 0.1 mm, where wipe marks are more visible.\n"
|
||||
"\n"
|
||||
"Uses the regular wipe where the outer wall has no adjacent inner wall, such as in single-wall areas, or if no supported inward path can be found, for example at tight corners or seam gaps."
|
||||
"Uses the regular wipe if no adjacent inner wall is already printed (single-wall areas or Outer/Inner wall order), or if no supported inward path can be found, for example at tight corners or seam gaps."
|
||||
msgstr ""
|
||||
"Se aplica solo a los perímetros externos, incluidos los contornos de los agujeros. Durante el purgado mueve la boquilla caliente hacia los perímetros internos para reducir el recalentamiento del plástico recién depositado y las marcas de costura.\n"
|
||||
"Se aplica solo a los perímetros externos, incluidos los contornos de los agujeros. Durante el purgado mueve la boquilla caliente hacia los perímetros internos ya impresos para reducir el recalentamiento del plástico recién depositado y las marcas de costura.\n"
|
||||
"\n"
|
||||
"Es especialmente útil con alturas de capa por debajo de 0,1 mm, donde las marcas de purgado se ven más.\n"
|
||||
"\n"
|
||||
"Usa el purgado normal donde el perímetro externo no tiene ningún perímetro interno contiguo, como en zonas de un solo perímetro, o si no se encuentra ninguna trayectoria hacia dentro con apoyo, por ejemplo en esquinas cerradas o huecos de costura."
|
||||
"Usa el purgado normal si no hay ningún perímetro interno contiguo ya impreso (zonas de un solo perímetro u orden de perímetros Exterior/Interior) o si no se encuentra ninguna trayectoria hacia dentro con apoyo, por ejemplo en esquinas cerradas o huecos de costura."
|
||||
|
||||
# AI Translated
|
||||
msgid "Wipe inward distance"
|
||||
@@ -19667,15 +19667,11 @@ msgstr "Distancia de purgado hacia dentro"
|
||||
msgid ""
|
||||
"The distance the wipe path is shifted away from the external perimeter, specified in millimeters or as a percentage of the actual outer-wall extrusion width.\n"
|
||||
"\n"
|
||||
"For example, 50% shifts the path by half of the outer-wall width. The effective offset is limited by both the actual outer-wall width and the available spacing to the adjacent wall, so values above 100% or an equivalent absolute distance have no additional effect. Set to 0 to disable the offset.\n"
|
||||
"\n"
|
||||
"With Outer/Inner or Inner/Outer/Inner wall order, the offset is limited to 50% of the actual outer-wall width because the adjacent inner wall is printed after the outer wall. This also applies to equivalent distances specified in millimeters."
|
||||
"For example, 50% shifts the path by half of the outer-wall width. The effective offset is limited by both the actual outer-wall width and the available spacing to the adjacent wall, so values above 100% or an equivalent absolute distance have no additional effect. Set to 0 to disable the offset."
|
||||
msgstr ""
|
||||
"Distancia que se desplaza la trayectoria de purgado alejándose del perímetro externo, indicada en milímetros o como porcentaje del ancho de extrusión real del perímetro externo.\n"
|
||||
"\n"
|
||||
"Por ejemplo, 50% desplaza la trayectoria la mitad del ancho del perímetro externo. El desplazamiento efectivo está limitado tanto por el ancho real del perímetro externo como por el espacio disponible hasta el perímetro contiguo, por lo que valores por encima de 100% o una distancia absoluta equivalente no tienen ningún efecto adicional. Ponga 0 para desactivar el desplazamiento.\n"
|
||||
"\n"
|
||||
"Con el orden de perímetros Exterior/Interior o Interior/Exterior/Interior, el desplazamiento se limita al 50% del ancho real del perímetro externo, porque el perímetro interno contiguo se imprime después del perímetro externo. Esto también se aplica a las distancias equivalentes indicadas en milímetros."
|
||||
"Por ejemplo, 50% desplaza la trayectoria la mitad del ancho del perímetro externo. El desplazamiento efectivo está limitado tanto por el ancho real del perímetro externo como por el espacio disponible hasta el perímetro contiguo, por lo que valores por encima de 100% o una distancia absoluta equivalente no tienen ningún efecto adicional. Ponga 0 para desactivar el desplazamiento."
|
||||
|
||||
msgid "Wipe before external loop"
|
||||
msgstr "Purgado antes del bucle externo"
|
||||
@@ -23926,10 +23922,10 @@ msgid "Klipper version => 0.9.0"
|
||||
msgstr "Versión de Klipper => 0.9.0"
|
||||
|
||||
msgid ""
|
||||
"RepRapFirmware version => 3.4.0\n"
|
||||
"RepRap firmware version => 3.4.0\n"
|
||||
"Check your firmware documentation for supported shaper types."
|
||||
msgstr ""
|
||||
"RepRapFirmware version => 3.4.0\n"
|
||||
"RepRap firmware version => 3.4.0\n"
|
||||
"Consulte la documentación del firmware para conocer los tipos de shaper compatibles."
|
||||
|
||||
msgid "Frequency (Start / End): "
|
||||
@@ -23946,8 +23942,8 @@ msgstr "Y Inicio / Fin: "
|
||||
msgid "Frequency settings"
|
||||
msgstr "Ajustes de frecuencia"
|
||||
|
||||
msgid "RepRapFirmware uses the same frequency range for both axes."
|
||||
msgstr "El RepRapFirmware utiliza el mismo rango de frecuencia para ambos ejes."
|
||||
msgid "RepRap firmware uses the same frequency range for both axes."
|
||||
msgstr "El firmware RepRap utiliza el mismo rango de frecuencia para ambos ejes."
|
||||
|
||||
msgid "Damp: "
|
||||
msgstr "Amortiguación: "
|
||||
@@ -23986,8 +23982,8 @@ msgstr "Frecuencia X / Y: "
|
||||
msgid "Damp (Start / End): "
|
||||
msgstr "Amortiguación (Inicio / Fin): "
|
||||
|
||||
msgid "RepRapFirmware uses the same frequency for both axes."
|
||||
msgstr "El RepRapFirmware utiliza la misma frecuencia para ambos ejes."
|
||||
msgid "RepRap firmware uses the same frequency for both axes."
|
||||
msgstr "El firmware RepRap utiliza la misma frecuencia para ambos ejes."
|
||||
|
||||
msgid "Note: Use previously calculated frequencies."
|
||||
msgstr "Nota: Utilice las frecuencias calculadas previamente."
|
||||
|
||||
@@ -19853,17 +19853,17 @@ msgstr "Garbitu barrurantz"
|
||||
|
||||
# AI Translated
|
||||
msgid ""
|
||||
"Applies only to external walls, including hole boundaries. Moves the hot nozzle toward the inner walls during wiping to reduce reheating of freshly printed plastic and seam marks.\n"
|
||||
"Applies only to external walls, including hole boundaries. Moves the hot nozzle toward printed inner walls during wiping to reduce reheating of freshly printed plastic and seam marks.\n"
|
||||
"\n"
|
||||
"Especially useful at layer heights below 0.1 mm, where wipe marks are more visible.\n"
|
||||
"\n"
|
||||
"Uses the regular wipe where the outer wall has no adjacent inner wall, such as in single-wall areas, or if no supported inward path can be found, for example at tight corners or seam gaps."
|
||||
"Uses the regular wipe if no adjacent inner wall is already printed (single-wall areas or Outer/Inner wall order), or if no supported inward path can be found, for example at tight corners or seam gaps."
|
||||
msgstr ""
|
||||
"Kanpoko hormei soilik aplikatzen zaie, zuloen mugak barne. Garbitzean pita beroa barruko hormetarantz mugitzen du, inprimatu berri den plastikoa berriro berotzea eta jostura-markak murrizteko.\n"
|
||||
"Kanpoko hormei soilik aplikatzen zaie, zuloen mugak barne. Garbitzean pita beroa jada inprimatutako barruko hormetarantz mugitzen du, inprimatu berri den plastikoa berriro berotzea eta jostura-markak murrizteko.\n"
|
||||
"\n"
|
||||
"Bereziki erabilgarria da 0,1 mm-tik beherako geruza-altueretan, non garbiketa-markak nabarmenago ikusten diren.\n"
|
||||
"\n"
|
||||
"Garbiketa arrunta erabiltzen du kanpoko hormak ondoan barruko hormarik ez duen lekuetan, hala nola horma bakarreko eremuetan, edo euskarria duen barrurako biderik aurkitzen ez bada, adibidez izkina estuetan edo josturako hutsuneetan."
|
||||
"Garbiketa arrunta erabiltzen du ondoko barruko hormarik jada inprimatuta ez badago (horma bakarreko eremuak edo Kanpokoa/Barrukoa hormen ordena) edo euskarria duen barrurako biderik aurkitzen ez bada, adibidez izkina estuetan edo josturako hutsuneetan."
|
||||
|
||||
# AI Translated
|
||||
msgid "Wipe inward distance"
|
||||
@@ -19874,15 +19874,11 @@ msgstr "Barrurako garbiketa-distantzia"
|
||||
msgid ""
|
||||
"The distance the wipe path is shifted away from the external perimeter, specified in millimeters or as a percentage of the actual outer-wall extrusion width.\n"
|
||||
"\n"
|
||||
"For example, 50% shifts the path by half of the outer-wall width. The effective offset is limited by both the actual outer-wall width and the available spacing to the adjacent wall, so values above 100% or an equivalent absolute distance have no additional effect. Set to 0 to disable the offset.\n"
|
||||
"\n"
|
||||
"With Outer/Inner or Inner/Outer/Inner wall order, the offset is limited to 50% of the actual outer-wall width because the adjacent inner wall is printed after the outer wall. This also applies to equivalent distances specified in millimeters."
|
||||
"For example, 50% shifts the path by half of the outer-wall width. The effective offset is limited by both the actual outer-wall width and the available spacing to the adjacent wall, so values above 100% or an equivalent absolute distance have no additional effect. Set to 0 to disable the offset."
|
||||
msgstr ""
|
||||
"Garbiketa-ibilbidea kanpoko perimetrotik zenbat desplazatzen den, milimetrotan edo kanpoko hormaren benetako estrusio-zabaleraren ehuneko gisa adierazita.\n"
|
||||
"\n"
|
||||
"Adibidez, 50% ibilbideak kanpoko hormaren zabaleraren erdia desplazatzen du. Desplazamendu eraginkorra mugatuta dago bai kanpoko hormaren benetako zabaleragatik bai ondoko hormarainoko tarte erabilgarriagatik; beraz, 100% baino handiagoko balioek edo baliokidea den distantzia absolutu batek ez dute eragin gehigarririk. Ezarri 0 desplazamendua desgaitzeko.\n"
|
||||
"\n"
|
||||
"Kanpokoa/Barrukoa edo Barrukoa/Kanpokoa/Barrukoa hormen ordenarekin, desplazamendua gehienez kanpoko hormaren benetako zabaleraren 50% izan daiteke, ondoko barruko horma kanpoko hormaren ondoren inprimatzen delako. Hori milimetrotan adierazitako distantzia baliokideei ere aplikatzen zaie."
|
||||
"Adibidez, 50% ibilbideak kanpoko hormaren zabaleraren erdia desplazatzen du. Desplazamendu eraginkorra mugatuta dago bai kanpoko hormaren benetako zabaleragatik bai ondoko hormarainoko tarte erabilgarriagatik; beraz, 100% baino handiagoko balioek edo baliokidea den distantzia absolutu batek ez dute eragin gehigarririk. Ezarri 0 desplazamendua desgaitzeko."
|
||||
|
||||
msgid "Wipe before external loop"
|
||||
msgstr "Garbitu kanpoko begizta baino lehen"
|
||||
@@ -24145,10 +24141,10 @@ msgid "Klipper version => 0.9.0"
|
||||
msgstr "Klipper bertsioa => 0.9.0"
|
||||
|
||||
msgid ""
|
||||
"RepRapFirmware version => 3.4.0\n"
|
||||
"RepRap firmware version => 3.4.0\n"
|
||||
"Check your firmware documentation for supported shaper types."
|
||||
msgstr ""
|
||||
"RepRapFirmware bertsioa => 3.4.0\n"
|
||||
"RepRap firmwarearen bertsioa => 3.4.0\n"
|
||||
"Begiratu zure firmwarearen dokumentazioa onartutako moldatzaile motak ezagutzeko."
|
||||
|
||||
msgid "Frequency (Start / End): "
|
||||
@@ -24165,8 +24161,8 @@ msgstr "Y hasiera / amaiera: "
|
||||
msgid "Frequency settings"
|
||||
msgstr "Maiztasun-ezarpenak"
|
||||
|
||||
msgid "RepRapFirmware uses the same frequency range for both axes."
|
||||
msgstr "RepRapFirmware maiztasun-tarte bera erabiltzen du bi ardatzetarako."
|
||||
msgid "RepRap firmware uses the same frequency range for both axes."
|
||||
msgstr "RepRap firmwareak maiztasun-tarte bera erabiltzen du bi ardatzetarako."
|
||||
|
||||
msgid "Damp: "
|
||||
msgstr "Moteltzea: "
|
||||
@@ -24205,8 +24201,8 @@ msgstr "Maiztasuna X / Y: "
|
||||
msgid "Damp (Start / End): "
|
||||
msgstr "Moteltzea (hasiera / amaiera): "
|
||||
|
||||
msgid "RepRapFirmware uses the same frequency for both axes."
|
||||
msgstr "RepRapFirmware maiztasun bera erabiltzen du bi ardatzetarako."
|
||||
msgid "RepRap firmware uses the same frequency for both axes."
|
||||
msgstr "RepRap firmwareak maiztasun bera erabiltzen du bi ardatzetarako."
|
||||
|
||||
msgid "Note: Use previously calculated frequencies."
|
||||
msgstr "Oharra: erabili aurrez kalkulatutako maiztasunak."
|
||||
|
||||
@@ -19839,17 +19839,17 @@ msgstr "Essuyage vers l'intérieur"
|
||||
|
||||
# AI Translated
|
||||
msgid ""
|
||||
"Applies only to external walls, including hole boundaries. Moves the hot nozzle toward the inner walls during wiping to reduce reheating of freshly printed plastic and seam marks.\n"
|
||||
"Applies only to external walls, including hole boundaries. Moves the hot nozzle toward printed inner walls during wiping to reduce reheating of freshly printed plastic and seam marks.\n"
|
||||
"\n"
|
||||
"Especially useful at layer heights below 0.1 mm, where wipe marks are more visible.\n"
|
||||
"\n"
|
||||
"Uses the regular wipe where the outer wall has no adjacent inner wall, such as in single-wall areas, or if no supported inward path can be found, for example at tight corners or seam gaps."
|
||||
"Uses the regular wipe if no adjacent inner wall is already printed (single-wall areas or Outer/Inner wall order), or if no supported inward path can be found, for example at tight corners or seam gaps."
|
||||
msgstr ""
|
||||
"S'applique uniquement aux parois extérieures, contours des trous compris. Déplace la buse chaude vers les parois intérieures pendant l'essuyage, afin de limiter le réchauffement du plastique fraîchement déposé et les marques de couture.\n"
|
||||
"S'applique uniquement aux parois extérieures, contours des trous compris. Déplace la buse chaude vers les parois intérieures déjà imprimées pendant l'essuyage, afin de limiter le réchauffement du plastique fraîchement déposé et les marques de couture.\n"
|
||||
"\n"
|
||||
"Particulièrement utile pour des hauteurs de couche inférieures à 0,1 mm, où les marques d'essuyage sont plus visibles.\n"
|
||||
"\n"
|
||||
"Utilise l'essuyage normal là où la paroi extérieure n'a pas de paroi intérieure adjacente, comme dans les zones à paroi unique, ou si aucun chemin vers l'intérieur soutenu n'est trouvé, par exemple dans les angles serrés ou aux interruptions de couture."
|
||||
"Utilise l'essuyage normal si aucune paroi intérieure adjacente n'est déjà imprimée (zones à paroi unique ou ordre des parois Extérieur/Intérieur), ou si aucun chemin vers l'intérieur soutenu n'est trouvé, par exemple dans les angles serrés ou aux interruptions de couture."
|
||||
|
||||
# AI Translated
|
||||
msgid "Wipe inward distance"
|
||||
@@ -19860,15 +19860,11 @@ msgstr "Distance d'essuyage vers l'intérieur"
|
||||
msgid ""
|
||||
"The distance the wipe path is shifted away from the external perimeter, specified in millimeters or as a percentage of the actual outer-wall extrusion width.\n"
|
||||
"\n"
|
||||
"For example, 50% shifts the path by half of the outer-wall width. The effective offset is limited by both the actual outer-wall width and the available spacing to the adjacent wall, so values above 100% or an equivalent absolute distance have no additional effect. Set to 0 to disable the offset.\n"
|
||||
"\n"
|
||||
"With Outer/Inner or Inner/Outer/Inner wall order, the offset is limited to 50% of the actual outer-wall width because the adjacent inner wall is printed after the outer wall. This also applies to equivalent distances specified in millimeters."
|
||||
"For example, 50% shifts the path by half of the outer-wall width. The effective offset is limited by both the actual outer-wall width and the available spacing to the adjacent wall, so values above 100% or an equivalent absolute distance have no additional effect. Set to 0 to disable the offset."
|
||||
msgstr ""
|
||||
"Distance dont le chemin d'essuyage est décalé par rapport au périmètre extérieur, exprimée en millimètres ou en pourcentage de la largeur d'extrusion réelle de la paroi extérieure.\n"
|
||||
"\n"
|
||||
"Par exemple, 50% décale le chemin de la moitié de la largeur de la paroi extérieure. Le décalage effectif est limité à la fois par la largeur réelle de la paroi extérieure et par l'espace disponible jusqu'à la paroi adjacente : les valeurs supérieures à 100% ou une distance absolue équivalente n'ont donc aucun effet supplémentaire. Mettez 0 pour désactiver le décalage.\n"
|
||||
"\n"
|
||||
"Avec l'ordre des parois Extérieur/Intérieur ou Intérieur/Extérieur/Intérieur, le décalage est limité à 50% de la largeur réelle de la paroi extérieure, car la paroi intérieure adjacente est imprimée après la paroi extérieure. Cela s'applique aussi aux distances équivalentes exprimées en millimètres."
|
||||
"Par exemple, 50% décale le chemin de la moitié de la largeur de la paroi extérieure. Le décalage effectif est limité à la fois par la largeur réelle de la paroi extérieure et par l'espace disponible jusqu'à la paroi adjacente : les valeurs supérieures à 100% ou une distance absolue équivalente n'ont donc aucun effet supplémentaire. Mettez 0 pour désactiver le décalage."
|
||||
|
||||
msgid "Wipe before external loop"
|
||||
msgstr "Essuyer avant la boucle externe"
|
||||
@@ -24136,10 +24132,10 @@ msgid "Klipper version => 0.9.0"
|
||||
msgstr "Version Klipper => 0.9.0"
|
||||
|
||||
msgid ""
|
||||
"RepRapFirmware version => 3.4.0\n"
|
||||
"RepRap firmware version => 3.4.0\n"
|
||||
"Check your firmware documentation for supported shaper types."
|
||||
msgstr ""
|
||||
"RepRapFirmware version => 3.4.0\n"
|
||||
"RepRap firmware version => 3.4.0\n"
|
||||
"Consultez la documentation de votre firmware pour les types de compensateur pris en charge."
|
||||
|
||||
msgid "Frequency (Start / End): "
|
||||
@@ -24156,8 +24152,8 @@ msgstr "Y Début / Fin : "
|
||||
msgid "Frequency settings"
|
||||
msgstr "Paramètres de fréquence"
|
||||
|
||||
msgid "RepRapFirmware uses the same frequency range for both axes."
|
||||
msgstr "Le RepRapFirmware utilise la même plage de fréquence pour les deux axes."
|
||||
msgid "RepRap firmware uses the same frequency range for both axes."
|
||||
msgstr "Le firmware RepRap utilise la même plage de fréquence pour les deux axes."
|
||||
|
||||
msgid "Damp: "
|
||||
msgstr "Amortissement : "
|
||||
@@ -24196,8 +24192,8 @@ msgstr "Fréquence X / Y : "
|
||||
msgid "Damp (Start / End): "
|
||||
msgstr "Amortissement (début / fin) : "
|
||||
|
||||
msgid "RepRapFirmware uses the same frequency for both axes."
|
||||
msgstr "Le RepRapFirmware utilise la même fréquence pour les deux axes."
|
||||
msgid "RepRap firmware uses the same frequency for both axes."
|
||||
msgstr "Le firmware RepRap utilise la même fréquence pour les deux axes."
|
||||
|
||||
msgid "Note: Use previously calculated frequencies."
|
||||
msgstr "Note : Utiliser les fréquences précédemment calculées."
|
||||
|
||||
@@ -20275,17 +20275,17 @@ msgstr "Törlés befelé"
|
||||
|
||||
# AI Translated
|
||||
msgid ""
|
||||
"Applies only to external walls, including hole boundaries. Moves the hot nozzle toward the inner walls during wiping to reduce reheating of freshly printed plastic and seam marks.\n"
|
||||
"Applies only to external walls, including hole boundaries. Moves the hot nozzle toward printed inner walls during wiping to reduce reheating of freshly printed plastic and seam marks.\n"
|
||||
"\n"
|
||||
"Especially useful at layer heights below 0.1 mm, where wipe marks are more visible.\n"
|
||||
"\n"
|
||||
"Uses the regular wipe where the outer wall has no adjacent inner wall, such as in single-wall areas, or if no supported inward path can be found, for example at tight corners or seam gaps."
|
||||
"Uses the regular wipe if no adjacent inner wall is already printed (single-wall areas or Outer/Inner wall order), or if no supported inward path can be found, for example at tight corners or seam gaps."
|
||||
msgstr ""
|
||||
"Csak a külső falakra vonatkozik, beleértve a furatok kontúrjait is. Törlés közben a forró fúvókát a belső falak felé mozgatja, hogy csökkentse a frissen nyomtatott műanyag újramelegedését és a varratnyomokat.\n"
|
||||
"Csak a külső falakra vonatkozik, beleértve a furatok kontúrjait is. Törlés közben a forró fúvókát a már kinyomtatott belső falak felé mozgatja, hogy csökkentse a frissen nyomtatott műanyag újramelegedését és a varratnyomokat.\n"
|
||||
"\n"
|
||||
"Különösen hasznos 0,1 mm alatti rétegmagasságnál, ahol a törlésnyomok jobban látszanak.\n"
|
||||
"\n"
|
||||
"A szokásos törlést használja ott, ahol a külső falnak nincs szomszédos belső fala, mint az egyfalú területeken, illetve ha nem található alátámasztott befelé vezető útvonal, például szűk sarkoknál vagy varrathézagoknál."
|
||||
"A szokásos törlést használja, ha nincs még kinyomtatott szomszédos belső fal (egyfalú területek vagy Külső/Belső falsorrend), illetve ha nem található alátámasztott befelé vezető útvonal, például szűk sarkoknál vagy varrathézagoknál."
|
||||
|
||||
# AI Translated
|
||||
msgid "Wipe inward distance"
|
||||
@@ -20296,15 +20296,11 @@ msgstr "Törlés befelé távolsága"
|
||||
msgid ""
|
||||
"The distance the wipe path is shifted away from the external perimeter, specified in millimeters or as a percentage of the actual outer-wall extrusion width.\n"
|
||||
"\n"
|
||||
"For example, 50% shifts the path by half of the outer-wall width. The effective offset is limited by both the actual outer-wall width and the available spacing to the adjacent wall, so values above 100% or an equivalent absolute distance have no additional effect. Set to 0 to disable the offset.\n"
|
||||
"\n"
|
||||
"With Outer/Inner or Inner/Outer/Inner wall order, the offset is limited to 50% of the actual outer-wall width because the adjacent inner wall is printed after the outer wall. This also applies to equivalent distances specified in millimeters."
|
||||
"For example, 50% shifts the path by half of the outer-wall width. The effective offset is limited by both the actual outer-wall width and the available spacing to the adjacent wall, so values above 100% or an equivalent absolute distance have no additional effect. Set to 0 to disable the offset."
|
||||
msgstr ""
|
||||
"Az a távolság, amennyivel a törlési útvonal eltolódik a külső kerülettől, milliméterben vagy a külső fal tényleges extrudálási szélességének százalékában megadva.\n"
|
||||
"\n"
|
||||
"Például az 50% a külső fal szélességének felével tolja el az útvonalat. A tényleges eltolást korlátozza a külső fal tényleges szélessége és a szomszédos falig rendelkezésre álló hely is, ezért a 100% feletti értékeknek vagy az ezzel egyenértékű abszolút távolságnak nincs további hatása. Az eltolás kikapcsolásához állítsd 0-ra.\n"
|
||||
"\n"
|
||||
"Külső/Belső vagy Belső/Külső/Belső falsorrend esetén az eltolás legfeljebb a külső fal tényleges szélességének 50%-a lehet, mert a szomszédos belső fal a külső fal után nyomtatódik. Ez a milliméterben megadott egyenértékű távolságokra is vonatkozik."
|
||||
"Például az 50% a külső fal szélességének felével tolja el az útvonalat. A tényleges eltolást korlátozza a külső fal tényleges szélessége és a szomszédos falig rendelkezésre álló hely is, ezért a 100% feletti értékeknek vagy az ezzel egyenértékű abszolút távolságnak nincs további hatása. Az eltolás kikapcsolásához állítsd 0-ra."
|
||||
|
||||
msgid "Wipe before external loop"
|
||||
msgstr "Törlés a külső hurok előtt"
|
||||
@@ -24610,10 +24606,10 @@ msgid "Klipper version => 0.9.0"
|
||||
msgstr "Klipper verzió => 0.9.0"
|
||||
|
||||
msgid ""
|
||||
"RepRapFirmware version => 3.4.0\n"
|
||||
"RepRap firmware version => 3.4.0\n"
|
||||
"Check your firmware documentation for supported shaper types."
|
||||
msgstr ""
|
||||
"RepRapFirmware-verzió => 3.4.0\n"
|
||||
"RepRap firmware-verzió => 3.4.0\n"
|
||||
"Ellenőrizd a firmware dokumentációját a támogatott rezgéskompenzátor-típusokhoz."
|
||||
|
||||
msgid "Frequency (Start / End): "
|
||||
@@ -24630,8 +24626,8 @@ msgstr "Y Kezdés / Vég: "
|
||||
msgid "Frequency settings"
|
||||
msgstr "Frekvenciabeállítások"
|
||||
|
||||
msgid "RepRapFirmware uses the same frequency range for both axes."
|
||||
msgstr "A RepRapFirmware mindkét tengelyhez ugyanazt a frekvenciatartományt használja."
|
||||
msgid "RepRap firmware uses the same frequency range for both axes."
|
||||
msgstr "A RepRap firmware mindkét tengelyhez ugyanazt a frekvenciatartományt használja."
|
||||
|
||||
msgid "Damp: "
|
||||
msgstr "Csillapítás: "
|
||||
@@ -24670,8 +24666,8 @@ msgstr "Frekvencia X / Y: "
|
||||
msgid "Damp (Start / End): "
|
||||
msgstr "Csillapítás (kezdés / vég): "
|
||||
|
||||
msgid "RepRapFirmware uses the same frequency for both axes."
|
||||
msgstr "A RepRapFirmware mindkét tengelyhez ugyanazt a frekvenciát használja."
|
||||
msgid "RepRap firmware uses the same frequency for both axes."
|
||||
msgstr "A RepRap firmware mindkét tengelyhez ugyanazt a frekvenciát használja."
|
||||
|
||||
msgid "Note: Use previously calculated frequencies."
|
||||
msgstr "Megjegyzés: Használd a korábban kiszámított frekvenciákat."
|
||||
|
||||
@@ -20163,17 +20163,17 @@ msgstr "Spurgo verso l'interno"
|
||||
|
||||
# AI Translated
|
||||
msgid ""
|
||||
"Applies only to external walls, including hole boundaries. Moves the hot nozzle toward the inner walls during wiping to reduce reheating of freshly printed plastic and seam marks.\n"
|
||||
"Applies only to external walls, including hole boundaries. Moves the hot nozzle toward printed inner walls during wiping to reduce reheating of freshly printed plastic and seam marks.\n"
|
||||
"\n"
|
||||
"Especially useful at layer heights below 0.1 mm, where wipe marks are more visible.\n"
|
||||
"\n"
|
||||
"Uses the regular wipe where the outer wall has no adjacent inner wall, such as in single-wall areas, or if no supported inward path can be found, for example at tight corners or seam gaps."
|
||||
"Uses the regular wipe if no adjacent inner wall is already printed (single-wall areas or Outer/Inner wall order), or if no supported inward path can be found, for example at tight corners or seam gaps."
|
||||
msgstr ""
|
||||
"Si applica solo alle pareti esterne, inclusi i contorni dei fori. Durante lo spurgo sposta l'ugello caldo verso le pareti interne, per ridurre il riscaldamento della plastica appena depositata e i segni di cucitura.\n"
|
||||
"Si applica solo alle pareti esterne, inclusi i contorni dei fori. Durante lo spurgo sposta l'ugello caldo verso le pareti interne già stampate, per ridurre il riscaldamento della plastica appena depositata e i segni di cucitura.\n"
|
||||
"\n"
|
||||
"Particolarmente utile con altezze strato inferiori a 0,1 mm, dove i segni di spurgo sono più visibili.\n"
|
||||
"\n"
|
||||
"Usa lo spurgo normale dove la parete esterna non ha una parete interna adiacente, come nelle zone a parete singola, o se non si trova un percorso verso l'interno che sia supportato, ad esempio in angoli stretti o in corrispondenza di interruzioni della cucitura."
|
||||
"Usa lo spurgo normale se nessuna parete interna adiacente è già stata stampata (zone a parete singola oppure ordine delle pareti Esterna/Interna) o se non si trova un percorso verso l'interno che sia supportato, ad esempio in angoli stretti o in corrispondenza di interruzioni della cucitura."
|
||||
|
||||
# AI Translated
|
||||
msgid "Wipe inward distance"
|
||||
@@ -20184,15 +20184,11 @@ msgstr "Distanza di spurgo verso l'interno"
|
||||
msgid ""
|
||||
"The distance the wipe path is shifted away from the external perimeter, specified in millimeters or as a percentage of the actual outer-wall extrusion width.\n"
|
||||
"\n"
|
||||
"For example, 50% shifts the path by half of the outer-wall width. The effective offset is limited by both the actual outer-wall width and the available spacing to the adjacent wall, so values above 100% or an equivalent absolute distance have no additional effect. Set to 0 to disable the offset.\n"
|
||||
"\n"
|
||||
"With Outer/Inner or Inner/Outer/Inner wall order, the offset is limited to 50% of the actual outer-wall width because the adjacent inner wall is printed after the outer wall. This also applies to equivalent distances specified in millimeters."
|
||||
"For example, 50% shifts the path by half of the outer-wall width. The effective offset is limited by both the actual outer-wall width and the available spacing to the adjacent wall, so values above 100% or an equivalent absolute distance have no additional effect. Set to 0 to disable the offset."
|
||||
msgstr ""
|
||||
"Distanza di cui il percorso di spurgo viene spostato rispetto al perimetro esterno, espressa in millimetri o in percentuale della larghezza di estrusione effettiva della parete esterna.\n"
|
||||
"\n"
|
||||
"Ad esempio, 50% sposta il percorso di metà della larghezza della parete esterna. Lo spostamento effettivo è limitato sia dalla larghezza effettiva della parete esterna sia dallo spazio disponibile fino alla parete adiacente, perciò valori superiori a 100% o una distanza assoluta equivalente non hanno alcun effetto aggiuntivo. Imposta 0 per disattivare lo spostamento.\n"
|
||||
"\n"
|
||||
"Con l'ordine delle pareti Esterna/Interna o Interna/Esterna/Interna, lo spostamento è limitato al 50% della larghezza effettiva della parete esterna, perché la parete interna adiacente viene stampata dopo la parete esterna. Questo vale anche per le distanze equivalenti espresse in millimetri."
|
||||
"Ad esempio, 50% sposta il percorso di metà della larghezza della parete esterna. Lo spostamento effettivo è limitato sia dalla larghezza effettiva della parete esterna sia dallo spazio disponibile fino alla parete adiacente, perciò valori superiori a 100% o una distanza assoluta equivalente non hanno alcun effetto aggiuntivo. Imposta 0 per disattivare lo spostamento."
|
||||
|
||||
msgid "Wipe before external loop"
|
||||
msgstr "Spurgo prima del perimetro esterno"
|
||||
@@ -24476,10 +24472,10 @@ msgid "Klipper version => 0.9.0"
|
||||
msgstr "Versione Klipper => 0.9.0"
|
||||
|
||||
msgid ""
|
||||
"RepRapFirmware version => 3.4.0\n"
|
||||
"RepRap firmware version => 3.4.0\n"
|
||||
"Check your firmware documentation for supported shaper types."
|
||||
msgstr ""
|
||||
"Versione RepRapFirmware => 3.4.0\n"
|
||||
"Versione firmware RepRap => 3.4.0\n"
|
||||
"Controllare la documentazione del firmware per i tipi di shaper supportati."
|
||||
|
||||
msgid "Frequency (Start / End): "
|
||||
@@ -24496,8 +24492,8 @@ msgstr "Y Inizio / Fine: "
|
||||
msgid "Frequency settings"
|
||||
msgstr "Impostazioni frequenza"
|
||||
|
||||
msgid "RepRapFirmware uses the same frequency range for both axes."
|
||||
msgstr "Il RepRapFirmware utilizza lo stesso intervallo di frequenza per entrambi gli assi."
|
||||
msgid "RepRap firmware uses the same frequency range for both axes."
|
||||
msgstr "Il firmware RepRap utilizza lo stesso intervallo di frequenza per entrambi gli assi."
|
||||
|
||||
msgid "Damp: "
|
||||
msgstr "Smorzamento: "
|
||||
@@ -24536,8 +24532,8 @@ msgstr "Frequenza X / Y: "
|
||||
msgid "Damp (Start / End): "
|
||||
msgstr "Smorzamento (Inizio / Fine): "
|
||||
|
||||
msgid "RepRapFirmware uses the same frequency for both axes."
|
||||
msgstr "Il RepRapFirmware utilizza la stessa frequenza per entrambi gli assi."
|
||||
msgid "RepRap firmware uses the same frequency for both axes."
|
||||
msgstr "Il firmware RepRap utilizza la stessa frequenza per entrambi gli assi."
|
||||
|
||||
msgid "Note: Use previously calculated frequencies."
|
||||
msgstr "Nota: usa le frequenze calcolate in precedenza."
|
||||
|
||||
@@ -21163,17 +21163,17 @@ msgstr "内側へ拭き上げ"
|
||||
|
||||
# AI Translated
|
||||
msgid ""
|
||||
"Applies only to external walls, including hole boundaries. Moves the hot nozzle toward the inner walls during wiping to reduce reheating of freshly printed plastic and seam marks.\n"
|
||||
"Applies only to external walls, including hole boundaries. Moves the hot nozzle toward printed inner walls during wiping to reduce reheating of freshly printed plastic and seam marks.\n"
|
||||
"\n"
|
||||
"Especially useful at layer heights below 0.1 mm, where wipe marks are more visible.\n"
|
||||
"\n"
|
||||
"Uses the regular wipe where the outer wall has no adjacent inner wall, such as in single-wall areas, or if no supported inward path can be found, for example at tight corners or seam gaps."
|
||||
"Uses the regular wipe if no adjacent inner wall is already printed (single-wall areas or Outer/Inner wall order), or if no supported inward path can be found, for example at tight corners or seam gaps."
|
||||
msgstr ""
|
||||
"穴の輪郭を含む外壁にのみ適用されます。拭き上げ中に高温のノズルを内壁へ向かって動かし、造形したばかりの樹脂の再加熱と継ぎ目の跡を抑えます。\n"
|
||||
"穴の輪郭を含む外壁にのみ適用されます。拭き上げ中に高温のノズルを造形済みの内壁へ向かって動かし、造形したばかりの樹脂の再加熱と継ぎ目の跡を抑えます。\n"
|
||||
"\n"
|
||||
"拭き上げの跡が目立ちやすい積層ピッチ0.1 mm未満で特に有効です。\n"
|
||||
"\n"
|
||||
"壁が1本のみの領域など、外壁に隣接する内壁がない場所や、細かい角や継ぎ目の隙間などで支えのある内向きの経路が見つからない場合は、通常の拭き上げを使用します。"
|
||||
"隣接する内壁がまだ造形されていない場合(壁が1本のみの領域や、壁の順序が外側/内側の場合)、または細かい角や継ぎ目の隙間などで支えのある内向きの経路が見つからない場合は、通常の拭き上げを使用します。"
|
||||
|
||||
# AI Translated
|
||||
msgid "Wipe inward distance"
|
||||
@@ -21184,15 +21184,11 @@ msgstr "内側への拭き上げ距離"
|
||||
msgid ""
|
||||
"The distance the wipe path is shifted away from the external perimeter, specified in millimeters or as a percentage of the actual outer-wall extrusion width.\n"
|
||||
"\n"
|
||||
"For example, 50% shifts the path by half of the outer-wall width. The effective offset is limited by both the actual outer-wall width and the available spacing to the adjacent wall, so values above 100% or an equivalent absolute distance have no additional effect. Set to 0 to disable the offset.\n"
|
||||
"\n"
|
||||
"With Outer/Inner or Inner/Outer/Inner wall order, the offset is limited to 50% of the actual outer-wall width because the adjacent inner wall is printed after the outer wall. This also applies to equivalent distances specified in millimeters."
|
||||
"For example, 50% shifts the path by half of the outer-wall width. The effective offset is limited by both the actual outer-wall width and the available spacing to the adjacent wall, so values above 100% or an equivalent absolute distance have no additional effect. Set to 0 to disable the offset."
|
||||
msgstr ""
|
||||
"拭き上げ経路を外周から離す距離で、ミリメートルまたは実際の外壁の押出線幅に対する割合で指定します。\n"
|
||||
"\n"
|
||||
"例えば50%では、経路を外壁幅の半分だけずらします。実効オフセットは実際の外壁幅と隣接する壁までの利用可能な間隔の両方で制限されるため、100%を超える値や同等の絶対距離を指定しても追加の効果はありません。0に設定するとオフセットは無効になります。\n"
|
||||
"\n"
|
||||
"壁の順序が外側/内側または内側/外側/内側の場合、隣接する内壁は外壁の後に造形されるため、オフセットは実際の外壁幅の50%までに制限されます。ミリメートルで指定した同等の距離にも適用されます。"
|
||||
"例えば50%では、経路を外壁幅の半分だけずらします。実効オフセットは実際の外壁幅と隣接する壁までの利用可能な間隔の両方で制限されるため、100%を超える値や同等の絶対距離を指定しても追加の効果はありません。0に設定するとオフセットは無効になります。"
|
||||
|
||||
# AI Translated
|
||||
msgid "Wipe before external loop"
|
||||
@@ -25832,7 +25828,7 @@ msgstr "Klipperバージョン => 0.9.0"
|
||||
|
||||
# AI Translated
|
||||
msgid ""
|
||||
"RepRapFirmware version => 3.4.0\n"
|
||||
"RepRap firmware version => 3.4.0\n"
|
||||
"Check your firmware documentation for supported shaper types."
|
||||
msgstr ""
|
||||
"RepRapファームウェアバージョン => 3.4.0\n"
|
||||
@@ -25853,7 +25849,7 @@ msgid "Frequency settings"
|
||||
msgstr "周波数設定"
|
||||
|
||||
# AI Translated
|
||||
msgid "RepRapFirmware uses the same frequency range for both axes."
|
||||
msgid "RepRap firmware uses the same frequency range for both axes."
|
||||
msgstr "RepRapファームウェアは両軸に同じ周波数範囲を使用します。"
|
||||
|
||||
# AI Translated
|
||||
@@ -25902,7 +25898,7 @@ msgid "Damp (Start / End): "
|
||||
msgstr "減衰 (開始/終了): "
|
||||
|
||||
# AI Translated
|
||||
msgid "RepRapFirmware uses the same frequency for both axes."
|
||||
msgid "RepRap firmware uses the same frequency for both axes."
|
||||
msgstr "RepRapファームウェアは両軸に同じ周波数を使用します。"
|
||||
|
||||
# AI Translated
|
||||
|
||||
@@ -20566,17 +20566,17 @@ msgstr "안쪽으로 노즐 청소"
|
||||
|
||||
# AI Translated
|
||||
msgid ""
|
||||
"Applies only to external walls, including hole boundaries. Moves the hot nozzle toward the inner walls during wiping to reduce reheating of freshly printed plastic and seam marks.\n"
|
||||
"Applies only to external walls, including hole boundaries. Moves the hot nozzle toward printed inner walls during wiping to reduce reheating of freshly printed plastic and seam marks.\n"
|
||||
"\n"
|
||||
"Especially useful at layer heights below 0.1 mm, where wipe marks are more visible.\n"
|
||||
"\n"
|
||||
"Uses the regular wipe where the outer wall has no adjacent inner wall, such as in single-wall areas, or if no supported inward path can be found, for example at tight corners or seam gaps."
|
||||
"Uses the regular wipe if no adjacent inner wall is already printed (single-wall areas or Outer/Inner wall order), or if no supported inward path can be found, for example at tight corners or seam gaps."
|
||||
msgstr ""
|
||||
"구멍 경계를 포함한 외벽에만 적용됩니다. 노즐 청소 중 뜨거운 노즐을 내벽 쪽으로 이동시켜, 갓 출력된 플라스틱의 재가열과 재봉선 자국을 줄입니다.\n"
|
||||
"구멍 경계를 포함한 외벽에만 적용됩니다. 노즐 청소 중 뜨거운 노즐을 이미 출력된 내벽 쪽으로 이동시켜, 갓 출력된 플라스틱의 재가열과 재봉선 자국을 줄입니다.\n"
|
||||
"\n"
|
||||
"청소 자국이 더 잘 보이는 0.1 mm 미만의 레이어 높이에서 특히 유용합니다.\n"
|
||||
"\n"
|
||||
"벽이 하나뿐인 영역처럼 외벽에 인접한 내벽이 없는 곳이나, 좁은 모서리나 재봉선 간격 등에서 지지되는 안쪽 경로를 찾을 수 없는 경우에는 일반 노즐 청소를 사용합니다."
|
||||
"인접한 내벽이 아직 출력되지 않았거나(벽이 하나뿐인 영역 또는 외벽/내벽 순서), 좁은 모서리나 재봉선 간격 등에서 지지되는 안쪽 경로를 찾을 수 없는 경우에는 일반 노즐 청소를 사용합니다."
|
||||
|
||||
# AI Translated
|
||||
msgid "Wipe inward distance"
|
||||
@@ -20587,15 +20587,11 @@ msgstr "안쪽 노즐 청소 거리"
|
||||
msgid ""
|
||||
"The distance the wipe path is shifted away from the external perimeter, specified in millimeters or as a percentage of the actual outer-wall extrusion width.\n"
|
||||
"\n"
|
||||
"For example, 50% shifts the path by half of the outer-wall width. The effective offset is limited by both the actual outer-wall width and the available spacing to the adjacent wall, so values above 100% or an equivalent absolute distance have no additional effect. Set to 0 to disable the offset.\n"
|
||||
"\n"
|
||||
"With Outer/Inner or Inner/Outer/Inner wall order, the offset is limited to 50% of the actual outer-wall width because the adjacent inner wall is printed after the outer wall. This also applies to equivalent distances specified in millimeters."
|
||||
"For example, 50% shifts the path by half of the outer-wall width. The effective offset is limited by both the actual outer-wall width and the available spacing to the adjacent wall, so values above 100% or an equivalent absolute distance have no additional effect. Set to 0 to disable the offset."
|
||||
msgstr ""
|
||||
"노즐 청소 경로를 외곽 둘레에서 밀어내는 거리로, 밀리미터 또는 실제 외벽 압출 너비에 대한 백분율로 지정합니다.\n"
|
||||
"\n"
|
||||
"예를 들어 50%는 경로를 외벽 너비의 절반만큼 이동시킵니다. 실제 오프셋은 실제 외벽 너비와 인접한 벽까지의 여유 간격 모두에 의해 제한되므로, 100%를 넘는 값이나 그에 상응하는 절대 거리를 지정해도 추가 효과가 없습니다. 오프셋을 끄려면 0으로 설정하세요.\n"
|
||||
"\n"
|
||||
"벽 출력 순서가 외벽/내벽 또는 내벽/외벽/내벽이면 인접한 내벽이 외벽보다 나중에 출력되므로, 오프셋은 실제 외벽 너비의 50%로 제한됩니다. 밀리미터로 지정한 상응하는 거리에도 적용됩니다."
|
||||
"예를 들어 50%는 경로를 외벽 너비의 절반만큼 이동시킵니다. 실제 오프셋은 실제 외벽 너비와 인접한 벽까지의 여유 간격 모두에 의해 제한되므로, 100%를 넘는 값이나 그에 상응하는 절대 거리를 지정해도 추가 효과가 없습니다. 오프셋을 끄려면 0으로 설정하세요."
|
||||
|
||||
msgid "Wipe before external loop"
|
||||
msgstr "외부 루프 전 닦아내기"
|
||||
@@ -24966,7 +24962,7 @@ msgstr "Klipper 버전 => 0.9.0"
|
||||
|
||||
# AI Translated
|
||||
msgid ""
|
||||
"RepRapFirmware version => 3.4.0\n"
|
||||
"RepRap firmware version => 3.4.0\n"
|
||||
"Check your firmware documentation for supported shaper types."
|
||||
msgstr ""
|
||||
"RepRap 펌웨어 버전 => 3.4.0\n"
|
||||
@@ -24989,7 +24985,7 @@ msgid "Frequency settings"
|
||||
msgstr "주파수 설정"
|
||||
|
||||
# AI Translated
|
||||
msgid "RepRapFirmware uses the same frequency range for both axes."
|
||||
msgid "RepRap firmware uses the same frequency range for both axes."
|
||||
msgstr "RepRap 펌웨어는 두 축에 동일한 주파수 범위를 사용합니다."
|
||||
|
||||
# AI Translated
|
||||
@@ -25037,7 +25033,7 @@ msgid "Damp (Start / End): "
|
||||
msgstr "감쇠 (시작 / 종료): "
|
||||
|
||||
# AI Translated
|
||||
msgid "RepRapFirmware uses the same frequency for both axes."
|
||||
msgid "RepRap firmware uses the same frequency for both axes."
|
||||
msgstr "RepRap 펌웨어는 두 축에 동일한 주파수를 사용합니다."
|
||||
|
||||
# AI Translated
|
||||
|
||||
@@ -294,7 +294,6 @@ src/slic3r/GUI/FilamentPickerDialog.cpp
|
||||
src/slic3r/GUI/NetworkPluginDialog.cpp
|
||||
src/slic3r/GUI/RammingChart.cpp
|
||||
src/slic3r/GUI/StepMeshDialog.cpp
|
||||
src/slic3r/GUI/GeometryImportDialog.cpp
|
||||
src/slic3r/GUI/FilamentPickerDialog.hpp
|
||||
src/slic3r/GUI/PresetBundleDialog.cpp
|
||||
src/slic3r/GUI/ExportPresetBundleDialog.cpp
|
||||
|
||||
@@ -20191,17 +20191,17 @@ msgstr "Valymas į vidų"
|
||||
|
||||
# AI Translated
|
||||
msgid ""
|
||||
"Applies only to external walls, including hole boundaries. Moves the hot nozzle toward the inner walls during wiping to reduce reheating of freshly printed plastic and seam marks.\n"
|
||||
"Applies only to external walls, including hole boundaries. Moves the hot nozzle toward printed inner walls during wiping to reduce reheating of freshly printed plastic and seam marks.\n"
|
||||
"\n"
|
||||
"Especially useful at layer heights below 0.1 mm, where wipe marks are more visible.\n"
|
||||
"\n"
|
||||
"Uses the regular wipe where the outer wall has no adjacent inner wall, such as in single-wall areas, or if no supported inward path can be found, for example at tight corners or seam gaps."
|
||||
"Uses the regular wipe if no adjacent inner wall is already printed (single-wall areas or Outer/Inner wall order), or if no supported inward path can be found, for example at tight corners or seam gaps."
|
||||
msgstr ""
|
||||
"Taikoma tik išorinėms sienelėms, įskaitant skylių kontūrus. Valymo metu karštą purkštuką patraukia link vidinių sienelių, kad sumažintų ką tik atspausdinto plastiko pakartotinį įkaitimą ir siūlės žymes.\n"
|
||||
"Taikoma tik išorinėms sienelėms, įskaitant skylių kontūrus. Valymo metu karštą purkštuką patraukia link jau atspausdintų vidinių sienelių, kad sumažintų ką tik atspausdinto plastiko pakartotinį įkaitimą ir siūlės žymes.\n"
|
||||
"\n"
|
||||
"Ypač naudinga esant mažesniam nei 0,1 mm sluoksnio aukščiui, kai valymo žymės labiau matomos.\n"
|
||||
"\n"
|
||||
"Naudoja įprastą valymą ten, kur išorinė sienelė neturi gretimos vidinės sienelės, kaip vienos sienelės srityse, arba jei nepavyksta rasti atremto kelio į vidų, pavyzdžiui, ankštuose kampuose ar siūlės tarpuose."
|
||||
"Naudoja įprastą valymą, jei nėra jau atspausdintos gretimos vidinės sienelės (vienos sienelės sritys arba sienelių eiliškumas Išorinis / vidinis) arba jei nepavyksta rasti atremto kelio į vidų, pavyzdžiui, ankštuose kampuose ar siūlės tarpuose."
|
||||
|
||||
# AI Translated
|
||||
msgid "Wipe inward distance"
|
||||
@@ -20212,15 +20212,11 @@ msgstr "Valymo į vidų atstumas"
|
||||
msgid ""
|
||||
"The distance the wipe path is shifted away from the external perimeter, specified in millimeters or as a percentage of the actual outer-wall extrusion width.\n"
|
||||
"\n"
|
||||
"For example, 50% shifts the path by half of the outer-wall width. The effective offset is limited by both the actual outer-wall width and the available spacing to the adjacent wall, so values above 100% or an equivalent absolute distance have no additional effect. Set to 0 to disable the offset.\n"
|
||||
"\n"
|
||||
"With Outer/Inner or Inner/Outer/Inner wall order, the offset is limited to 50% of the actual outer-wall width because the adjacent inner wall is printed after the outer wall. This also applies to equivalent distances specified in millimeters."
|
||||
"For example, 50% shifts the path by half of the outer-wall width. The effective offset is limited by both the actual outer-wall width and the available spacing to the adjacent wall, so values above 100% or an equivalent absolute distance have no additional effect. Set to 0 to disable the offset."
|
||||
msgstr ""
|
||||
"Atstumas, kuriuo valymo kelias pastumiamas nuo išorinio kontūro, nurodomas milimetrais arba procentais nuo faktinio išorinės sienelės išspaudimo pločio.\n"
|
||||
"\n"
|
||||
"Pavyzdžiui, 50% pastumia kelią per pusę išorinės sienelės pločio. Faktinį poslinkį riboja tiek tikrasis išorinės sienelės plotis, tiek laisvas tarpas iki gretimos sienelės, todėl didesnės nei 100% reikšmės ar joms lygiavertis absoliutus atstumas papildomo poveikio neturi. Nustatykite 0, kad poslinkis būtų išjungtas.\n"
|
||||
"\n"
|
||||
"Kai sienelių eiliškumas yra Išorinis / vidinis arba Vidinis / išorinis / vidinis, poslinkis ribojamas iki 50% faktinio išorinės sienelės pločio, nes gretima vidinė sienelė spausdinama po išorinės sienelės. Tai taikoma ir lygiaverčiams atstumams, nurodytiems milimetrais."
|
||||
"Pavyzdžiui, 50% pastumia kelią per pusę išorinės sienelės pločio. Faktinį poslinkį riboja tiek tikrasis išorinės sienelės plotis, tiek laisvas tarpas iki gretimos sienelės, todėl didesnės nei 100% reikšmės ar joms lygiavertis absoliutus atstumas papildomo poveikio neturi. Nustatykite 0, kad poslinkis būtų išjungtas."
|
||||
|
||||
msgid "Wipe before external loop"
|
||||
msgstr "Valymas prieš išorinį kontūrą"
|
||||
@@ -24528,7 +24524,7 @@ msgid "Klipper version => 0.9.0"
|
||||
msgstr "Klipper versija => 0.9.0 (Klipper)"
|
||||
|
||||
msgid ""
|
||||
"RepRapFirmware version => 3.4.0\n"
|
||||
"RepRap firmware version => 3.4.0\n"
|
||||
"Check your firmware documentation for supported shaper types."
|
||||
msgstr ""
|
||||
"RepRap programinės aparatinės įrangos versija => 3.4.0\n"
|
||||
@@ -24548,7 +24544,7 @@ msgstr "Y pradžia / pabaiga: "
|
||||
msgid "Frequency settings"
|
||||
msgstr "Dažnio nustatymai"
|
||||
|
||||
msgid "RepRapFirmware uses the same frequency range for both axes."
|
||||
msgid "RepRap firmware uses the same frequency range for both axes."
|
||||
msgstr "RepRap programinė aparatinė įranga naudoja tą patį dažnių diapazoną abiem ašims."
|
||||
|
||||
msgid "Damp: "
|
||||
@@ -24588,7 +24584,7 @@ msgstr "Dažnis X / Y: "
|
||||
msgid "Damp (Start / End): "
|
||||
msgstr "Slopinimas (pradžia / pabaiga): "
|
||||
|
||||
msgid "RepRapFirmware uses the same frequency for both axes."
|
||||
msgid "RepRap firmware uses the same frequency for both axes."
|
||||
msgstr "RepRap programinė aparatinė įranga naudoja tą patį dažnį abiem ašims."
|
||||
|
||||
msgid "Note: Use previously calculated frequencies."
|
||||
|
||||
@@ -21758,17 +21758,17 @@ msgstr "Naar binnen vegen"
|
||||
|
||||
# AI Translated
|
||||
msgid ""
|
||||
"Applies only to external walls, including hole boundaries. Moves the hot nozzle toward the inner walls during wiping to reduce reheating of freshly printed plastic and seam marks.\n"
|
||||
"Applies only to external walls, including hole boundaries. Moves the hot nozzle toward printed inner walls during wiping to reduce reheating of freshly printed plastic and seam marks.\n"
|
||||
"\n"
|
||||
"Especially useful at layer heights below 0.1 mm, where wipe marks are more visible.\n"
|
||||
"\n"
|
||||
"Uses the regular wipe where the outer wall has no adjacent inner wall, such as in single-wall areas, or if no supported inward path can be found, for example at tight corners or seam gaps."
|
||||
"Uses the regular wipe if no adjacent inner wall is already printed (single-wall areas or Outer/Inner wall order), or if no supported inward path can be found, for example at tight corners or seam gaps."
|
||||
msgstr ""
|
||||
"Geldt alleen voor buitenwanden, inclusief gatcontouren. Beweegt het hete mondstuk tijdens het vegen naar de binnenwanden, om het opnieuw opwarmen van vers geprint plastic en naadsporen te beperken.\n"
|
||||
"Geldt alleen voor buitenwanden, inclusief gatcontouren. Beweegt het hete mondstuk tijdens het vegen naar reeds geprinte binnenwanden, om het opnieuw opwarmen van vers geprint plastic en naadsporen te beperken.\n"
|
||||
"\n"
|
||||
"Vooral nuttig bij laaghoogtes onder 0,1 mm, waar veegsporen beter zichtbaar zijn.\n"
|
||||
"\n"
|
||||
"Gebruikt het gewone vegen waar de buitenwand geen aangrenzende binnenwand heeft, zoals in gebieden met één wand, of als er geen ondersteund pad naar binnen gevonden kan worden, bijvoorbeeld bij krappe hoeken of onderbrekingen in de naad."
|
||||
"Gebruikt het gewone vegen als er nog geen aangrenzende binnenwand geprint is (gebieden met één wand of de wandvolgorde Buiten/Binnen), of als er geen ondersteund pad naar binnen gevonden kan worden, bijvoorbeeld bij krappe hoeken of onderbrekingen in de naad."
|
||||
|
||||
# AI Translated
|
||||
msgid "Wipe inward distance"
|
||||
@@ -21779,15 +21779,11 @@ msgstr "Afstand voor naar binnen vegen"
|
||||
msgid ""
|
||||
"The distance the wipe path is shifted away from the external perimeter, specified in millimeters or as a percentage of the actual outer-wall extrusion width.\n"
|
||||
"\n"
|
||||
"For example, 50% shifts the path by half of the outer-wall width. The effective offset is limited by both the actual outer-wall width and the available spacing to the adjacent wall, so values above 100% or an equivalent absolute distance have no additional effect. Set to 0 to disable the offset.\n"
|
||||
"\n"
|
||||
"With Outer/Inner or Inner/Outer/Inner wall order, the offset is limited to 50% of the actual outer-wall width because the adjacent inner wall is printed after the outer wall. This also applies to equivalent distances specified in millimeters."
|
||||
"For example, 50% shifts the path by half of the outer-wall width. The effective offset is limited by both the actual outer-wall width and the available spacing to the adjacent wall, so values above 100% or an equivalent absolute distance have no additional effect. Set to 0 to disable the offset."
|
||||
msgstr ""
|
||||
"De afstand waarover het veegpad van de buitenste omtrek af wordt verschoven, opgegeven in millimeters of als percentage van de werkelijke extrusiebreedte van de buitenwand.\n"
|
||||
"\n"
|
||||
"Bijvoorbeeld: 50% verschuift het pad over de helft van de breedte van de buitenwand. De effectieve verschuiving wordt begrensd door zowel de werkelijke breedte van de buitenwand als de beschikbare ruimte tot de aangrenzende wand, dus waarden boven 100% of een gelijkwaardige absolute afstand hebben geen extra effect. Stel in op 0 om de verschuiving uit te schakelen.\n"
|
||||
"\n"
|
||||
"Bij de wandvolgorde Buiten/Binnen of Binnen/Buiten/Binnen is de verschuiving beperkt tot 50% van de werkelijke breedte van de buitenwand, omdat de aangrenzende binnenwand na de buitenwand wordt geprint. Dit geldt ook voor gelijkwaardige afstanden in millimeters."
|
||||
"Bijvoorbeeld: 50% verschuift het pad over de helft van de breedte van de buitenwand. De effectieve verschuiving wordt begrensd door zowel de werkelijke breedte van de buitenwand als de beschikbare ruimte tot de aangrenzende wand, dus waarden boven 100% of een gelijkwaardige absolute afstand hebben geen extra effect. Stel in op 0 om de verschuiving uit te schakelen."
|
||||
|
||||
# AI Translated
|
||||
msgid "Wipe before external loop"
|
||||
@@ -26448,10 +26444,10 @@ msgstr "Klipper-versie => 0.9.0"
|
||||
|
||||
# AI Translated
|
||||
msgid ""
|
||||
"RepRapFirmware version => 3.4.0\n"
|
||||
"RepRap firmware version => 3.4.0\n"
|
||||
"Check your firmware documentation for supported shaper types."
|
||||
msgstr ""
|
||||
"RepRapFirmware-versie => 3.4.0\n"
|
||||
"RepRap-firmwareversie => 3.4.0\n"
|
||||
"Raadpleeg de documentatie van uw firmware voor de ondersteunde shapertypes."
|
||||
|
||||
# AI Translated
|
||||
@@ -26471,8 +26467,8 @@ msgid "Frequency settings"
|
||||
msgstr "Frequentie-instellingen"
|
||||
|
||||
# AI Translated
|
||||
msgid "RepRapFirmware uses the same frequency range for both axes."
|
||||
msgstr "RepRapFirmware gebruikt hetzelfde frequentiebereik voor beide assen."
|
||||
msgid "RepRap firmware uses the same frequency range for both axes."
|
||||
msgstr "RepRap-firmware gebruikt hetzelfde frequentiebereik voor beide assen."
|
||||
|
||||
# AI Translated
|
||||
msgid "Damp: "
|
||||
@@ -26519,8 +26515,8 @@ msgid "Damp (Start / End): "
|
||||
msgstr "Demping (Start / Einde): "
|
||||
|
||||
# AI Translated
|
||||
msgid "RepRapFirmware uses the same frequency for both axes."
|
||||
msgstr "RepRapFirmware gebruikt dezelfde frequentie voor beide assen."
|
||||
msgid "RepRap firmware uses the same frequency for both axes."
|
||||
msgstr "RepRap-firmware gebruikt dezelfde frequentie voor beide assen."
|
||||
|
||||
# AI Translated
|
||||
msgid "Note: Use previously calculated frequencies."
|
||||
|
||||
@@ -20633,17 +20633,17 @@ msgstr "Wycieranie do wewnątrz"
|
||||
|
||||
# AI Translated
|
||||
msgid ""
|
||||
"Applies only to external walls, including hole boundaries. Moves the hot nozzle toward the inner walls during wiping to reduce reheating of freshly printed plastic and seam marks.\n"
|
||||
"Applies only to external walls, including hole boundaries. Moves the hot nozzle toward printed inner walls during wiping to reduce reheating of freshly printed plastic and seam marks.\n"
|
||||
"\n"
|
||||
"Especially useful at layer heights below 0.1 mm, where wipe marks are more visible.\n"
|
||||
"\n"
|
||||
"Uses the regular wipe where the outer wall has no adjacent inner wall, such as in single-wall areas, or if no supported inward path can be found, for example at tight corners or seam gaps."
|
||||
"Uses the regular wipe if no adjacent inner wall is already printed (single-wall areas or Outer/Inner wall order), or if no supported inward path can be found, for example at tight corners or seam gaps."
|
||||
msgstr ""
|
||||
"Dotyczy wyłącznie ścian zewnętrznych, w tym obrysów otworów. Podczas wycierania przesuwa gorącą dyszę w stronę ścian wewnętrznych, aby ograniczyć ponowne nagrzewanie świeżo wydrukowanego tworzywa i ślady szwu.\n"
|
||||
"Dotyczy wyłącznie ścian zewnętrznych, w tym obrysów otworów. Podczas wycierania przesuwa gorącą dyszę w stronę wydrukowanych już ścian wewnętrznych, aby ograniczyć ponowne nagrzewanie świeżo wydrukowanego tworzywa i ślady szwu.\n"
|
||||
"\n"
|
||||
"Szczególnie przydatne przy wysokościach warstwy poniżej 0,1 mm, gdzie ślady wycierania są bardziej widoczne.\n"
|
||||
"\n"
|
||||
"Używa zwykłego wycierania tam, gdzie ściana zewnętrzna nie ma sąsiedniej ściany wewnętrznej, jak w obszarach o pojedynczej ścianie, albo jeśli nie można znaleźć podpartej ścieżki do wewnątrz, na przykład w ciasnych narożnikach lub przerwach szwu."
|
||||
"Używa zwykłego wycierania, jeśli żadna sąsiednia ściana wewnętrzna nie została jeszcze wydrukowana (obszary o pojedynczej ścianie lub kolejność ścian Zewnętrzna/wewnętrzna) albo jeśli nie można znaleźć podpartej ścieżki do wewnątrz, na przykład w ciasnych narożnikach lub przerwach szwu."
|
||||
|
||||
# AI Translated
|
||||
msgid "Wipe inward distance"
|
||||
@@ -20654,15 +20654,11 @@ msgstr "Odległość wycierania do wewnątrz"
|
||||
msgid ""
|
||||
"The distance the wipe path is shifted away from the external perimeter, specified in millimeters or as a percentage of the actual outer-wall extrusion width.\n"
|
||||
"\n"
|
||||
"For example, 50% shifts the path by half of the outer-wall width. The effective offset is limited by both the actual outer-wall width and the available spacing to the adjacent wall, so values above 100% or an equivalent absolute distance have no additional effect. Set to 0 to disable the offset.\n"
|
||||
"\n"
|
||||
"With Outer/Inner or Inner/Outer/Inner wall order, the offset is limited to 50% of the actual outer-wall width because the adjacent inner wall is printed after the outer wall. This also applies to equivalent distances specified in millimeters."
|
||||
"For example, 50% shifts the path by half of the outer-wall width. The effective offset is limited by both the actual outer-wall width and the available spacing to the adjacent wall, so values above 100% or an equivalent absolute distance have no additional effect. Set to 0 to disable the offset."
|
||||
msgstr ""
|
||||
"Odległość, o jaką ścieżka wycierania zostaje przesunięta od zewnętrznego obrysu, podana w milimetrach lub jako procent rzeczywistej szerokości ekstruzji zewnętrznej ściany.\n"
|
||||
"\n"
|
||||
"Na przykład 50% przesuwa ścieżkę o połowę szerokości zewnętrznej ściany. Skuteczne przesunięcie jest ograniczone zarówno rzeczywistą szerokością zewnętrznej ściany, jak i dostępnym odstępem do sąsiedniej ściany, więc wartości powyżej 100% lub równoważna odległość bezwzględna nie dają dodatkowego efektu. Ustaw 0, aby wyłączyć przesunięcie.\n"
|
||||
"\n"
|
||||
"Przy kolejności ścian Zewnętrzna/wewnętrzna lub Wewnętrzna/zewnętrzna/wewnętrzna przesunięcie jest ograniczone do 50% rzeczywistej szerokości zewnętrznej ściany, ponieważ sąsiednia ściana wewnętrzna jest drukowana po ścianie zewnętrznej. Dotyczy to również równoważnych odległości podanych w milimetrach."
|
||||
"Na przykład 50% przesuwa ścieżkę o połowę szerokości zewnętrznej ściany. Skuteczne przesunięcie jest ograniczone zarówno rzeczywistą szerokością zewnętrznej ściany, jak i dostępnym odstępem do sąsiedniej ściany, więc wartości powyżej 100% lub równoważna odległość bezwzględna nie dają dodatkowego efektu. Ustaw 0, aby wyłączyć przesunięcie."
|
||||
|
||||
msgid "Wipe before external loop"
|
||||
msgstr "Wycieranie przed zewnętrzną pętlą"
|
||||
@@ -25013,10 +25009,10 @@ msgstr "Klipper w wersji => 0.9.0"
|
||||
|
||||
# AI Translated
|
||||
msgid ""
|
||||
"RepRapFirmware version => 3.4.0\n"
|
||||
"RepRap firmware version => 3.4.0\n"
|
||||
"Check your firmware documentation for supported shaper types."
|
||||
msgstr ""
|
||||
"RepRapFirmware w wersji => 3.4.0\n"
|
||||
"RepRap firmware w wersji => 3.4.0\n"
|
||||
"Sprawdź w dokumentacji oprogramowania sprzętowego, które typy kształtowników są obsługiwane."
|
||||
|
||||
# AI Translated
|
||||
@@ -25036,8 +25032,8 @@ msgid "Frequency settings"
|
||||
msgstr "Ustawienia częstotliwości"
|
||||
|
||||
# AI Translated
|
||||
msgid "RepRapFirmware uses the same frequency range for both axes."
|
||||
msgstr "RepRapFirmware używa tego samego zakresu częstotliwości dla obu osi."
|
||||
msgid "RepRap firmware uses the same frequency range for both axes."
|
||||
msgstr "RepRap firmware używa tego samego zakresu częstotliwości dla obu osi."
|
||||
|
||||
# AI Translated
|
||||
msgid "Damp: "
|
||||
@@ -25084,8 +25080,8 @@ msgid "Damp (Start / End): "
|
||||
msgstr "Tłumienie (początek / koniec): "
|
||||
|
||||
# AI Translated
|
||||
msgid "RepRapFirmware uses the same frequency for both axes."
|
||||
msgstr "RepRapFirmware używa tej samej częstotliwości dla obu osi."
|
||||
msgid "RepRap firmware uses the same frequency for both axes."
|
||||
msgstr "RepRap firmware używa tej samej częstotliwości dla obu osi."
|
||||
|
||||
# AI Translated
|
||||
msgid "Note: Use previously calculated frequencies."
|
||||
|
||||
@@ -19091,17 +19091,17 @@ msgstr "Limpeza para dentro"
|
||||
|
||||
# AI Translated
|
||||
msgid ""
|
||||
"Applies only to external walls, including hole boundaries. Moves the hot nozzle toward the inner walls during wiping to reduce reheating of freshly printed plastic and seam marks.\n"
|
||||
"Applies only to external walls, including hole boundaries. Moves the hot nozzle toward printed inner walls during wiping to reduce reheating of freshly printed plastic and seam marks.\n"
|
||||
"\n"
|
||||
"Especially useful at layer heights below 0.1 mm, where wipe marks are more visible.\n"
|
||||
"\n"
|
||||
"Uses the regular wipe where the outer wall has no adjacent inner wall, such as in single-wall areas, or if no supported inward path can be found, for example at tight corners or seam gaps."
|
||||
"Uses the regular wipe if no adjacent inner wall is already printed (single-wall areas or Outer/Inner wall order), or if no supported inward path can be found, for example at tight corners or seam gaps."
|
||||
msgstr ""
|
||||
"Aplica-se apenas às paredes externas, incluindo os contornos dos furos. Durante a limpeza, move o bico quente em direção às paredes internas, para reduzir o reaquecimento do plástico recém-depositado e as marcas de costura.\n"
|
||||
"Aplica-se apenas às paredes externas, incluindo os contornos dos furos. Durante a limpeza, move o bico quente em direção às paredes internas já impressas, para reduzir o reaquecimento do plástico recém-depositado e as marcas de costura.\n"
|
||||
"\n"
|
||||
"Especialmente útil em alturas de camada abaixo de 0,1 mm, nas quais as marcas de limpeza ficam mais visíveis.\n"
|
||||
"\n"
|
||||
"Usa a limpeza normal onde a parede externa não tem nenhuma parede interna adjacente, como em áreas de parede única, ou se nenhum caminho apoiado para dentro puder ser encontrado, por exemplo em cantos fechados ou em falhas da costura."
|
||||
"Usa a limpeza normal se nenhuma parede interna adjacente já tiver sido impressa (áreas de parede única ou ordem de paredes Exterior/Interior) ou se nenhum caminho apoiado para dentro puder ser encontrado, por exemplo em cantos fechados ou em falhas da costura."
|
||||
|
||||
msgid "Wipe inward distance"
|
||||
msgstr "Distância de limpeza para dentro"
|
||||
@@ -19111,15 +19111,11 @@ msgstr "Distância de limpeza para dentro"
|
||||
msgid ""
|
||||
"The distance the wipe path is shifted away from the external perimeter, specified in millimeters or as a percentage of the actual outer-wall extrusion width.\n"
|
||||
"\n"
|
||||
"For example, 50% shifts the path by half of the outer-wall width. The effective offset is limited by both the actual outer-wall width and the available spacing to the adjacent wall, so values above 100% or an equivalent absolute distance have no additional effect. Set to 0 to disable the offset.\n"
|
||||
"\n"
|
||||
"With Outer/Inner or Inner/Outer/Inner wall order, the offset is limited to 50% of the actual outer-wall width because the adjacent inner wall is printed after the outer wall. This also applies to equivalent distances specified in millimeters."
|
||||
"For example, 50% shifts the path by half of the outer-wall width. The effective offset is limited by both the actual outer-wall width and the available spacing to the adjacent wall, so values above 100% or an equivalent absolute distance have no additional effect. Set to 0 to disable the offset."
|
||||
msgstr ""
|
||||
"Distância pela qual o caminho de limpeza é deslocado para longe do perímetro externo, indicada em milímetros ou como porcentagem da largura de extrusão real da parede externa.\n"
|
||||
"\n"
|
||||
"Por exemplo, 50% desloca o caminho pela metade da largura da parede externa. O deslocamento efetivo é limitado tanto pela largura real da parede externa quanto pelo espaço disponível até a parede adjacente, de modo que valores acima de 100% ou uma distância absoluta equivalente não têm efeito adicional. Defina 0 para desativar o deslocamento.\n"
|
||||
"\n"
|
||||
"Com a ordem de paredes Exterior/Interior ou Interior/Exterior/Interior, o deslocamento é limitado a 50% da largura real da parede externa, porque a parede interna adjacente é impressa depois da parede externa. Isso também se aplica a distâncias equivalentes indicadas em milímetros."
|
||||
"Por exemplo, 50% desloca o caminho pela metade da largura da parede externa. O deslocamento efetivo é limitado tanto pela largura real da parede externa quanto pelo espaço disponível até a parede adjacente, de modo que valores acima de 100% ou uma distância absoluta equivalente não têm efeito adicional. Defina 0 para desativar o deslocamento."
|
||||
|
||||
msgid "Wipe before external loop"
|
||||
msgstr "Limpeza antes da volta externa"
|
||||
@@ -23282,10 +23278,10 @@ msgid "Klipper version => 0.9.0"
|
||||
msgstr "Versão do Klipper => 0.9.0"
|
||||
|
||||
msgid ""
|
||||
"RepRapFirmware version => 3.4.0\n"
|
||||
"RepRap firmware version => 3.4.0\n"
|
||||
"Check your firmware documentation for supported shaper types."
|
||||
msgstr ""
|
||||
"Versão do RepRapFirmware => 3.4.0\n"
|
||||
"Versão do firmware RepRap => 3.4.0\n"
|
||||
"Consulte a documentação do firmware para verificar os tipos de modeladores suportados."
|
||||
|
||||
msgid "Frequency (Start / End): "
|
||||
@@ -23302,8 +23298,8 @@ msgstr "Y Inicial / Final: "
|
||||
msgid "Frequency settings"
|
||||
msgstr "Configurações de frequência"
|
||||
|
||||
msgid "RepRapFirmware uses the same frequency range for both axes."
|
||||
msgstr "O RepRapFirmware usa a mesma faixa de frequência para ambos os eixos."
|
||||
msgid "RepRap firmware uses the same frequency range for both axes."
|
||||
msgstr "O firmware RepRap usa a mesma faixa de frequência para ambos os eixos."
|
||||
|
||||
msgid "Damp: "
|
||||
msgstr "Amortecimento: "
|
||||
@@ -23342,8 +23338,8 @@ msgstr "Frequência X / Y: "
|
||||
msgid "Damp (Start / End): "
|
||||
msgstr "Amortecimento (Inicial / Final): "
|
||||
|
||||
msgid "RepRapFirmware uses the same frequency for both axes."
|
||||
msgstr "O RepRapFirmware usa a mesma frequência para ambos os eixos."
|
||||
msgid "RepRap firmware uses the same frequency for both axes."
|
||||
msgstr "O firmware RepRap usa a mesma frequência para ambos os eixos."
|
||||
|
||||
msgid "Note: Use previously calculated frequencies."
|
||||
msgstr "Nota: Use frequências previamente calculadas."
|
||||
|
||||
@@ -19851,17 +19851,17 @@ msgstr "Очистка внутрь"
|
||||
|
||||
# AI Translated
|
||||
msgid ""
|
||||
"Applies only to external walls, including hole boundaries. Moves the hot nozzle toward the inner walls during wiping to reduce reheating of freshly printed plastic and seam marks.\n"
|
||||
"Applies only to external walls, including hole boundaries. Moves the hot nozzle toward printed inner walls during wiping to reduce reheating of freshly printed plastic and seam marks.\n"
|
||||
"\n"
|
||||
"Especially useful at layer heights below 0.1 mm, where wipe marks are more visible.\n"
|
||||
"\n"
|
||||
"Uses the regular wipe where the outer wall has no adjacent inner wall, such as in single-wall areas, or if no supported inward path can be found, for example at tight corners or seam gaps."
|
||||
"Uses the regular wipe if no adjacent inner wall is already printed (single-wall areas or Outer/Inner wall order), or if no supported inward path can be found, for example at tight corners or seam gaps."
|
||||
msgstr ""
|
||||
"Применяется только к внешним периметрам, включая контуры отверстий. Во время очистки перемещает горячее сопло к внутренним периметрам, чтобы уменьшить повторный нагрев только что напечатанного пластика и следы шва.\n"
|
||||
"Применяется только к внешним периметрам, включая контуры отверстий. Во время очистки перемещает горячее сопло к уже напечатанным внутренним периметрам, чтобы уменьшить повторный нагрев только что напечатанного пластика и следы шва.\n"
|
||||
"\n"
|
||||
"Особенно полезно при высоте слоя менее 0,1 мм, где следы очистки заметнее.\n"
|
||||
"\n"
|
||||
"Использует обычную очистку там, где у внешнего периметра нет соседнего внутреннего периметра, как в областях с одним периметром, либо если не удаётся найти опирающийся путь внутрь, например в тесных углах или разрывах шва."
|
||||
"Использует обычную очистку, если рядом нет уже напечатанного внутреннего периметра (области с одним периметром или порядок периметров «Снаружи внутрь») либо если не удаётся найти опирающийся путь внутрь, например в тесных углах или разрывах шва."
|
||||
|
||||
# AI Translated
|
||||
msgid "Wipe inward distance"
|
||||
@@ -19872,15 +19872,11 @@ msgstr "Расстояние очистки внутрь"
|
||||
msgid ""
|
||||
"The distance the wipe path is shifted away from the external perimeter, specified in millimeters or as a percentage of the actual outer-wall extrusion width.\n"
|
||||
"\n"
|
||||
"For example, 50% shifts the path by half of the outer-wall width. The effective offset is limited by both the actual outer-wall width and the available spacing to the adjacent wall, so values above 100% or an equivalent absolute distance have no additional effect. Set to 0 to disable the offset.\n"
|
||||
"\n"
|
||||
"With Outer/Inner or Inner/Outer/Inner wall order, the offset is limited to 50% of the actual outer-wall width because the adjacent inner wall is printed after the outer wall. This also applies to equivalent distances specified in millimeters."
|
||||
"For example, 50% shifts the path by half of the outer-wall width. The effective offset is limited by both the actual outer-wall width and the available spacing to the adjacent wall, so values above 100% or an equivalent absolute distance have no additional effect. Set to 0 to disable the offset."
|
||||
msgstr ""
|
||||
"Расстояние, на которое путь очистки смещается от внешнего периметра, задаётся в миллиметрах или в процентах от фактической ширины линии внешнего периметра.\n"
|
||||
"\n"
|
||||
"Например, 50% смещает путь на половину ширины внешнего периметра. Фактическое смещение ограничено как реальной шириной внешнего периметра, так и доступным промежутком до соседнего периметра, поэтому значения выше 100% или эквивалентное абсолютное расстояние не дают дополнительного эффекта. Задайте 0, чтобы отключить смещение.\n"
|
||||
"\n"
|
||||
"При порядке печати периметров «Снаружи внутрь» или «Навстречу» смещение ограничено 50% фактической ширины внешнего периметра, потому что соседний внутренний периметр печатается после внешнего. Это относится и к эквивалентным расстояниям, заданным в миллиметрах."
|
||||
"Например, 50% смещает путь на половину ширины внешнего периметра. Фактическое смещение ограничено как реальной шириной внешнего периметра, так и доступным промежутком до соседнего периметра, поэтому значения выше 100% или эквивалентное абсолютное расстояние не дают дополнительного эффекта. Задайте 0, чтобы отключить смещение."
|
||||
|
||||
# Подворот начала линии на шве, упреждающая подача перед внешним периметром,
|
||||
# заглубление подачи ..., смещённая подача
|
||||
@@ -24193,7 +24189,7 @@ msgid "Klipper version => 0.9.0"
|
||||
msgstr "Требуется Klipper 0.9.0 или новее."
|
||||
|
||||
msgid ""
|
||||
"RepRapFirmware version => 3.4.0\n"
|
||||
"RepRap firmware version => 3.4.0\n"
|
||||
"Check your firmware documentation for supported shaper types."
|
||||
msgstr ""
|
||||
"Требуется RepRap 3.4.0 или новее.\n"
|
||||
@@ -24214,7 +24210,7 @@ msgstr "Y, начало / конец: "
|
||||
msgid "Frequency settings"
|
||||
msgstr "Настройка частоты"
|
||||
|
||||
msgid "RepRapFirmware uses the same frequency range for both axes."
|
||||
msgid "RepRap firmware uses the same frequency range for both axes."
|
||||
msgstr "Прошивка RepRap использует общий диапазон частот для обеих осей."
|
||||
|
||||
msgid "Damp: "
|
||||
@@ -24254,7 +24250,7 @@ msgstr "Частота X / Y: "
|
||||
msgid "Damp (Start / End): "
|
||||
msgstr "Затухание (начало / конец): "
|
||||
|
||||
msgid "RepRapFirmware uses the same frequency for both axes."
|
||||
msgid "RepRap firmware uses the same frequency for both axes."
|
||||
msgstr "Прошивка RepRap использует общую частоту для обеих осей."
|
||||
|
||||
msgid "Note: Use previously calculated frequencies."
|
||||
|
||||
@@ -21990,17 +21990,17 @@ msgstr "Torka inåt"
|
||||
|
||||
# AI Translated
|
||||
msgid ""
|
||||
"Applies only to external walls, including hole boundaries. Moves the hot nozzle toward the inner walls during wiping to reduce reheating of freshly printed plastic and seam marks.\n"
|
||||
"Applies only to external walls, including hole boundaries. Moves the hot nozzle toward printed inner walls during wiping to reduce reheating of freshly printed plastic and seam marks.\n"
|
||||
"\n"
|
||||
"Especially useful at layer heights below 0.1 mm, where wipe marks are more visible.\n"
|
||||
"\n"
|
||||
"Uses the regular wipe where the outer wall has no adjacent inner wall, such as in single-wall areas, or if no supported inward path can be found, for example at tight corners or seam gaps."
|
||||
"Uses the regular wipe if no adjacent inner wall is already printed (single-wall areas or Outer/Inner wall order), or if no supported inward path can be found, for example at tight corners or seam gaps."
|
||||
msgstr ""
|
||||
"Gäller endast yttre väggar, inklusive hålkonturer. Flyttar den heta nozzeln mot de inre väggarna under avtorkningen, för att minska återuppvärmningen av nyss utskriven plast och sömmärken.\n"
|
||||
"Gäller endast yttre väggar, inklusive hålkonturer. Flyttar den heta nozzeln mot redan utskrivna inre väggar under avtorkningen, för att minska återuppvärmningen av nyss utskriven plast och sömmärken.\n"
|
||||
"\n"
|
||||
"Särskilt användbart vid lagerhöjder under 0,1 mm, där avtorkningsmärken syns tydligare.\n"
|
||||
"\n"
|
||||
"Använder vanlig avtorkning där den yttre väggen saknar angränsande inre vägg, som i områden med en enda vägg, eller om ingen understödd väg inåt kan hittas, till exempel i trånga hörn eller vid sömglapp."
|
||||
"Använder vanlig avtorkning om ingen angränsande inre vägg redan är utskriven (områden med en enda vägg eller väggordningen Yttre/Inre), eller om ingen understödd väg inåt kan hittas, till exempel i trånga hörn eller vid sömglapp."
|
||||
|
||||
# AI Translated
|
||||
msgid "Wipe inward distance"
|
||||
@@ -22011,15 +22011,11 @@ msgstr "Avstånd för torka inåt"
|
||||
msgid ""
|
||||
"The distance the wipe path is shifted away from the external perimeter, specified in millimeters or as a percentage of the actual outer-wall extrusion width.\n"
|
||||
"\n"
|
||||
"For example, 50% shifts the path by half of the outer-wall width. The effective offset is limited by both the actual outer-wall width and the available spacing to the adjacent wall, so values above 100% or an equivalent absolute distance have no additional effect. Set to 0 to disable the offset.\n"
|
||||
"\n"
|
||||
"With Outer/Inner or Inner/Outer/Inner wall order, the offset is limited to 50% of the actual outer-wall width because the adjacent inner wall is printed after the outer wall. This also applies to equivalent distances specified in millimeters."
|
||||
"For example, 50% shifts the path by half of the outer-wall width. The effective offset is limited by both the actual outer-wall width and the available spacing to the adjacent wall, so values above 100% or an equivalent absolute distance have no additional effect. Set to 0 to disable the offset."
|
||||
msgstr ""
|
||||
"Avståndet som avtorkningsvägen förskjuts bort från den yttre perimetern, angivet i millimeter eller som procent av den yttre väggens faktiska extruderingsbredd.\n"
|
||||
"\n"
|
||||
"Till exempel förskjuter 50% vägen med halva den yttre väggens bredd. Den verkliga förskjutningen begränsas både av den yttre väggens faktiska bredd och av det tillgängliga utrymmet till den angränsande väggen, så värden över 100% eller ett motsvarande absolut avstånd har ingen ytterligare effekt. Ange 0 för att stänga av förskjutningen.\n"
|
||||
"\n"
|
||||
"Med väggordningen Yttre/Inre eller Inre/Yttre/Inre begränsas förskjutningen till 50% av den yttre väggens faktiska bredd, eftersom den angränsande inre väggen skrivs ut efter den yttre väggen. Detta gäller även motsvarande avstånd angivna i millimeter."
|
||||
"Till exempel förskjuter 50% vägen med halva den yttre väggens bredd. Den verkliga förskjutningen begränsas både av den yttre väggens faktiska bredd och av det tillgängliga utrymmet till den angränsande väggen, så värden över 100% eller ett motsvarande absolut avstånd har ingen ytterligare effekt. Ange 0 för att stänga av förskjutningen."
|
||||
|
||||
# AI Translated
|
||||
msgid "Wipe before external loop"
|
||||
@@ -26625,10 +26621,10 @@ msgstr "Klipper-version => 0.9.0"
|
||||
|
||||
# AI Translated
|
||||
msgid ""
|
||||
"RepRapFirmware version => 3.4.0\n"
|
||||
"RepRap firmware version => 3.4.0\n"
|
||||
"Check your firmware documentation for supported shaper types."
|
||||
msgstr ""
|
||||
"RepRapFirmware-version => 3.4.0\n"
|
||||
"RepRap firmware-version => 3.4.0\n"
|
||||
"Kontrollera dokumentationen för din fasta programvara för att se vilka shaper-typer som stöds."
|
||||
|
||||
# AI Translated
|
||||
@@ -26648,8 +26644,8 @@ msgid "Frequency settings"
|
||||
msgstr "Frekvensinställningar"
|
||||
|
||||
# AI Translated
|
||||
msgid "RepRapFirmware uses the same frequency range for both axes."
|
||||
msgstr "RepRapFirmware använder samma frekvensintervall för båda axlarna."
|
||||
msgid "RepRap firmware uses the same frequency range for both axes."
|
||||
msgstr "RepRap firmware använder samma frekvensintervall för båda axlarna."
|
||||
|
||||
# AI Translated
|
||||
msgid "Damp: "
|
||||
@@ -26696,8 +26692,8 @@ msgid "Damp (Start / End): "
|
||||
msgstr "Dämpning (start / slut): "
|
||||
|
||||
# AI Translated
|
||||
msgid "RepRapFirmware uses the same frequency for both axes."
|
||||
msgstr "RepRapFirmware använder samma frekvens för båda axlarna."
|
||||
msgid "RepRap firmware uses the same frequency for both axes."
|
||||
msgstr "RepRap firmware använder samma frekvens för båda axlarna."
|
||||
|
||||
# AI Translated
|
||||
msgid "Note: Use previously calculated frequencies."
|
||||
|
||||
@@ -20243,17 +20243,17 @@ msgstr "เช็ดเข้าด้านใน"
|
||||
|
||||
# AI Translated
|
||||
msgid ""
|
||||
"Applies only to external walls, including hole boundaries. Moves the hot nozzle toward the inner walls during wiping to reduce reheating of freshly printed plastic and seam marks.\n"
|
||||
"Applies only to external walls, including hole boundaries. Moves the hot nozzle toward printed inner walls during wiping to reduce reheating of freshly printed plastic and seam marks.\n"
|
||||
"\n"
|
||||
"Especially useful at layer heights below 0.1 mm, where wipe marks are more visible.\n"
|
||||
"\n"
|
||||
"Uses the regular wipe where the outer wall has no adjacent inner wall, such as in single-wall areas, or if no supported inward path can be found, for example at tight corners or seam gaps."
|
||||
"Uses the regular wipe if no adjacent inner wall is already printed (single-wall areas or Outer/Inner wall order), or if no supported inward path can be found, for example at tight corners or seam gaps."
|
||||
msgstr ""
|
||||
"ใช้กับผนังด้านนอกเท่านั้น รวมถึงขอบรู โดยจะขยับหัวฉีดที่ร้อนเข้าหาผนังด้านในระหว่างการเช็ด เพื่อลดการให้ความร้อนซ้ำแก่พลาสติกที่เพิ่งพิมพ์และลดรอยตะเข็บ\n"
|
||||
"ใช้กับผนังด้านนอกเท่านั้น รวมถึงขอบรู โดยจะขยับหัวฉีดที่ร้อนเข้าหาผนังด้านในที่พิมพ์ไปแล้วระหว่างการเช็ด เพื่อลดการให้ความร้อนซ้ำแก่พลาสติกที่เพิ่งพิมพ์และลดรอยตะเข็บ\n"
|
||||
"\n"
|
||||
"มีประโยชน์เป็นพิเศษที่ความสูงเลเยอร์ต่ำกว่า 0.1 มม. ซึ่งรอยเช็ดจะเห็นได้ชัดกว่า\n"
|
||||
"\n"
|
||||
"จะใช้การเช็ดแบบปกติในบริเวณที่ผนังด้านนอกไม่มีผนังด้านในอยู่ติดกัน เช่น พื้นที่ผนังเดี่ยว หรือหากหาเส้นทางเข้าด้านในที่มีส่วนรองรับไม่ได้ เช่น ที่มุมแคบหรือช่องว่างของรอยตะเข็บ"
|
||||
"จะใช้การเช็ดแบบปกติหากยังไม่มีผนังด้านในที่อยู่ติดกันถูกพิมพ์ (พื้นที่ผนังเดี่ยว หรือลำดับผนังแบบด้านนอก/ด้านใน) หรือหากหาเส้นทางเข้าด้านในที่มีส่วนรองรับไม่ได้ เช่น ที่มุมแคบหรือช่องว่างของรอยตะเข็บ"
|
||||
|
||||
# AI Translated
|
||||
msgid "Wipe inward distance"
|
||||
@@ -20264,15 +20264,11 @@ msgstr "ระยะเช็ดเข้าด้านใน"
|
||||
msgid ""
|
||||
"The distance the wipe path is shifted away from the external perimeter, specified in millimeters or as a percentage of the actual outer-wall extrusion width.\n"
|
||||
"\n"
|
||||
"For example, 50% shifts the path by half of the outer-wall width. The effective offset is limited by both the actual outer-wall width and the available spacing to the adjacent wall, so values above 100% or an equivalent absolute distance have no additional effect. Set to 0 to disable the offset.\n"
|
||||
"\n"
|
||||
"With Outer/Inner or Inner/Outer/Inner wall order, the offset is limited to 50% of the actual outer-wall width because the adjacent inner wall is printed after the outer wall. This also applies to equivalent distances specified in millimeters."
|
||||
"For example, 50% shifts the path by half of the outer-wall width. The effective offset is limited by both the actual outer-wall width and the available spacing to the adjacent wall, so values above 100% or an equivalent absolute distance have no additional effect. Set to 0 to disable the offset."
|
||||
msgstr ""
|
||||
"ระยะที่เส้นทางการเช็ดถูกเลื่อนออกจากเส้นรอบรูปด้านนอก ระบุเป็นมิลลิเมตรหรือเป็นเปอร์เซ็นต์ของความกว้างการอัดขึ้นรูปจริงของผนังด้านนอก\n"
|
||||
"\n"
|
||||
"ตัวอย่างเช่น 50% จะเลื่อนเส้นทางไปครึ่งหนึ่งของความกว้างผนังด้านนอก ระยะเลื่อนที่มีผลจริงถูกจำกัดทั้งโดยความกว้างจริงของผนังด้านนอกและโดยช่องว่างที่มีถึงผนังที่อยู่ติดกัน ดังนั้นค่าที่เกิน 100% หรือระยะสัมบูรณ์ที่เทียบเท่าจะไม่ให้ผลเพิ่มเติม ตั้งเป็น 0 เพื่อปิดการเลื่อน\n"
|
||||
"\n"
|
||||
"เมื่อใช้ลำดับผนังแบบด้านนอก/ด้านใน หรือภายใน/ภายนอก/ภายใน ระยะเลื่อนจะถูกจำกัดไว้ที่ 50% ของความกว้างจริงของผนังด้านนอก เนื่องจากผนังด้านในที่อยู่ติดกันจะถูกพิมพ์หลังผนังด้านนอก ข้อจำกัดนี้ใช้กับระยะที่เทียบเท่าซึ่งระบุเป็นมิลลิเมตรด้วย"
|
||||
"ตัวอย่างเช่น 50% จะเลื่อนเส้นทางไปครึ่งหนึ่งของความกว้างผนังด้านนอก ระยะเลื่อนที่มีผลจริงถูกจำกัดทั้งโดยความกว้างจริงของผนังด้านนอกและโดยช่องว่างที่มีถึงผนังที่อยู่ติดกัน ดังนั้นค่าที่เกิน 100% หรือระยะสัมบูรณ์ที่เทียบเท่าจะไม่ให้ผลเพิ่มเติม ตั้งเป็น 0 เพื่อปิดการเลื่อน"
|
||||
|
||||
msgid "Wipe before external loop"
|
||||
msgstr "เช็ดก่อนวนรอบภายนอก"
|
||||
@@ -24604,7 +24600,7 @@ msgid "Klipper version => 0.9.0"
|
||||
msgstr "คลิปเปอร์เวอร์ชัน => 0.9.0"
|
||||
|
||||
msgid ""
|
||||
"RepRapFirmware version => 3.4.0\n"
|
||||
"RepRap firmware version => 3.4.0\n"
|
||||
"Check your firmware documentation for supported shaper types."
|
||||
msgstr ""
|
||||
"เฟิร์มแวร์ RepRap เวอร์ชัน => 3.4.0\n"
|
||||
@@ -24624,7 +24620,7 @@ msgstr "Y เริ่ม / สิ้นสุด: "
|
||||
msgid "Frequency settings"
|
||||
msgstr "การตั้งค่าความถี่"
|
||||
|
||||
msgid "RepRapFirmware uses the same frequency range for both axes."
|
||||
msgid "RepRap firmware uses the same frequency range for both axes."
|
||||
msgstr "เฟิร์มแวร์ RepRap ใช้ช่วงความถี่เดียวกันสำหรับทั้งสองแกน"
|
||||
|
||||
msgid "Damp: "
|
||||
@@ -24665,7 +24661,7 @@ msgstr "ความถี่ X / Y: "
|
||||
msgid "Damp (Start / End): "
|
||||
msgstr "การหน่วง (เริ่ม / สิ้นสุด): "
|
||||
|
||||
msgid "RepRapFirmware uses the same frequency for both axes."
|
||||
msgid "RepRap firmware uses the same frequency for both axes."
|
||||
msgstr "เฟิร์มแวร์ RepRap ใช้ความถี่เดียวกันสำหรับทั้งสองแกน"
|
||||
|
||||
msgid "Note: Use previously calculated frequencies."
|
||||
|
||||
@@ -20130,17 +20130,17 @@ msgstr "İçeri temizleme"
|
||||
|
||||
# AI Translated
|
||||
msgid ""
|
||||
"Applies only to external walls, including hole boundaries. Moves the hot nozzle toward the inner walls during wiping to reduce reheating of freshly printed plastic and seam marks.\n"
|
||||
"Applies only to external walls, including hole boundaries. Moves the hot nozzle toward printed inner walls during wiping to reduce reheating of freshly printed plastic and seam marks.\n"
|
||||
"\n"
|
||||
"Especially useful at layer heights below 0.1 mm, where wipe marks are more visible.\n"
|
||||
"\n"
|
||||
"Uses the regular wipe where the outer wall has no adjacent inner wall, such as in single-wall areas, or if no supported inward path can be found, for example at tight corners or seam gaps."
|
||||
"Uses the regular wipe if no adjacent inner wall is already printed (single-wall areas or Outer/Inner wall order), or if no supported inward path can be found, for example at tight corners or seam gaps."
|
||||
msgstr ""
|
||||
"Yalnızca delik sınırları dahil olmak üzere dış duvarlara uygulanır. Temizleme sırasında sıcak nozulu iç duvarlara doğru hareket ettirerek yeni yazdırılmış plastiğin yeniden ısınmasını ve dikiş izlerini azaltır.\n"
|
||||
"Yalnızca delik sınırları dahil olmak üzere dış duvarlara uygulanır. Temizleme sırasında sıcak nozulu yazdırılmış iç duvarlara doğru hareket ettirerek yeni yazdırılmış plastiğin yeniden ısınmasını ve dikiş izlerini azaltır.\n"
|
||||
"\n"
|
||||
"Özellikle temizleme izlerinin daha belirgin olduğu 0,1 mm'nin altındaki katman yüksekliklerinde yararlıdır.\n"
|
||||
"\n"
|
||||
"Tek duvarlı alanlar gibi dış duvarın bitişiğinde iç duvar bulunmayan yerlerde ya da örneğin dar köşelerde veya dikiş boşluklarında desteklenen bir içeri yol bulunamazsa normal temizlemeyi kullanır."
|
||||
"Yazdırılmış bitişik bir iç duvar yoksa (tek duvarlı alanlar veya Dış/İç duvar sırası) ya da örneğin dar köşelerde veya dikiş boşluklarında desteklenen bir içeri yol bulunamazsa normal temizlemeyi kullanır."
|
||||
|
||||
# AI Translated
|
||||
msgid "Wipe inward distance"
|
||||
@@ -20151,15 +20151,11 @@ msgstr "İçeri temizleme mesafesi"
|
||||
msgid ""
|
||||
"The distance the wipe path is shifted away from the external perimeter, specified in millimeters or as a percentage of the actual outer-wall extrusion width.\n"
|
||||
"\n"
|
||||
"For example, 50% shifts the path by half of the outer-wall width. The effective offset is limited by both the actual outer-wall width and the available spacing to the adjacent wall, so values above 100% or an equivalent absolute distance have no additional effect. Set to 0 to disable the offset.\n"
|
||||
"\n"
|
||||
"With Outer/Inner or Inner/Outer/Inner wall order, the offset is limited to 50% of the actual outer-wall width because the adjacent inner wall is printed after the outer wall. This also applies to equivalent distances specified in millimeters."
|
||||
"For example, 50% shifts the path by half of the outer-wall width. The effective offset is limited by both the actual outer-wall width and the available spacing to the adjacent wall, so values above 100% or an equivalent absolute distance have no additional effect. Set to 0 to disable the offset."
|
||||
msgstr ""
|
||||
"Temizleme yolunun dış çevreden uzağa kaydırıldığı mesafe; milimetre cinsinden veya dış duvarın gerçek ekstrüzyon genişliğinin yüzdesi olarak belirtilir.\n"
|
||||
"\n"
|
||||
"Örneğin 50%, yolu dış duvar genişliğinin yarısı kadar kaydırır. Etkin kaydırma, hem dış duvarın gerçek genişliğiyle hem de bitişik duvara olan mevcut boşlukla sınırlıdır; bu nedenle 100% üzerindeki değerlerin veya buna denk bir mutlak mesafenin ek bir etkisi olmaz. Kaydırmayı devre dışı bırakmak için 0 girin.\n"
|
||||
"\n"
|
||||
"Dış/İç veya İç/Dış/İç duvar sırasında bitişik iç duvar dış duvardan sonra yazdırıldığı için kaydırma, dış duvarın gerçek genişliğinin 50%'si ile sınırlanır. Bu, milimetre cinsinden belirtilen eşdeğer mesafeler için de geçerlidir."
|
||||
"Örneğin 50%, yolu dış duvar genişliğinin yarısı kadar kaydırır. Etkin kaydırma, hem dış duvarın gerçek genişliğiyle hem de bitişik duvara olan mevcut boşlukla sınırlıdır; bu nedenle 100% üzerindeki değerlerin veya buna denk bir mutlak mesafenin ek bir etkisi olmaz. Kaydırmayı devre dışı bırakmak için 0 girin."
|
||||
|
||||
msgid "Wipe before external loop"
|
||||
msgstr "Harici döngüden önce silin"
|
||||
@@ -24511,7 +24507,7 @@ msgid "Klipper version => 0.9.0"
|
||||
msgstr "Klipper sürümü => 0.9.0"
|
||||
|
||||
msgid ""
|
||||
"RepRapFirmware version => 3.4.0\n"
|
||||
"RepRap firmware version => 3.4.0\n"
|
||||
"Check your firmware documentation for supported shaper types."
|
||||
msgstr ""
|
||||
"RepRap ürün yazılımı sürümü => 3.4.0\n"
|
||||
@@ -24531,7 +24527,7 @@ msgstr "Y Başlangıç / Bitiş: "
|
||||
msgid "Frequency settings"
|
||||
msgstr "Frekans ayarları"
|
||||
|
||||
msgid "RepRapFirmware uses the same frequency range for both axes."
|
||||
msgid "RepRap firmware uses the same frequency range for both axes."
|
||||
msgstr "RepRap ürün yazılımı her iki eksen için aynı frekans aralığını kullanır."
|
||||
|
||||
# AI Translated
|
||||
@@ -24572,7 +24568,7 @@ msgstr "Frekans X / Y: "
|
||||
msgid "Damp (Start / End): "
|
||||
msgstr "Sönümleme (Başlangıç / Bitiş): "
|
||||
|
||||
msgid "RepRapFirmware uses the same frequency for both axes."
|
||||
msgid "RepRap firmware uses the same frequency for both axes."
|
||||
msgstr "RepRap ürün yazılımı her iki eksen için de aynı frekansı kullanır."
|
||||
|
||||
msgid "Note: Use previously calculated frequencies."
|
||||
|
||||
@@ -20601,17 +20601,17 @@ msgstr "Протирання всередину"
|
||||
|
||||
# AI Translated
|
||||
msgid ""
|
||||
"Applies only to external walls, including hole boundaries. Moves the hot nozzle toward the inner walls during wiping to reduce reheating of freshly printed plastic and seam marks.\n"
|
||||
"Applies only to external walls, including hole boundaries. Moves the hot nozzle toward printed inner walls during wiping to reduce reheating of freshly printed plastic and seam marks.\n"
|
||||
"\n"
|
||||
"Especially useful at layer heights below 0.1 mm, where wipe marks are more visible.\n"
|
||||
"\n"
|
||||
"Uses the regular wipe where the outer wall has no adjacent inner wall, such as in single-wall areas, or if no supported inward path can be found, for example at tight corners or seam gaps."
|
||||
"Uses the regular wipe if no adjacent inner wall is already printed (single-wall areas or Outer/Inner wall order), or if no supported inward path can be found, for example at tight corners or seam gaps."
|
||||
msgstr ""
|
||||
"Застосовується лише до зовнішніх стінок, зокрема до контурів отворів. Під час протирання переміщує гаряче сопло до внутрішніх стінок, щоб зменшити повторне нагрівання щойно надрукованого пластику та сліди шва.\n"
|
||||
"Застосовується лише до зовнішніх стінок, зокрема до контурів отворів. Під час протирання переміщує гаряче сопло до вже надрукованих внутрішніх стінок, щоб зменшити повторне нагрівання щойно надрукованого пластику та сліди шва.\n"
|
||||
"\n"
|
||||
"Особливо корисно за висоти шару менше 0,1 мм, де сліди протирання помітніші.\n"
|
||||
"\n"
|
||||
"Використовує звичайне протирання там, де зовнішня стінка не має сусідньої внутрішньої стінки, як-от на ділянках з однією стінкою, або якщо не вдається знайти опертий шлях усередину, наприклад у тісних кутах чи розривах шва."
|
||||
"Використовує звичайне протирання, якщо поруч немає вже надрукованої внутрішньої стінки (ділянки з однією стінкою або порядок стінок Зовнішня/Внутрішня) або якщо не вдається знайти опертий шлях усередину, наприклад у тісних кутах чи розривах шва."
|
||||
|
||||
# AI Translated
|
||||
msgid "Wipe inward distance"
|
||||
@@ -20622,15 +20622,11 @@ msgstr "Відстань протирання всередину"
|
||||
msgid ""
|
||||
"The distance the wipe path is shifted away from the external perimeter, specified in millimeters or as a percentage of the actual outer-wall extrusion width.\n"
|
||||
"\n"
|
||||
"For example, 50% shifts the path by half of the outer-wall width. The effective offset is limited by both the actual outer-wall width and the available spacing to the adjacent wall, so values above 100% or an equivalent absolute distance have no additional effect. Set to 0 to disable the offset.\n"
|
||||
"\n"
|
||||
"With Outer/Inner or Inner/Outer/Inner wall order, the offset is limited to 50% of the actual outer-wall width because the adjacent inner wall is printed after the outer wall. This also applies to equivalent distances specified in millimeters."
|
||||
"For example, 50% shifts the path by half of the outer-wall width. The effective offset is limited by both the actual outer-wall width and the available spacing to the adjacent wall, so values above 100% or an equivalent absolute distance have no additional effect. Set to 0 to disable the offset."
|
||||
msgstr ""
|
||||
"Відстань, на яку шлях протирання зміщується від зовнішнього контуру, задається в міліметрах або у відсотках від фактичної ширини екструзії зовнішньої стінки.\n"
|
||||
"\n"
|
||||
"Наприклад, 50% зміщує шлях на половину ширини зовнішньої стінки. Фактичне зміщення обмежується як реальною шириною зовнішньої стінки, так і доступним проміжком до сусідньої стінки, тому значення понад 100% або еквівалентна абсолютна відстань не дають додаткового ефекту. Задайте 0, щоб вимкнути зміщення.\n"
|
||||
"\n"
|
||||
"За порядку стінок Зовнішня/Внутрішня або Внутрішня/Зовнішня/Внутрішня зміщення обмежується 50% фактичної ширини зовнішньої стінки, оскільки сусідня внутрішня стінка друкується після зовнішньої. Це стосується й еквівалентних відстаней, заданих у міліметрах."
|
||||
"Наприклад, 50% зміщує шлях на половину ширини зовнішньої стінки. Фактичне зміщення обмежується як реальною шириною зовнішньої стінки, так і доступним проміжком до сусідньої стінки, тому значення понад 100% або еквівалентна абсолютна відстань не дають додаткового ефекту. Задайте 0, щоб вимкнути зміщення."
|
||||
|
||||
msgid "Wipe before external loop"
|
||||
msgstr "Протирати перед зовнішнім контуром"
|
||||
@@ -25027,10 +25023,10 @@ msgstr "Версія Klipper => 0.9.0"
|
||||
|
||||
# AI Translated
|
||||
msgid ""
|
||||
"RepRapFirmware version => 3.4.0\n"
|
||||
"RepRap firmware version => 3.4.0\n"
|
||||
"Check your firmware documentation for supported shaper types."
|
||||
msgstr ""
|
||||
"Версія RepRapFirmware => 3.4.0\n"
|
||||
"Версія RepRap firmware => 3.4.0\n"
|
||||
"Перевірте в документації прошивки, які типи шейперів підтримуються."
|
||||
|
||||
msgid "Frequency (Start / End): "
|
||||
@@ -25048,8 +25044,8 @@ msgid "Frequency settings"
|
||||
msgstr "Налаштування частоти"
|
||||
|
||||
# AI Translated
|
||||
msgid "RepRapFirmware uses the same frequency range for both axes."
|
||||
msgstr "RepRapFirmware використовує однаковий діапазон частот для обох осей."
|
||||
msgid "RepRap firmware uses the same frequency range for both axes."
|
||||
msgstr "RepRap firmware використовує однаковий діапазон частот для обох осей."
|
||||
|
||||
# AI Translated
|
||||
msgid "Damp: "
|
||||
@@ -25094,8 +25090,8 @@ msgid "Damp (Start / End): "
|
||||
msgstr "Демпфування (початок / кінець): "
|
||||
|
||||
# AI Translated
|
||||
msgid "RepRapFirmware uses the same frequency for both axes."
|
||||
msgstr "RepRapFirmware використовує однакову частоту для обох осей."
|
||||
msgid "RepRap firmware uses the same frequency for both axes."
|
||||
msgstr "RepRap firmware використовує однакову частоту для обох осей."
|
||||
|
||||
# AI Translated
|
||||
msgid "Note: Use previously calculated frequencies."
|
||||
|
||||
@@ -20995,17 +20995,17 @@ msgstr "Lau vào trong"
|
||||
|
||||
# AI Translated
|
||||
msgid ""
|
||||
"Applies only to external walls, including hole boundaries. Moves the hot nozzle toward the inner walls during wiping to reduce reheating of freshly printed plastic and seam marks.\n"
|
||||
"Applies only to external walls, including hole boundaries. Moves the hot nozzle toward printed inner walls during wiping to reduce reheating of freshly printed plastic and seam marks.\n"
|
||||
"\n"
|
||||
"Especially useful at layer heights below 0.1 mm, where wipe marks are more visible.\n"
|
||||
"\n"
|
||||
"Uses the regular wipe where the outer wall has no adjacent inner wall, such as in single-wall areas, or if no supported inward path can be found, for example at tight corners or seam gaps."
|
||||
"Uses the regular wipe if no adjacent inner wall is already printed (single-wall areas or Outer/Inner wall order), or if no supported inward path can be found, for example at tight corners or seam gaps."
|
||||
msgstr ""
|
||||
"Chỉ áp dụng cho các thành ngoài, kể cả biên của lỗ. Trong lúc lau, đầu phun nóng được đưa về phía các thành trong để giảm việc nung lại phần nhựa vừa in và giảm vết đường nối.\n"
|
||||
"Chỉ áp dụng cho các thành ngoài, kể cả biên của lỗ. Trong lúc lau, đầu phun nóng được đưa về phía các thành trong đã in để giảm việc nung lại phần nhựa vừa in và giảm vết đường nối.\n"
|
||||
"\n"
|
||||
"Đặc biệt hữu ích ở chiều cao lớp dưới 0,1 mm, nơi vết lau dễ thấy hơn.\n"
|
||||
"\n"
|
||||
"Dùng cách lau thông thường ở những nơi thành ngoài không có thành trong liền kề, như vùng chỉ có một thành, hoặc nếu không tìm được đường đi vào trong có điểm tựa, ví dụ ở các góc hẹp hay khe hở đường nối."
|
||||
"Dùng cách lau thông thường nếu chưa có thành trong liền kề nào được in (vùng chỉ có một thành hoặc thứ tự thành Ngoài/Trong), hoặc nếu không tìm được đường đi vào trong có điểm tựa, ví dụ ở các góc hẹp hay khe hở đường nối."
|
||||
|
||||
# AI Translated
|
||||
msgid "Wipe inward distance"
|
||||
@@ -21016,15 +21016,11 @@ msgstr "Khoảng cách lau vào trong"
|
||||
msgid ""
|
||||
"The distance the wipe path is shifted away from the external perimeter, specified in millimeters or as a percentage of the actual outer-wall extrusion width.\n"
|
||||
"\n"
|
||||
"For example, 50% shifts the path by half of the outer-wall width. The effective offset is limited by both the actual outer-wall width and the available spacing to the adjacent wall, so values above 100% or an equivalent absolute distance have no additional effect. Set to 0 to disable the offset.\n"
|
||||
"\n"
|
||||
"With Outer/Inner or Inner/Outer/Inner wall order, the offset is limited to 50% of the actual outer-wall width because the adjacent inner wall is printed after the outer wall. This also applies to equivalent distances specified in millimeters."
|
||||
"For example, 50% shifts the path by half of the outer-wall width. The effective offset is limited by both the actual outer-wall width and the available spacing to the adjacent wall, so values above 100% or an equivalent absolute distance have no additional effect. Set to 0 to disable the offset."
|
||||
msgstr ""
|
||||
"Khoảng cách mà đường lau được dịch ra xa khỏi chu vi ngoài, tính bằng milimét hoặc theo phần trăm độ rộng đùn thực tế của thành ngoài.\n"
|
||||
"\n"
|
||||
"Ví dụ, 50% dịch đường đi một nửa độ rộng thành ngoài. Độ dịch thực tế bị giới hạn bởi cả độ rộng thật của thành ngoài lẫn khoảng trống còn lại tới thành liền kề, nên các giá trị trên 100% hoặc khoảng cách tuyệt đối tương đương sẽ không có thêm tác dụng. Đặt 0 để tắt việc dịch chuyển.\n"
|
||||
"\n"
|
||||
"Với thứ tự thành Ngoài/Trong hoặc Trong/Ngoài/Trong, độ dịch bị giới hạn ở 50% độ rộng thực tế của thành ngoài, vì thành trong liền kề được in sau thành ngoài. Điều này cũng áp dụng cho các khoảng cách tương đương tính bằng milimét."
|
||||
"Ví dụ, 50% dịch đường đi một nửa độ rộng thành ngoài. Độ dịch thực tế bị giới hạn bởi cả độ rộng thật của thành ngoài lẫn khoảng trống còn lại tới thành liền kề, nên các giá trị trên 100% hoặc khoảng cách tuyệt đối tương đương sẽ không có thêm tác dụng. Đặt 0 để tắt việc dịch chuyển."
|
||||
|
||||
msgid "Wipe before external loop"
|
||||
msgstr "Lau trước vòng ngoài"
|
||||
@@ -25380,10 +25376,10 @@ msgstr "Phiên bản Klipper => 0.9.0"
|
||||
|
||||
# AI Translated
|
||||
msgid ""
|
||||
"RepRapFirmware version => 3.4.0\n"
|
||||
"RepRap firmware version => 3.4.0\n"
|
||||
"Check your firmware documentation for supported shaper types."
|
||||
msgstr ""
|
||||
"Phiên bản RepRapFirmware => 3.4.0\n"
|
||||
"Phiên bản RepRap firmware => 3.4.0\n"
|
||||
"Hãy xem tài liệu firmware của bạn để biết các loại shaper được hỗ trợ."
|
||||
|
||||
# AI Translated
|
||||
@@ -25402,8 +25398,8 @@ msgid "Frequency settings"
|
||||
msgstr "Cài đặt tần số"
|
||||
|
||||
# AI Translated
|
||||
msgid "RepRapFirmware uses the same frequency range for both axes."
|
||||
msgstr "RepRapFirmware dùng cùng một dải tần số cho cả hai trục."
|
||||
msgid "RepRap firmware uses the same frequency range for both axes."
|
||||
msgstr "RepRap firmware dùng cùng một dải tần số cho cả hai trục."
|
||||
|
||||
msgid "Damp: "
|
||||
msgstr "Giảm chấn: "
|
||||
@@ -25446,8 +25442,8 @@ msgid "Damp (Start / End): "
|
||||
msgstr "Giảm chấn (Bắt đầu / Kết thúc): "
|
||||
|
||||
# AI Translated
|
||||
msgid "RepRapFirmware uses the same frequency for both axes."
|
||||
msgstr "RepRapFirmware dùng cùng một tần số cho cả hai trục."
|
||||
msgid "RepRap firmware uses the same frequency for both axes."
|
||||
msgstr "RepRap firmware dùng cùng một tần số cho cả hai trục."
|
||||
|
||||
msgid "Note: Use previously calculated frequencies."
|
||||
msgstr "Lưu ý: Sử dụng tần số đã tính trước đó."
|
||||
|
||||
@@ -20780,17 +20780,17 @@ msgstr "向内擦拭"
|
||||
|
||||
# AI Translated
|
||||
msgid ""
|
||||
"Applies only to external walls, including hole boundaries. Moves the hot nozzle toward the inner walls during wiping to reduce reheating of freshly printed plastic and seam marks.\n"
|
||||
"Applies only to external walls, including hole boundaries. Moves the hot nozzle toward printed inner walls during wiping to reduce reheating of freshly printed plastic and seam marks.\n"
|
||||
"\n"
|
||||
"Especially useful at layer heights below 0.1 mm, where wipe marks are more visible.\n"
|
||||
"\n"
|
||||
"Uses the regular wipe where the outer wall has no adjacent inner wall, such as in single-wall areas, or if no supported inward path can be found, for example at tight corners or seam gaps."
|
||||
"Uses the regular wipe if no adjacent inner wall is already printed (single-wall areas or Outer/Inner wall order), or if no supported inward path can be found, for example at tight corners or seam gaps."
|
||||
msgstr ""
|
||||
"仅适用于外墙,包括孔洞边界。擦拭时将高温喷嘴移向内墙,以减少刚打印塑料的二次受热和接缝痕迹。\n"
|
||||
"仅适用于外墙,包括孔洞边界。擦拭时将高温喷嘴移向已打印的内墙,以减少刚打印塑料的二次受热和接缝痕迹。\n"
|
||||
"\n"
|
||||
"在层高低于 0.1 mm 时尤其有用,此时擦拭痕迹更明显。\n"
|
||||
"\n"
|
||||
"若外墙没有相邻的内墙(例如单墙区域),或找不到有支撑的向内路径(例如在锐角或接缝间隙处),则使用常规擦拭。"
|
||||
"若相邻内墙尚未打印(单墙区域或外墙/内墙顺序),或找不到有支撑的向内路径(例如在锐角或接缝间隙处),则使用常规擦拭。"
|
||||
|
||||
# AI Translated
|
||||
msgid "Wipe inward distance"
|
||||
@@ -20801,15 +20801,11 @@ msgstr "向内擦拭距离"
|
||||
msgid ""
|
||||
"The distance the wipe path is shifted away from the external perimeter, specified in millimeters or as a percentage of the actual outer-wall extrusion width.\n"
|
||||
"\n"
|
||||
"For example, 50% shifts the path by half of the outer-wall width. The effective offset is limited by both the actual outer-wall width and the available spacing to the adjacent wall, so values above 100% or an equivalent absolute distance have no additional effect. Set to 0 to disable the offset.\n"
|
||||
"\n"
|
||||
"With Outer/Inner or Inner/Outer/Inner wall order, the offset is limited to 50% of the actual outer-wall width because the adjacent inner wall is printed after the outer wall. This also applies to equivalent distances specified in millimeters."
|
||||
"For example, 50% shifts the path by half of the outer-wall width. The effective offset is limited by both the actual outer-wall width and the available spacing to the adjacent wall, so values above 100% or an equivalent absolute distance have no additional effect. Set to 0 to disable the offset."
|
||||
msgstr ""
|
||||
"擦拭路径偏离外墙轮廓的距离,以毫米或实际外墙挤出宽度的百分比指定。\n"
|
||||
"\n"
|
||||
"例如,50% 会将路径偏移外墙宽度的一半。实际偏移量同时受实际外墙宽度和到相邻墙的可用间距限制,因此超过 100% 的值或等效的绝对距离不会产生额外效果。设为 0 可禁用偏移。\n"
|
||||
"\n"
|
||||
"墙顺序为外墙/内墙或内墙/外墙/内墙时,相邻内墙在外墙之后打印,因此偏移量限制为实际外墙宽度的 50%。以毫米指定的等效距离同样适用此限制。"
|
||||
"例如,50% 会将路径偏移外墙宽度的一半。实际偏移量同时受实际外墙宽度和到相邻墙的可用间距限制,因此超过 100% 的值或等效的绝对距离不会产生额外效果。设为 0 可禁用偏移。"
|
||||
|
||||
# AI Translated
|
||||
msgid "Wipe before external loop"
|
||||
@@ -25320,7 +25316,7 @@ msgid "Klipper version => 0.9.0"
|
||||
msgstr "Klipper 版本 => 0.9.0"
|
||||
|
||||
msgid ""
|
||||
"RepRapFirmware version => 3.4.0\n"
|
||||
"RepRap firmware version => 3.4.0\n"
|
||||
"Check your firmware documentation for supported shaper types."
|
||||
msgstr ""
|
||||
"RepRap 固件版本 => 3.4.0\n"
|
||||
@@ -25341,7 +25337,7 @@ msgstr "Y 开始 / 结束: "
|
||||
msgid "Frequency settings"
|
||||
msgstr "频率设置"
|
||||
|
||||
msgid "RepRapFirmware uses the same frequency range for both axes."
|
||||
msgid "RepRap firmware uses the same frequency range for both axes."
|
||||
msgstr "RepRap 固件将对两个轴使用相同的频率范围。"
|
||||
|
||||
msgid "Damp: "
|
||||
@@ -25382,7 +25378,7 @@ msgstr "频率 X / Y: "
|
||||
msgid "Damp (Start / End): "
|
||||
msgstr "阻尼(开始 / 结束): "
|
||||
|
||||
msgid "RepRapFirmware uses the same frequency for both axes."
|
||||
msgid "RepRap firmware uses the same frequency for both axes."
|
||||
msgstr "RepRap 固件将对两个轴使用相同的频率。"
|
||||
|
||||
msgid "Note: Use previously calculated frequencies."
|
||||
|
||||
@@ -21209,17 +21209,17 @@ msgstr "向內擦拭"
|
||||
|
||||
# AI Translated
|
||||
msgid ""
|
||||
"Applies only to external walls, including hole boundaries. Moves the hot nozzle toward the inner walls during wiping to reduce reheating of freshly printed plastic and seam marks.\n"
|
||||
"Applies only to external walls, including hole boundaries. Moves the hot nozzle toward printed inner walls during wiping to reduce reheating of freshly printed plastic and seam marks.\n"
|
||||
"\n"
|
||||
"Especially useful at layer heights below 0.1 mm, where wipe marks are more visible.\n"
|
||||
"\n"
|
||||
"Uses the regular wipe where the outer wall has no adjacent inner wall, such as in single-wall areas, or if no supported inward path can be found, for example at tight corners or seam gaps."
|
||||
"Uses the regular wipe if no adjacent inner wall is already printed (single-wall areas or Outer/Inner wall order), or if no supported inward path can be found, for example at tight corners or seam gaps."
|
||||
msgstr ""
|
||||
"僅適用於外牆,包括孔洞邊界。擦拭時將高溫噴嘴移向內牆,以減少剛列印塑膠的二次受熱與接縫痕跡。\n"
|
||||
"僅適用於外牆,包括孔洞邊界。擦拭時將高溫噴嘴移向已列印的內牆,以減少剛列印塑膠的二次受熱與接縫痕跡。\n"
|
||||
"\n"
|
||||
"在層高低於 0.1 mm 時特別有用,此時擦拭痕跡更明顯。\n"
|
||||
"\n"
|
||||
"若外牆沒有相鄰的內牆(例如單牆區域),或找不到有支撐的向內路徑(例如在銳角或接縫間隙處),則使用一般擦拭。"
|
||||
"若相鄰內牆尚未列印(單牆區域或外牆/內牆順序),或找不到有支撐的向內路徑(例如在銳角或接縫間隙處),則使用一般擦拭。"
|
||||
|
||||
# AI Translated
|
||||
msgid "Wipe inward distance"
|
||||
@@ -21230,15 +21230,11 @@ msgstr "向內擦拭距離"
|
||||
msgid ""
|
||||
"The distance the wipe path is shifted away from the external perimeter, specified in millimeters or as a percentage of the actual outer-wall extrusion width.\n"
|
||||
"\n"
|
||||
"For example, 50% shifts the path by half of the outer-wall width. The effective offset is limited by both the actual outer-wall width and the available spacing to the adjacent wall, so values above 100% or an equivalent absolute distance have no additional effect. Set to 0 to disable the offset.\n"
|
||||
"\n"
|
||||
"With Outer/Inner or Inner/Outer/Inner wall order, the offset is limited to 50% of the actual outer-wall width because the adjacent inner wall is printed after the outer wall. This also applies to equivalent distances specified in millimeters."
|
||||
"For example, 50% shifts the path by half of the outer-wall width. The effective offset is limited by both the actual outer-wall width and the available spacing to the adjacent wall, so values above 100% or an equivalent absolute distance have no additional effect. Set to 0 to disable the offset."
|
||||
msgstr ""
|
||||
"擦拭路徑偏離外牆的距離,以公釐或實際外牆線寬的百分比指定。\n"
|
||||
"\n"
|
||||
"例如,50% 會將路徑偏移外牆寬度的一半。實際偏移量同時受實際外牆寬度與到相鄰牆的可用間距限制,因此超過 100% 的值或等效的絕對距離不會產生額外效果。設為 0 可停用偏移。\n"
|
||||
"\n"
|
||||
"牆順序為外牆/內牆或內牆/外牆/內牆時,相鄰內牆會在外牆之後列印,因此偏移量限制為實際外牆寬度的 50%。以公釐指定的等效距離同樣適用此限制。"
|
||||
"例如,50% 會將路徑偏移外牆寬度的一半。實際偏移量同時受實際外牆寬度與到相鄰牆的可用間距限制,因此超過 100% 的值或等效的絕對距離不會產生額外效果。設為 0 可停用偏移。"
|
||||
|
||||
msgid "Wipe before external loop"
|
||||
msgstr "外牆迴圈前的擦拭動作"
|
||||
@@ -25829,7 +25825,7 @@ msgid "Klipper version => 0.9.0"
|
||||
msgstr "Klipper 版本 => 0.9.0"
|
||||
|
||||
msgid ""
|
||||
"RepRapFirmware version => 3.4.0\n"
|
||||
"RepRap firmware version => 3.4.0\n"
|
||||
"Check your firmware documentation for supported shaper types."
|
||||
msgstr ""
|
||||
"RepRap 韌體版本 => 3.4.0\n"
|
||||
@@ -25850,7 +25846,7 @@ msgstr "Y 開始 / 結束: "
|
||||
msgid "Frequency settings"
|
||||
msgstr "頻率設定"
|
||||
|
||||
msgid "RepRapFirmware uses the same frequency range for both axes."
|
||||
msgid "RepRap firmware uses the same frequency range for both axes."
|
||||
msgstr "RepRap 韌體對兩個軸使用相同的頻率範圍。"
|
||||
|
||||
msgid "Damp: "
|
||||
@@ -25892,7 +25888,7 @@ msgstr "頻率 X / Y: "
|
||||
msgid "Damp (Start / End): "
|
||||
msgstr "阻尼(開始 / 結束): "
|
||||
|
||||
msgid "RepRapFirmware uses the same frequency for both axes."
|
||||
msgid "RepRap firmware uses the same frequency for both axes."
|
||||
msgstr "RepRap 韌體對兩個軸使用相同的頻率。"
|
||||
|
||||
msgid "Note: Use previously calculated frequencies."
|
||||
|
||||
@@ -1 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M4.125,4.125H19.875V19.875H4.125V6.75H17.25V17.25H6.75V9.375H14.625V14.625H9.375V12H12" style="fill:none;stroke:#009688;stroke-linecap:round;stroke-linejoin:round"/><rect x="1.5" y="1.5" width="21" height="21" rx="2" style="fill:none;stroke:#949494;stroke-linecap:round;stroke-linejoin:round"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12.00,12.00 L12.00,11.96 L12.01,11.92 L12.03,11.89 L12.05,11.85 L12.08,11.82 L12.12,11.80 L12.16,11.78 L12.20,11.76 L12.25,11.75 L12.30,11.75 L12.35,11.75 L12.40,11.77 L12.46,11.79 L12.51,11.81 L12.56,11.85 L12.61,11.89 L12.66,11.94 L12.70,12.00 L12.74,12.06 L12.77,12.14 L12.79,12.21 L12.80,12.29 L12.81,12.38 L12.81,12.47 L12.80,12.56 L12.77,12.65 L12.74,12.74 L12.70,12.83 L12.65,12.92 L12.58,13.01 L12.51,13.09 L12.43,13.17 L12.33,13.24 L12.23,13.30 L12.12,13.36 L12.00,13.40 L11.87,13.43 L11.74,13.46 L11.61,13.46 L11.47,13.46 L11.33,13.45 L11.18,13.41 L11.04,13.37 L10.90,13.31 L10.76,13.24 L10.63,13.15 L10.50,13.05 L10.38,12.93 L10.27,12.81 L10.17,12.67 L10.08,12.51 L10.01,12.35 L9.95,12.18 L9.90,12.00 L9.87,11.81 L9.86,11.62 L9.86,11.43 L9.88,11.23 L9.92,11.03 L9.98,10.83 L10.06,10.64 L10.15,10.45 L10.27,10.27 L10.40,10.09 L10.55,9.93 L10.72,9.78 L10.90,9.64 L11.10,9.52 L11.31,9.41 L11.53,9.32 L11.76,9.25 L12.00,9.20 L12.25,9.17 L12.50,9.17 L12.75,9.18 L13.01,9.22 L13.27,9.29 L13.52,9.37 L13.76,9.48 L14.00,9.62 L14.23,9.77 L14.44,9.95 L14.64,10.15 L14.83,10.37 L15.00,10.60 L15.14,10.86 L15.27,11.12 L15.37,11.41 L15.45,11.70 L15.50,12.00 L15.53,12.31 L15.52,12.62 L15.49,12.94 L15.44,13.25 L15.35,13.56 L15.23,13.87 L15.09,14.16 L14.92,14.45 L14.72,14.72 L14.50,14.98 L14.25,15.22 L13.98,15.44 L13.69,15.63 L13.38,15.80 L13.06,15.94 L12.72,16.06 L12.36,16.15 L12.00,16.20 L11.63,16.22 L11.26,16.21 L10.88,16.17 L10.51,16.09 L10.14,15.98 L9.78,15.84 L9.43,15.66 L9.10,15.46 L8.78,15.22 L8.48,14.95 L8.21,14.65 L7.96,14.33 L7.74,13.99 L7.54,13.62 L7.38,13.24 L7.25,12.84 L7.16,12.42 L7.10,12.00 L7.08,11.57 L7.10,11.14 L7.15,10.70 L7.25,10.27 L7.38,9.85 L7.55,9.43 L7.76,9.03 L8.01,8.65 L8.29,8.29 L8.60,7.95 L8.94,7.64 L9.32,7.35 L9.72,7.10 L10.14,6.88 L10.58,6.70 L11.04,6.56 L11.52,6.46 L12.00,6.40 L12.49,6.38 L12.99,6.41 L13.48,6.48 L13.97,6.59 L14.45,6.75 L14.92,6.95 L15.37,7.19 L15.80,7.47 L16.21,7.79 L16.59,8.15 L16.94,8.54 L17.25,8.97 L17.53,9.42 L17.77,9.90 L17.97,10.40 L18.13,10.92 L18.24,11.45 L18.30,12.00 L18.31,12.55 L18.28,13.11 L18.20,13.66 L18.07,14.21 L17.89,14.74 L17.66,15.27 L17.38,15.77 L17.06,16.25 L16.70,16.70 L16.30,17.12 L15.86,17.51 L15.38,17.86 L14.88,18.17 L14.34,18.43 L13.78,18.65 L13.20,18.82 L12.61,18.93 L12.00,19.00 L11.39,19.01 L10.77,18.97 L10.16,18.87 L9.55,18.72 L8.96,18.52 L8.38,18.26 L7.83,17.96 L7.30,17.60 L6.80,17.20 L6.34,16.75 L5.92,16.26 L5.53,15.73 L5.20,15.17 L4.91,14.58 L4.68,13.96 L4.49,13.32 L4.37,12.67 L4.30,12.00 L4.29,11.33 L4.34,10.65 L4.45,9.98 L4.62,9.31 L4.85,8.66 L5.13,8.03 L5.47,7.43 L5.86,6.85 L6.31,6.31 L6.80,5.80 L7.34,5.34 L7.92,4.93 L8.53,4.56 L9.18,4.25 L9.86,4.00 L10.55,3.80 L11.27,3.67 L12.00,3.60" style="fill:none;stroke:#009688;stroke-linecap:round;stroke-linejoin:round"/><rect x="1.5" y="1.5" width="21" height="21" rx="2" style="fill:none;stroke:#949494;stroke-linecap:round;stroke-linejoin:round"/></svg>
|
||||
|
Before Width: | Height: | Size: 392 B After Width: | Height: | Size: 2.9 KiB |
@@ -35,6 +35,10 @@ uniform vec4 uniform_color_clip_plane_1;
|
||||
uniform vec4 uniform_color_clip_plane_2;
|
||||
uniform SlopeDetection slope;
|
||||
|
||||
//BBS: add outline_color
|
||||
uniform bool is_outline;
|
||||
uniform sampler2D depth_tex;
|
||||
uniform vec2 screen_size;
|
||||
|
||||
|
||||
#ifdef ENABLE_ENVIRONMENT_MAP
|
||||
@@ -49,6 +53,8 @@ uniform PrintVolumeDetection print_volume;
|
||||
uniform vec3 extruder_printable_heights;
|
||||
const float ONE_OVER_EPSILON = 1e4;
|
||||
|
||||
uniform float z_far;
|
||||
uniform float z_near;
|
||||
|
||||
// Depth-based shadow map (object-on-object and self shadows). shadow_intensity == 0 disables it.
|
||||
uniform sampler2D shadow_map;
|
||||
@@ -73,6 +79,71 @@ varying vec4 world_pos;
|
||||
varying float world_normal_z;
|
||||
varying vec3 eye_normal;
|
||||
|
||||
vec3 getBackfaceColor(vec3 fill) {
|
||||
float brightness = 0.2126 * fill.r + 0.7152 * fill.g + 0.0722 * fill.b;
|
||||
return (brightness > 0.75) ? vec3(0.11, 0.165, 0.208) : vec3(0.988, 0.988, 0.988);
|
||||
}
|
||||
|
||||
// Silhouette edge detection & rendering algorithem by leoneruggiero
|
||||
// https://www.shadertoy.com/view/DslXz2
|
||||
#define INFLATE 1
|
||||
|
||||
float GetTolerance(float d, float k)
|
||||
{
|
||||
// -------------------------------------------
|
||||
// Find a tolerance for depth that is constant
|
||||
// in view space (k in view space).
|
||||
//
|
||||
// tol = k*ddx(ZtoDepth(z))
|
||||
// -------------------------------------------
|
||||
|
||||
float A=- (z_far+z_near)/(z_far-z_near);
|
||||
float B=-2.0*z_far*z_near /(z_far-z_near);
|
||||
|
||||
d = d*2.0-1.0;
|
||||
|
||||
return -k*(d+A)*(d+A)/B;
|
||||
}
|
||||
|
||||
float DetectSilho(vec2 fragCoord, vec2 dir)
|
||||
{
|
||||
// -------------------------------------------
|
||||
// x0 ___ x1----o
|
||||
// :\ :
|
||||
// r0 : \ : r1
|
||||
// : \ :
|
||||
// o---x2 ___ x3
|
||||
//
|
||||
// r0 and r1 are the differences between actual
|
||||
// and expected (as if x0..3 where on the same
|
||||
// plane) depth values.
|
||||
// -------------------------------------------
|
||||
|
||||
float x0 = abs(texture2D(depth_tex, (fragCoord + dir*-2.0) / screen_size).r);
|
||||
float x1 = abs(texture2D(depth_tex, (fragCoord + dir*-1.0) / screen_size).r);
|
||||
float x2 = abs(texture2D(depth_tex, (fragCoord + dir* 0.0) / screen_size).r);
|
||||
float x3 = abs(texture2D(depth_tex, (fragCoord + dir* 1.0) / screen_size).r);
|
||||
|
||||
float d0 = (x1-x0);
|
||||
float d1 = (x2-x3);
|
||||
|
||||
float r0 = x1 + d0 - x2;
|
||||
float r1 = x2 + d1 - x1;
|
||||
|
||||
float tol = GetTolerance(x2, 0.04);
|
||||
|
||||
return smoothstep(0.0, tol*tol, max( - r0*r1, 0.0));
|
||||
|
||||
}
|
||||
|
||||
float DetectSilho(vec2 fragCoord)
|
||||
{
|
||||
return max(
|
||||
DetectSilho(fragCoord, vec2(1,0)), // Horizontal
|
||||
DetectSilho(fragCoord, vec2(0,1)) // Vertical
|
||||
);
|
||||
}
|
||||
|
||||
// Returns a lighting multiplier in [1 - shadow_intensity, 1]: < 1 where the fragment is
|
||||
// occluded from the light in the shadow map. 3x3 PCF softens the edges.
|
||||
float shadow_shade()
|
||||
@@ -154,10 +225,25 @@ void main()
|
||||
}
|
||||
float shade = shadow_shade();
|
||||
|
||||
//BBS: add outline_color
|
||||
if (is_outline) {
|
||||
color = vec4((vec3(intensity.y) + color.rgb * intensity.x) * shade, color.a);
|
||||
vec2 fragCoord = gl_FragCoord.xy;
|
||||
float s = DetectSilho(fragCoord);
|
||||
// Makes silhouettes thicker.
|
||||
for(int i=1;i<=INFLATE; i++)
|
||||
{
|
||||
s = max(s, DetectSilho(fragCoord.xy + vec2(i, 0)));
|
||||
s = max(s, DetectSilho(fragCoord.xy + vec2(0, i)));
|
||||
}
|
||||
if (s < 0.01)
|
||||
discard;
|
||||
gl_FragColor = vec4(mix(color.rgb, getBackfaceColor(color.rgb), s), color.a);
|
||||
}
|
||||
#ifdef ENABLE_ENVIRONMENT_MAP
|
||||
if (use_environment_tex)
|
||||
else if (use_environment_tex)
|
||||
gl_FragColor = vec4((0.45 * texture(environment_tex, normalize(eye_normal).xy * 0.5 + 0.5).xyz + 0.8 * color.rgb * intensity.x) * shade, color.a);
|
||||
else
|
||||
#endif
|
||||
else
|
||||
gl_FragColor = vec4((vec3(intensity.y) + color.rgb * intensity.x) * shade, color.a);
|
||||
}
|
||||
@@ -31,6 +31,8 @@ uniform mat4 projection_matrix;
|
||||
uniform mat3 view_normal_matrix;
|
||||
uniform mat4 volume_world_matrix;
|
||||
uniform SlopeDetection slope;
|
||||
uniform bool is_outline;
|
||||
uniform vec2 screen_size;
|
||||
|
||||
// Clipping plane, x = min z, y = max z. Used by the FFF and SLA previews to clip with a top / bottom plane.
|
||||
uniform vec2 z_range;
|
||||
@@ -80,6 +82,15 @@ void main()
|
||||
world_normal_z = slope.actived ? dot(normalize(slope.volume_world_normal_matrix * v_normal), slope.up_direction) : 0.0;
|
||||
|
||||
gl_Position = projection_matrix * position;
|
||||
if (is_outline) {
|
||||
vec3 n = normalize((view_normal_matrix * v_normal).xyz);
|
||||
vec2 dir = normalize(n.xy);
|
||||
if (dot(dir, dir) > 0.0) {
|
||||
//set outline thickness
|
||||
float px = 3.0;
|
||||
gl_Position.xy += dir * (px * 2.0 / screen_size) * gl_Position.w;
|
||||
}
|
||||
}
|
||||
// Fill in the scalars for fragment shader clipping. Fragments with any of these components lower than zero are discarded.
|
||||
clipping_planes_dots = vec3(dot(world_pos, clipping_plane), world_pos.z - z_range.x, z_range.y - world_pos.z);
|
||||
color_clip_plane_dot = dot(world_pos, color_clip_plane);
|
||||
|
||||
@@ -1,219 +0,0 @@
|
||||
#version 110
|
||||
|
||||
const float INF = 1e9;
|
||||
|
||||
uniform sampler2D mask_tex;
|
||||
uniform sampler2D depth_tex;
|
||||
uniform sampler2D edges_tex;
|
||||
uniform vec2 tex_size;
|
||||
// false draws the ring around the selection, true the lines along its inner edges.
|
||||
uniform bool inner;
|
||||
// The stencil keeps the ring off the samples of the selection, without it the ring stays off covered pixels.
|
||||
uniform bool use_stencil;
|
||||
// Widths in pixels: x at least, y at most, z the width on the model in view space units.
|
||||
uniform vec3 ring_width;
|
||||
uniform int ring_reach;
|
||||
uniform float ring_sigma;
|
||||
// Half the width of an inner line, as ring_width.
|
||||
uniform vec3 line_width;
|
||||
uniform int line_reach;
|
||||
uniform float line_opacity;
|
||||
uniform vec3 outline_color;
|
||||
// The projection on view z: window depth is (x * z + y) / (z * z + w), remapped from [-1, 1].
|
||||
uniform vec4 depth_coef;
|
||||
// View space size of a pixel at view depth z: x * -z + y.
|
||||
uniform vec2 pixel_size_coef;
|
||||
|
||||
vec4 fetch_mask(ivec2 p)
|
||||
{
|
||||
return texture2D(mask_tex, (vec2(p) + 0.5) / tex_size);
|
||||
}
|
||||
|
||||
float fetch_depth(ivec2 p)
|
||||
{
|
||||
return texture2D(depth_tex, (vec2(p) + 0.5) / tex_size).r;
|
||||
}
|
||||
|
||||
vec4 fetch_edges(ivec2 p)
|
||||
{
|
||||
return texture2D(edges_tex, (vec2(p) + 0.5) / tex_size);
|
||||
}
|
||||
|
||||
bool covered(vec4 m)
|
||||
{
|
||||
return m.g > 0.0;
|
||||
}
|
||||
|
||||
// The texel and its eight neighbors are covered.
|
||||
bool inside_mask(ivec2 p)
|
||||
{
|
||||
for (int y = -1; y <= 1; ++y)
|
||||
for (int x = -1; x <= 1; ++x)
|
||||
if (!covered(fetch_mask(p + ivec2(x, y))))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Strength and crossing of an inner edge written by outline_edges.fs.
|
||||
vec2 unpack_edge(float c)
|
||||
{
|
||||
float v = floor(c * 255.0 + 0.5);
|
||||
float s = floor(v / 16.0);
|
||||
return vec2(s, v - s * 16.0) / 15.0;
|
||||
}
|
||||
|
||||
float pixel_size(float z)
|
||||
{
|
||||
return dot(pixel_size_coef, vec2(-z, 1.0));
|
||||
}
|
||||
|
||||
// Thicker as the camera closes in, within a range of pixels.
|
||||
float width_at(vec3 width, float z)
|
||||
{
|
||||
return clamp(width.z / pixel_size(z), width.x, width.y);
|
||||
}
|
||||
|
||||
// A smooth edge 1.2 pixels wide around width.
|
||||
float edge_alpha(float width, float d)
|
||||
{
|
||||
return 1.0 - smoothstep(width - 0.6, width + 0.6, d);
|
||||
}
|
||||
|
||||
float view_z(float depth)
|
||||
{
|
||||
float ndc = depth * 2.0 - 1.0;
|
||||
return (depth_coef.y - ndc * depth_coef.w) / (ndc * depth_coef.z - depth_coef.x);
|
||||
}
|
||||
|
||||
float window_depth(float z)
|
||||
{
|
||||
return 0.5 * (depth_coef.x * z + depth_coef.y) / (depth_coef.z * z + depth_coef.w) + 0.5;
|
||||
}
|
||||
|
||||
// One sided, so that the slope does not span an edge. Uncovered texels keep the cleared depth of 1.
|
||||
float depth_slope(float d, float before, float after)
|
||||
{
|
||||
float s = INF;
|
||||
if (before < 1.0) s = abs(d - before);
|
||||
if (after < 1.0) s = min(s, abs(after - d));
|
||||
return s < INF ? s : 0.0;
|
||||
}
|
||||
|
||||
// The depth of the selection at p, moved forward by its spread over the pixel, so that it passes on every sample.
|
||||
float surface_depth(ivec2 p)
|
||||
{
|
||||
float d = fetch_depth(p);
|
||||
float sx = depth_slope(d, fetch_depth(p - ivec2(1, 0)), fetch_depth(p + ivec2(1, 0)));
|
||||
float sy = depth_slope(d, fetch_depth(p - ivec2(0, 1)), fetch_depth(p + ivec2(0, 1)));
|
||||
return d - 0.5 * (sx + sy) - 1e-6;
|
||||
}
|
||||
|
||||
// x beyond which a standard normal has p of its mass, for p up to 0.5 (Abramowitz and Stegun 26.2.23).
|
||||
float normal_tail_inverse(float p)
|
||||
{
|
||||
float t = sqrt(-2.0 * log(p));
|
||||
return t - (2.515517 + t * (0.802853 + t * 0.010328)) / (1.0 + t * (1.432788 + t * (0.189269 + t * 0.001308)));
|
||||
}
|
||||
|
||||
void render_ring(ivec2 p)
|
||||
{
|
||||
vec4 m = fetch_mask(p);
|
||||
float alpha = 1.0;
|
||||
float depth;
|
||||
if (covered(m)) {
|
||||
// Only the silhouette of the mask may hold samples off the selection. Inside, a face the mask has and the
|
||||
// scene culled, say, would get no stencil bit and fill with the ring.
|
||||
if (!use_stencil || inside_mask(p))
|
||||
discard;
|
||||
depth = surface_depth(p);
|
||||
}
|
||||
else {
|
||||
// The nearest covered texel from the nearest one of each row, and the gaussian coverage around p.
|
||||
float best = INF;
|
||||
ivec2 t = p;
|
||||
float coverage = 0.0;
|
||||
float weights = 0.0;
|
||||
for (int j = -ring_reach; j <= ring_reach; ++j) {
|
||||
vec4 e = fetch_edges(p + ivec2(0, j));
|
||||
float w = exp(-float(j * j) / (2.0 * ring_sigma * ring_sigma));
|
||||
weights += w;
|
||||
coverage += w * e.a;
|
||||
float v = floor(e.b * 255.0 + 0.5);
|
||||
if (v > 0.0) {
|
||||
float h = v - 16.0;
|
||||
float d2 = h * h + float(j * j);
|
||||
if (d2 < best) {
|
||||
best = d2;
|
||||
t = p + ivec2(int(h), j);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (best >= INF)
|
||||
discard;
|
||||
// The coverage of a straight silhouette at dist is the normal tail beyond dist / sigma. Corners and thin
|
||||
// parts fall off faster, so it is kept within half a texel of the midpoint to the nearest covered texel.
|
||||
coverage /= weights;
|
||||
float centers = sqrt(best) - 0.5;
|
||||
float dist = coverage < 0.5 ? ring_sigma * normal_tail_inverse(max(coverage, 1e-6)) : 0.0;
|
||||
dist = clamp(dist, centers - 0.5, centers + 0.5);
|
||||
float z = view_z(fetch_depth(t));
|
||||
alpha = edge_alpha(width_at(ring_width, z), dist);
|
||||
if (alpha <= 0.0)
|
||||
discard;
|
||||
m = fetch_mask(t);
|
||||
// Brought forward with the distance, so that it shows over what the selection stands on.
|
||||
depth = window_depth(z + 3.0 * (dist + 2.0) * pixel_size(z));
|
||||
}
|
||||
gl_FragColor = vec4(outline_color, alpha);
|
||||
gl_FragDepth = depth;
|
||||
}
|
||||
|
||||
void render_lines(ivec2 p)
|
||||
{
|
||||
vec4 m = fetch_mask(p);
|
||||
if (!covered(m))
|
||||
discard;
|
||||
|
||||
// The nearest crossing along the row and along the column. For a straight line at distance d they lie at
|
||||
// dx = d / |cos| and dy = d / |sin|, so 1 / d^2 = 1 / dx^2 + 1 / dy^2.
|
||||
float dx = INF;
|
||||
float sx = 0.0;
|
||||
for (int i = -line_reach - 1; i <= line_reach; ++i) {
|
||||
vec2 e = unpack_edge(fetch_edges(p + ivec2(i, 0)).r);
|
||||
float d = abs(float(i) + e.y);
|
||||
if (e.x > 0.0 && d < dx) {
|
||||
dx = d;
|
||||
sx = e.x;
|
||||
}
|
||||
}
|
||||
float dy = INF;
|
||||
float sy = 0.0;
|
||||
for (int j = -line_reach - 1; j <= line_reach; ++j) {
|
||||
vec2 e = unpack_edge(fetch_edges(p + ivec2(0, j)).g);
|
||||
float d = abs(float(j) + e.y);
|
||||
if (e.x > 0.0 && d < dy) {
|
||||
dy = d;
|
||||
sy = e.x;
|
||||
}
|
||||
}
|
||||
if (dx >= INF && dy >= INF)
|
||||
discard;
|
||||
float d = (dx < INF && dy < INF) ? dx * dy * inversesqrt(max(dx * dx + dy * dy, 1e-8)) : min(dx, dy);
|
||||
// A line thinner on screen than the narrowest drawn fades instead, so that a far selection is not all lines.
|
||||
float z = view_z(fetch_depth(p));
|
||||
float fade = clamp(line_width.z / (pixel_size(z) * line_width.x), 0.4, 1.0);
|
||||
float alpha = line_opacity * fade * max(sx, sy) * edge_alpha(width_at(line_width, z), d);
|
||||
if (alpha <= 0.0)
|
||||
discard;
|
||||
gl_FragColor = vec4(outline_color, alpha);
|
||||
gl_FragDepth = surface_depth(p);
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
ivec2 p = ivec2(gl_FragCoord.xy);
|
||||
if (inner)
|
||||
render_lines(p);
|
||||
else
|
||||
render_ring(p);
|
||||
}
|
||||
@@ -1,139 +0,0 @@
|
||||
#version 110
|
||||
|
||||
// A crease fades in as the angle between its faces grows from 25 to 40 degrees.
|
||||
const float CREASE_COS_START = 0.906;
|
||||
const float CREASE_COS_FULL = 0.766;
|
||||
|
||||
uniform sampler2D mask_tex;
|
||||
uniform sampler2D depth_tex;
|
||||
uniform vec2 tex_size;
|
||||
uniform mat4 inv_projection_matrix;
|
||||
// View space size of a pixel at view depth z: x * -z + y.
|
||||
uniform vec2 pixel_size_coef;
|
||||
uniform int ring_reach;
|
||||
uniform float ring_sigma;
|
||||
|
||||
vec2 unpack2(float c)
|
||||
{
|
||||
float v = floor(c * 65535.0 + 0.5);
|
||||
float hi = floor(v / 256.0);
|
||||
return vec2(hi, v - hi * 256.0);
|
||||
}
|
||||
|
||||
vec4 fetch_mask(ivec2 p)
|
||||
{
|
||||
return texture2D(mask_tex, (vec2(p) + 0.5) / tex_size);
|
||||
}
|
||||
|
||||
float fetch_depth(ivec2 p)
|
||||
{
|
||||
return texture2D(depth_tex, (vec2(p) + 0.5) / tex_size).r;
|
||||
}
|
||||
|
||||
bool covered(vec4 m)
|
||||
{
|
||||
return m.g > 0.0;
|
||||
}
|
||||
|
||||
vec3 normal_of(vec4 m)
|
||||
{
|
||||
vec2 e = unpack2(m.r) / 255.0 * 2.0 - 1.0;
|
||||
vec3 n = vec3(e, 1.0 - abs(e.x) - abs(e.y));
|
||||
if (n.z < 0.0)
|
||||
n.xy = (1.0 - abs(n.yx)) * vec2(n.x >= 0.0 ? 1.0 : -1.0, n.y >= 0.0 ? 1.0 : -1.0);
|
||||
return normalize(n);
|
||||
}
|
||||
|
||||
vec3 view_position(ivec2 p, float depth)
|
||||
{
|
||||
vec4 v = inv_projection_matrix * vec4((vec2(p) + 0.5) / tex_size * 2.0 - 1.0, depth * 2.0 - 1.0, 1.0);
|
||||
return v.xyz / v.w;
|
||||
}
|
||||
|
||||
// 1 for a turn between neighboring texels of about 7 to 23 degrees: neither flat nor a crease.
|
||||
float gradual_turn(float cos_angle)
|
||||
{
|
||||
return (1.0 - smoothstep(0.985, 0.997, cos_angle)) * smoothstep(0.88, 0.92, cos_angle);
|
||||
}
|
||||
|
||||
float pack_edge(float strength, float crossing)
|
||||
{
|
||||
return (floor(strength * 15.0 + 0.5) * 16.0 + floor(clamp(crossing, 0.0, 1.0) * 15.0 + 0.5) + 0.25) / 255.0;
|
||||
}
|
||||
|
||||
// The inner edge between q and q + dir: how strong it is, and where it crosses from q (0) to q + dir (1).
|
||||
float inner_edge(ivec2 q, ivec2 dir)
|
||||
{
|
||||
vec4 m0 = fetch_mask(q);
|
||||
vec4 m1 = fetch_mask(q + dir);
|
||||
// The silhouette is drawn by the ring.
|
||||
if (!covered(m0) || !covered(m1))
|
||||
return 0.0;
|
||||
|
||||
vec3 n0 = normal_of(m0);
|
||||
vec3 n1 = normal_of(m1);
|
||||
vec4 mb = fetch_mask(q - dir);
|
||||
vec4 ma = fetch_mask(q + 2 * dir);
|
||||
vec3 nb = covered(mb) ? normal_of(mb) : n0;
|
||||
vec3 na = covered(ma) ? normal_of(ma) : n1;
|
||||
float d0 = fetch_depth(q);
|
||||
float d1 = fetch_depth(q + dir);
|
||||
float db = fetch_depth(q - dir);
|
||||
float da = fetch_depth(q + 2 * dir);
|
||||
vec3 p0 = view_position(q, d0);
|
||||
vec3 p1 = view_position(q + dir, d1);
|
||||
// One surface hides the other: they are pixels apart off their planes.
|
||||
vec3 d = p1 - p0;
|
||||
float px = dot(pixel_size_coef, vec2(-max(p0.z, p1.z), 1.0));
|
||||
float jump = smoothstep(2.0, 4.0, max(abs(dot(n0, d)), abs(dot(n1, d))) / px);
|
||||
// A step: the texel after the pair lies pixels off the surface before it carried on, both ways, which a surface
|
||||
// seen edge on does not.
|
||||
float off = 1e9;
|
||||
if (covered(mb))
|
||||
off = length(p1 - (2.0 * p0 - view_position(q - dir, db)));
|
||||
if (covered(ma))
|
||||
off = min(off, length(p0 - (2.0 * p1 - view_position(q + 2 * dir, da))));
|
||||
if (off < 1e9)
|
||||
jump *= smoothstep(1.0, 2.0, off / px);
|
||||
// Nor a fillet, which turns a little at every texel on both sides.
|
||||
jump *= 1.0 - gradual_turn(dot(nb, n0)) * gradual_turn(dot(n1, na));
|
||||
float crease = 1.0 - smoothstep(CREASE_COS_FULL, CREASE_COS_START, dot(n0, n1));
|
||||
float strength = m0.g == m1.g ? max(jump, crease) : 1.0;
|
||||
if (strength <= 0.0)
|
||||
return 0.0;
|
||||
|
||||
// Where the depth planes of both sides meet, when each side is flat over two texels and the planes part
|
||||
// clearly along dir.
|
||||
float crossing = 0.5;
|
||||
if (covered(mb) && covered(ma) && dot(nb, n0) > 0.999 && dot(na, n1) > 0.999) {
|
||||
float a = d0 - db;
|
||||
float b = da - d1;
|
||||
float u = (d1 - d0 - b) / (a - b);
|
||||
if (abs(a - b) > 0.1 * (abs(a) + abs(b)) && u >= 0.0 && u <= 1.0)
|
||||
crossing = u;
|
||||
}
|
||||
return pack_edge(strength, crossing);
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
ivec2 q = ivec2(gl_FragCoord.xy);
|
||||
|
||||
// For the ring around the selection: the nearest covered texel along the row, offset by 16, and the
|
||||
// coverage of the row under a gaussian, whose sum over the column sets the silhouette between texels.
|
||||
float nearest = 0.0;
|
||||
float coverage = 0.0;
|
||||
float weights = 0.0;
|
||||
for (int k = -ring_reach; k <= ring_reach; ++k) {
|
||||
float w = exp(-float(k * k) / (2.0 * ring_sigma * ring_sigma));
|
||||
weights += w;
|
||||
if (covered(fetch_mask(q + ivec2(k, 0)))) {
|
||||
coverage += w;
|
||||
if (nearest == 0.0 || abs(float(k)) < abs(nearest - 16.0))
|
||||
nearest = float(16 + k);
|
||||
}
|
||||
}
|
||||
|
||||
gl_FragColor = vec4(inner_edge(q, ivec2(1, 0)), inner_edge(q, ivec2(0, 1)),
|
||||
nearest > 0.0 ? (nearest + 0.25) / 255.0 : 0.0, coverage / weights);
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
#version 110
|
||||
|
||||
const vec3 ZERO = vec3(0.0, 0.0, 0.0);
|
||||
|
||||
// 1 to 65535, told apart between neighboring volumes.
|
||||
uniform float part_id;
|
||||
|
||||
varying vec3 clipping_planes_dots;
|
||||
varying vec3 eye_normal;
|
||||
varying vec3 to_camera;
|
||||
|
||||
// Two bytes in one channel of the 16 bit target, offset so that a truncating conversion keeps them.
|
||||
float pack2(float hi, float lo)
|
||||
{
|
||||
return (hi * 256.0 + lo + 0.25) / 65535.0;
|
||||
}
|
||||
|
||||
vec2 oct_encode(vec3 n)
|
||||
{
|
||||
n /= abs(n.x) + abs(n.y) + abs(n.z);
|
||||
vec2 e = n.z >= 0.0 ? n.xy : (1.0 - abs(n.yx)) * vec2(n.x >= 0.0 ? 1.0 : -1.0, n.y >= 0.0 ? 1.0 : -1.0);
|
||||
return floor((e * 0.5 + 0.5) * 255.0 + 0.5);
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
if (any(lessThan(clipping_planes_dots, ZERO)))
|
||||
discard;
|
||||
|
||||
// Back faces show through cuts, so every surface is compared by its side facing the camera.
|
||||
vec3 n = normalize(eye_normal);
|
||||
if (dot(n, to_camera) < 0.0)
|
||||
n = -n;
|
||||
vec2 e = oct_encode(n);
|
||||
// Without gl_VertexID there are no barycentrics to tell where the triangle ends.
|
||||
gl_FragColor = vec4(pack2(e.x, e.y), (part_id + 0.25) / 65535.0, 0.0, 0.0);
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
#version 110
|
||||
|
||||
uniform mat4 view_model_matrix;
|
||||
uniform mat4 projection_matrix;
|
||||
uniform mat3 view_normal_matrix;
|
||||
uniform mat4 volume_world_matrix;
|
||||
|
||||
// Clipping plane, x = min z, y = max z. Used by the FFF and SLA previews to clip with a top / bottom plane.
|
||||
uniform vec2 z_range;
|
||||
// Clipping plane - general orientation. Used by the SLA gizmo.
|
||||
uniform vec4 clipping_plane;
|
||||
|
||||
attribute vec3 v_position;
|
||||
attribute vec3 v_normal;
|
||||
|
||||
varying vec3 clipping_planes_dots;
|
||||
varying vec3 eye_normal;
|
||||
varying vec3 to_camera;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 world_pos = volume_world_matrix * vec4(v_position, 1.0);
|
||||
clipping_planes_dots = vec3(dot(world_pos, clipping_plane), world_pos.z - z_range.x, z_range.y - world_pos.z);
|
||||
|
||||
vec4 position = view_model_matrix * vec4(v_position, 1.0);
|
||||
eye_normal = view_normal_matrix * v_normal;
|
||||
// projection_matrix[3][3] is 1 only for an orthographic camera, whose view rays all run along -z.
|
||||
to_camera = mix(-position.xyz, vec3(0.0, 0.0, 1.0), projection_matrix[3][3]);
|
||||
gl_Position = projection_matrix * position;
|
||||
}
|
||||
@@ -50,6 +50,10 @@ uniform vec4 uniform_color_clip_plane_1;
|
||||
uniform vec4 uniform_color_clip_plane_2;
|
||||
uniform SlopeDetection slope;
|
||||
|
||||
//BBS: add outline_color
|
||||
uniform bool is_outline;
|
||||
uniform sampler2D depth_tex;
|
||||
uniform vec2 screen_size;
|
||||
|
||||
#ifdef ENABLE_ENVIRONMENT_MAP
|
||||
uniform sampler2D environment_tex;
|
||||
@@ -58,6 +62,8 @@ uniform SlopeDetection slope;
|
||||
|
||||
uniform PrintVolumeDetection print_volume;
|
||||
|
||||
uniform float z_far;
|
||||
uniform float z_near;
|
||||
uniform bool enable_ssao;
|
||||
// 1 = the Design tab's studio lighting (studio_shade below); 0 = the two-light model above, which
|
||||
// every other canvas keeps. world_up_eye is world +Z in eye space, for the hemisphere ambient.
|
||||
@@ -82,6 +88,51 @@ varying float world_normal_z;
|
||||
varying vec3 eye_normal;
|
||||
varying vec3 eye_position;
|
||||
|
||||
vec3 getBackfaceColor(vec3 fill) {
|
||||
float brightness = 0.2126 * fill.r + 0.7152 * fill.g + 0.0722 * fill.b;
|
||||
return (brightness > 0.75) ? vec3(0.11, 0.165, 0.208) : vec3(0.988, 0.988, 0.988);
|
||||
}
|
||||
|
||||
// Silhouette edge detection & rendering algorithm by leoneruggiero
|
||||
// https://www.shadertoy.com/view/DslXz2
|
||||
#define INFLATE 1
|
||||
|
||||
float GetTolerance(float d, float k)
|
||||
{
|
||||
float A = -(z_far+z_near)/(z_far-z_near);
|
||||
float B = -2.0*z_far*z_near /(z_far-z_near);
|
||||
|
||||
d = d*2.0-1.0;
|
||||
|
||||
return -k*(d+A)*(d+A)/B;
|
||||
}
|
||||
|
||||
float DetectSilho(vec2 fragCoord, vec2 dir)
|
||||
{
|
||||
float x0 = abs(texture2D(depth_tex, (fragCoord + dir*-2.0) / screen_size).r);
|
||||
float x1 = abs(texture2D(depth_tex, (fragCoord + dir*-1.0) / screen_size).r);
|
||||
float x2 = abs(texture2D(depth_tex, (fragCoord + dir* 0.0) / screen_size).r);
|
||||
float x3 = abs(texture2D(depth_tex, (fragCoord + dir* 1.0) / screen_size).r);
|
||||
|
||||
float d0 = (x1-x0);
|
||||
float d1 = (x2-x3);
|
||||
|
||||
float r0 = x1 + d0 - x2;
|
||||
float r1 = x2 + d1 - x1;
|
||||
|
||||
float tol = GetTolerance(x2, 0.04);
|
||||
|
||||
return smoothstep(0.0, tol*tol, max( - r0*r1, 0.0));
|
||||
}
|
||||
|
||||
float DetectSilho(vec2 fragCoord)
|
||||
{
|
||||
return max(
|
||||
DetectSilho(fragCoord, vec2(1,0)),
|
||||
DetectSilho(fragCoord, vec2(0,1))
|
||||
);
|
||||
}
|
||||
|
||||
float compute_ssao_factor(vec3 normal, vec3 view_dir, vec3 eye_pos)
|
||||
{
|
||||
vec3 normal_dx = dFdx(normal);
|
||||
@@ -244,10 +295,24 @@ void main()
|
||||
vec3 lit = (lighting_model == 1) ? studio_shade(color.rgb, normal, view_dir)
|
||||
: (vec3(specular) + window_reflection + color.rgb * diffuse) * PHONG_BRIGHTNESS;
|
||||
|
||||
if (is_outline) {
|
||||
vec3 shaded_rgb = lit * shade;
|
||||
vec4 shaded_color = vec4(clamp(shaded_rgb, vec3(0.0), vec3(1.0)), color.a);
|
||||
vec2 fragCoord = gl_FragCoord.xy;
|
||||
float s = DetectSilho(fragCoord);
|
||||
for(int i=1;i<=INFLATE; i++)
|
||||
{
|
||||
s = max(s, DetectSilho(fragCoord.xy + vec2(i, 0)));
|
||||
s = max(s, DetectSilho(fragCoord.xy + vec2(0, i)));
|
||||
}
|
||||
if (s < 0.01)
|
||||
discard;
|
||||
gl_FragColor = vec4(mix(shaded_color.rgb, getBackfaceColor(shaded_color.rgb), s), shaded_color.a);
|
||||
}
|
||||
#ifdef ENABLE_ENVIRONMENT_MAP
|
||||
if (use_environment_tex)
|
||||
else if (use_environment_tex)
|
||||
gl_FragColor = vec4(clamp((0.45 * texture2D(environment_tex, normalize(eye_normal).xy * 0.5 + 0.5).xyz + window_reflection + 0.8 * color.rgb * diffuse) * PHONG_BRIGHTNESS * shade, vec3(0.0), vec3(1.0)), color.a);
|
||||
else
|
||||
#endif
|
||||
else
|
||||
gl_FragColor = vec4(clamp(lit * shade, vec3(0.0), vec3(1.0)), color.a);
|
||||
}
|
||||
@@ -15,6 +15,8 @@ uniform mat4 projection_matrix;
|
||||
uniform mat3 view_normal_matrix;
|
||||
uniform mat4 volume_world_matrix;
|
||||
uniform SlopeDetection slope;
|
||||
uniform bool is_outline;
|
||||
uniform vec2 screen_size;
|
||||
|
||||
// Clipping plane, x = min z, y = max z. Used by the FFF and SLA previews to clip with a top / bottom plane.
|
||||
uniform vec2 z_range;
|
||||
@@ -49,6 +51,15 @@ void main()
|
||||
world_normal_z = slope.actived ? dot(normalize(slope.volume_world_normal_matrix * v_normal), slope.up_direction) : 0.0;
|
||||
|
||||
gl_Position = projection_matrix * position;
|
||||
if (is_outline) {
|
||||
vec3 n = normalize((view_normal_matrix * v_normal).xyz);
|
||||
vec2 dir = normalize(n.xy);
|
||||
if (dot(dir, dir) > 0.0) {
|
||||
//set outline thickness
|
||||
float px = 3.0;
|
||||
gl_Position.xy += dir * (px * 2.0 / screen_size) * gl_Position.w;
|
||||
}
|
||||
}
|
||||
// Fill in the scalars for fragment shader clipping. Fragments with any of these components lower than zero are discarded.
|
||||
clipping_planes_dots = vec3(dot(world_pos, clipping_plane), world_pos.z - z_range.x, z_range.y - world_pos.z);
|
||||
color_clip_plane_dot = dot(world_pos, color_clip_plane);
|
||||
|
||||
@@ -9,6 +9,7 @@ uniform sampler2D color_texture;
|
||||
uniform sampler2D depth_texture;
|
||||
uniform vec2 inv_tex_size;
|
||||
uniform float z_far;
|
||||
uniform bool is_outline;
|
||||
// The pass has no normal target to read, so the surface normal is reconstructed from the depth
|
||||
// buffer. inv_projection_matrix unprojects a pixel back into view space and up_view is world +Z
|
||||
// expressed in view space, which is what tells a top surface from a wall.
|
||||
@@ -42,6 +43,10 @@ vec3 view_normal(vec2 uv, vec3 p)
|
||||
|
||||
void main()
|
||||
{
|
||||
if (is_outline) {
|
||||
gl_FragColor = vec4(texture2D(color_texture, tex_coord).rgb, 1.0);
|
||||
return;
|
||||
}
|
||||
vec3 base = texture2D(color_texture, tex_coord).rgb;
|
||||
|
||||
// Nothing was drawn here: occluding the background would only darken the gradient, and its
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
#version 140
|
||||
// Multisample depth texture for the anti-aliased outline (see 3DScene.cpp render_with_outline).
|
||||
// Optional on the GLSL 140 path: if unavailable, fallback to a non-multisample depth texture.
|
||||
#extension GL_ARB_texture_multisample : enable
|
||||
|
||||
const vec3 ZERO = vec3(0.0, 0.0, 0.0);
|
||||
//BBS: add grey and orange
|
||||
@@ -35,10 +38,21 @@ uniform vec4 uniform_color_clip_plane_1;
|
||||
uniform vec4 uniform_color_clip_plane_2;
|
||||
uniform SlopeDetection slope;
|
||||
|
||||
//BBS: add outline_color
|
||||
uniform bool is_outline;
|
||||
// ORCA: a part of a translucent filament, drawn as its print would show in premultiplied color, see
|
||||
// GLVolumeCollection::render(). It catches a highlight only with translucent_gloss, in realistic view.
|
||||
uniform bool translucent_filament;
|
||||
uniform bool translucent_gloss;
|
||||
// The outline is a per-fragment discard mask, which the framebuffer MSAA cannot smooth, so the
|
||||
// silhouette is resolved per sample from a multisample copy of the outlined model's depth buffer.
|
||||
#ifdef GL_ARB_texture_multisample
|
||||
uniform sampler2DMS depth_tex;
|
||||
uniform int msaa_samples; // samples in depth_tex, 1 when MSAA is off
|
||||
#else
|
||||
uniform sampler2D depth_tex;
|
||||
#endif
|
||||
uniform vec2 screen_size;
|
||||
|
||||
#ifdef ENABLE_ENVIRONMENT_MAP
|
||||
uniform sampler2D environment_tex;
|
||||
@@ -52,6 +66,8 @@ uniform PrintVolumeDetection print_volume;
|
||||
uniform vec3 extruder_printable_heights;
|
||||
const float ONE_OVER_EPSILON = 1e4;
|
||||
|
||||
uniform float z_far;
|
||||
uniform float z_near;
|
||||
|
||||
// Depth-based shadow map (object-on-object and self shadows). shadow_intensity == 0 disables it.
|
||||
uniform sampler2D shadow_map;
|
||||
@@ -76,6 +92,113 @@ in vec4 world_pos;
|
||||
in float world_normal_z;
|
||||
in vec3 eye_normal;
|
||||
|
||||
vec3 getBackfaceColor(vec3 fill) {
|
||||
float brightness = 0.2126 * fill.r + 0.7152 * fill.g + 0.0722 * fill.b;
|
||||
return (brightness > 0.75) ? vec3(0.11, 0.165, 0.208) : vec3(0.988, 0.988, 0.988);
|
||||
}
|
||||
|
||||
// Silhouette edge detection & rendering algorithem by leoneruggiero
|
||||
// https://www.shadertoy.com/view/DslXz2
|
||||
#define INFLATE 1
|
||||
|
||||
float GetTolerance(float d, float k)
|
||||
{
|
||||
// -------------------------------------------
|
||||
// Find a tolerance for depth that is constant
|
||||
// in view space (k in view space).
|
||||
//
|
||||
// tol = k*ddx(ZtoDepth(z))
|
||||
// -------------------------------------------
|
||||
|
||||
float A=- (z_far+z_near)/(z_far-z_near);
|
||||
float B=-2.0*z_far*z_near /(z_far-z_near);
|
||||
|
||||
d = d*2.0-1.0;
|
||||
|
||||
return -k*(d+A)*(d+A)/B;
|
||||
}
|
||||
|
||||
// Depth of sample s at integer pixel coord.
|
||||
#ifdef GL_ARB_texture_multisample
|
||||
float FetchDepth(ivec2 coord, int s)
|
||||
{
|
||||
// texelFetch has no wrap mode, so clamp to the edge texel (sampler2D used CLAMP_TO_EDGE).
|
||||
ivec2 sz = textureSize(depth_tex);
|
||||
return abs(texelFetch(depth_tex, clamp(coord, ivec2(0), sz - 1), s).r);
|
||||
}
|
||||
#else
|
||||
float FetchDepth(ivec2 coord, int s)
|
||||
{
|
||||
return abs(texture(depth_tex, (vec2(coord) + 0.5) / screen_size).r);
|
||||
}
|
||||
#endif
|
||||
|
||||
float DetectSilho(ivec2 coord, ivec2 dir, int s)
|
||||
{
|
||||
// -------------------------------------------
|
||||
// x0 ___ x1----o
|
||||
// :\ :
|
||||
// r0 : \ : r1
|
||||
// : \ :
|
||||
// o---x2 ___ x3
|
||||
//
|
||||
// r0 and r1 are the differences between actual
|
||||
// and expected (as if x0..3 where on the same
|
||||
// plane) depth values.
|
||||
// -------------------------------------------
|
||||
float x0 = FetchDepth(coord + dir*-2, s);
|
||||
float x1 = FetchDepth(coord + dir*-1, s);
|
||||
float x2 = FetchDepth(coord, s);
|
||||
float x3 = FetchDepth(coord + dir* 1, s);
|
||||
|
||||
float d0 = (x1-x0);
|
||||
float d1 = (x2-x3);
|
||||
|
||||
float r0 = x1 + d0 - x2;
|
||||
float r1 = x2 + d1 - x1;
|
||||
|
||||
float tol = GetTolerance(x2, 0.04);
|
||||
|
||||
return smoothstep(0.0, tol*tol, max( - r0*r1, 0.0));
|
||||
}
|
||||
|
||||
float DetectSilho(ivec2 coord, int s)
|
||||
{
|
||||
return max(
|
||||
DetectSilho(coord, ivec2(1,0), s), // Horizontal
|
||||
DetectSilho(coord, ivec2(0,1), s) // Vertical
|
||||
);
|
||||
}
|
||||
|
||||
// Full response of one sample. Reduce the max() per sample and average only afterwards:
|
||||
// max(mean) <= mean(max), and averaging first hollows out diagonal and curved lines.
|
||||
float DetectSilhoSample(ivec2 coord, int s)
|
||||
{
|
||||
float v = DetectSilho(coord, s);
|
||||
// Makes silhouettes thicker.
|
||||
for (int i = 1; i <= INFLATE; ++i)
|
||||
{
|
||||
v = max(v, DetectSilho(coord + ivec2(i, 0), s));
|
||||
v = max(v, DetectSilho(coord + ivec2(0, i), s));
|
||||
}
|
||||
return v;
|
||||
}
|
||||
|
||||
// Average the per-sample coverage into the sub-pixel anti-aliasing of the line.
|
||||
float DetectSilho(vec2 fragCoord)
|
||||
{
|
||||
ivec2 coord = ivec2(fragCoord);
|
||||
#ifdef GL_ARB_texture_multisample
|
||||
int n = max(msaa_samples, 1);
|
||||
#else
|
||||
const int n = 1;
|
||||
#endif
|
||||
float acc = 0.0;
|
||||
for (int s = 0; s < n; ++s)
|
||||
acc += DetectSilhoSample(coord, s);
|
||||
return acc / float(n);
|
||||
}
|
||||
|
||||
// Returns a lighting multiplier in [1 - shadow_intensity, 1]: < 1 where the fragment is
|
||||
// occluded from the light in the shadow map. 3x3 PCF softens the edges.
|
||||
float shadow_shade()
|
||||
@@ -167,12 +290,21 @@ void main()
|
||||
}
|
||||
float shade = shadow_shade();
|
||||
|
||||
//BBS: add outline_color
|
||||
if (is_outline) {
|
||||
color = vec4((vec3(intensity.y) + color.rgb * intensity.x) * shade, color.a);
|
||||
float s = DetectSilho(gl_FragCoord.xy);
|
||||
if (s < 0.01)
|
||||
discard;
|
||||
out_color = vec4(mix(color.rgb, getBackfaceColor(color.rgb), s), color.a);
|
||||
if (translucent_filament)
|
||||
out_color.rgb *= out_color.a;
|
||||
}
|
||||
#ifdef ENABLE_ENVIRONMENT_MAP
|
||||
if (use_environment_tex)
|
||||
else if (use_environment_tex)
|
||||
out_color = vec4((0.45 * texture(environment_tex, normalize(eye_normal).xy * 0.5 + 0.5).xyz + 0.8 * color.rgb * intensity.x) * shade, color.a);
|
||||
else
|
||||
#endif
|
||||
if (translucent_filament)
|
||||
else if (translucent_filament)
|
||||
out_color = translucent_filament_color(color.rgb * intensity.x * shade, color.a,
|
||||
translucent_gloss ? vec3(intensity.y * shade) : ZERO, abs(normalize(eye_normal).z));
|
||||
else
|
||||
|
||||
@@ -31,6 +31,8 @@ uniform mat4 projection_matrix;
|
||||
uniform mat3 view_normal_matrix;
|
||||
uniform mat4 volume_world_matrix;
|
||||
uniform SlopeDetection slope;
|
||||
uniform bool is_outline;
|
||||
uniform vec2 screen_size;
|
||||
|
||||
// Clipping plane, x = min z, y = max z. Used by the FFF and SLA previews to clip with a top / bottom plane.
|
||||
uniform vec2 z_range;
|
||||
@@ -80,6 +82,15 @@ void main()
|
||||
world_normal_z = slope.actived ? dot(normalize(slope.volume_world_normal_matrix * v_normal), slope.up_direction) : 0.0;
|
||||
|
||||
gl_Position = projection_matrix * position;
|
||||
if (is_outline) {
|
||||
vec3 n = normalize((view_normal_matrix * v_normal).xyz);
|
||||
vec2 dir = normalize(n.xy);
|
||||
if (dot(dir, dir) > 0.0) {
|
||||
//set outline thickness
|
||||
float px = 3.0;
|
||||
gl_Position.xy += dir * (px * 2.0 / screen_size) * gl_Position.w;
|
||||
}
|
||||
}
|
||||
// Fill in the scalars for fragment shader clipping. Fragments with any of these components lower than zero are discarded.
|
||||
clipping_planes_dots = vec3(dot(world_pos, clipping_plane), world_pos.z - z_range.x, z_range.y - world_pos.z);
|
||||
color_clip_plane_dot = dot(world_pos, color_clip_plane);
|
||||
|
||||
@@ -1,223 +0,0 @@
|
||||
#version 140
|
||||
|
||||
const float INF = 1e9;
|
||||
|
||||
uniform sampler2D mask_tex;
|
||||
uniform sampler2D depth_tex;
|
||||
uniform sampler2D edges_tex;
|
||||
// false draws the ring around the selection, true the lines along its inner edges.
|
||||
uniform bool inner;
|
||||
// The stencil keeps the ring off the samples of the selection, without it the ring stays off covered pixels.
|
||||
uniform bool use_stencil;
|
||||
// Widths in pixels: x at least, y at most, z the width on the model in view space units.
|
||||
uniform vec3 ring_width;
|
||||
uniform int ring_reach;
|
||||
uniform float ring_sigma;
|
||||
// Half the width of an inner line, as ring_width.
|
||||
uniform vec3 line_width;
|
||||
uniform int line_reach;
|
||||
uniform float line_opacity;
|
||||
uniform vec3 outline_color;
|
||||
// The projection on view z: window depth is (x * z + y) / (z * z + w), remapped from [-1, 1].
|
||||
uniform vec4 depth_coef;
|
||||
// View space size of a pixel at view depth z: x * -z + y.
|
||||
uniform vec2 pixel_size_coef;
|
||||
|
||||
out vec4 out_color;
|
||||
|
||||
ivec2 tex_size;
|
||||
|
||||
vec4 fetch_mask(ivec2 p)
|
||||
{
|
||||
return texelFetch(mask_tex, clamp(p, ivec2(0), tex_size - 1), 0);
|
||||
}
|
||||
|
||||
float fetch_depth(ivec2 p)
|
||||
{
|
||||
return texelFetch(depth_tex, clamp(p, ivec2(0), tex_size - 1), 0).r;
|
||||
}
|
||||
|
||||
vec4 fetch_edges(ivec2 p)
|
||||
{
|
||||
return texelFetch(edges_tex, clamp(p, ivec2(0), tex_size - 1), 0);
|
||||
}
|
||||
|
||||
bool covered(vec4 m)
|
||||
{
|
||||
return m.g > 0.0;
|
||||
}
|
||||
|
||||
// The texel and its eight neighbors are covered.
|
||||
bool inside_mask(ivec2 p)
|
||||
{
|
||||
for (int y = -1; y <= 1; ++y)
|
||||
for (int x = -1; x <= 1; ++x)
|
||||
if (!covered(fetch_mask(p + ivec2(x, y))))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Strength and crossing of an inner edge written by outline_edges.fs.
|
||||
vec2 unpack_edge(float c)
|
||||
{
|
||||
float v = floor(c * 255.0 + 0.5);
|
||||
float s = floor(v / 16.0);
|
||||
return vec2(s, v - s * 16.0) / 15.0;
|
||||
}
|
||||
|
||||
float pixel_size(float z)
|
||||
{
|
||||
return dot(pixel_size_coef, vec2(-z, 1.0));
|
||||
}
|
||||
|
||||
// Thicker as the camera closes in, within a range of pixels.
|
||||
float width_at(vec3 width, float z)
|
||||
{
|
||||
return clamp(width.z / pixel_size(z), width.x, width.y);
|
||||
}
|
||||
|
||||
// A smooth edge 1.2 pixels wide around width.
|
||||
float edge_alpha(float width, float d)
|
||||
{
|
||||
return 1.0 - smoothstep(width - 0.6, width + 0.6, d);
|
||||
}
|
||||
|
||||
float view_z(float depth)
|
||||
{
|
||||
float ndc = depth * 2.0 - 1.0;
|
||||
return (depth_coef.y - ndc * depth_coef.w) / (ndc * depth_coef.z - depth_coef.x);
|
||||
}
|
||||
|
||||
float window_depth(float z)
|
||||
{
|
||||
return 0.5 * (depth_coef.x * z + depth_coef.y) / (depth_coef.z * z + depth_coef.w) + 0.5;
|
||||
}
|
||||
|
||||
// One sided, so that the slope does not span an edge. Uncovered texels keep the cleared depth of 1.
|
||||
float depth_slope(float d, float before, float after)
|
||||
{
|
||||
float s = INF;
|
||||
if (before < 1.0) s = abs(d - before);
|
||||
if (after < 1.0) s = min(s, abs(after - d));
|
||||
return s < INF ? s : 0.0;
|
||||
}
|
||||
|
||||
// The depth of the selection at p, moved forward by its spread over the pixel, so that it passes on every sample.
|
||||
float surface_depth(ivec2 p)
|
||||
{
|
||||
float d = fetch_depth(p);
|
||||
float sx = depth_slope(d, fetch_depth(p - ivec2(1, 0)), fetch_depth(p + ivec2(1, 0)));
|
||||
float sy = depth_slope(d, fetch_depth(p - ivec2(0, 1)), fetch_depth(p + ivec2(0, 1)));
|
||||
return d - 0.5 * (sx + sy) - 1e-6;
|
||||
}
|
||||
|
||||
// x beyond which a standard normal has p of its mass, for p up to 0.5 (Abramowitz and Stegun 26.2.23).
|
||||
float normal_tail_inverse(float p)
|
||||
{
|
||||
float t = sqrt(-2.0 * log(p));
|
||||
return t - (2.515517 + t * (0.802853 + t * 0.010328)) / (1.0 + t * (1.432788 + t * (0.189269 + t * 0.001308)));
|
||||
}
|
||||
|
||||
void render_ring(ivec2 p)
|
||||
{
|
||||
vec4 m = fetch_mask(p);
|
||||
float alpha = 1.0;
|
||||
float depth;
|
||||
if (covered(m)) {
|
||||
// Only the silhouette of the mask may hold samples off the selection. Inside, a face the mask has and the
|
||||
// scene culled, say, would get no stencil bit and fill with the ring.
|
||||
if (!use_stencil || inside_mask(p))
|
||||
discard;
|
||||
depth = surface_depth(p);
|
||||
}
|
||||
else {
|
||||
// The nearest covered texel from the nearest one of each row, and the gaussian coverage around p.
|
||||
float best = INF;
|
||||
ivec2 t = p;
|
||||
float coverage = 0.0;
|
||||
float weights = 0.0;
|
||||
for (int j = -ring_reach; j <= ring_reach; ++j) {
|
||||
vec4 e = fetch_edges(p + ivec2(0, j));
|
||||
float w = exp(-float(j * j) / (2.0 * ring_sigma * ring_sigma));
|
||||
weights += w;
|
||||
coverage += w * e.a;
|
||||
float v = floor(e.b * 255.0 + 0.5);
|
||||
if (v > 0.0) {
|
||||
float h = v - 16.0;
|
||||
float d2 = h * h + float(j * j);
|
||||
if (d2 < best) {
|
||||
best = d2;
|
||||
t = p + ivec2(int(h), j);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (best >= INF)
|
||||
discard;
|
||||
m = fetch_mask(t);
|
||||
// The coverage of a straight silhouette at dist is the normal tail beyond dist / sigma. Corners and thin
|
||||
// parts fall off faster, so it is kept within half a texel of the midpoint to the nearest covered texel.
|
||||
coverage /= weights;
|
||||
float centers = sqrt(best) - 0.5;
|
||||
float dist = coverage < 0.5 ? ring_sigma * normal_tail_inverse(max(coverage, 1e-6)) : 0.0;
|
||||
dist = clamp(dist, centers - 0.5, centers + 0.5);
|
||||
float z = view_z(fetch_depth(t));
|
||||
alpha = edge_alpha(width_at(ring_width, z), dist);
|
||||
if (alpha <= 0.0)
|
||||
discard;
|
||||
// Brought forward with the distance, so that it shows over what the selection stands on.
|
||||
depth = window_depth(z + 3.0 * (dist + 2.0) * pixel_size(z));
|
||||
}
|
||||
out_color = vec4(outline_color, alpha);
|
||||
gl_FragDepth = depth;
|
||||
}
|
||||
|
||||
void render_lines(ivec2 p)
|
||||
{
|
||||
vec4 m = fetch_mask(p);
|
||||
if (!covered(m))
|
||||
discard;
|
||||
|
||||
// The nearest crossing along the row and along the column. For a straight line at distance d they lie at
|
||||
// dx = d / |cos| and dy = d / |sin|, so 1 / d^2 = 1 / dx^2 + 1 / dy^2.
|
||||
float dx = INF;
|
||||
float sx = 0.0;
|
||||
for (int i = -line_reach - 1; i <= line_reach; ++i) {
|
||||
vec2 e = unpack_edge(fetch_edges(p + ivec2(i, 0)).r);
|
||||
float d = abs(float(i) + e.y);
|
||||
if (e.x > 0.0 && d < dx) {
|
||||
dx = d;
|
||||
sx = e.x;
|
||||
}
|
||||
}
|
||||
float dy = INF;
|
||||
float sy = 0.0;
|
||||
for (int j = -line_reach - 1; j <= line_reach; ++j) {
|
||||
vec2 e = unpack_edge(fetch_edges(p + ivec2(0, j)).g);
|
||||
float d = abs(float(j) + e.y);
|
||||
if (e.x > 0.0 && d < dy) {
|
||||
dy = d;
|
||||
sy = e.x;
|
||||
}
|
||||
}
|
||||
if (dx >= INF && dy >= INF)
|
||||
discard;
|
||||
float d = (dx < INF && dy < INF) ? dx * dy * inversesqrt(max(dx * dx + dy * dy, 1e-8)) : min(dx, dy);
|
||||
// A line thinner on screen than the narrowest drawn fades instead, so that a far selection is not all lines.
|
||||
float z = view_z(fetch_depth(p));
|
||||
float fade = clamp(line_width.z / (pixel_size(z) * line_width.x), 0.4, 1.0);
|
||||
float alpha = line_opacity * fade * max(sx, sy) * edge_alpha(width_at(line_width, z), d);
|
||||
if (alpha <= 0.0)
|
||||
discard;
|
||||
out_color = vec4(outline_color, alpha);
|
||||
gl_FragDepth = surface_depth(p);
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
tex_size = textureSize(mask_tex, 0);
|
||||
ivec2 p = ivec2(gl_FragCoord.xy);
|
||||
if (inner)
|
||||
render_lines(p);
|
||||
else
|
||||
render_ring(p);
|
||||
}
|
||||
@@ -1,209 +0,0 @@
|
||||
#version 140
|
||||
|
||||
// Farthest triangle edge distance stored by outline_mask.fs, in pixels.
|
||||
const float EXIT_REACH = 4.0;
|
||||
// A crease fades in as the angle between its faces grows from 25 to 40 degrees.
|
||||
const float CREASE_COS_START = 0.906;
|
||||
const float CREASE_COS_FULL = 0.766;
|
||||
|
||||
uniform sampler2D mask_tex;
|
||||
uniform sampler2D depth_tex;
|
||||
uniform mat4 inv_projection_matrix;
|
||||
// View space size of a pixel at view depth z: x * -z + y.
|
||||
uniform vec2 pixel_size_coef;
|
||||
uniform int ring_reach;
|
||||
uniform float ring_sigma;
|
||||
|
||||
out vec4 out_color;
|
||||
|
||||
ivec2 tex_size;
|
||||
|
||||
vec2 unpack2(float c)
|
||||
{
|
||||
float v = floor(c * 65535.0 + 0.5);
|
||||
float hi = floor(v / 256.0);
|
||||
return vec2(hi, v - hi * 256.0);
|
||||
}
|
||||
|
||||
vec4 fetch_mask(ivec2 p)
|
||||
{
|
||||
return texelFetch(mask_tex, clamp(p, ivec2(0), tex_size - 1), 0);
|
||||
}
|
||||
|
||||
float fetch_depth(ivec2 p)
|
||||
{
|
||||
return texelFetch(depth_tex, clamp(p, ivec2(0), tex_size - 1), 0).r;
|
||||
}
|
||||
|
||||
bool covered(vec4 m)
|
||||
{
|
||||
return m.g > 0.0;
|
||||
}
|
||||
|
||||
vec3 normal_of(vec4 m)
|
||||
{
|
||||
vec2 e = unpack2(m.r) / 255.0 * 2.0 - 1.0;
|
||||
vec3 n = vec3(e, 1.0 - abs(e.x) - abs(e.y));
|
||||
if (n.z < 0.0)
|
||||
n.xy = (1.0 - abs(n.yx)) * vec2(n.x >= 0.0 ? 1.0 : -1.0, n.y >= 0.0 ? 1.0 : -1.0);
|
||||
return normalize(n);
|
||||
}
|
||||
|
||||
// Pixels to the edge of the triangle under the texel along an axis direction.
|
||||
float exit_along(vec4 m, ivec2 dir)
|
||||
{
|
||||
vec2 e = unpack2(dir.x != 0 ? m.b : m.a) / 255.0 * EXIT_REACH;
|
||||
return dir.x + dir.y > 0 ? e.x : e.y;
|
||||
}
|
||||
|
||||
vec3 view_position(ivec2 p, float depth)
|
||||
{
|
||||
vec4 v = inv_projection_matrix * vec4((vec2(p) + 0.5) / vec2(tex_size) * 2.0 - 1.0, depth * 2.0 - 1.0, 1.0);
|
||||
return v.xyz / v.w;
|
||||
}
|
||||
|
||||
// Under a pixel along both axes: the normal of such a sliver may be far off its surface.
|
||||
bool tiny_triangle(vec4 m)
|
||||
{
|
||||
vec4 e = vec4(unpack2(m.b), unpack2(m.a)) / 255.0 * EXIT_REACH;
|
||||
return e.x + e.y < 1.0 && e.z + e.w < 1.0;
|
||||
}
|
||||
|
||||
// The normal of the texel, or of one beside it when the texel lies on a tiny triangle.
|
||||
vec3 surface_normal(vec4 m, vec4 l, vec4 r)
|
||||
{
|
||||
if (tiny_triangle(m)) {
|
||||
if (covered(l) && !tiny_triangle(l))
|
||||
return normal_of(l);
|
||||
if (covered(r) && !tiny_triangle(r))
|
||||
return normal_of(r);
|
||||
}
|
||||
return normal_of(m);
|
||||
}
|
||||
|
||||
// One surface hides the other: d, between them, is pixels long off their planes.
|
||||
float jump_strength(vec3 n0, vec3 n1, vec3 d, float px)
|
||||
{
|
||||
float gap = max(abs(dot(n0, d)), abs(dot(n1, d)));
|
||||
return smoothstep(2.0, 4.0, gap / px);
|
||||
}
|
||||
|
||||
// 1 for a turn between neighboring texels of about 7 to 23 degrees: neither flat nor a crease.
|
||||
float gradual_turn(float cos_angle)
|
||||
{
|
||||
return (1.0 - smoothstep(0.985, 0.997, cos_angle)) * smoothstep(0.88, 0.92, cos_angle);
|
||||
}
|
||||
|
||||
float pack_edge(float strength, float crossing)
|
||||
{
|
||||
return (floor(strength * 15.0 + 0.5) * 16.0 + floor(clamp(crossing, 0.0, 1.0) * 15.0 + 0.5) + 0.25) / 255.0;
|
||||
}
|
||||
|
||||
// The inner edge between q and q + dir: how strong it is, and where it crosses from q (0) to q + dir (1).
|
||||
float inner_edge(ivec2 q, ivec2 dir)
|
||||
{
|
||||
vec4 m0 = fetch_mask(q);
|
||||
vec4 m1 = fetch_mask(q + dir);
|
||||
// The silhouette is drawn by the ring.
|
||||
if (!covered(m0) || !covered(m1))
|
||||
return 0.0;
|
||||
|
||||
vec3 n0 = normal_of(m0);
|
||||
vec3 n1 = normal_of(m1);
|
||||
float d0 = fetch_depth(q);
|
||||
float d1 = fetch_depth(q + dir);
|
||||
vec3 p0 = view_position(q, d0);
|
||||
vec3 p1 = view_position(q + dir, d1);
|
||||
vec3 d = p1 - p0;
|
||||
float px = dot(pixel_size_coef, vec2(-max(p0.z, p1.z), 1.0));
|
||||
bool same_part = m0.g == m1.g;
|
||||
if (same_part && jump_strength(n0, n1, d, px) <= 0.0 && dot(n0, n1) >= CREASE_COS_START)
|
||||
return 0.0;
|
||||
|
||||
// Beside the pair, and before and after it along dir.
|
||||
ivec2 perp = ivec2(dir.y, dir.x);
|
||||
vec4 l0 = fetch_mask(q - perp);
|
||||
vec4 r0 = fetch_mask(q + perp);
|
||||
vec4 l1 = fetch_mask(q + dir - perp);
|
||||
vec4 r1 = fetch_mask(q + dir + perp);
|
||||
vec4 mb = fetch_mask(q - dir);
|
||||
vec4 ma = fetch_mask(q + 2 * dir);
|
||||
n0 = surface_normal(m0, l0, r0);
|
||||
n1 = surface_normal(m1, l1, r1);
|
||||
vec3 nb = covered(mb) ? normal_of(mb) : n0;
|
||||
vec3 na = covered(ma) ? normal_of(ma) : n1;
|
||||
float db = fetch_depth(q - dir);
|
||||
float da = fetch_depth(q + 2 * dir);
|
||||
float jump = jump_strength(n0, n1, d, px);
|
||||
// A step: the texel after the pair lies pixels off the surface before it carried on, both ways, which a surface
|
||||
// seen edge on does not.
|
||||
float off = 1e9;
|
||||
if (covered(mb))
|
||||
off = length(p1 - (2.0 * p0 - view_position(q - dir, db)));
|
||||
if (covered(ma))
|
||||
off = min(off, length(p0 - (2.0 * p1 - view_position(q + 2 * dir, da))));
|
||||
if (off < 1e9)
|
||||
jump *= smoothstep(1.0, 2.0, off / px);
|
||||
// Nor a fillet, which turns a little at every texel on both sides.
|
||||
jump *= 1.0 - gradual_turn(dot(nb, n0)) * gradual_turn(dot(n1, na));
|
||||
float crease = 1.0 - smoothstep(CREASE_COS_FULL, CREASE_COS_START, dot(n0, n1));
|
||||
float strength = same_part ? max(jump, crease) : 1.0;
|
||||
if (strength <= 0.0)
|
||||
return 0.0;
|
||||
|
||||
// Where the triangle under q ends and the one under q + dir starts: together when they share the edge.
|
||||
float lo = exit_along(m0, dir);
|
||||
float hi = 1.0 - exit_along(m1, -dir);
|
||||
if (same_part && abs(hi - lo) < 0.15)
|
||||
return pack_edge(strength, 0.5 * (lo + hi));
|
||||
// Where the depth planes of both sides meet, when each side is flat over two texels and the planes part
|
||||
// clearly along dir.
|
||||
if (covered(mb) && covered(ma) && dot(nb, n0) > 0.999 && dot(na, n1) > 0.999) {
|
||||
float a = d0 - db;
|
||||
float b = da - d1;
|
||||
float u = (d1 - d0 - b) / (a - b);
|
||||
if (abs(a - b) > 0.1 * (abs(a) + abs(b)) && u >= 0.0 && u <= 1.0)
|
||||
return pack_edge(strength, u);
|
||||
}
|
||||
// Where the nearer surface ends, when its triangle ends on a straight edge: the texel behind it, or the
|
||||
// texels beside it, end on the same line.
|
||||
float crossing = 0.5;
|
||||
if (jump > 0.0) {
|
||||
if (p0.z > p1.z) {
|
||||
if ((covered(mb) && abs(exit_along(mb, dir) - min(lo + 1.0, EXIT_REACH)) < 0.1) ||
|
||||
(covered(l0) && covered(r0) && abs(exit_along(l0, dir) + exit_along(r0, dir) - 2.0 * lo) < 0.1))
|
||||
crossing = lo;
|
||||
}
|
||||
else {
|
||||
float e = 1.0 - hi;
|
||||
if ((covered(ma) && abs(exit_along(ma, -dir) - min(e + 1.0, EXIT_REACH)) < 0.1) ||
|
||||
(covered(l1) && covered(r1) && abs(exit_along(l1, -dir) + exit_along(r1, -dir) - 2.0 * e) < 0.1))
|
||||
crossing = hi;
|
||||
}
|
||||
}
|
||||
return pack_edge(strength, crossing);
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
tex_size = textureSize(mask_tex, 0);
|
||||
ivec2 q = ivec2(gl_FragCoord.xy);
|
||||
|
||||
// For the ring around the selection: the nearest covered texel along the row, offset by 16, and the
|
||||
// coverage of the row under a gaussian, whose sum over the column sets the silhouette between texels.
|
||||
float nearest = 0.0;
|
||||
float coverage = 0.0;
|
||||
float weights = 0.0;
|
||||
for (int k = -ring_reach; k <= ring_reach; ++k) {
|
||||
float w = exp(-float(k * k) / (2.0 * ring_sigma * ring_sigma));
|
||||
weights += w;
|
||||
if (covered(fetch_mask(q + ivec2(k, 0)))) {
|
||||
coverage += w;
|
||||
if (nearest == 0.0 || abs(k) < abs(int(nearest) - 16))
|
||||
nearest = float(16 + k);
|
||||
}
|
||||
}
|
||||
|
||||
out_color = vec4(inner_edge(q, ivec2(1, 0)), inner_edge(q, ivec2(0, 1)),
|
||||
nearest > 0.0 ? (nearest + 0.25) / 255.0 : 0.0, coverage / weights);
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
#version 140
|
||||
|
||||
const vec3 ZERO = vec3(0.0, 0.0, 0.0);
|
||||
// Farthest triangle edge distance stored, in pixels.
|
||||
const float EXIT_REACH = 4.0;
|
||||
|
||||
// 1 to 65535, told apart between neighboring volumes.
|
||||
uniform float part_id;
|
||||
|
||||
in vec3 clipping_planes_dots;
|
||||
in vec3 eye_normal;
|
||||
in vec3 to_camera;
|
||||
noperspective in vec3 barycentric;
|
||||
|
||||
out vec4 out_color;
|
||||
|
||||
// Two bytes in one channel of the 16 bit target, offset so that a truncating conversion keeps them.
|
||||
float pack2(float hi, float lo)
|
||||
{
|
||||
return (hi * 256.0 + lo + 0.25) / 65535.0;
|
||||
}
|
||||
|
||||
vec2 oct_encode(vec3 n)
|
||||
{
|
||||
n /= abs(n.x) + abs(n.y) + abs(n.z);
|
||||
vec2 e = n.z >= 0.0 ? n.xy : (1.0 - abs(n.yx)) * vec2(n.x >= 0.0 ? 1.0 : -1.0, n.y >= 0.0 ? 1.0 : -1.0);
|
||||
return floor((e * 0.5 + 0.5) * 255.0 + 0.5);
|
||||
}
|
||||
|
||||
// Pixels to the edge of the triangle along the screen direction over which the barycentrics change by d.
|
||||
float exit_distance(vec3 d)
|
||||
{
|
||||
vec3 t = vec3(EXIT_REACH);
|
||||
if (d.x < 0.0) t.x = barycentric.x / -d.x;
|
||||
if (d.y < 0.0) t.y = barycentric.y / -d.y;
|
||||
if (d.z < 0.0) t.z = barycentric.z / -d.z;
|
||||
return floor(clamp(min(t.x, min(t.y, t.z)) / EXIT_REACH, 0.0, 1.0) * 255.0 + 0.5);
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
if (any(lessThan(clipping_planes_dots, ZERO)))
|
||||
discard;
|
||||
|
||||
// Back faces show through cuts, so every surface is compared by its side facing the camera.
|
||||
vec3 n = normalize(eye_normal);
|
||||
if (dot(n, to_camera) < 0.0)
|
||||
n = -n;
|
||||
vec2 e = oct_encode(n);
|
||||
vec3 bx = dFdx(barycentric);
|
||||
vec3 by = dFdy(barycentric);
|
||||
out_color = vec4(pack2(e.x, e.y), (part_id + 0.25) / 65535.0,
|
||||
pack2(exit_distance(bx), exit_distance(-bx)), pack2(exit_distance(by), exit_distance(-by)));
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
#version 140
|
||||
|
||||
uniform mat4 view_model_matrix;
|
||||
uniform mat4 projection_matrix;
|
||||
uniform mat3 view_normal_matrix;
|
||||
uniform mat4 volume_world_matrix;
|
||||
|
||||
// Clipping plane, x = min z, y = max z. Used by the FFF and SLA previews to clip with a top / bottom plane.
|
||||
uniform vec2 z_range;
|
||||
// Clipping plane - general orientation. Used by the SLA gizmo.
|
||||
uniform vec4 clipping_plane;
|
||||
|
||||
in vec3 v_position;
|
||||
in vec3 v_normal;
|
||||
|
||||
out vec3 clipping_planes_dots;
|
||||
out vec3 eye_normal;
|
||||
out vec3 to_camera;
|
||||
noperspective out vec3 barycentric;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 world_pos = volume_world_matrix * vec4(v_position, 1.0);
|
||||
clipping_planes_dots = vec3(dot(world_pos, clipping_plane), world_pos.z - z_range.x, z_range.y - world_pos.z);
|
||||
|
||||
vec4 position = view_model_matrix * vec4(v_position, 1.0);
|
||||
eye_normal = view_normal_matrix * v_normal;
|
||||
// projection_matrix[3][3] is 1 only for an orthographic camera, whose view rays all run along -z.
|
||||
to_camera = mix(-position.xyz, vec3(0.0, 0.0, 1.0), projection_matrix[3][3]);
|
||||
// GLModel gives every triangle three vertices of its own.
|
||||
barycentric = vec3(equal(ivec3(gl_VertexID % 3), ivec3(0, 1, 2)));
|
||||
gl_Position = projection_matrix * position;
|
||||
}
|
||||
@@ -1,4 +1,7 @@
|
||||
#version 140
|
||||
// Multisample depth texture for the anti-aliased outline (see 3DScene.cpp render_with_outline).
|
||||
// Optional on the GLSL 140 path: if unavailable, fallback to a non-multisample depth texture.
|
||||
#extension GL_ARB_texture_multisample : enable
|
||||
|
||||
const vec3 ZERO = vec3(0.0, 0.0, 0.0);
|
||||
const vec3 LightRed = vec3(0.78, 0.0, 0.0);
|
||||
@@ -50,10 +53,21 @@ uniform vec4 uniform_color_clip_plane_1;
|
||||
uniform vec4 uniform_color_clip_plane_2;
|
||||
uniform SlopeDetection slope;
|
||||
|
||||
//BBS: add outline_color
|
||||
uniform bool is_outline;
|
||||
// ORCA: a part of a translucent filament, drawn as its print would show in premultiplied color, see
|
||||
// GLVolumeCollection::render(). It catches a highlight only with translucent_gloss, in realistic view.
|
||||
uniform bool translucent_filament;
|
||||
uniform bool translucent_gloss;
|
||||
// The outline is a per-fragment discard mask, which the framebuffer MSAA cannot smooth, so the
|
||||
// silhouette is resolved per sample from a multisample copy of the outlined model's depth buffer.
|
||||
#ifdef GL_ARB_texture_multisample
|
||||
uniform sampler2DMS depth_tex;
|
||||
uniform int msaa_samples; // samples in depth_tex, 1 when MSAA is off
|
||||
#else
|
||||
uniform sampler2D depth_tex;
|
||||
#endif
|
||||
uniform vec2 screen_size;
|
||||
|
||||
#ifdef ENABLE_ENVIRONMENT_MAP
|
||||
uniform sampler2D environment_tex;
|
||||
@@ -62,6 +76,8 @@ uniform bool translucent_gloss;
|
||||
|
||||
uniform PrintVolumeDetection print_volume;
|
||||
|
||||
uniform float z_far;
|
||||
uniform float z_near;
|
||||
uniform bool enable_ssao;
|
||||
// 1 = the Design tab's studio lighting (studio_shade below); 0 = the two-light model above, which
|
||||
// every other canvas keeps. world_up_eye is world +Z in eye space, for the hemisphere ambient.
|
||||
@@ -96,6 +112,95 @@ vec4 translucent_filament_color(vec3 diffuse, float alpha, vec3 highlight, float
|
||||
|
||||
out vec4 out_color;
|
||||
|
||||
vec3 getBackfaceColor(vec3 fill) {
|
||||
float brightness = 0.2126 * fill.r + 0.7152 * fill.g + 0.0722 * fill.b;
|
||||
return (brightness > 0.75) ? vec3(0.11, 0.165, 0.208) : vec3(0.988, 0.988, 0.988);
|
||||
}
|
||||
|
||||
// Silhouette edge detection & rendering algorithm by leoneruggiero
|
||||
// https://www.shadertoy.com/view/DslXz2
|
||||
#define INFLATE 1
|
||||
|
||||
float GetTolerance(float d, float k)
|
||||
{
|
||||
float A=- (z_far+z_near)/(z_far-z_near);
|
||||
float B=-2.0*z_far*z_near /(z_far-z_near);
|
||||
|
||||
d = d*2.0-1.0;
|
||||
|
||||
return -k*(d+A)*(d+A)/B;
|
||||
}
|
||||
|
||||
// Depth of sample s at integer pixel coord.
|
||||
#ifdef GL_ARB_texture_multisample
|
||||
float FetchDepth(ivec2 coord, int s)
|
||||
{
|
||||
// texelFetch has no wrap mode, so clamp to the edge texel (sampler2D used CLAMP_TO_EDGE).
|
||||
ivec2 sz = textureSize(depth_tex);
|
||||
return abs(texelFetch(depth_tex, clamp(coord, ivec2(0), sz - 1), s).r);
|
||||
}
|
||||
#else
|
||||
float FetchDepth(ivec2 coord, int s)
|
||||
{
|
||||
return abs(texture(depth_tex, (vec2(coord) + 0.5) / screen_size).r);
|
||||
}
|
||||
#endif
|
||||
|
||||
float DetectSilho(ivec2 coord, ivec2 dir, int s)
|
||||
{
|
||||
float x0 = FetchDepth(coord + dir*-2, s);
|
||||
float x1 = FetchDepth(coord + dir*-1, s);
|
||||
float x2 = FetchDepth(coord, s);
|
||||
float x3 = FetchDepth(coord + dir* 1, s);
|
||||
|
||||
float d0 = (x1-x0);
|
||||
float d1 = (x2-x3);
|
||||
|
||||
float r0 = x1 + d0 - x2;
|
||||
float r1 = x2 + d1 - x1;
|
||||
|
||||
float tol = GetTolerance(x2, 0.04);
|
||||
|
||||
return smoothstep(0.0, tol*tol, max( - r0*r1, 0.0));
|
||||
}
|
||||
|
||||
float DetectSilho(ivec2 coord, int s)
|
||||
{
|
||||
return max(
|
||||
DetectSilho(coord, ivec2(1,0), s),
|
||||
DetectSilho(coord, ivec2(0,1), s)
|
||||
);
|
||||
}
|
||||
|
||||
// Full response of one sample. Reduce the max() per sample and average only afterwards:
|
||||
// max(mean) <= mean(max), and averaging first hollows out diagonal and curved lines.
|
||||
float DetectSilhoSample(ivec2 coord, int s)
|
||||
{
|
||||
float v = DetectSilho(coord, s);
|
||||
// Makes silhouettes thicker.
|
||||
for (int i = 1; i <= INFLATE; ++i)
|
||||
{
|
||||
v = max(v, DetectSilho(coord + ivec2(i, 0), s));
|
||||
v = max(v, DetectSilho(coord + ivec2(0, i), s));
|
||||
}
|
||||
return v;
|
||||
}
|
||||
|
||||
// Average the per-sample coverage into the sub-pixel anti-aliasing of the line.
|
||||
float DetectSilho(vec2 fragCoord)
|
||||
{
|
||||
ivec2 coord = ivec2(fragCoord);
|
||||
#ifdef GL_ARB_texture_multisample
|
||||
int n = max(msaa_samples, 1);
|
||||
#else
|
||||
const int n = 1;
|
||||
#endif
|
||||
float acc = 0.0;
|
||||
for (int s = 0; s < n; ++s)
|
||||
acc += DetectSilhoSample(coord, s);
|
||||
return acc / float(n);
|
||||
}
|
||||
|
||||
float compute_ssao_factor(vec3 normal, vec3 view_dir, vec3 eye_pos)
|
||||
{
|
||||
vec3 normal_dx = dFdx(normal);
|
||||
@@ -259,12 +364,21 @@ void main()
|
||||
vec3 lit = (lighting_model == 1) ? studio_shade(color.rgb, normal, view_dir)
|
||||
: (vec3(specular) + window_reflection + color.rgb * diffuse) * PHONG_BRIGHTNESS;
|
||||
|
||||
if (is_outline) {
|
||||
vec3 shaded_rgb = lit * shade;
|
||||
vec4 shaded_color = vec4(clamp(shaded_rgb, vec3(0.0), vec3(1.0)), color.a);
|
||||
float s = DetectSilho(gl_FragCoord.xy);
|
||||
if (s < 0.01)
|
||||
discard;
|
||||
out_color = vec4(mix(shaded_color.rgb, getBackfaceColor(shaded_color.rgb), s), shaded_color.a);
|
||||
if (translucent_filament)
|
||||
out_color.rgb *= out_color.a;
|
||||
}
|
||||
#ifdef ENABLE_ENVIRONMENT_MAP
|
||||
if (use_environment_tex)
|
||||
else if (use_environment_tex)
|
||||
out_color = vec4(clamp((0.45 * texture(environment_tex, normalize(eye_normal).xy * 0.5 + 0.5).xyz + window_reflection + 0.8 * color.rgb * diffuse) * PHONG_BRIGHTNESS * shade, vec3(0.0), vec3(1.0)), color.a);
|
||||
else
|
||||
#endif
|
||||
if (translucent_filament)
|
||||
else if (translucent_filament)
|
||||
out_color = translucent_filament_color(clamp(color.rgb * diffuse * PHONG_BRIGHTNESS * shade, vec3(0.0), vec3(1.0)), color.a,
|
||||
translucent_gloss ? (vec3(specular) + window_reflection) * PHONG_BRIGHTNESS * shade : ZERO,
|
||||
abs(dot(normal, view_dir)));
|
||||
|
||||
@@ -15,6 +15,8 @@ uniform mat4 projection_matrix;
|
||||
uniform mat3 view_normal_matrix;
|
||||
uniform mat4 volume_world_matrix;
|
||||
uniform SlopeDetection slope;
|
||||
uniform bool is_outline;
|
||||
uniform vec2 screen_size;
|
||||
|
||||
// Clipping plane, x = min z, y = max z. Used by the FFF and SLA previews to clip with a top / bottom plane.
|
||||
uniform vec2 z_range;
|
||||
@@ -49,6 +51,15 @@ void main()
|
||||
world_normal_z = slope.actived ? dot(normalize(slope.volume_world_normal_matrix * v_normal), slope.up_direction) : 0.0;
|
||||
|
||||
gl_Position = projection_matrix * position;
|
||||
if (is_outline) {
|
||||
vec3 n = normalize((view_normal_matrix * v_normal).xyz);
|
||||
vec2 dir = normalize(n.xy);
|
||||
if (dot(dir, dir) > 0.0) {
|
||||
//set outline thickness
|
||||
float px = 3.0;
|
||||
gl_Position.xy += dir * (px * 2.0 / screen_size) * gl_Position.w;
|
||||
}
|
||||
}
|
||||
// Fill in the scalars for fragment shader clipping. Fragments with any of these components lower than zero are discarded.
|
||||
clipping_planes_dots = vec3(dot(world_pos, clipping_plane), world_pos.z - z_range.x, z_range.y - world_pos.z);
|
||||
color_clip_plane_dot = dot(world_pos, color_clip_plane);
|
||||
|
||||
@@ -9,6 +9,7 @@ uniform sampler2D color_texture;
|
||||
uniform sampler2D depth_texture;
|
||||
uniform vec2 inv_tex_size;
|
||||
uniform float z_far;
|
||||
uniform bool is_outline;
|
||||
// The pass has no normal target to read, so the surface normal is reconstructed from the depth
|
||||
// buffer. inv_projection_matrix unprojects a pixel back into view space and up_view is world +Z
|
||||
// expressed in view space, which is what tells a top surface from a wall.
|
||||
@@ -43,6 +44,10 @@ vec3 view_normal(ivec2 pixel, vec3 p)
|
||||
|
||||
void main()
|
||||
{
|
||||
if (is_outline) {
|
||||
frag_color = vec4(texture(color_texture, tex_coord).rgb, 1.0);
|
||||
return;
|
||||
}
|
||||
ivec2 pixel = ivec2(gl_FragCoord.xy);
|
||||
vec3 color = texture(color_texture, tex_coord).rgb;
|
||||
|
||||
|
||||
@@ -889,6 +889,15 @@ function renderFav() {
|
||||
badge.title = T("sd_fav_slot", "Favorite %s (%s)", slot_num, shortcutAlt() + slot);
|
||||
tile.appendChild(badge);
|
||||
}
|
||||
// Direct removal: a hover-revealed ✕ in the tile's corner. click() stops propagation so it
|
||||
// unpins without activating the action.
|
||||
var unpin = document.createElement("button");
|
||||
unpin.className = "fav-unpin";
|
||||
unpin.title = T("sd_remove_fav", "Remove from favorites");
|
||||
unpin.setAttribute("aria-label", T("sd_remove_fav", "Remove from favorites"));
|
||||
unpin.innerHTML = '<svg width="9" height="9" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><line x1="4" y1="4" x2="12" y2="12"/><line x1="12" y1="4" x2="4" y2="12"/></svg>';
|
||||
unpin.onclick = function (ev) { ev.stopPropagation(); toggleFav(id); };
|
||||
tile.appendChild(unpin);
|
||||
tile.oncontextmenu = function (ev) {
|
||||
ev.preventDefault();
|
||||
// why: selecting shows the eyebrow, which grows the launcher - resize so the popup
|
||||
@@ -1016,11 +1025,13 @@ function renderActionRow(a, i) {
|
||||
var pin = document.createElement("button");
|
||||
pin.className = "pin";
|
||||
setPinState(pin, on);
|
||||
// stopPropagation keeps the bookmark's click from launching the row.
|
||||
pin.onclick = function (ev) { ev.stopPropagation(); toggleFav(a.id); };
|
||||
// why: two quick fav/unfav clicks must not dblclick-run the row
|
||||
pin.ondblclick = function (ev) { ev.stopPropagation(); };
|
||||
shell.row.appendChild(pin);
|
||||
|
||||
shell.row.onclick = function () { sel = { zone: "list", i: i }; activateEntry(a); };
|
||||
shell.row.onclick = function () { sel = { zone: "list", i: i }; render({ resize: true }); };
|
||||
shell.row.ondblclick = function () { sel = { zone: "list", i: i }; activateEntry(a); };
|
||||
return shell.row;
|
||||
}
|
||||
|
||||
@@ -1185,7 +1196,8 @@ function renderTabRow(t, i) {
|
||||
var hint = tabAliasHint(t, query);
|
||||
if (hint)
|
||||
shell.line.appendChild(markedText("row-alias", hint.text, hint.ranges));
|
||||
shell.row.onclick = function () { sel = { zone: "list", i: i }; jumpToTab(t); };
|
||||
shell.row.onclick = function () { sel = { zone: "list", i: i }; render({ resize: true }); };
|
||||
shell.row.ondblclick = function () { sel = { zone: "list", i: i }; jumpToTab(t); };
|
||||
return shell.row;
|
||||
}
|
||||
|
||||
|
||||
@@ -55,8 +55,6 @@ body {
|
||||
|
||||
.fav-tile {
|
||||
flex: 0 0 auto;
|
||||
/* why: anchors the absolutely positioned Alt/Option slot badge in the tile's corner. */
|
||||
position: relative;
|
||||
/* keep tiles full-size; don't shrink to fit - scroll instead */
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
@@ -80,6 +78,38 @@ body {
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
/* Hover-revealed remove button in the tile's corner; sits inside the tile bounds so overflow:hidden clips it. */
|
||||
.fav-tile {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.fav-unpin {
|
||||
position: absolute;
|
||||
top: 1px;
|
||||
right: 1px;
|
||||
width: 13px;
|
||||
height: 13px;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
border-radius: 50%;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: var(--muted, var(--orca-muted, #6b7280));
|
||||
background: rgba(127, 127, 127, .35);
|
||||
cursor: pointer;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.fav-tile:hover .fav-unpin,
|
||||
.fav-tile.sel .fav-unpin {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.fav-unpin:hover {
|
||||
background: rgba(127, 127, 127, .6);
|
||||
}
|
||||
|
||||
/* Numbered quick-launch slot (Alt/Option+digit), top-left corner of the fav tile. */
|
||||
.fav-slot {
|
||||
position: absolute;
|
||||
|
||||
@@ -14,7 +14,6 @@ interface GitHubIssue {
|
||||
user: { id: number };
|
||||
created_at: string;
|
||||
closed_at?: string;
|
||||
pull_request?: unknown;
|
||||
}
|
||||
|
||||
interface GitHubComment {
|
||||
@@ -58,7 +57,7 @@ async function triggerDedupeWorkflow(
|
||||
}
|
||||
|
||||
await githubRequest(
|
||||
`/repos/${owner}/${repo}/actions/workflows/dedupe-issues.yml/dispatches`,
|
||||
`/repos/${owner}/${repo}/actions/workflows/claude-dedupe-issues.yml/dispatches`,
|
||||
token,
|
||||
'POST',
|
||||
{
|
||||
@@ -83,25 +82,19 @@ Usage:
|
||||
Environment Variables:
|
||||
GITHUB_TOKEN - GitHub personal access token with repo and actions permissions (required)
|
||||
DRY_RUN - Set to "false" to actually trigger workflows (default: true for safety)
|
||||
MIN_ISSUE_NUMBER - Only process issues with numbers at or above this value (default: 1)
|
||||
MAX_ISSUE_NUMBER - Only process issues with numbers less than this value (default: no limit)
|
||||
LIMIT - Stop after triggering this many workflows (default: 100)`);
|
||||
MAX_ISSUE_NUMBER - Only process issues with numbers less than this value (default: 4050)`);
|
||||
}
|
||||
console.log("[DEBUG] GitHub token found");
|
||||
|
||||
const owner = "OrcaSlicer";
|
||||
const repo = "OrcaSlicer";
|
||||
const dryRun = process.env.DRY_RUN !== "false";
|
||||
const maxIssueNumber = process.env.MAX_ISSUE_NUMBER ? parseInt(process.env.MAX_ISSUE_NUMBER, 10) : Infinity;
|
||||
const maxIssueNumber = parseInt(process.env.MAX_ISSUE_NUMBER || "11000", 10);
|
||||
const minIssueNumber = parseInt(process.env.MIN_ISSUE_NUMBER || "1", 10);
|
||||
const limit = parseInt(process.env.LIMIT || "100", 10);
|
||||
// A dedupe run takes about 2.5 minutes, so this keeps about five running at once and
|
||||
// leaves the rest of the Actions runners and the Claude subscription free for other work.
|
||||
const dispatchIntervalMs = 30_000;
|
||||
|
||||
console.log(`[DEBUG] Repository: ${owner}/${repo}`);
|
||||
console.log(`[DEBUG] Dry run mode: ${dryRun}`);
|
||||
console.log(`[DEBUG] Looking at open issues between #${minIssueNumber} and #${maxIssueNumber}, triggering at most ${limit}`);
|
||||
console.log(`[DEBUG] Looking at issues between #${minIssueNumber} and #${maxIssueNumber}`);
|
||||
|
||||
console.log(`[DEBUG] Fetching issues between #${minIssueNumber} and #${maxIssueNumber}...`);
|
||||
const allIssues: GitHubIssue[] = [];
|
||||
@@ -110,15 +103,15 @@ Environment Variables:
|
||||
|
||||
while (true) {
|
||||
const pageIssues: GitHubIssue[] = await githubRequest(
|
||||
`/repos/${owner}/${repo}/issues?state=open&per_page=${perPage}&page=${page}&sort=created&direction=desc`,
|
||||
`/repos/${owner}/${repo}/issues?state=all&per_page=${perPage}&page=${page}&sort=created&direction=desc`,
|
||||
token
|
||||
);
|
||||
|
||||
if (pageIssues.length === 0) break;
|
||||
|
||||
// Filter to only include issues within the specified range; the issues endpoint also lists pull requests
|
||||
// Filter to only include issues within the specified range
|
||||
const filteredIssues = pageIssues.filter(issue =>
|
||||
!issue.pull_request && issue.number >= minIssueNumber && issue.number < maxIssueNumber
|
||||
issue.number >= minIssueNumber && issue.number < maxIssueNumber
|
||||
);
|
||||
allIssues.push(...filteredIssues);
|
||||
|
||||
@@ -148,13 +141,8 @@ Environment Variables:
|
||||
let processedCount = 0;
|
||||
let candidateCount = 0;
|
||||
let triggeredCount = 0;
|
||||
let lowestTriggered: number | undefined;
|
||||
|
||||
for (const issue of allIssues) {
|
||||
if (triggeredCount >= limit) {
|
||||
console.log(`[DEBUG] Reached the limit of ${limit} workflows, stopping`);
|
||||
break;
|
||||
}
|
||||
processedCount++;
|
||||
console.log(
|
||||
`[DEBUG] Processing issue #${issue.number} (${processedCount}/${allIssues.length}): ${issue.title}`
|
||||
@@ -162,7 +150,7 @@ Environment Variables:
|
||||
|
||||
console.log(`[DEBUG] Fetching comments for issue #${issue.number}...`);
|
||||
const comments: GitHubComment[] = await githubRequest(
|
||||
`/repos/${owner}/${repo}/issues/${issue.number}/comments?per_page=100`,
|
||||
`/repos/${owner}/${repo}/issues/${issue.number}/comments`,
|
||||
token
|
||||
);
|
||||
console.log(
|
||||
@@ -204,25 +192,19 @@ Environment Variables:
|
||||
);
|
||||
}
|
||||
triggeredCount++;
|
||||
lowestTriggered = issue.number;
|
||||
} catch (error) {
|
||||
console.error(
|
||||
`[ERROR] Failed to trigger workflow for issue #${issue.number}: ${error}`
|
||||
);
|
||||
}
|
||||
|
||||
if (!dryRun) {
|
||||
await new Promise(resolve => setTimeout(resolve, dispatchIntervalMs));
|
||||
}
|
||||
// Add a delay between workflow triggers to avoid overwhelming the system
|
||||
await new Promise(resolve => setTimeout(resolve, 1000));
|
||||
}
|
||||
|
||||
console.log(
|
||||
`[DEBUG] Script completed. Processed ${processedCount} issues, found ${candidateCount} candidates without duplicate comments, ${dryRun ? 'would trigger' : 'triggered'} ${triggeredCount} workflows`
|
||||
);
|
||||
// Issues with no duplicates get no comment, so a later run would pick them again; continue below this batch instead.
|
||||
if (lowestTriggered !== undefined) {
|
||||
console.log(`[INFO] To continue with older issues, run again with max_issue_number set to ${lowestTriggered}`);
|
||||
}
|
||||
}
|
||||
|
||||
backfillDuplicateComments().catch(console.error);
|
||||
|
||||
@@ -1,95 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Comments on a GitHub issue with a list of potential duplicates.
|
||||
# Usage: ./comment-on-duplicates.sh --potential-duplicates 456 789 101
|
||||
#
|
||||
# The base issue number is read from the workflow event payload.
|
||||
#
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
REPO="${GITHUB_REPOSITORY:?GITHUB_REPOSITORY not set}"
|
||||
|
||||
# Read from event payload so the issue number is bound to the triggering event.
|
||||
# Falls back to workflow_dispatch inputs for manual runs.
|
||||
BASE_ISSUE=$(jq -r '.issue.number // .inputs.issue_number // empty' "${GITHUB_EVENT_PATH:?GITHUB_EVENT_PATH not set}")
|
||||
if ! [[ "$BASE_ISSUE" =~ ^[0-9]+$ ]]; then
|
||||
echo "Error: no issue number in event payload" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
DUPLICATES=()
|
||||
|
||||
# Parse arguments
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case $1 in
|
||||
--potential-duplicates)
|
||||
shift
|
||||
while [[ $# -gt 0 && ! "$1" =~ ^-- ]]; do
|
||||
DUPLICATES+=("$1")
|
||||
shift
|
||||
done
|
||||
;;
|
||||
*)
|
||||
echo "Error: unknown argument (only --potential-duplicates is accepted)" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Validate duplicates
|
||||
if [[ ${#DUPLICATES[@]} -eq 0 ]]; then
|
||||
echo "Error: --potential-duplicates requires at least one issue number" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ ${#DUPLICATES[@]} -gt 3 ]]; then
|
||||
echo "Error: --potential-duplicates accepts at most 3 issues" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
for dup in "${DUPLICATES[@]}"; do
|
||||
if ! [[ "$dup" =~ ^[0-9]+$ ]]; then
|
||||
echo "Error: duplicate issue must be a number, got: $dup" >&2
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# Validate that base issue exists
|
||||
if ! gh issue view "$BASE_ISSUE" --repo "$REPO" &>/dev/null; then
|
||||
echo "Error: issue #$BASE_ISSUE does not exist in $REPO" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Validate that all duplicate issues exist
|
||||
for dup in "${DUPLICATES[@]}"; do
|
||||
if ! gh issue view "$dup" --repo "$REPO" &>/dev/null; then
|
||||
echo "Error: issue #$dup does not exist in $REPO" >&2
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# Build comment body
|
||||
COUNT=${#DUPLICATES[@]}
|
||||
if [[ $COUNT -eq 1 ]]; then
|
||||
HEADER="Found 1 possible duplicate issue:"
|
||||
else
|
||||
HEADER="Found $COUNT possible duplicate issues:"
|
||||
fi
|
||||
|
||||
BODY="$HEADER"$'\n\n'
|
||||
INDEX=1
|
||||
for dup in "${DUPLICATES[@]}"; do
|
||||
BODY+="$INDEX. https://github.com/$REPO/issues/$dup"$'\n'
|
||||
((INDEX++))
|
||||
done
|
||||
|
||||
BODY+=$'\n'"This issue will be automatically closed as a duplicate in 3 days."$'\n\n'
|
||||
BODY+="- If your issue is a duplicate, please close it and 👍 the existing issue instead"$'\n'
|
||||
BODY+="- To prevent auto-closure, add a comment or 👎 this comment"$'\n\n'
|
||||
BODY+="🤖 OrcaSlicer bot"
|
||||
|
||||
# Post the comment
|
||||
gh issue comment "$BASE_ISSUE" --repo "$REPO" --body "$BODY"
|
||||
|
||||
echo "Posted duplicate comment on issue #$BASE_ISSUE"
|
||||
@@ -52,8 +52,8 @@ modules:
|
||||
- -Dtests=disabled
|
||||
sources:
|
||||
- type: archive
|
||||
url: https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-1.26.11.tar.xz
|
||||
sha256: 001deb0876d5d743cd3448abf74a27adec3fd850012fcb1b00994861bd6c1145
|
||||
url: https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-1.22.8.tar.xz
|
||||
sha256: e305b9f07f52743ca481da0a4e0c76c35efd60adaf1b0694eb3bb021e2137e39
|
||||
|
||||
- name: kde-extra-cmake-modules
|
||||
buildsystem: cmake-ninja
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# Wrapper around gh CLI that only allows specific subcommands and flags.
|
||||
# All commands are scoped to the current repository via GH_REPO or GITHUB_REPOSITORY.
|
||||
#
|
||||
# Usage:
|
||||
# ./scripts/gh.sh issue view 123
|
||||
# ./scripts/gh.sh issue view 123 --comments
|
||||
# ./scripts/gh.sh issue list --state open --limit 20
|
||||
# ./scripts/gh.sh search issues "search query" --limit 10
|
||||
# ./scripts/gh.sh label list --limit 100
|
||||
|
||||
export GH_HOST=github.com
|
||||
|
||||
REPO="${GH_REPO:-${GITHUB_REPOSITORY:-}}"
|
||||
if [[ -z "$REPO" || "$REPO" == */*/* || "$REPO" != */* ]]; then
|
||||
echo "Error: GH_REPO or GITHUB_REPOSITORY must be set to owner/repo format (e.g., GITHUB_REPOSITORY=OrcaSlicer/OrcaSlicer)" >&2
|
||||
exit 1
|
||||
fi
|
||||
export GH_REPO="$REPO"
|
||||
|
||||
ALLOWED_FLAGS=(--comments --state --limit --label)
|
||||
FLAGS_WITH_VALUES=(--state --limit --label)
|
||||
|
||||
SUB1="${1:-}"
|
||||
SUB2="${2:-}"
|
||||
CMD="$SUB1 $SUB2"
|
||||
case "$CMD" in
|
||||
"issue view"|"issue list"|"search issues"|"label list")
|
||||
;;
|
||||
*)
|
||||
echo "Error: only 'issue view', 'issue list', 'search issues', 'label list' are allowed (e.g., ./scripts/gh.sh issue view 123)" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
shift 2
|
||||
|
||||
# Separate flags from positional arguments
|
||||
POSITIONAL=()
|
||||
FLAGS=()
|
||||
skip_next=false
|
||||
for arg in "$@"; do
|
||||
if [[ "$skip_next" == true ]]; then
|
||||
FLAGS+=("$arg")
|
||||
skip_next=false
|
||||
elif [[ "$arg" == -* ]]; then
|
||||
flag="${arg%%=*}"
|
||||
matched=false
|
||||
for allowed in "${ALLOWED_FLAGS[@]}"; do
|
||||
if [[ "$flag" == "$allowed" ]]; then
|
||||
matched=true
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [[ "$matched" == false ]]; then
|
||||
echo "Error: only --comments, --state, --limit, --label flags are allowed (e.g., ./scripts/gh.sh issue list --state open --limit 20)" >&2
|
||||
exit 1
|
||||
fi
|
||||
FLAGS+=("$arg")
|
||||
# If flag expects a value and isn't using = syntax, skip next arg
|
||||
if [[ "$arg" != *=* ]]; then
|
||||
for vflag in "${FLAGS_WITH_VALUES[@]}"; do
|
||||
if [[ "$flag" == "$vflag" ]]; then
|
||||
skip_next=true
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
else
|
||||
POSITIONAL+=("$arg")
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ "$CMD" == "search issues" ]]; then
|
||||
QUERY="${POSITIONAL[0]:-}"
|
||||
QUERY_LOWER=$(echo "$QUERY" | tr '[:upper:]' '[:lower:]')
|
||||
if [[ "$QUERY_LOWER" == *"repo:"* || "$QUERY_LOWER" == *"org:"* || "$QUERY_LOWER" == *"user:"* ]]; then
|
||||
echo "Error: search query must not contain repo:, org:, or user: qualifiers (e.g., ./scripts/gh.sh search issues \"bug report\" --limit 10)" >&2
|
||||
exit 1
|
||||
fi
|
||||
gh "$SUB1" "$SUB2" "$QUERY" --repo "$REPO" "${FLAGS[@]}"
|
||||
elif [[ "$CMD" == "issue view" ]]; then
|
||||
if [[ ${#POSITIONAL[@]} -ne 1 ]] || ! [[ "${POSITIONAL[0]}" =~ ^[0-9]+$ ]]; then
|
||||
echo "Error: issue view requires exactly one numeric issue number (e.g., ./scripts/gh.sh issue view 123)" >&2
|
||||
exit 1
|
||||
fi
|
||||
gh "$SUB1" "$SUB2" "${POSITIONAL[0]}" "${FLAGS[@]}"
|
||||
else
|
||||
if [[ ${#POSITIONAL[@]} -ne 0 ]]; then
|
||||
echo "Error: issue list and label list do not accept positional arguments (e.g., ./scripts/gh.sh issue list --state open, ./scripts/gh.sh label list --limit 100)" >&2
|
||||
exit 1
|
||||
fi
|
||||
gh "$SUB1" "$SUB2" "${FLAGS[@]}"
|
||||
fi
|
||||
@@ -18,7 +18,6 @@
|
||||
#include "nlohmann/json.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
#include <initializer_list>
|
||||
#include <string>
|
||||
#include <exception>
|
||||
#include <boost/none.hpp>
|
||||
@@ -704,29 +703,8 @@ void AppConfig::set_defaults()
|
||||
set("angle_deflection", "0.5");
|
||||
}
|
||||
if (get("is_split_compound").empty()) {
|
||||
// Splitting keeps the bodies of a multi-body part, and with them their original names.
|
||||
set_bool("is_split_compound", true);
|
||||
set_bool("is_split_compound", false);
|
||||
}
|
||||
// Geometry-import choices are editor preferences, never project print settings.
|
||||
for (const std::string format : {"step", "amf", "3mf"}) {
|
||||
const std::string prefix = "import_names_" + format + "_";
|
||||
if (get(prefix + "keep").empty())
|
||||
set_bool(prefix + "keep", true);
|
||||
if (get(prefix + "sort").empty())
|
||||
set_bool(prefix + "sort", false);
|
||||
if (format != "3mf" && get(prefix + "assembly").empty())
|
||||
set_bool(prefix + "assembly", true);
|
||||
if (format == "amf" && get(prefix + "separate").empty())
|
||||
set_bool(prefix + "separate", true);
|
||||
if (format != "step" && get(prefix + "show_dialog").empty())
|
||||
set_bool(prefix + "show_dialog", true);
|
||||
}
|
||||
if (get("import_names_cleanup_show_dialog").empty())
|
||||
set_bool("import_names_cleanup_show_dialog", true);
|
||||
if (get("import_names_cleanup_remove").empty())
|
||||
set_bool("import_names_cleanup_remove", false);
|
||||
if (get("import_names_cleanup_replacement").empty())
|
||||
set("import_names_cleanup_replacement", "_");
|
||||
if (get("enable_primitive_size_dialog").empty()) {
|
||||
set_bool("enable_primitive_size_dialog", true);
|
||||
}
|
||||
@@ -749,6 +727,11 @@ void AppConfig::set_defaults()
|
||||
set_bool("use_printer_agents", false);
|
||||
}
|
||||
|
||||
if (get("enable_ota").empty())
|
||||
{
|
||||
set_bool("enable_ota", false);
|
||||
}
|
||||
|
||||
// Remove legacy window positions/sizes
|
||||
erase("app", "main_frame_maximized");
|
||||
erase("app", "main_frame_pos");
|
||||
|
||||
+26
-66
@@ -7,8 +7,6 @@
|
||||
#include "Polygon.hpp"
|
||||
#include "Print.hpp"
|
||||
#include "ShortestPath.hpp"
|
||||
#include "Surface.hpp"
|
||||
#include "SurfaceCollection.hpp"
|
||||
#include "Support/BeltFloorContext.hpp"
|
||||
#include "BoundingBox.hpp"
|
||||
#include "ExPolygon.hpp"
|
||||
@@ -259,12 +257,9 @@ struct BeltBrimContext
|
||||
};
|
||||
|
||||
// Emit the cross-belt brim lines that belong to the band [print_z - height, print_z].
|
||||
// wall_inset is how far the centreline of the outer wall of the band's object layer lies
|
||||
// inside where the layer's slice met the belt, mm.
|
||||
static void belt_brim_band_paths(const BeltBrimContext &bc,
|
||||
coordf_t print_z,
|
||||
coordf_t height,
|
||||
double wall_inset,
|
||||
const Polygons &obstacles,
|
||||
ExtrusionEntityCollection &out,
|
||||
ExPolygons &areas_out)
|
||||
@@ -277,15 +272,10 @@ static void belt_brim_band_paths(const BeltBrimContext &bc,
|
||||
// How wide this band is measured ON the belt, versus one nominal bead.
|
||||
const double band_in_plane = (u_hi - u_lo) * bc.frame.u_stretch();
|
||||
|
||||
// Nozzle-to-belt clearance of the object's own outer wall where it rests on the belt.
|
||||
// The layer is sliced half a layer below print_z, so the slice meets the belt there, and
|
||||
// the wall's centreline is inset from that edge, where the belt lies lower by the inset
|
||||
// times the shear. No brim line sits closer to the belt than this, so brim and object
|
||||
// are laid at the same height and one calibration of the belt height (endstop, extruder
|
||||
// offset) serves both. A contour compensation that pushes the wall down to the belt
|
||||
// cannot be matched: the brim keeps a tenth of a layer, so its lines still have a
|
||||
// cross-section.
|
||||
const double wall_clearance = std::max(0.5 * height + wall_inset * std::abs(bc.frame.shear), 0.1 * height);
|
||||
// Fraction of the layer height at which a line sits above the belt. Toward the
|
||||
// downhill edge, so the sheet is reasonably thick while the nozzle stays clear of
|
||||
// the belt itself.
|
||||
static constexpr double BAND_CLEARANCE_FRACTION = 0.75;
|
||||
|
||||
std::vector<coord_t> us;
|
||||
double uniform_clearance = 0.; // 0 => derive per line from its own position
|
||||
@@ -295,20 +285,19 @@ static void belt_brim_band_paths(const BeltBrimContext &bc,
|
||||
// wider. Two lattice lines in such a band would land almost on top of each other.
|
||||
if (band_in_plane <= 1.5 * bc.in_plane_pitch + EPSILON) {
|
||||
// Steep belt, which is the normal case: the band is narrower than one bead, so
|
||||
// exactly one line fits. Place it at the outer wall's clearance rather than on
|
||||
// a nominal-spacing lattice. On a lattice each line lands at an arbitrary point
|
||||
// in its band, the clearance sweeps [0, height] from band to band, and the bead
|
||||
// width therefore varies by 2x - visible as ragged, uneven brim lines. A fixed
|
||||
// clearance is identical everywhere, so every bead is the same width. It can
|
||||
// exceed the layer height, which only moves every band's line downhill by the
|
||||
// same distance.
|
||||
// exactly one line fits. Place it at a FIXED fraction of the band rather than
|
||||
// on a nominal-spacing lattice. On a lattice each line lands at an arbitrary
|
||||
// point in its band, the clearance sweeps [0, height] from band to band, and the
|
||||
// bead width therefore varies by 2x - visible as ragged, uneven brim lines.
|
||||
// Anchoring to the band makes the clearance identical everywhere, so every bead
|
||||
// is the same width.
|
||||
//
|
||||
// The spacing is then whatever the bands give (height / sin(tilt) on the belt)
|
||||
// rather than the nominal bead spacing, so the flow below is matched to THAT
|
||||
// pitch. Matched flow at the real pitch is what keeps the sheet uniform and
|
||||
// gap-free; using nominal flow at band spacing would over-feed it.
|
||||
us.push_back(scale_(bc.ctx.cutoff_u(print_z - wall_clearance)));
|
||||
uniform_clearance = wall_clearance;
|
||||
us.push_back(scale_(bc.ctx.cutoff_u(print_z - BAND_CLEARANCE_FRACTION * height)));
|
||||
uniform_clearance = BAND_CLEARANCE_FRACTION * height;
|
||||
line_pitch = band_in_plane;
|
||||
} else {
|
||||
// Shallow belt: the band is wider than a bead, so it takes several lines and they
|
||||
@@ -335,17 +324,18 @@ static void belt_brim_band_paths(const BeltBrimContext &bc,
|
||||
//
|
||||
// A lattice line can fall where the belt is only a hair below the band's print_z.
|
||||
// The bead there would be laid scraping the belt while its flow is sized for a
|
||||
// taller cell, so it is moved to the outer wall's clearance, where the single-line
|
||||
// case puts every line. (The clearance is along slice Z; the real gap under the
|
||||
// nozzle is clearance x cos(tilt).)
|
||||
// taller cell, so it is moved uphill to the same fraction of the band the
|
||||
// single-line case uses. (The clearance is along slice Z; the real gap under the
|
||||
// nozzle is clearance x cos(tilt), 0.53 h at 45 degrees for the 0.75 fraction.)
|
||||
double clearance = uniform_clearance;
|
||||
if (clearance <= 0.) {
|
||||
const Point probe = bc.frame.from_axis == 0 ? Point(u, 0) : Point(0, u);
|
||||
clearance = std::min(print_z - bc.ctx.floor_print_z(probe), height);
|
||||
if (clearance < wall_clearance) {
|
||||
clearance = wall_clearance;
|
||||
clearance = print_z - bc.ctx.floor_print_z(probe);
|
||||
if (clearance < BAND_CLEARANCE_FRACTION * height) {
|
||||
clearance = BAND_CLEARANCE_FRACTION * height;
|
||||
u = scale_(bc.ctx.cutoff_u(print_z - clearance));
|
||||
}
|
||||
clearance = std::min(clearance, height);
|
||||
}
|
||||
// A line moved uphill can land on, or almost on, its neighbour; two beads closer
|
||||
// than half a pitch would be laid into the same cell.
|
||||
@@ -367,12 +357,10 @@ static void belt_brim_band_paths(const BeltBrimContext &bc,
|
||||
if (pieces.empty())
|
||||
continue;
|
||||
|
||||
// A bead as tall as the clearance and line_pitch apart from the next fills exactly
|
||||
// one pitch x clearance cell of the sheet, at any clearance. (with_cross_section()
|
||||
// makes a round bead of a quarter of the area asked for when the cell is small.)
|
||||
const float height_f = float(clearance);
|
||||
const Flow f(Flow::rounded_rectangle_extrusion_width_from_spacing(float(line_pitch), height_f), height_f,
|
||||
bc.brim_flow.nozzle_diameter());
|
||||
// with_cross_section, not with_height: it reaches the prescribed volume while
|
||||
// KEEPING the extrusion spacing, so the bead is sized to fill exactly one
|
||||
// pitch x clearance cell of the sheet.
|
||||
const Flow f = bc.brim_flow.with_cross_section(float(line_pitch * clearance));
|
||||
|
||||
// Footprint of these beads, for the first-layer convex hull and bbox.
|
||||
for (const Polygon &p : offset(pieces, 0.5f * float(f.scaled_width())))
|
||||
@@ -457,9 +445,6 @@ void make_belt_brim(PrintObject &object)
|
||||
ExPolygons footprint_acc;
|
||||
// The first layer that touches the belt: where the leading-edge brim is cut.
|
||||
const Layer *first_contact = nullptr;
|
||||
// Per layer, the width of the outer wall resting on the belt, the narrowest where several
|
||||
// regions do, as it sits lowest; 0 where the layer does not rest on the belt.
|
||||
std::vector<double> contact_wall_width(nlayers, 0.);
|
||||
for (size_t i = 0; i < nlayers; ++ i) {
|
||||
const Layer &layer = *object.layers()[i];
|
||||
if (layer.lslices.empty())
|
||||
@@ -481,11 +466,6 @@ void make_belt_brim(PrintObject &object)
|
||||
if (first_contact == nullptr)
|
||||
first_contact = &layer;
|
||||
expolygons_append(footprint_acc, std::move(contact));
|
||||
for (const LayerRegion *layerm : layer.regions())
|
||||
if (! layerm->slices.empty() && ! intersection(to_polygons(layerm->slices.surfaces), Polygons{ band }).empty()) {
|
||||
const double w = layerm->flow(frExternalPerimeter).width();
|
||||
contact_wall_width[i] = contact_wall_width[i] > 0. ? std::min(contact_wall_width[i], w) : w;
|
||||
}
|
||||
}
|
||||
const ExPolygons footprint = union_ex(footprint_acc);
|
||||
if (footprint.empty())
|
||||
@@ -539,37 +519,17 @@ void make_belt_brim(PrintObject &object)
|
||||
: (low_side ? fbb.min.y() : fbb.max.y());
|
||||
}
|
||||
|
||||
// How far each layer's outer wall, which the layer's brim band is levelled with, lies
|
||||
// inside where the layer's slice met the belt: half its width, less the XY contour
|
||||
// compensation that grew the slice toward the belt (none where slicing skips it, see
|
||||
// PrintObject::slice_volumes()). The first layer's walls take initial_layer_line_width.
|
||||
// A layer that does not rest on the belt takes the wall of the last one before it that
|
||||
// does, and the layers ahead of the part the first one's.
|
||||
const double contour_compensation = print.config().filament_diameter.size() > 1 && object.is_mm_painted() ?
|
||||
0. : object.config().xy_contour_compensation.value;
|
||||
std::vector<double> wall_insets(nlayers);
|
||||
{
|
||||
const auto first_wall = std::find_if(contact_wall_width.begin(), contact_wall_width.end(), [](double w) { return w > 0.; });
|
||||
double width = first_wall != contact_wall_width.end() ? *first_wall : 0.;
|
||||
for (size_t i = 0; i < nlayers; ++ i) {
|
||||
if (contact_wall_width[i] > 0.)
|
||||
width = contact_wall_width[i];
|
||||
wall_insets[i] = 0.5 * width - contour_compensation;
|
||||
}
|
||||
}
|
||||
|
||||
// 4. Bands coincident with an object layer.
|
||||
std::vector<ExtrusionEntityCollection> by_layer(nlayers);
|
||||
std::vector<ExPolygons> areas_by_layer(nlayers);
|
||||
for (size_t i = 0; i < nlayers; ++ i) {
|
||||
const Layer &layer = *object.layers()[i];
|
||||
const Polygons obstacles = belt_brim_obstacles(print, object, bc.region_bbox, layer.print_z, 0.5 * layer.height);
|
||||
belt_brim_band_paths(bc, layer.print_z, layer.height, wall_insets[i], obstacles, by_layer[i], areas_by_layer[i]);
|
||||
belt_brim_band_paths(bc, layer.print_z, layer.height, obstacles, by_layer[i], areas_by_layer[i]);
|
||||
}
|
||||
|
||||
// 5. Apron prologue: the part of the region downhill of the object's first
|
||||
// layer, which has no object layer to ride on. It continues the first layer's
|
||||
// band, so it takes that layer's height, and the first contact's wall.
|
||||
// layer, which has no object layer to ride on.
|
||||
std::vector<BeltBrimBand> prologue;
|
||||
{
|
||||
const Layer &first = *object.layers().front();
|
||||
@@ -588,7 +548,7 @@ void make_belt_brim(PrintObject &object)
|
||||
BeltBrimBand band;
|
||||
band.print_z = z;
|
||||
band.height = h;
|
||||
belt_brim_band_paths(bc, z, h, wall_insets.front(), obstacles, band.fills, band.areas);
|
||||
belt_brim_band_paths(bc, z, h, obstacles, band.fills, band.areas);
|
||||
if (! band.fills.empty())
|
||||
prologue.emplace_back(std::move(band));
|
||||
}
|
||||
|
||||
@@ -217,8 +217,6 @@ set(lisbslic3r_sources
|
||||
Format/3mf.hpp
|
||||
Format/AMF.cpp
|
||||
Format/AMF.hpp
|
||||
Format/ImportNames.cpp
|
||||
Format/ImportNames.hpp
|
||||
Format/AssembleList.cpp
|
||||
Format/AssembleList.hpp
|
||||
Format/DRC.cpp
|
||||
|
||||
@@ -441,9 +441,6 @@ bool ExtrusionLoop::is_smooth(double angle_threshold, double min_arm_length) con
|
||||
// scarf extrudes through both ends, and the planner nearly halts on a block that short. Drop the
|
||||
// vertex next to the seam point instead, so the loop still starts and ends at the seam. A trimmed
|
||||
// path loses its arc fitting; its geometry is unchanged, it just prints as line segments.
|
||||
// An eighth of a common line width: the path moves by less than that where a vertex is dropped.
|
||||
const double seam_path_tolerance = scale_(0.05);
|
||||
|
||||
static void trim_seam_ends(ExtrusionPaths &paths, double tolerance)
|
||||
{
|
||||
const auto shorter = [tolerance](const Point3 &a, const Point3 &b) { return (b - a).cast<double>().norm() < tolerance; };
|
||||
@@ -483,13 +480,10 @@ static void trim_seam_ends(ExtrusionPaths &paths, double tolerance)
|
||||
}
|
||||
}
|
||||
|
||||
// Split `polyline` where the scarf ramp ends. A remainder shorter than half a slope step before
|
||||
// the next vertex would be a flat stub that makes the motion planner slow down at the end of the
|
||||
// ramp. Where that vertex lies within `seam_path_tolerance` of the straight line from the exact
|
||||
// ramp end to the vertex after it, the flat path skips it: the ramp keeps its exact length, so it
|
||||
// ends at the same place on every layer however the loop's vertices fall there. At a corner, or
|
||||
// when the vertex ends the path, the ramp is extended to the vertex instead. Planners treat moves
|
||||
// of a millimetre and more as ordinary, so the ramp never grows by more than that.
|
||||
// Split `polyline` where the scarf ramp ends. When the split would leave a remainder shorter
|
||||
// than half a slope step before the next vertex, the ramp is extended to that vertex instead:
|
||||
// a stub that short makes the motion planner slow down at the end of the ramp. Planners treat
|
||||
// moves of a millimetre and more as ordinary, so the ramp never grows by more than that.
|
||||
static void split_at_slope_end(const Polyline3 &polyline, double length, double slope_max_segment_length, Polyline3 &slope, Polyline3 &flat)
|
||||
{
|
||||
const double snap_distance = std::min(0.5 * slope_max_segment_length, scale_(1.));
|
||||
@@ -499,21 +493,6 @@ static void split_at_slope_end(const Polyline3 &polyline, double length, double
|
||||
const double end_length = acc_length + line.length();
|
||||
if (end_length >= length) {
|
||||
if (end_length - length < snap_distance) {
|
||||
const size_t after = line_idx + 2;
|
||||
if (length >= SCALED_EPSILON && after < polyline.size()) {
|
||||
// Distance of the skipped vertex from the chord, in 3D so that a Z contour is kept too.
|
||||
const Vec3d a = lerp(line.a, line.b, (length - acc_length) / line.length()).cast<double>();
|
||||
const Vec3d b = polyline.points[after].cast<double>();
|
||||
const Vec3d p = line.b.cast<double>();
|
||||
const double t = (b - a).squaredNorm() > 0. ? std::clamp((p - a).dot(b - a) / (b - a).squaredNorm(), 0., 1.) : 0.;
|
||||
if ((p - a - t * (b - a)).norm() <= seam_path_tolerance) {
|
||||
Polyline3 rest;
|
||||
polyline.split_at_length(length, &slope, &rest);
|
||||
polyline.split_at_index(after, &rest, &flat);
|
||||
flat.append_before(slope.last_point());
|
||||
return;
|
||||
}
|
||||
}
|
||||
polyline.split_at_index(line_idx + 1, &slope, &flat);
|
||||
return;
|
||||
}
|
||||
@@ -533,7 +512,8 @@ ExtrusionLoopSloped::ExtrusionLoopSloped(ExtrusionPaths& original_paths,
|
||||
ExtrusionLoopRole role)
|
||||
: ExtrusionLoop(role)
|
||||
{
|
||||
trim_seam_ends(original_paths, seam_path_tolerance);
|
||||
// An eighth of a common line width: the path moves by less than that at the seam.
|
||||
trim_seam_ends(original_paths, scale_(0.05));
|
||||
// The caller measured the loop before the trim; a scarf that covers the whole loop must still end at 1.
|
||||
double trimmed_length = 0.;
|
||||
for (const ExtrusionPath &path : original_paths)
|
||||
|
||||
@@ -103,11 +103,11 @@ namespace FilamentGroupUtils
|
||||
}
|
||||
|
||||
|
||||
std::vector<std::vector<MachineFilamentInfo>> build_full_machine_filaments(const std::vector<std::vector<DynamicPrintConfig>>& filament_configs)
|
||||
static std::vector<std::vector<MachineFilamentInfo>> build_full_machine_filaments(const std::vector<std::vector<DynamicPrintConfig>>& filament_configs)
|
||||
{
|
||||
auto extract_filament_type = [](const std::string& s)->std::string {
|
||||
static const std::regex r1(R"(^Sup.(\w+)$)");
|
||||
static const std::regex r2(R"(^(\w+)-S$)");
|
||||
std::regex r1(R"(^Sup.(\w+)$)");
|
||||
std::regex r2(R"(^(\w+)-S$)");
|
||||
|
||||
std::smatch m;
|
||||
if (std::regex_match(s, m, r1))
|
||||
@@ -118,9 +118,8 @@ namespace FilamentGroupUtils
|
||||
};
|
||||
|
||||
// change filament type to type format in preset
|
||||
// One bucket per extruder, at least two, never fewer than the payload so the loop below
|
||||
// cannot index out of bounds.
|
||||
std::vector<std::vector<MachineFilamentInfo>> machine_filaments(std::max<size_t>(filament_configs.size(), 2));
|
||||
// defualt size set to 2
|
||||
std::vector<std::vector<MachineFilamentInfo>> machine_filaments(2);
|
||||
for (size_t idx = 0; idx < filament_configs.size(); ++idx) {
|
||||
auto& arr = filament_configs[idx];
|
||||
for (auto& item : arr) {
|
||||
@@ -130,15 +129,15 @@ namespace FilamentGroupUtils
|
||||
std::string tray_name;
|
||||
bool is_support_filament = false;
|
||||
|
||||
if (auto color_ptr = item.option<ConfigOptionStrings>("filament_colour"); color_ptr && !color_ptr->values.empty())
|
||||
if (auto color_ptr = item.option<ConfigOptionStrings>("filament_colour"); color_ptr)
|
||||
color = color_ptr->get_at(0);
|
||||
if (auto type_ptr = item.option<ConfigOptionStrings>("filament_type"); type_ptr && !type_ptr->values.empty()) {
|
||||
if (auto type_ptr = item.option<ConfigOptionStrings>("filament_type"); type_ptr) {
|
||||
type = type_ptr->get_at(0);
|
||||
type = extract_filament_type(type);
|
||||
}
|
||||
if (auto tray_ptr = item.option<ConfigOptionStrings>("tray_name"); tray_ptr && !tray_ptr->values.empty())
|
||||
if (auto tray_ptr = item.option<ConfigOptionStrings>("tray_name"); tray_ptr)
|
||||
tray_name = tray_ptr->get_at(0);
|
||||
if (auto support_ptr = item.option<ConfigOptionBools>("filament_is_support"); support_ptr && !support_ptr->values.empty())
|
||||
if (auto support_ptr = item.option<ConfigOptionBools>("filament_is_support"); support_ptr)
|
||||
is_support_filament = support_ptr->get_at(0);
|
||||
if (auto id_ptr = item.option<ConfigOptionStrings>("filament_id"); id_ptr && !id_ptr->values.empty())
|
||||
temp.filament_id = id_ptr->get_at(0);
|
||||
@@ -157,48 +156,12 @@ namespace FilamentGroupUtils
|
||||
return machine_filaments;
|
||||
}
|
||||
|
||||
bool machine_filaments_changed(const std::vector<std::vector<DynamicPrintConfig>>& old_configs,
|
||||
const std::vector<std::vector<DynamicPrintConfig>>& new_configs)
|
||||
{
|
||||
// A payload carrying no tray configs at all means "inventory not known yet" (AMS not
|
||||
// connected), not "the AMS has no filaments": a connected device reports one config per slot,
|
||||
// so clearing the last spool still has to count as a change.
|
||||
const auto has_any_tray = [](const std::vector<std::vector<DynamicPrintConfig>>& payload) {
|
||||
for (const std::vector<DynamicPrintConfig>& extruder : payload)
|
||||
if (!extruder.empty())
|
||||
return true;
|
||||
return false;
|
||||
};
|
||||
const std::vector<std::vector<MachineFilamentInfo>> old_projected = build_full_machine_filaments(old_configs);
|
||||
const std::vector<std::vector<MachineFilamentInfo>> new_projected = build_full_machine_filaments(new_configs);
|
||||
if (!has_any_tray(old_configs) || !has_any_tray(new_configs))
|
||||
return false;
|
||||
if (old_projected.size() != new_projected.size())
|
||||
return true;
|
||||
for (size_t idx = 0; idx < old_projected.size(); ++idx) {
|
||||
const std::vector<MachineFilamentInfo>& old_slots = old_projected[idx];
|
||||
const std::vector<MachineFilamentInfo>& new_slots = new_projected[idx];
|
||||
// Slot order is significant: build_machine_filaments() groups by slot position.
|
||||
if (old_slots.size() != new_slots.size())
|
||||
return true;
|
||||
for (size_t i = 0; i < old_slots.size(); ++i) {
|
||||
const MachineFilamentInfo& a = old_slots[i];
|
||||
const MachineFilamentInfo& b = new_slots[i];
|
||||
const bool slot_changed = a.color != b.color || a.type != b.type || a.is_support != b.is_support
|
||||
|| a.is_extended != b.is_extended || a.filament_id != b.filament_id;
|
||||
if (slot_changed)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
std::vector<std::vector<MachineFilamentInfo>> build_machine_filaments(const std::vector<std::vector<DynamicPrintConfig>>& filament_configs, const std::vector<std::map<int, int>>& ams_counts, bool ignore_ext_filament)
|
||||
{
|
||||
std::vector<std::vector<MachineFilamentInfo>> ret(2);
|
||||
std::vector<int> ams_size(2, 0);
|
||||
std::vector<std::vector<MachineFilamentInfo>> full_machine_filaments = build_full_machine_filaments(filament_configs);
|
||||
assert(full_machine_filaments.size() >= 2);
|
||||
assert(full_machine_filaments.size() == 2);
|
||||
for (size_t idx = 0; idx < std::min(ams_counts.size(),ams_size.size()); ++idx) {
|
||||
const auto& ams_count = ams_counts[idx];
|
||||
for (auto iter = ams_count.begin(); iter != ams_count.end(); ++iter) {
|
||||
@@ -206,7 +169,7 @@ namespace FilamentGroupUtils
|
||||
}
|
||||
}
|
||||
|
||||
assert(full_machine_filaments.size() >= ams_size.size());
|
||||
assert(full_machine_filaments.size() == ams_size.size());
|
||||
for (size_t idx = 0; idx < std::min(ams_size.size(), full_machine_filaments.size()); ++idx) {
|
||||
std::vector<MachineFilamentInfo> tmp;
|
||||
for (size_t j = 0; j < full_machine_filaments[idx].size(); ++j) {
|
||||
|
||||
@@ -82,17 +82,6 @@ namespace Slic3r
|
||||
|
||||
std::vector<std::vector<MachineFilamentInfo>> build_machine_filaments(const std::vector<std::vector<DynamicPrintConfig>>& filament_configs, const std::vector<std::map<int, int>>& ams_counts, bool ignore_ext_filament);
|
||||
|
||||
// Per-extruder projection of an AMS inventory payload: only the keys the grouping consumes
|
||||
// (colour, type, tray_name, filament_is_support, filament_id); slots lacking colour, type or
|
||||
// tray_name are dropped.
|
||||
std::vector<std::vector<MachineFilamentInfo>> build_full_machine_filaments(const std::vector<std::vector<DynamicPrintConfig>>& filament_configs);
|
||||
|
||||
// Compares two AMS inventory payloads by that projection, so volatile keys (remaining amount,
|
||||
// temperatures, filament_changed) never count as a change. A payload carrying no tray configs at
|
||||
// all is "unknown" (AMS not connected) and reports no change.
|
||||
bool machine_filaments_changed(const std::vector<std::vector<DynamicPrintConfig>>& old_configs,
|
||||
const std::vector<std::vector<DynamicPrintConfig>>& new_configs);
|
||||
|
||||
bool collect_unprintable_limits(const std::vector<std::set<int>>& physical_unprintables, const std::vector<std::set<int>>& geometric_unprintables, std::vector<std::set<int>>& unprintable_limits);
|
||||
|
||||
bool remove_intersection(std::set<int>& a, std::set<int>& b);
|
||||
|
||||
@@ -252,36 +252,6 @@ static void insert_gap_fill(const ThickPolylines &gaps, const Flow &flow, Extrus
|
||||
return sum;
|
||||
};
|
||||
|
||||
// The last extrusion of the fill that borders each gap: the gap fill goes after it.
|
||||
std::vector<size_t> after(gaps.size(), npos);
|
||||
{
|
||||
Lines lines;
|
||||
std::vector<size_t> owner;
|
||||
for (size_t i = 0; i < entities.size(); ++ i)
|
||||
for (const Polyline &pl : entities[i]->as_polylines())
|
||||
for (const Line &line : pl.lines()) {
|
||||
lines.push_back(line);
|
||||
owner.push_back(i);
|
||||
}
|
||||
const AABBTreeLines::LinesDistancer<Line> distancer(std::move(lines));
|
||||
const double spacing = flow.scaled_spacing();
|
||||
for (size_t gap = 0; gap < gaps.size(); ++ gap) {
|
||||
const ThickPolyline &pl = gaps[gap];
|
||||
if (pl.width.empty())
|
||||
continue;
|
||||
const double radius = 0.5 * *std::max_element(pl.width.begin(), pl.width.end()) + spacing;
|
||||
for (size_t j = 0; j + 1 < pl.points.size(); ++ j) {
|
||||
const Vec2d a = pl.points[j].cast<double>();
|
||||
const Vec2d b = pl.points[j + 1].cast<double>();
|
||||
const size_t steps = std::max<size_t>(1, size_t(std::ceil((b - a).norm() / (0.5 * spacing))));
|
||||
for (size_t k = 0; k <= steps; ++ k)
|
||||
for (size_t line : distancer.all_lines_in_radius(Point((a + double(k) / double(steps) * (b - a)).cast<coord_t>()), radius))
|
||||
if (after[gap] == npos || owner[line] > after[gap])
|
||||
after[gap] = owner[line];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<Item> items, appended;
|
||||
items.reserve(entities.size() + gaps.size());
|
||||
for (const ExtrusionEntity *ee : entities)
|
||||
@@ -292,12 +262,7 @@ static void insert_gap_fill(const ThickPolylines &gaps, const Flow &flow, Extrus
|
||||
double best = std::numeric_limits<double>::max();
|
||||
size_t best_slot = 0;
|
||||
Item best_item{};
|
||||
size_t extrusions_before = 0;
|
||||
for (size_t slot = 0; slot <= items.size(); ++ slot) {
|
||||
if (slot > 0 && items[slot - 1].gap == npos)
|
||||
++ extrusions_before;
|
||||
if (after[gap] != npos && extrusions_before <= after[gap])
|
||||
continue;
|
||||
const Point *prev = slot > 0 ? &items[slot - 1].out : nullptr;
|
||||
const Point *next = slot < items.size() ? &items[slot].in : nullptr;
|
||||
auto consider = [&](const Point &in, const Point &out, bool reversed) {
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
#include <cmath>
|
||||
#include <cstddef>
|
||||
#include <functional>
|
||||
#include <limits>
|
||||
#include <math.h>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
@@ -353,6 +352,16 @@ void FillSpiralInset::_fill_surface_single(const FillParams& params,
|
||||
assert(params.use_arachne);
|
||||
assert(this->print_config != nullptr && this->print_object_config != nullptr);
|
||||
|
||||
// Internal solid infill must not add Arachne's standalone thin walls: one of those walls can
|
||||
// become the extra centre point after the spiral has finished. Top and bottom surfaces keep
|
||||
// Arachne, including the centre plug handled by generate_spiral_insets().
|
||||
if (params.extrusion_role == erSolidInfill) {
|
||||
Polylines polylines;
|
||||
this->_fill_surface_single(params, thickness_layers, direction, expolygon, polylines);
|
||||
append(thick_polylines_out, to_thick_polylines(std::move(polylines), scaled<coord_t>(this->spacing)));
|
||||
return;
|
||||
}
|
||||
|
||||
// Only a solid surface is worth the variable width walls; a sparse one falls back to plain loops.
|
||||
if (params.density <= 0.9999f || params.dont_adjust) {
|
||||
Polylines polylines;
|
||||
@@ -431,65 +440,11 @@ void FillSpiralInset::_fill_surface_single(const FillParams& params,
|
||||
if (parent[i] < 0)
|
||||
descend(int(i));
|
||||
|
||||
ThickPolylines spirals =
|
||||
ThickPolylines spiral_result =
|
||||
generate_spiral_insets<Arachne::ExtrusionLine, ThickPolyline>(params, ordered, outlines, min_spacing, expolygon);
|
||||
if (spirals.empty()) {
|
||||
append(thick_polylines_out, std::move(open_walls));
|
||||
return;
|
||||
}
|
||||
|
||||
// The open walls lie mostly down the middle of an island, so each one prints at the centre end
|
||||
// of the nearest spiral, before an outward spiral and after an inward one, rather than after
|
||||
// every spiral, which brought the nozzle back across the surface for them.
|
||||
const bool outward = params.fill_order != SurfaceFillOrder::Inward;
|
||||
auto centre = [outward](const ThickPolyline& spiral) { return outward ? spiral.first_point() : spiral.last_point(); };
|
||||
auto dist2 = [](const Point& a, const Point& b) { return (a - b).cast<double>().squaredNorm(); };
|
||||
std::vector<ThickPolylines> beside(spirals.size());
|
||||
for (ThickPolyline& wall : open_walls) {
|
||||
size_t nearest = 0;
|
||||
double best = std::numeric_limits<double>::max();
|
||||
for (size_t k = 0; k < spirals.size(); ++k) {
|
||||
const Point c = centre(spirals[k]);
|
||||
if (const double d = std::min(dist2(wall.first_point(), c), dist2(wall.last_point(), c)); d < best) {
|
||||
best = d;
|
||||
nearest = k;
|
||||
}
|
||||
}
|
||||
beside[nearest].emplace_back(std::move(wall));
|
||||
}
|
||||
|
||||
for (size_t k = 0; k < spirals.size(); ++k) {
|
||||
// Chain the walls away from the centre end, nearest end first.
|
||||
ThickPolylines& walls = beside[k];
|
||||
Point pos = centre(spirals[k]);
|
||||
for (size_t i = 0; i < walls.size(); ++i) {
|
||||
size_t next = i;
|
||||
bool flip = false;
|
||||
double best = std::numeric_limits<double>::max();
|
||||
for (size_t j = i; j < walls.size(); ++j)
|
||||
for (const bool f : {false, true})
|
||||
if (const double d = dist2(f ? walls[j].last_point() : walls[j].first_point(), pos); d < best) {
|
||||
best = d;
|
||||
next = j;
|
||||
flip = f;
|
||||
}
|
||||
std::swap(walls[i], walls[next]);
|
||||
if (flip)
|
||||
walls[i].reverse();
|
||||
pos = walls[i].last_point();
|
||||
}
|
||||
if (outward) {
|
||||
// Printed backwards, the chain ends at the centre, where the spiral starts.
|
||||
std::reverse(walls.begin(), walls.end());
|
||||
for (ThickPolyline& wall : walls)
|
||||
wall.reverse();
|
||||
append(thick_polylines_out, std::move(walls));
|
||||
thick_polylines_out.emplace_back(std::move(spirals[k]));
|
||||
} else {
|
||||
thick_polylines_out.emplace_back(std::move(spirals[k]));
|
||||
append(thick_polylines_out, std::move(walls));
|
||||
}
|
||||
}
|
||||
append(thick_polylines_out, std::move(spiral_result));
|
||||
append(thick_polylines_out, std::move(open_walls));
|
||||
}
|
||||
|
||||
} // namespace Slic3r
|
||||
|
||||
+16
-215
@@ -2,13 +2,11 @@
|
||||
#include <algorithm>
|
||||
#include <cstdio>
|
||||
#include <exception>
|
||||
#include <functional>
|
||||
#include <boost/algorithm/string/predicate.hpp>
|
||||
#include <limits>
|
||||
#include <miniz.h>
|
||||
#include <string.h>
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <expat.h>
|
||||
|
||||
@@ -22,7 +20,6 @@
|
||||
#include "libslic3r/TriangleMesh.hpp"
|
||||
|
||||
#include "AMF.hpp"
|
||||
#include "ProjectStrategy.hpp"
|
||||
|
||||
#include <boost/property_tree/ptree.hpp>
|
||||
#include <boost/property_tree/xml_parser.hpp>
|
||||
@@ -70,15 +67,11 @@ namespace Slic3r
|
||||
|
||||
struct AMFParserContext
|
||||
{
|
||||
AMFParserContext(XML_Parser parser, DynamicPrintConfig* config, ConfigSubstitutionContext* config_substitutions, Model* model, LoadStrategy options,
|
||||
const char* source_path) :
|
||||
AMFParserContext(XML_Parser parser, DynamicPrintConfig* config, ConfigSubstitutionContext* config_substitutions, Model* model) :
|
||||
m_parser(parser),
|
||||
m_model(*model),
|
||||
m_config(config),
|
||||
m_config_substitutions(config_substitutions),
|
||||
m_assemble_parts((options & LoadStrategy::AssembleParts) && !(options & LoadStrategy::LoadConfig)),
|
||||
m_keep_original_names(options & LoadStrategy::KeepOriginalNames),
|
||||
m_fallback_name(boost::filesystem::path(source_path).filename().string())
|
||||
m_config_substitutions(config_substitutions)
|
||||
{
|
||||
m_path.reserve(12);
|
||||
}
|
||||
@@ -103,8 +96,7 @@ struct AMFParserContext
|
||||
|
||||
void startElement(const char *name, const char **atts);
|
||||
void endElement(const char *name);
|
||||
bool endDocument();
|
||||
bool assemble_constellations();
|
||||
void endDocument();
|
||||
void characters(const XML_Char *s, int len);
|
||||
|
||||
static void XMLCALL startElement(void *userData, const char *name, const char **atts)
|
||||
@@ -254,10 +246,6 @@ struct AMFParserContext
|
||||
ModelObject *m_object { nullptr };
|
||||
// Map from obect name to object idx & instances.
|
||||
std::map<std::string, Object> m_object_instances_map;
|
||||
// Preserve XML membership and occurrence order only for explicit assembly import.
|
||||
std::vector<std::vector<std::pair<std::string, Instance>>> m_constellations;
|
||||
// XML ids of m_constellations, so a group can be referenced from another group.
|
||||
std::vector<std::string> m_constellation_ids;
|
||||
// Vertices parsed for the current m_object.
|
||||
std::vector<Vec3f> m_object_vertices;
|
||||
// Current volume allocated for an amf/object/mesh/volume subtree.
|
||||
@@ -278,9 +266,6 @@ struct AMFParserContext
|
||||
ConfigSubstitutionContext *m_config_substitutions { nullptr };
|
||||
//BBS: add units logic
|
||||
bool m_use_inches { false };
|
||||
bool m_assemble_parts { false };
|
||||
bool m_keep_original_names { false };
|
||||
std::string m_fallback_name;
|
||||
|
||||
private:
|
||||
AMFParserContext& operator=(AMFParserContext&);
|
||||
@@ -321,11 +306,6 @@ void AMFParserContext::startElement(const char *name, const char **atts)
|
||||
node_type_new = NODE_TYPE_OBJECT;
|
||||
}
|
||||
} else if (strcmp(name, "constellation") == 0) {
|
||||
if (m_assemble_parts) {
|
||||
m_constellations.emplace_back();
|
||||
const char *constellation_id = get_attribute(atts, "id");
|
||||
m_constellation_ids.emplace_back(constellation_id == nullptr ? "" : constellation_id);
|
||||
}
|
||||
node_type_new = NODE_TYPE_CONSTELLATION;
|
||||
}/*else if (strcmp(name, "custom_gcodes_per_height") == 0) {
|
||||
node_type_new = NODE_TYPE_CUSTOM_GCODE;
|
||||
@@ -353,14 +333,8 @@ void AMFParserContext::startElement(const char *name, const char **atts)
|
||||
if (object_id == nullptr)
|
||||
this->stop();
|
||||
else {
|
||||
if (m_assemble_parts) {
|
||||
auto &occurrences = m_constellations.back();
|
||||
occurrences.emplace_back(object_id, Instance());
|
||||
m_instance = &occurrences.back().second;
|
||||
} else {
|
||||
m_object_instances_map[object_id].instances.push_back(Instance());
|
||||
m_instance = &m_object_instances_map[object_id].instances.back();
|
||||
}
|
||||
m_object_instances_map[object_id].instances.push_back(AMFParserContext::Instance());
|
||||
m_instance = &m_object_instances_map[object_id].instances.back();
|
||||
node_type_new = NODE_TYPE_INSTANCE;
|
||||
}
|
||||
}
|
||||
@@ -884,178 +858,8 @@ void AMFParserContext::endElement(const char * /* name */)
|
||||
m_path.pop_back();
|
||||
}
|
||||
|
||||
bool AMFParserContext::assemble_constellations()
|
||||
void AMFParserContext::endDocument()
|
||||
{
|
||||
auto object_index = [this](const std::string &target) {
|
||||
auto definition = m_object_instances_map.find(target);
|
||||
return definition == m_object_instances_map.end() ? -1 : definition->second.idx;
|
||||
};
|
||||
// Malformed ids are skipped as Orca always did: an objectid names an object first, then the first group with that id.
|
||||
std::map<std::string, size_t> constellation_index;
|
||||
for (size_t index = 0; index < m_constellation_ids.size(); ++index) {
|
||||
const std::string &id = m_constellation_ids[index];
|
||||
if (id.empty())
|
||||
continue;
|
||||
if (object_index(id) >= 0)
|
||||
BOOST_LOG_TRIVIAL(warning) << "AMF constellation id " << id << " equals an object id; references resolve to the object";
|
||||
else if (!constellation_index.emplace(id, index).second)
|
||||
BOOST_LOG_TRIVIAL(error) << "Duplicate AMF constellation id " << id << "; only the first group can be referenced";
|
||||
}
|
||||
auto group_index = [&constellation_index](const std::string &target) {
|
||||
auto group = constellation_index.find(target);
|
||||
return group == constellation_index.end() ? -1 : int(group->second);
|
||||
};
|
||||
|
||||
// A group referenced from another group is flattened into it and is not an assembly of its own.
|
||||
std::set<size_t> nested;
|
||||
for (const auto &constellation : m_constellations)
|
||||
for (const auto &occurrence : constellation) {
|
||||
if (object_index(occurrence.first) >= 0)
|
||||
continue;
|
||||
if (const int group = group_index(occurrence.first); group >= 0)
|
||||
nested.insert(size_t(group));
|
||||
else
|
||||
BOOST_LOG_TRIVIAL(error) << "Undefined object " << occurrence.first << " referenced in constellation";
|
||||
}
|
||||
|
||||
auto instance_matrix = [](const Instance &source) {
|
||||
Geometry::Transformation transformation;
|
||||
transformation.set_offset(Vec3d(source.deltax_set ? source.deltax : 0., source.deltay_set ? source.deltay : 0.,
|
||||
source.deltaz_set ? source.deltaz : 0.));
|
||||
transformation.set_rotation(Vec3d(source.rx_set ? source.rx : 0., source.ry_set ? source.ry : 0.,
|
||||
source.rz_set ? source.rz : 0.));
|
||||
transformation.set_scaling_factor(Vec3d(source.scalex_set ? source.scalex : 1., source.scaley_set ? source.scaley : 1.,
|
||||
source.scalez_set ? source.scalez : 1.));
|
||||
transformation.set_mirror(Vec3d(source.mirrorx_set ? source.mirrorx : 1., source.mirrory_set ? source.mirrory : 1.,
|
||||
source.mirrorz_set ? source.mirrorz : 1.));
|
||||
return transformation.get_matrix();
|
||||
};
|
||||
// Nesting and expansion limits keep a small malformed file from exhausting the stack or the time.
|
||||
constexpr size_t max_depth = 256;
|
||||
constexpr size_t max_expanded = 100000;
|
||||
// One depth-first pass rejects cycles, so the expansion below always terminates.
|
||||
std::vector<int> state(m_constellations.size(), 0); // 0 new, 1 on the current path, 2 done
|
||||
std::function<bool(size_t, size_t)> acyclic = [&](size_t group, size_t depth) {
|
||||
if (depth > max_depth)
|
||||
return false;
|
||||
state[group] = 1;
|
||||
for (const auto &occurrence : m_constellations[group]) {
|
||||
const int child = object_index(occurrence.first) >= 0 ? -1 : group_index(occurrence.first);
|
||||
if (child < 0)
|
||||
continue;
|
||||
if (state[child] == 1 || (state[child] == 0 && !acyclic(size_t(child), depth + 1)))
|
||||
return false;
|
||||
}
|
||||
state[group] = 2;
|
||||
return true;
|
||||
};
|
||||
for (size_t group = 0; group < m_constellations.size(); ++group)
|
||||
if (state[group] == 0 && !acyclic(group, 0)) {
|
||||
BOOST_LOG_TRIVIAL(error) << "Cyclic or too deeply nested AMF constellation references";
|
||||
return false;
|
||||
}
|
||||
|
||||
struct Placement
|
||||
{
|
||||
int index;
|
||||
Transform3d matrix;
|
||||
bool printable;
|
||||
// Some occurrence on the path sets a transform; the legacy loader creates instances only then.
|
||||
bool placed;
|
||||
};
|
||||
// Every expanded occurrence counts, so groups that reach no body cannot multiply the work unnoticed.
|
||||
size_t expanded = 0;
|
||||
// Nested placements multiply down to the object definitions of the top-level group.
|
||||
// The cycle check skips groups it already visited, so the expansion bounds its own depth too.
|
||||
std::function<bool(size_t, const Transform3d &, bool, bool, size_t, std::vector<Placement> &)> flatten =
|
||||
[&](size_t group, const Transform3d &parent, bool parent_printable, bool parent_placed, size_t depth,
|
||||
std::vector<Placement> &out) {
|
||||
if (depth > max_depth)
|
||||
return false;
|
||||
for (const auto &occurrence : m_constellations[group]) {
|
||||
if (++expanded > max_expanded)
|
||||
return false;
|
||||
const Transform3d matrix = parent * instance_matrix(occurrence.second);
|
||||
const bool printable = parent_printable && occurrence.second.printable;
|
||||
const bool placed = parent_placed || occurrence.second.anything_set();
|
||||
if (const int index = object_index(occurrence.first); index >= 0)
|
||||
out.push_back({index, matrix, printable, placed});
|
||||
else if (const int group = group_index(occurrence.first);
|
||||
group >= 0 && !flatten(size_t(group), matrix, printable, placed, depth + 1, out))
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
std::set<int> referenced;
|
||||
std::vector<std::vector<Placement>> groups;
|
||||
for (size_t group = 0; group < m_constellations.size(); ++group) {
|
||||
if (nested.count(group) != 0)
|
||||
continue;
|
||||
std::vector<Placement> placements;
|
||||
if (!flatten(group, Transform3d::Identity(), true, false, 0, placements)) {
|
||||
BOOST_LOG_TRIVIAL(error) << "Too many AMF constellation placements";
|
||||
return false;
|
||||
}
|
||||
for (const Placement &placement : placements)
|
||||
referenced.insert(placement.index);
|
||||
groups.emplace_back(std::move(placements));
|
||||
}
|
||||
|
||||
Model prepared;
|
||||
int assemblies = 0;
|
||||
for (const std::vector<Placement> &placements : groups) {
|
||||
if (placements.empty())
|
||||
continue;
|
||||
Model group;
|
||||
const bool printable = placements.front().printable;
|
||||
bool mixed_printable = false;
|
||||
bool placed = false;
|
||||
for (const Placement &placement : placements) {
|
||||
ModelObject *object = group.add_object(*m_model.objects[placement.index]);
|
||||
// Match the GUI's filename fallback before merging discards the source objects.
|
||||
if (object->name.empty())
|
||||
object->name = m_fallback_name;
|
||||
for (ModelVolume* volume : object->volumes)
|
||||
if (volume->name.empty())
|
||||
volume->name = object->name;
|
||||
object->clear_instances();
|
||||
ModelInstance *instance = object->add_instance();
|
||||
// An identity occurrence is still an explicit instance, including its printability.
|
||||
instance->set_transformation(Geometry::Transformation(placement.matrix));
|
||||
instance->printable = placement.printable;
|
||||
mixed_printable = mixed_printable || placement.printable != printable;
|
||||
placed = placed || placement.placed;
|
||||
}
|
||||
if (!mixed_printable && group.objects.size() > 1) {
|
||||
group.convert_multipart_object(0, m_keep_original_names);
|
||||
// An assembly is named after its file like other single-file imports; later groups get a suffix.
|
||||
++assemblies;
|
||||
group.objects.front()->name = m_fallback_name + (assemblies > 1 ? "_" + std::to_string(assemblies) : std::string());
|
||||
group.objects.front()->add_instance()->printable = printable;
|
||||
}
|
||||
// Without any placement in the file the GUI centres the object on the bed, as for legacy AMF objects.
|
||||
// An excluded group keeps its identity instance: dropping it would make the part printable.
|
||||
if (!placed && printable && group.objects.size() == 1)
|
||||
group.objects.front()->clear_instances();
|
||||
// Mixed printability cannot be expressed by one instance; preserve separate occurrences.
|
||||
for (const ModelObject *object : group.objects)
|
||||
prepared.add_object(*object);
|
||||
}
|
||||
// Unreferenced definitions remain independent, in their original XML order.
|
||||
for (size_t index = 0; index < m_model.objects.size(); ++index)
|
||||
if (referenced.count(static_cast<int>(index)) == 0)
|
||||
prepared.add_object(*m_model.objects[index]);
|
||||
m_model.clear_objects();
|
||||
for (const ModelObject *object : prepared.objects)
|
||||
m_model.add_object(*object);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool AMFParserContext::endDocument()
|
||||
{
|
||||
if (m_assemble_parts)
|
||||
return assemble_constellations();
|
||||
for (const auto &object : m_object_instances_map) {
|
||||
if (object.second.idx == -1) {
|
||||
BOOST_LOG_TRIVIAL(error) << "Undefined object " << object.first.c_str() << " referenced in constellation";
|
||||
@@ -1084,12 +888,11 @@ bool AMFParserContext::endDocument()
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// Load an AMF file into a provided model.
|
||||
//BBS: add inches check logic
|
||||
bool load_amf_file(const char *path, DynamicPrintConfig *config, ConfigSubstitutionContext *config_substitutions, Model *model, bool *use_inches, LoadStrategy options)
|
||||
bool load_amf_file(const char *path, DynamicPrintConfig *config, ConfigSubstitutionContext *config_substitutions, Model *model, bool *use_inches)
|
||||
{
|
||||
if ((path == nullptr) || (model == nullptr))
|
||||
return false;
|
||||
@@ -1106,7 +909,7 @@ bool load_amf_file(const char *path, DynamicPrintConfig *config, ConfigSubstitut
|
||||
return false;
|
||||
}
|
||||
|
||||
AMFParserContext ctx(parser, config, config_substitutions, model, options, path);
|
||||
AMFParserContext ctx(parser, config, config_substitutions, model);
|
||||
XML_SetUserData(parser, (void*)&ctx);
|
||||
XML_SetElementHandler(parser, AMFParserContext::startElement, AMFParserContext::endElement);
|
||||
XML_SetCharacterDataHandler(parser, AMFParserContext::characters);
|
||||
@@ -1134,7 +937,7 @@ bool load_amf_file(const char *path, DynamicPrintConfig *config, ConfigSubstitut
|
||||
::fclose(pFile);
|
||||
|
||||
if (result)
|
||||
result = ctx.endDocument();
|
||||
ctx.endDocument();
|
||||
if (use_inches) {
|
||||
*use_inches = ctx.m_use_inches;
|
||||
}
|
||||
@@ -1152,7 +955,7 @@ bool load_amf_file(const char *path, DynamicPrintConfig *config, ConfigSubstitut
|
||||
}
|
||||
|
||||
//BBS: add inches logic
|
||||
bool extract_model_from_archive(mz_zip_archive& archive, const mz_zip_archive_file_stat& stat, DynamicPrintConfig* config, ConfigSubstitutionContext* config_substitutions, Model* model, bool* use_inches, LoadStrategy options, const char* source_path)
|
||||
bool extract_model_from_archive(mz_zip_archive& archive, const mz_zip_archive_file_stat& stat, DynamicPrintConfig* config, ConfigSubstitutionContext* config_substitutions, Model* model, bool* use_inches)
|
||||
{
|
||||
if (stat.m_uncomp_size == 0)
|
||||
{
|
||||
@@ -1168,7 +971,7 @@ bool extract_model_from_archive(mz_zip_archive& archive, const mz_zip_archive_fi
|
||||
return false;
|
||||
}
|
||||
|
||||
AMFParserContext ctx(parser, config, config_substitutions, model, options, source_path);
|
||||
AMFParserContext ctx(parser, config, config_substitutions, model);
|
||||
XML_SetUserData(parser, (void*)&ctx);
|
||||
XML_SetElementHandler(parser, AMFParserContext::startElement, AMFParserContext::endElement);
|
||||
XML_SetCharacterDataHandler(parser, AMFParserContext::characters);
|
||||
@@ -1214,8 +1017,7 @@ bool extract_model_from_archive(mz_zip_archive& archive, const mz_zip_archive_fi
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!ctx.endDocument())
|
||||
return false;
|
||||
ctx.endDocument();
|
||||
if (use_inches) {
|
||||
*use_inches = ctx.m_use_inches;
|
||||
}
|
||||
@@ -1231,7 +1033,7 @@ bool extract_model_from_archive(mz_zip_archive& archive, const mz_zip_archive_fi
|
||||
}
|
||||
|
||||
// Load an AMF archive into a provided model.
|
||||
bool load_amf_archive(const char* path, DynamicPrintConfig* config, ConfigSubstitutionContext* config_substitutions, Model* model, bool* use_inches, LoadStrategy options)
|
||||
bool load_amf_archive(const char* path, DynamicPrintConfig* config, ConfigSubstitutionContext* config_substitutions, Model* model, bool* use_inches)
|
||||
{
|
||||
if ((path == nullptr) || (model == nullptr))
|
||||
return false;
|
||||
@@ -1257,7 +1059,7 @@ bool load_amf_archive(const char* path, DynamicPrintConfig* config, ConfigSubsti
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!extract_model_from_archive(archive, stat, config, config_substitutions, model, use_inches, options, path))
|
||||
if (!extract_model_from_archive(archive, stat, config, config_substitutions, model, use_inches))
|
||||
{
|
||||
close_zip_reader(&archive);
|
||||
BOOST_LOG_TRIVIAL(error) << "Archive does not contain a valid model";
|
||||
@@ -1300,7 +1102,7 @@ bool load_amf_archive(const char* path, DynamicPrintConfig* config, ConfigSubsti
|
||||
// Load an AMF file into a provided model.
|
||||
// If config is not a null pointer, updates it if the amf file/archive contains config data
|
||||
//BBS: refine the amf logic
|
||||
bool load_amf(const char *path, DynamicPrintConfig *config, ConfigSubstitutionContext *config_substitutions, Model *model, bool* use_inches, LoadStrategy options)
|
||||
bool load_amf(const char *path, DynamicPrintConfig *config, ConfigSubstitutionContext *config_substitutions, Model *model, bool* use_inches)
|
||||
{
|
||||
CNumericLocalesSetter locales_setter; // use "C" locales and point as a decimal separator
|
||||
|
||||
@@ -1314,8 +1116,7 @@ bool load_amf(const char *path, DynamicPrintConfig *config, ConfigSubstitutionCo
|
||||
file.read(zip_mask.data(), 2);
|
||||
file.close();
|
||||
|
||||
return (zip_mask == "PK") ? load_amf_archive(path, config, config_substitutions, model, use_inches, options) :
|
||||
load_amf_file(path, config, config_substitutions, model, use_inches, options);
|
||||
return (zip_mask == "PK") ? load_amf_archive(path, config, config_substitutions, model, use_inches) : load_amf_file(path, config, config_substitutions, model, use_inches);
|
||||
}
|
||||
else
|
||||
return false;
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#ifndef slic3r_Format_AMF_hpp_
|
||||
#define slic3r_Format_AMF_hpp_
|
||||
|
||||
#include "ProjectStrategy.hpp"
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
class Model;
|
||||
@@ -10,8 +8,7 @@ class DynamicPrintConfig;
|
||||
struct ConfigSubstitutionContext;
|
||||
|
||||
// Load the content of an amf file into the given model and configuration.
|
||||
extern bool load_amf(const char* path, DynamicPrintConfig* config, ConfigSubstitutionContext* config_substitutions, Model* model, bool* use_inches,
|
||||
LoadStrategy options = LoadStrategy::Default);
|
||||
extern bool load_amf(const char* path, DynamicPrintConfig* config, ConfigSubstitutionContext* config_substitutions, Model* model, bool* use_inches);
|
||||
|
||||
//BBS: remove amf export
|
||||
// Save the given model and the config data into an amf file.
|
||||
|
||||
@@ -1,115 +0,0 @@
|
||||
#include "ImportNames.hpp"
|
||||
|
||||
#include <boost/locale/encoding_errors.hpp>
|
||||
#include <boost/locale/encoding_utf.hpp>
|
||||
|
||||
#include <map>
|
||||
#include <cstddef>
|
||||
#include <set>
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
namespace Slic3r {
|
||||
namespace {
|
||||
|
||||
std::u32string decode_name(const std::string& name)
|
||||
{
|
||||
try {
|
||||
return boost::locale::conv::utf_to_utf<char32_t>(name, boost::locale::conv::stop);
|
||||
} catch (const boost::locale::conv::conversion_error&) {
|
||||
throw std::invalid_argument("An imported name contains invalid UTF-8.");
|
||||
}
|
||||
}
|
||||
|
||||
bool unsupported_character(char32_t c)
|
||||
{
|
||||
// XML permits tab/newline/CR, but excludes other C0 controls and noncharacters FFFE/FFFF.
|
||||
const bool valid_xml = c == 9 || c == 10 || c == 13 ||
|
||||
(c >= 0x20 && c <= 0xd7ff) ||
|
||||
(c >= 0xe000 && c <= 0xfffd) ||
|
||||
(c >= 0x10000 && c <= 0x10ffff);
|
||||
constexpr std::u32string_view forbidden = U"<>:/\\|?*\"";
|
||||
return !valid_xml || forbidden.find(c) != std::u32string_view::npos;
|
||||
}
|
||||
|
||||
std::string replace_characters(const std::string& name, const std::string& replacement)
|
||||
{
|
||||
std::u32string output;
|
||||
const std::u32string substitute = decode_name(replacement);
|
||||
for (char32_t c : decode_name(name)) {
|
||||
if (unsupported_character(c))
|
||||
output += substitute;
|
||||
else
|
||||
output += c;
|
||||
}
|
||||
return boost::locale::conv::utf_to_utf<char>(output);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
bool has_unsupported_name_characters(const std::string& name)
|
||||
{
|
||||
for (char32_t c : decode_name(name))
|
||||
if (unsupported_character(c))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool valid_import_name_replacement(const std::string& replacement)
|
||||
{
|
||||
if (replacement.empty())
|
||||
return false;
|
||||
try {
|
||||
return !has_unsupported_name_characters(replacement);
|
||||
} catch (const std::invalid_argument&) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<std::string> sanitize_import_names(const std::vector<std::string>& names,
|
||||
const std::string& replacement,
|
||||
const std::string& fallback)
|
||||
{
|
||||
if (!replacement.empty() && !valid_import_name_replacement(replacement))
|
||||
throw std::invalid_argument("The name replacement contains unsupported characters.");
|
||||
|
||||
// Reserve all existing valid names before processing, including those appearing later.
|
||||
std::set<std::string> reserved;
|
||||
for (const auto& name : names)
|
||||
if (!has_unsupported_name_characters(name))
|
||||
reserved.insert(name);
|
||||
|
||||
std::string safe_fallback = replace_characters(fallback, replacement);
|
||||
if (safe_fallback.empty())
|
||||
safe_fallback = "Part";
|
||||
|
||||
std::map<std::string, std::string> cleaned;
|
||||
std::vector<std::string> result;
|
||||
result.reserve(names.size());
|
||||
for (const auto& name : names) {
|
||||
if (!has_unsupported_name_characters(name)) {
|
||||
result.push_back(name);
|
||||
continue;
|
||||
}
|
||||
// Equal original names stay equal even when both require the same cleaning.
|
||||
const auto previous = cleaned.find(name);
|
||||
if (previous != cleaned.end()) {
|
||||
result.push_back(previous->second);
|
||||
continue;
|
||||
}
|
||||
std::string base = replace_characters(name, replacement);
|
||||
if (base.empty())
|
||||
base = safe_fallback;
|
||||
std::string candidate = base;
|
||||
for (size_t suffix = 2; reserved.count(candidate) != 0; ++suffix)
|
||||
candidate = base + " (" + std::to_string(suffix) + ")";
|
||||
reserved.insert(candidate);
|
||||
cleaned.emplace(name, candidate);
|
||||
result.push_back(candidate);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
} // namespace Slic3r
|
||||
@@ -1,17 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
// Names follow Orca's rename restrictions as well as XML 1.0 and UTF-8 requirements.
|
||||
bool has_unsupported_name_characters(const std::string& name);
|
||||
bool valid_import_name_replacement(const std::string& replacement);
|
||||
|
||||
// Empty replacement means removal; only collisions introduced by cleaning receive suffixes.
|
||||
std::vector<std::string> sanitize_import_names(const std::vector<std::string>& names,
|
||||
const std::string& replacement,
|
||||
const std::string& fallback = "Part");
|
||||
|
||||
} // namespace Slic3r
|
||||
@@ -18,9 +18,6 @@ enum class LoadStrategy
|
||||
LoadAuxiliary = 16,
|
||||
Silence = 32,
|
||||
ImperialUnits = 64,
|
||||
// Geometry-import policies are opt-in; opening existing projects retains its defaults.
|
||||
KeepOriginalNames = 128,
|
||||
AssembleParts = 256,
|
||||
|
||||
Restore = 0x10000 | LoadModel | LoadConfig | LoadAuxiliary | Silence,
|
||||
};
|
||||
|
||||
@@ -14,10 +14,7 @@
|
||||
#include <cstddef>
|
||||
#include <Standard_Handle.hxx>
|
||||
#include <Standard_TypeDef.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TopAbs_ShapeEnum.hxx>
|
||||
#include <TopTools_ShapeMapHasher.hxx>
|
||||
#include <algorithm>
|
||||
#include <atomic>
|
||||
#include <IFSelect_ReturnStatus.hxx>
|
||||
#include <boost/chrono/duration.hpp>
|
||||
@@ -51,7 +48,6 @@
|
||||
#include "XCAFDoc_ShapeTool.hxx"
|
||||
#include "XCAFApp_Application.hxx"
|
||||
#include "NCollection_Sequence.hxx"
|
||||
#include <NCollection_DataMap.hxx>
|
||||
#include "TDF_Label.hxx"
|
||||
#include "TopoDS_Solid.hxx"
|
||||
#include "TopoDS_Compound.hxx"
|
||||
@@ -63,16 +59,6 @@
|
||||
#include "BRep_Tool.hxx"
|
||||
#include "BRepTools.hxx"
|
||||
#include <IMeshTools_Parameters.hxx>
|
||||
#include <StepData_StepModel.hxx>
|
||||
#include <StepRepr_RepresentationItem.hxx>
|
||||
#include <StepShape_ConnectedFaceSet.hxx>
|
||||
#include <StepShape_ManifoldSolidBrep.hxx>
|
||||
#include <StepShape_ShellBasedSurfaceModel.hxx>
|
||||
#include <TCollection_HAsciiString.hxx>
|
||||
#include <TransferBRep.hxx>
|
||||
#include <Transfer_TransientProcess.hxx>
|
||||
#include <XSControl_TransferReader.hxx>
|
||||
#include <XSControl_WorkSession.hxx>
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
@@ -215,41 +201,13 @@ int StepPreProcessor::preNum(const unsigned char byte) {
|
||||
return num;
|
||||
}
|
||||
|
||||
using StepBodyNames = NCollection_DataMap<TopoDS_Shape, std::string, TopTools_ShapeMapHasher>;
|
||||
|
||||
// Resolve the original topology before BRepBuilderAPI_Transform copies its TShape.
|
||||
static void add_named_solid(std::vector<NamedSolid>& namedSolids, const TopoDS_Shape& mesh_shape, const TopoDS_Shape& source,
|
||||
const StepBodyNames* body_names, const std::string& fallback)
|
||||
{
|
||||
if (body_names != nullptr && body_names->IsBound(source))
|
||||
namedSolids.emplace_back(mesh_shape, body_names->Find(source), true);
|
||||
else
|
||||
namedSolids.emplace_back(mesh_shape, fallback);
|
||||
}
|
||||
|
||||
// The single body of a compound, or a null shape when Split compound would produce several parts.
|
||||
static TopoDS_Shape single_body(const TopoDS_Shape& compound)
|
||||
{
|
||||
TopoDS_Shape body;
|
||||
int bodies = 0;
|
||||
TopExp_Explorer explorer;
|
||||
for (explorer.Init(compound, TopAbs_SOLID); explorer.More(); explorer.Next(), ++bodies)
|
||||
body = explorer.Current();
|
||||
for (explorer.Init(compound, TopAbs_SHELL, TopAbs_SOLID); explorer.More(); explorer.Next(), ++bodies)
|
||||
body = explorer.Current();
|
||||
explorer.Init(compound, TopAbs_FACE, TopAbs_SHELL);
|
||||
// Loose faces form one more part, so the compound is then not a single body.
|
||||
return bodies == 1 && !explorer.More() ? body : TopoDS_Shape();
|
||||
}
|
||||
|
||||
static void getNamedSolids(const TopLoc_Location& location,
|
||||
const std::string& prefix,
|
||||
unsigned int& id,
|
||||
const Handle(XCAFDoc_ShapeTool) shapeTool,
|
||||
const TDF_Label label,
|
||||
std::vector<NamedSolid>& namedSolids,
|
||||
bool isSplitCompound = false,
|
||||
const StepBodyNames* body_names = nullptr) {
|
||||
bool isSplitCompound = false) {
|
||||
TDF_Label referredLabel{label};
|
||||
if (shapeTool->IsReference(label))
|
||||
shapeTool->GetReferredShape(label, referredLabel);
|
||||
@@ -268,7 +226,7 @@ static void getNamedSolids(const TopLoc_Location& location,
|
||||
NCollection_Sequence<TDF_Label> components;
|
||||
if (shapeTool->GetComponents(referredLabel, components)) {
|
||||
for (int compIndex = 1; compIndex <= components.Length(); ++compIndex) {
|
||||
getNamedSolids(localLocation, fullName, id, shapeTool, components.Value(compIndex), namedSolids, isSplitCompound, body_names);
|
||||
getNamedSolids(localLocation, fullName, id, shapeTool, components.Value(compIndex), namedSolids, isSplitCompound);
|
||||
}
|
||||
} else {
|
||||
TopoDS_Shape shape;
|
||||
@@ -281,30 +239,23 @@ static void getNamedSolids(const TopLoc_Location& location,
|
||||
case TopAbs_COMPOUND:
|
||||
case TopAbs_COMPSOLID:
|
||||
if (!isSplitCompound) {
|
||||
// One body keeps its label without splitting; the mesh is the unchanged compound.
|
||||
const TopoDS_Shape body = single_body(shape);
|
||||
if (body.IsNull())
|
||||
namedSolids.emplace_back(transform.Shape(), fullName);
|
||||
else
|
||||
add_named_solid(namedSolids, transform.Shape(), body, body_names, fullName);
|
||||
namedSolids.emplace_back(transform.Shape(), fullName);
|
||||
} else {
|
||||
for (explorer.Init(shape, TopAbs_SOLID); explorer.More(); explorer.Next()) {
|
||||
for (explorer.Init(transform.Shape(), TopAbs_SOLID); explorer.More(); explorer.Next()) {
|
||||
i++;
|
||||
const TopoDS_Shape& currentShape = explorer.Current();
|
||||
add_named_solid(namedSolids, transform.ModifiedShape(currentShape), currentShape, body_names,
|
||||
fullName + "-SOLID-" + std::to_string(i));
|
||||
namedSolids.emplace_back(TopoDS::Solid(currentShape), fullName + "-SOLID-" + std::to_string(i));
|
||||
}
|
||||
// Surface models have no solids: each shell outside a solid is a part, and loose faces stay together.
|
||||
i = 0;
|
||||
for (explorer.Init(shape, TopAbs_SHELL, TopAbs_SOLID); explorer.More(); explorer.Next())
|
||||
add_named_solid(namedSolids, transform.ModifiedShape(explorer.Current()), explorer.Current(), body_names,
|
||||
fullName + "-SHELL-" + std::to_string(++i));
|
||||
for (explorer.Init(transform.Shape(), TopAbs_SHELL, TopAbs_SOLID); explorer.More(); explorer.Next())
|
||||
namedSolids.emplace_back(explorer.Current(), fullName + "-SHELL-" + std::to_string(++i));
|
||||
TopoDS_Compound loose_faces;
|
||||
TopoDS_Builder builder;
|
||||
builder.MakeCompound(loose_faces);
|
||||
bool has_loose_faces = false;
|
||||
for (explorer.Init(shape, TopAbs_FACE, TopAbs_SHELL); explorer.More(); explorer.Next()) {
|
||||
builder.Add(loose_faces, transform.ModifiedShape(explorer.Current()));
|
||||
for (explorer.Init(transform.Shape(), TopAbs_FACE, TopAbs_SHELL); explorer.More(); explorer.Next()) {
|
||||
builder.Add(loose_faces, explorer.Current());
|
||||
has_loose_faces = true;
|
||||
}
|
||||
if (has_loose_faces)
|
||||
@@ -312,10 +263,10 @@ static void getNamedSolids(const TopLoc_Location& location,
|
||||
}
|
||||
break;
|
||||
case TopAbs_SOLID:
|
||||
add_named_solid(namedSolids, TopoDS::Solid(transform.Shape()), shape, body_names, fullName);
|
||||
namedSolids.emplace_back(TopoDS::Solid(transform.Shape()), fullName);
|
||||
break;
|
||||
case TopAbs_SHELL:
|
||||
add_named_solid(namedSolids, TopoDS::Shell(transform.Shape()), shape, body_names, fullName);
|
||||
namedSolids.emplace_back(TopoDS::Shell(transform.Shape()), fullName);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -535,9 +486,8 @@ void Step::update_process(int load_stage, int current, int total, bool& cancel)
|
||||
}
|
||||
}
|
||||
|
||||
Step::Step_Status Step::load(bool collect_original_names)
|
||||
Step::Step_Status Step::load()
|
||||
{
|
||||
m_body_names.Clear();
|
||||
if (!StepPreProcessor::isUtf8File(m_path.c_str()) && m_utf8Fn) {
|
||||
m_utf8Fn(false);
|
||||
return Step_Status::LOAD_ERROR;
|
||||
@@ -562,27 +512,6 @@ Step::Step_Status Step::load(bool collect_original_names)
|
||||
}
|
||||
if (cb_cancel) return;
|
||||
progress = 6;
|
||||
if (collect_original_names) {
|
||||
// The transfer process records which BREP produced each shape, independently of traversal order.
|
||||
const auto step_model = reader.Reader().StepModel();
|
||||
const auto transfer = reader.Reader().WS()->TransferReader()->TransientProcess();
|
||||
for (int entity_index = 1; entity_index <= step_model->NbEntities(); ++entity_index) {
|
||||
const auto entity = step_model->Value(entity_index);
|
||||
if (!entity->IsKind(STANDARD_TYPE(StepShape_ManifoldSolidBrep)) &&
|
||||
!entity->IsKind(STANDARD_TYPE(StepShape_ConnectedFaceSet)) &&
|
||||
!entity->IsKind(STANDARD_TYPE(StepShape_ShellBasedSurfaceModel)))
|
||||
continue;
|
||||
const auto item = Handle(StepRepr_RepresentationItem)::DownCast(entity);
|
||||
if (item.IsNull() || item->Name().IsNull() || item->Name()->IsEmpty())
|
||||
continue;
|
||||
const std::string body_name = item->Name()->ToCString();
|
||||
if (!StepPreProcessor::isUtf8(body_name))
|
||||
continue;
|
||||
const TopoDS_Shape original_shape = TransferBRep::ShapeResult(transfer, entity);
|
||||
if (!original_shape.IsNull() && !m_body_names.IsBound(original_shape))
|
||||
m_body_names.Bind(original_shape, body_name);
|
||||
}
|
||||
}
|
||||
m_shape_tool = XCAFDoc_DocumentTool::ShapeTool(m_doc->Main());
|
||||
NCollection_Sequence<TDF_Label> topLevelShapes;
|
||||
m_shape_tool->GetFreeShapes(topLevelShapes);
|
||||
@@ -592,11 +521,6 @@ Step::Step_Status Step::load(bool collect_original_names)
|
||||
if (cb_cancel) return;
|
||||
getNamedSolids(TopLoc_Location{}, "", id, m_shape_tool, topLevelShapes.Value(iLabel), m_name_solids);
|
||||
}
|
||||
// Without Split compound these leaves stay whole; a multi-body one would lose its body names.
|
||||
m_multi_body_compound = std::any_of(m_name_solids.begin(), m_name_solids.end(), [](const NamedSolid& leaf) {
|
||||
const TopAbs_ShapeEnum type = leaf.solid.ShapeType();
|
||||
return (type == TopAbs_COMPOUND || type == TopAbs_COMPSOLID) && single_body(leaf.solid).IsNull();
|
||||
});
|
||||
progress = 10;
|
||||
load_result = true;
|
||||
task_result = true;
|
||||
@@ -633,8 +557,7 @@ Step::Step_Status Step::mesh(Model* model,
|
||||
bool& is_cancel,
|
||||
bool isSplitCompound,
|
||||
double linear_deflection/*=0.003*/,
|
||||
double angle_deflection/*= 0.5*/,
|
||||
bool keep_original_names/*= false*/)
|
||||
double angle_deflection/*= 0.5*/)
|
||||
|
||||
{
|
||||
bool task_result = false;
|
||||
@@ -659,12 +582,8 @@ Step::Step_Status Step::mesh(Model* model,
|
||||
if (cb_cancel) {
|
||||
return;
|
||||
}
|
||||
getNamedSolids(TopLoc_Location{}, "", id, m_shape_tool, topLevelShapes.Value(iLabel), namedSolids,
|
||||
isSplitCompound, keep_original_names ? &m_body_names : nullptr);
|
||||
getNamedSolids(TopLoc_Location{}, "", id, m_shape_tool, topLevelShapes.Value(iLabel), namedSolids, isSplitCompound);
|
||||
}
|
||||
// A single part is not listed under its object, so the object shows the body label instead.
|
||||
if (namedSolids.size() == 1 && namedSolids.front().original_name)
|
||||
new_object->name = namedSolids.front().name;
|
||||
|
||||
std::vector<stl_file> stl;
|
||||
stl.resize(namedSolids.size());
|
||||
|
||||
@@ -5,9 +5,6 @@
|
||||
#include "XCAFDoc_ShapeTool.hxx"
|
||||
#include <Standard_TypeDef.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
#include <NCollection_DataMap.hxx>
|
||||
#include <TopTools_ShapeMapHasher.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <boost/filesystem/path.hpp>
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <Message_ProgressIndicator.hxx>
|
||||
@@ -40,13 +37,10 @@ typedef std::function<void(bool isUtf8)> StepIsUtf8Fn;
|
||||
struct NamedSolid
|
||||
{
|
||||
NamedSolid(const TopoDS_Shape& s,
|
||||
const std::string& n,
|
||||
bool original = false) : solid{ s }, name{ n }, original_name{ original } {
|
||||
const std::string& n) : solid{ s }, name{ n } {
|
||||
}
|
||||
const TopoDS_Shape solid;
|
||||
const std::string name;
|
||||
// The name is the CAD body label rather than a generated or product name.
|
||||
const bool original_name;
|
||||
int tri_face_cout = 0;
|
||||
};
|
||||
|
||||
@@ -112,14 +106,7 @@ public:
|
||||
Step(boost::filesystem::path path, ImportStepProgressFn stepFn = nullptr, StepIsUtf8Fn isUtf8Fn = nullptr);
|
||||
Step(std::string path, ImportStepProgressFn stepFn = nullptr, StepIsUtf8Fn isUtf8Fn = nullptr);
|
||||
~Step();
|
||||
Step_Status load(bool collect_original_names = false);
|
||||
// The import dialog may change this preference after the CAD document is read.
|
||||
void set_keep_original_names(bool keep) { m_keep_original_names = keep; }
|
||||
bool keep_original_names() const { return m_keep_original_names; }
|
||||
// Valid after load(true): the file stores body labels that Keep original names can apply.
|
||||
bool has_original_names() const { return !m_body_names.IsEmpty(); }
|
||||
// Valid after load(): some compound holds several bodies, so their names need Split compound.
|
||||
bool has_multi_body_compound() const { return m_multi_body_compound; }
|
||||
Step_Status load();
|
||||
unsigned int get_triangle_num(double linear_deflection, double angle_deflection);
|
||||
unsigned int get_triangle_num_tbb(double linear_deflection, double angle_deflection);
|
||||
void clean_mesh_data();
|
||||
@@ -127,8 +114,7 @@ public:
|
||||
bool& is_cancel,
|
||||
bool isSplitCompound,
|
||||
double linear_deflection = 0.003,
|
||||
double angle_deflection = 0.5,
|
||||
bool keep_original_names = false);
|
||||
double angle_deflection = 0.5);
|
||||
|
||||
std::atomic<bool> m_stop_mesh{false};
|
||||
void update_process(int load_stage, int current, int total, bool& cancel);
|
||||
@@ -140,10 +126,6 @@ private:
|
||||
Handle(TDocStd_Document) m_doc;
|
||||
Handle(XCAFDoc_ShapeTool) m_shape_tool;
|
||||
std::vector<NamedSolid> m_name_solids;
|
||||
// Keys retain the exact transferred topology and location, before copied transforms.
|
||||
NCollection_DataMap<TopoDS_Shape, std::string, TopTools_ShapeMapHasher> m_body_names;
|
||||
bool m_keep_original_names = false;
|
||||
bool m_multi_body_compound = false;
|
||||
};
|
||||
|
||||
}; // namespace Slic3r
|
||||
|
||||
@@ -351,7 +351,6 @@ static constexpr const char* TRANSFORM_ATTR = "transform";
|
||||
static constexpr const char* OFFSET_ATTR = "offset";
|
||||
static constexpr const char* PRINTABLE_ATTR = "printable";
|
||||
static constexpr const char* AUTO_DROP_ATTR = "auto_drop";
|
||||
static constexpr const char* IMPORTED_PARTS_HIDDEN_KEY = "orca:imported_parts_hidden";
|
||||
static constexpr const char* INSTANCESCOUNT_ATTR = "instances_count";
|
||||
static constexpr const char* CUSTOM_SUPPORTS_ATTR = "paint_supports";
|
||||
static constexpr const char* CUSTOM_FUZZY_SKIN_ATTR = "paint_fuzzy_skin";
|
||||
@@ -1168,7 +1167,6 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
||||
bool m_load_model = false;
|
||||
bool m_load_aux = false;
|
||||
bool m_load_config = false;
|
||||
bool m_keep_original_names = false;
|
||||
// backup & restore
|
||||
bool m_load_restore = false;
|
||||
std::string m_backup_path;
|
||||
@@ -1494,8 +1492,6 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
||||
m_load_aux = strategy & LoadStrategy::LoadAuxiliary;
|
||||
m_load_restore = strategy & LoadStrategy::Restore;
|
||||
m_load_config = strategy & LoadStrategy::LoadConfig;
|
||||
// Project part metadata remains authoritative; the opt-in only fills missing CAD labels.
|
||||
m_keep_original_names = (strategy & LoadStrategy::KeepOriginalNames) && !m_load_config;
|
||||
m_model = &model;
|
||||
m_unit_factor = 1.0f;
|
||||
m_curr_object = nullptr;
|
||||
@@ -2263,7 +2259,6 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
||||
|
||||
ObjectMetadata::VolumeMetadataList volumes;
|
||||
ObjectMetadata::VolumeMetadataList* volumes_ptr = nullptr;
|
||||
bool imported_parts_hidden = false;
|
||||
|
||||
// 2.4.x stored auto_drop on build items, shared by all instances of an object; any "off" wins
|
||||
const bool legacy_auto_drop = !m_items_auto_drop_off.count(object.first.second);
|
||||
@@ -2278,9 +2273,6 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
||||
for (const Metadata& metadata : obj_metadata->second.metadata) {
|
||||
if (metadata.key == "name")
|
||||
model_object->name = metadata.value;
|
||||
// This is model presentation state, never a print configuration option.
|
||||
else if (metadata.key == IMPORTED_PARTS_HIDDEN_KEY)
|
||||
imported_parts_hidden = metadata.value == "1";
|
||||
//BBS: add module name
|
||||
else if (metadata.key == "module")
|
||||
model_object->module_name = metadata.value;
|
||||
@@ -2324,8 +2316,6 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
||||
|
||||
if (!_generate_volumes_new(*model_object, object_id_list, *volumes_ptr, config_substitutions))
|
||||
return false;
|
||||
// add_volume reveals edited objects, so restore persisted presentation after creation.
|
||||
model_object->imported_parts_hidden = imported_parts_hidden;
|
||||
|
||||
// Apply cut information for object if any was loaded
|
||||
// m_cut_object_ids are indexed by a 1 based model object index.
|
||||
@@ -5486,8 +5476,6 @@ void PlateData::parse_filament_info(GCodeProcessorResult *result)
|
||||
}
|
||||
|
||||
// this may happen for 3mf saved by 3rd part softwares
|
||||
if (volume->name.empty() && m_keep_original_names)
|
||||
volume->name = sub_object->name;
|
||||
if (volume->name.empty()) {
|
||||
volume->name = object.name;
|
||||
if (renamed_volumes_count > 0)
|
||||
@@ -8333,9 +8321,6 @@ bool _BBS_3MF_Exporter::_add_model_config_file_to_archive(mz_zip_archive& archiv
|
||||
stream << " <" << METADATA_TAG << " " << KEY_ATTR << "=\"module\" " << VALUE_ATTR << "=\"" << xml_escape(obj->module_name) << "\"/>\n";
|
||||
|
||||
// stores object's config data
|
||||
if (obj->imported_parts_hidden)
|
||||
stream << " <" << METADATA_TAG << " " << KEY_ATTR << "=\"" << IMPORTED_PARTS_HIDDEN_KEY
|
||||
<< "\" " << VALUE_ATTR << "=\"1\"/>\n";
|
||||
for (const std::string& key : obj->config.keys()) {
|
||||
stream << " <" << METADATA_TAG << " " << KEY_ATTR << "=\"" << key << "\" " << VALUE_ATTR << "=\"" << obj->config.opt_serialize(key) << "\"/>\n";
|
||||
}
|
||||
|
||||
+119
-242
@@ -699,8 +699,8 @@ static std::vector<Vec2d> get_path_of_change_filament(const Print& print)
|
||||
// BBS
|
||||
double wipe_dist = scale_(gcodegen.config().wipe_distance.get_at(gcodegen.get_filament_config_index((int)gcodegen.writer().filament()->id())));
|
||||
|
||||
// Replace the stored first point with the actual nozzle position,
|
||||
// including any loop clipping or Wipe on loop move.
|
||||
/* Take the stored wipe path and replace first point with the current actual position
|
||||
(they might be different, for example, in case of loop clipping). */
|
||||
Polyline wipe_path;
|
||||
wipe_path.append(gcodegen.last_pos());
|
||||
wipe_path.append(
|
||||
@@ -1070,6 +1070,27 @@ static std::vector<Vec2d> get_path_of_change_filament(const Print& print)
|
||||
return gcode;
|
||||
}
|
||||
|
||||
// A folded tower layer is thicker than the object layer it sits on, so the height process_layer
|
||||
// emitted is not the tower's. Both writers declare one, but each hardcodes a tag dialect - Type 1
|
||||
// forces s_IsBBLPrinter and writes "; LAYER_HEIGHT:", Type 2 writes ";HEIGHT:" - and the processor
|
||||
// reads only its printer's, so a Type 1 tower on a non-BBL printer loses it and the merged layer
|
||||
// is drawn and costed as a thin one. Declare it here, where the printer is known, unless the tower
|
||||
// already wrote the right tag. _extrude puts the object's height back on the next object path,
|
||||
// since process_layer forces the role to erWipeTower on any layer with a tower.
|
||||
std::string WipeTowerIntegration::tower_height_tag(GCode &gcodegen, const WipeTower::ToolChangeResult &tcr,
|
||||
const std::string &tcr_gcode) const
|
||||
{
|
||||
const std::string tag = ";" + GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Height);
|
||||
if (! m_sparse_layers_combined || std::abs(gcodegen.m_last_height - tcr.layer_height) <= EPSILON ||
|
||||
tcr_gcode.find(tag) != std::string::npos)
|
||||
return {};
|
||||
// Keep m_last_height what the G-code last declared, so a second visit does not repeat it.
|
||||
gcodegen.m_last_height = tcr.layer_height;
|
||||
char buf[64];
|
||||
sprintf(buf, "%s%g\n", tag.c_str(), tcr.layer_height);
|
||||
return buf;
|
||||
}
|
||||
|
||||
// FanMover consumes these markers (and drops them) to avoid splitting a G1 inside custom gcode.
|
||||
// Only written when FanMover runs, the same gate as its construction in GCode::process_layers.
|
||||
static std::string wrap_custom_gcode_for_fan_mover(const FullPrintConfig &config, const std::string &gcode)
|
||||
@@ -1146,9 +1167,7 @@ static std::vector<Vec2d> get_path_of_change_filament(const Print& print)
|
||||
// over the tower - which is what the is_finish_first travel above does. Otherwise the nozzle
|
||||
// is still over the model and this descent would drive it into the print, so defer it to the
|
||||
// re-descents below, which run after the travel to the tower.
|
||||
// A layer joined to the tower layer below descends to it the same way, by less than a layer.
|
||||
const bool joined_below_layer = m_layer_joined && !tcr.priming && (current_z - z) > EPSILON;
|
||||
const bool defer_compacted_descend = (m_sparse_layers_skipped || joined_below_layer)
|
||||
const bool defer_compacted_descend = m_sparse_layers_skipped
|
||||
&& !tcr.priming && !tcr.is_finish_first && (current_z - z) > EPSILON;
|
||||
if (!is_approx(z, current_z) && !defer_compacted_descend) {
|
||||
gcode += gcodegen.writer().retract();
|
||||
@@ -1157,7 +1176,7 @@ static std::vector<Vec2d> get_path_of_change_filament(const Print& print)
|
||||
}
|
||||
// Tower compacted below the object, so any extrusion emitted without an explicit z has to be
|
||||
// pulled back down to it first.
|
||||
const bool compacted_below_object = (m_sparse_layers_skipped && z >= 0. && (tcr.print_z - z) > EPSILON) || joined_below_layer;
|
||||
const bool compacted_below_object = m_sparse_layers_skipped && z >= 0. && (tcr.print_z - z) > EPSILON;
|
||||
|
||||
// Process the end filament gcode.
|
||||
bool add_change_filament_624 = false;
|
||||
@@ -1492,14 +1511,6 @@ static std::vector<Vec2d> get_path_of_change_filament(const Print& print)
|
||||
if (position_before_toolchange)
|
||||
gcodegen.synchronize_toolchange_position(*position_before_toolchange, toolchange_gcode_str);
|
||||
|
||||
// A joined layer descends to the tower layer below it. With no macro and no nozzle change
|
||||
// nothing has moved the head off the part yet, so travel over the tower before that descent.
|
||||
if (joined_below_layer && !need_travel_after_change_filament_gcode && !is_nozzle_change) {
|
||||
std::string start_pos_str = gcodegen.travel_to(wipe_tower_point_to_object_point(gcodegen, tool_change_start_pos + plate_origin_2d), erMixed, "Move to start pos");
|
||||
check_add_eol(start_pos_str);
|
||||
wipe_next_start_point_str = start_pos_str;
|
||||
}
|
||||
|
||||
if (need_travel_after_change_filament_gcode) {
|
||||
// move to start_pos for wiping after toolchange
|
||||
if (!is_used_travel_avoid_perimeter) {
|
||||
@@ -1619,6 +1630,7 @@ static std::vector<Vec2d> get_path_of_change_filament(const Print& print)
|
||||
config.set_key_value("filament_start_gcode", new ConfigOptionString(start_filament_gcode_str));
|
||||
std::string tcr_gcode, tcr_escaped_gcode = gcodegen.placeholder_parser_process("tcr_rotated_gcode", tcr_rotated_gcode, new_filament_id, &config);
|
||||
unescape_string_cstyle(tcr_escaped_gcode, tcr_gcode);
|
||||
gcode += tower_height_tag(gcodegen, tcr, tcr_gcode);
|
||||
gcode += tcr_gcode;
|
||||
// Count the toolchange only when the emitted block really changed the tool —
|
||||
// tower visits without a filament change must not advance the ordinal.
|
||||
@@ -1933,6 +1945,7 @@ static std::vector<Vec2d> get_path_of_change_filament(const Print& print)
|
||||
std::string tcr_gcode,
|
||||
tcr_escaped_gcode = gcodegen.placeholder_parser_process("tcr_rotated_gcode", tcr_rotated_gcode, new_extruder_id, &config);
|
||||
unescape_string_cstyle(tcr_escaped_gcode, tcr_gcode);
|
||||
gcode += tower_height_tag(gcodegen, tcr, tcr_gcode);
|
||||
gcode += tcr_gcode;
|
||||
check_add_eol(toolchange_gcode_str);
|
||||
|
||||
@@ -2085,8 +2098,7 @@ static std::vector<Vec2d> get_path_of_change_filament(const Print& print)
|
||||
ignore_sparse = wipe_tower_layer_is_sparse(m_tool_changes[m_layer_idx]) && m_layer_idx != 0;
|
||||
if (m_tool_change_idx == 0 && !ignore_sparse)
|
||||
wipe_tower_z = m_last_wipe_tower_print_z + m_tool_changes[m_layer_idx].front().layer_height;
|
||||
} else if (m_layer_joined)
|
||||
wipe_tower_z = joined_tower_z();
|
||||
}
|
||||
|
||||
if (!ignore_sparse) {
|
||||
gcode += append_tcr2(gcodegen, m_tool_changes[m_layer_idx][m_tool_change_idx++], extruder_id, wipe_tower_z);
|
||||
@@ -2103,8 +2115,7 @@ static std::vector<Vec2d> get_path_of_change_filament(const Print& print)
|
||||
if (m_sparse_layers_skipped) {
|
||||
ignore_sparse = wipe_tower_layer_is_sparse(m_tool_changes[m_layer_idx]);
|
||||
wipe_tower_z = m_compacted_tower_z[m_layer_idx];
|
||||
} else if (m_layer_joined)
|
||||
wipe_tower_z = joined_tower_z();
|
||||
}
|
||||
|
||||
if ((m_enable_timelapse_print || m_enable_wrapping_detection) && m_is_first_print) {
|
||||
gcode += append_tcr(gcodegen, m_tool_changes[m_layer_idx][0], m_tool_changes[m_layer_idx][0].new_tool, wipe_tower_z);
|
||||
@@ -3293,30 +3304,32 @@ static inline std::vector<const PrintInstance*> sort_object_instances_by_max_z(c
|
||||
}
|
||||
#endif
|
||||
|
||||
// Produce a vector of PrintInstances in the order of their ModelInstances in the object and instance lists of print.model().
|
||||
// Produce a vector of PrintObjects in the order of their respective ModelObjects in print.model().
|
||||
//BBS: add sort logic for seq-print
|
||||
std::vector<const PrintInstance*> sort_object_instances_by_model_order(const Print& print, bool init_order)
|
||||
{
|
||||
if (init_order) {
|
||||
// Number by position in the model's object and instance lists. Copies of one object can be split
|
||||
// into separate PrintObjects, one per distinct transformation, and print.objects() orders those by
|
||||
// transformation, so its order is not the list order.
|
||||
int order = 0;
|
||||
for (const ModelObject *model_object : print.model().objects)
|
||||
for (ModelInstance *model_instance : model_object->instances)
|
||||
model_instance->arrange_order = ++order;
|
||||
}
|
||||
auto find_object_index = [](const Model& model, const ModelObject* obj) {
|
||||
for (int index = 0; index < model.objects.size(); index++)
|
||||
{
|
||||
if (model.objects[index] == obj)
|
||||
return index;
|
||||
}
|
||||
return -1;
|
||||
};
|
||||
|
||||
// Build up map from ModelInstance* to PrintInstance*
|
||||
std::vector<std::pair<const ModelInstance*, const PrintInstance*>> model_instance_to_print_instance;
|
||||
model_instance_to_print_instance.reserve(print.num_object_instances());
|
||||
for (const PrintObject *print_object : print.objects())
|
||||
for (const PrintInstance &print_instance : print_object->instances())
|
||||
{
|
||||
if (init_order)
|
||||
const_cast<ModelInstance*>(print_instance.model_instance)->arrange_order = find_object_index(print.model(), print_object->model_object());
|
||||
model_instance_to_print_instance.emplace_back(print_instance.model_instance, &print_instance);
|
||||
}
|
||||
std::sort(model_instance_to_print_instance.begin(), model_instance_to_print_instance.end(), [](auto &l, auto &r) { return l.first->arrange_order < r.first->arrange_order; });
|
||||
if (init_order) {
|
||||
// Re-assign the arrange_order so each instance of this print has a unique order number. The
|
||||
// numbering above covers the whole model, including the instances of the other plates.
|
||||
// Re-assign the arrange_order so each instance has a unique order number
|
||||
for (int k = 0; k < model_instance_to_print_instance.size(); k++) {
|
||||
const_cast<ModelInstance*>(model_instance_to_print_instance[k].first)->arrange_order = k + 1;
|
||||
}
|
||||
@@ -3324,8 +3337,13 @@ std::vector<const PrintInstance*> sort_object_instances_by_model_order(const Pri
|
||||
|
||||
std::vector<const PrintInstance*> instances;
|
||||
instances.reserve(model_instance_to_print_instance.size());
|
||||
for (const auto &model_instance_print_instance : model_instance_to_print_instance)
|
||||
instances.emplace_back(model_instance_print_instance.second);
|
||||
for (const ModelObject *model_object : print.model().objects)
|
||||
for (const ModelInstance *model_instance : model_object->instances) {
|
||||
auto it = std::lower_bound(model_instance_to_print_instance.begin(), model_instance_to_print_instance.end(), std::make_pair(model_instance, nullptr), [](auto &l, auto &r) { return l.first->arrange_order < r.first->arrange_order; });
|
||||
if (it != model_instance_to_print_instance.end() && it->first == model_instance)
|
||||
instances.emplace_back(it->second);
|
||||
}
|
||||
std::sort(instances.begin(), instances.end(), [](auto& l, auto& r) { return l->model_instance->arrange_order < r->model_instance->arrange_order; });
|
||||
return instances;
|
||||
}
|
||||
|
||||
@@ -3471,13 +3489,9 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
|
||||
// Undo what point_to_gcode() added (m_origin, minus the extruder offset) and
|
||||
// what the writer then took off (its XY offset, the plate origin).
|
||||
const Vec2d plate_offset = m_writer.get_xy_offset().cast<double>();
|
||||
// Judged like the path the travel leads to (see belt_path_height()).
|
||||
if (m_belt_travel_target != nullptr && m_belt_travel_target->role() == erBrim)
|
||||
return true;
|
||||
return this->on_first_layer(Vec3d(point_logical.x() - (m_origin.x() - plate_offset.x()) + extruder_offset.x(),
|
||||
point_logical.y() - (m_origin.y() - plate_offset.y()) + extruder_offset.y(),
|
||||
point_logical.z()),
|
||||
m_belt_travel_target != nullptr ? m_belt_travel_target->width : 0.);
|
||||
point_logical.z()));
|
||||
});
|
||||
}
|
||||
|
||||
@@ -5176,13 +5190,8 @@ void GCode::process_layers(
|
||||
const std::pair<coordf_t, std::vector<LayerToPrint>>& layer = layers_to_print[precomputed.index];
|
||||
const LayerTools& layer_tools = tool_ordering.tools_for_layer(layer.first);
|
||||
print.set_status(80, Slic3r::format(_(L("Generating G-code: layer %1%")), std::to_string(precomputed.index + 1)));
|
||||
// A layer that joined the tower layer below continues it.
|
||||
if (m_wipe_tower && layer_tools.has_wipe_tower) {
|
||||
if (layer_tools.joins_wipe_tower_layer_below())
|
||||
m_wipe_tower->join_layer();
|
||||
else
|
||||
m_wipe_tower->next_layer();
|
||||
}
|
||||
if (m_wipe_tower && layer_tools.has_wipe_tower)
|
||||
m_wipe_tower->next_layer();
|
||||
//BBS
|
||||
check_placeholder_parser_failed();
|
||||
print.throw_if_canceled();
|
||||
@@ -7425,8 +7434,7 @@ LayerResult GCode::process_layer(
|
||||
gcode += insert_timelapse_gcode();
|
||||
}
|
||||
|
||||
// A joined layer continues a tower layer whose first print is already done.
|
||||
if (m_wipe_tower && ! layer_tools.joins_wipe_tower_layer_below())
|
||||
if (m_wipe_tower)
|
||||
m_wipe_tower->set_is_first_print(true);
|
||||
|
||||
auto insert_wrapping_detection_gcode = [this, &print, &print_z, &most_used_extruder]() -> std::string {
|
||||
@@ -7515,8 +7523,7 @@ LayerResult GCode::process_layer(
|
||||
|
||||
std::string gcode_toolchange;
|
||||
if (has_wipe_tower) {
|
||||
const bool finish_tower_layer = extruder_id == layer_tools.extruders.back() && layer_tools.wipe_tower_layer_ends;
|
||||
if (!m_wipe_tower->is_empty_wipe_tower_gcode(*this, extruder_id, finish_tower_layer)) {
|
||||
if (!m_wipe_tower->is_empty_wipe_tower_gcode(*this, extruder_id, extruder_id == layer_tools.extruders.back())) {
|
||||
if (need_insert_timelapse_gcode_for_traditional && !has_insert_timelapse_gcode
|
||||
&& !(m_farthest_point_timelapse.enabled && m_farthest_point_timelapse.farthest_is_photo_head)) {
|
||||
bool should_insert = true;
|
||||
@@ -7544,7 +7551,7 @@ LayerResult GCode::process_layer(
|
||||
gcode += insert_wrapping_detection_gcode();
|
||||
has_insert_wrapping_detection_gcode = true;
|
||||
}
|
||||
gcode_toolchange = m_wipe_tower->tool_change(*this, extruder_id, finish_tower_layer);
|
||||
gcode_toolchange = m_wipe_tower->tool_change(*this, extruder_id, extruder_id == layer_tools.extruders.back());
|
||||
}
|
||||
} else {
|
||||
// Same case-A/case-B split for the non-wipe-tower path. With the subsystem off,
|
||||
@@ -8059,7 +8066,7 @@ LayerResult GCode::process_layer(
|
||||
m_nominal_z = entry.sub_z;
|
||||
// Use the same lazy-Z mechanism as change_layer(): set the flag so travel_to
|
||||
// fires even when m_last_pos coincides with the first extrusion point,
|
||||
// ensuring Z reaches sub_z on the travel to it.
|
||||
// ensuring Z reaches sub_z via the combined XY+Z move.
|
||||
m_need_change_layer_lift_z = true;
|
||||
|
||||
for (ObjectByExtruder::Island &island : instance_to_print.object_by_extruder.islands) {
|
||||
@@ -8771,14 +8778,11 @@ std::string GCode::extrude_loop(const ExtrusionLoop& loop_
|
||||
paths.back().polyline.points.size() >= 2)
|
||||
wipe_on_loops_dest = wipe_on_loops_destination(paths, scale_(nozzle_diameter), is_ccw, is_hole);
|
||||
|
||||
bool wipe_inward_applied = false;
|
||||
// Orca: store loop paths in print order because inward offsets use this orientation.
|
||||
if (m_wipe.enable && FILAMENT_CONFIG(wipe)) {
|
||||
m_wipe.update_path(paths);
|
||||
|
||||
// A loop's role is its first path's role. An overhanging start must
|
||||
// not hide ordinary external-wall segments elsewhere in the loop.
|
||||
const auto external_path = std::find_if(paths.begin(), paths.end(),
|
||||
[](const ExtrusionPath &path) { return is_external_perimeter(path.role()); });
|
||||
// Orca: loop wipe paths retain print direction. Their material side is
|
||||
// therefore left for CCW contours and right for CW contours, with the
|
||||
// result inverted for holes. Only external perimeters are eligible.
|
||||
@@ -8786,19 +8790,18 @@ std::string GCode::extrude_loop(const ExtrusionLoop& loop_
|
||||
// context was created. Check the effective setting again at execution.
|
||||
if (m_config.wipe_inward && m_config.wipe_inward_distance.value > 0. &&
|
||||
wipe_support != nullptr && !wipe_support->inner_lines.empty() &&
|
||||
external_path != paths.end() && m_wipe.path.points.size() >= 2) {
|
||||
// Orca: use the actual extrusion width of the external wall, not the config
|
||||
// A loop's role is its first path's role. An overhanging start must
|
||||
// not hide ordinary external-wall segments elsewhere in the loop.
|
||||
std::any_of(paths.begin(), paths.end(),
|
||||
[](const ExtrusionPath &path) { return is_external_perimeter(path.role()); }) &&
|
||||
m_wipe.path.points.size() >= 2) {
|
||||
// Orca: use the actual extrusion width from the path, not the config
|
||||
// value — outer_wall_line_width=0 (Auto) would make get_abs_value
|
||||
// return 0 and silently disable the feature, and Arachne may produce
|
||||
// a different width than the config default. An overhanging start
|
||||
// may have another width, so it does not set the offset.
|
||||
const double outer_wall_line_width = external_path->width;
|
||||
// a different width than the config default.
|
||||
const double outer_wall_line_width = paths.front().width;
|
||||
const double requested_offset = m_config.wipe_inward_distance.get_abs_value(outer_wall_line_width);
|
||||
// Outer/Inner and sandwich order print the adjacent inner wall after
|
||||
// this one. Only the outer bead's own inner half is available for wiping now.
|
||||
const double max_offset = outer_wall_line_width *
|
||||
(m_config.wall_sequence == WallSequence::InnerOuter ? 1. : 0.5);
|
||||
const double offset_dist = scale_(std::min(requested_offset, max_offset));
|
||||
const double offset_dist = scale_(std::min(requested_offset, outer_wall_line_width));
|
||||
if (offset_dist > SCALED_EPSILON) {
|
||||
const Point seam_start = paths.front().first_point();
|
||||
const Point seam_end = paths.back().last_point();
|
||||
@@ -8808,10 +8811,11 @@ std::string GCode::extrude_loop(const ExtrusionLoop& loop_
|
||||
// from points[1]. The helper preserves that sentinel and atomically
|
||||
// replaces the remaining points, or leaves the path untouched.
|
||||
// Orca: a configured wall count does not guarantee that Arachne
|
||||
// generated an adjacent wall for this particular loop. Inner walls
|
||||
// determine the material side; with Outer/Inner and sandwich order
|
||||
// they include walls printed later. Only printed walls validate
|
||||
// the executable wipe path.
|
||||
// generated an adjacent wall for this particular loop. Only
|
||||
// earlier entities are considered because later walls have
|
||||
// not been printed yet (for example with Outer/Inner order).
|
||||
// Inner walls determine the material side; every earlier wall
|
||||
// remains available to validate the executable wipe path.
|
||||
const double support_distance = scale_(std::max(nozzle_diameter, outer_wall_line_width));
|
||||
Polyline inward_path = m_wipe.path;
|
||||
if (offset_wipe_path_toward_support(
|
||||
@@ -8819,9 +8823,8 @@ std::string GCode::extrude_loop(const ExtrusionLoop& loop_
|
||||
wipe_offset_direction(is_ccw, is_hole), offset_dist, max_wipe_length,
|
||||
wipe_support->inner_lines, wipe_support->printed_lines,
|
||||
m_wipe.path.lines(), support_distance)) {
|
||||
// Only the stored geometry changes. Like the regular wipe, the path
|
||||
// runs when travel planning retracts and is skipped on short travels.
|
||||
m_wipe.path = std::move(inward_path);
|
||||
wipe_inward_applied = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8834,6 +8837,12 @@ std::string GCode::extrude_loop(const ExtrusionLoop& loop_
|
||||
this->set_last_pos(*wipe_on_loops_dest);
|
||||
}
|
||||
|
||||
// Execute the accepted path before another extrusion replaces it. Wiping
|
||||
// must not force retraction or Z-hop across a short travel to the next wall.
|
||||
// Ordinary travel planning decides whether to retract from the new position.
|
||||
if (wipe_inward_applied)
|
||||
gcode += m_wipe.wipe(*this, 0.);
|
||||
|
||||
return gcode;
|
||||
}
|
||||
|
||||
@@ -8940,18 +8949,6 @@ std::string GCode::extrude_perimeters(const Print &print, const std::vector<Obje
|
||||
scale_(FILAMENT_CONFIG(wipe_distance)) > SCALED_EPSILON)
|
||||
wipe_support.emplace();
|
||||
|
||||
// Outer/Inner and sandwich order print the adjacent inner wall after the
|
||||
// external wall. Its geometry still identifies the inward side and whether
|
||||
// the external wall has a neighbour, while the half-width limit in
|
||||
// extrude_loop() keeps the wipe on the outer bead.
|
||||
if (wipe_support && m_config.wall_sequence != WallSequence::InnerOuter) {
|
||||
WipeInwardSupport all_walls;
|
||||
for (const ExtrusionEntity* ee : region.perimeters)
|
||||
all_walls.append(*ee);
|
||||
wipe_support->inner_lines = std::move(all_walls.inner_lines);
|
||||
wipe_support->inner_lines_complete = true;
|
||||
}
|
||||
|
||||
// ORCA: loops flagged as extruded in mid air, out of reach of the layer below, are held back
|
||||
// for a second pass after the infill that anchors them. Infill already precedes infill first walls.
|
||||
const bool defer_unsupported = !is_infill_first;
|
||||
@@ -9232,89 +9229,6 @@ static bool overhang_fan_active(float overlap, int overhang_fan_threshold, Extru
|
||||
}
|
||||
|
||||
std::string GCode::_extrude(const ExtrusionPath &path, const std::string &path_description, double speed)
|
||||
{
|
||||
std::vector<std::vector<double>> uncut_line_lengths;
|
||||
const ExtrusionPaths pieces = this->belt_cut_at_band_edges(path, uncut_line_lengths);
|
||||
if (pieces.size() < 2)
|
||||
return this->_extrude_piece(path, path_description, speed);
|
||||
std::string gcode;
|
||||
for (size_t i = 0; i < pieces.size(); ++ i) {
|
||||
m_belt_uncut_line_lengths = &uncut_line_lengths[i];
|
||||
gcode += this->_extrude_piece(pieces[i], path_description, speed);
|
||||
}
|
||||
m_belt_uncut_line_lengths = nullptr;
|
||||
return gcode;
|
||||
}
|
||||
|
||||
// Belt printers: whether a path is on the first layer, and its step of the slow_down_layers
|
||||
// ramp, set its speed, flow and acceleration as a whole. A wall loop runs from the belt up
|
||||
// the part, so a path is cut where it crosses the edge of the first-layer band above the belt
|
||||
// or of a band of the ramp, and each piece is judged on its own. Otherwise the loop would
|
||||
// take the settings of wherever its seam is all the way round. Returns no pieces when the
|
||||
// path stays in one band, and else, for each piece, the length of the uncut line each of its
|
||||
// lines comes from, so that small-area flow compensation sees the line as it was.
|
||||
ExtrusionPaths GCode::belt_cut_at_band_edges(const ExtrusionPath &path, std::vector<std::vector<double>> &uncut_line_lengths) const
|
||||
{
|
||||
ExtrusionPaths pieces;
|
||||
// A sloped seam carries its slope along it, and a contoured path scales each line's
|
||||
// extrusion by the Z offset at the line's end, which a cut would move; both are judged
|
||||
// whole.
|
||||
if (! m_config.belt_printer.value || path.z_contoured || dynamic_cast<const ExtrusionPathSloped*>(&path) != nullptr)
|
||||
return pieces;
|
||||
// Band 0 is the first layer as on_first_layer() has it, band k > 0 the heights the ramp
|
||||
// gives step k (effective_layer_index_for_point()), the last one everything above it.
|
||||
const double first = m_config.initial_layer_print_height.value;
|
||||
const double band = this->first_layer_band_mm();
|
||||
const int last = std::max(1, m_config.slow_down_layers.value);
|
||||
auto band_of = [this, first, last](double h) {
|
||||
return h <= first + EPSILON ? 0 : std::clamp(this->belt_band_index(h), 1, last);
|
||||
};
|
||||
auto band_top = [first, band](int k) { return k == 0 ? first : (k + 1) * band; };
|
||||
const Points3 &points = path.polyline.points;
|
||||
double h_prev;
|
||||
if (points.size() < 2 || ! this->belt_path_height(path, points.front(), h_prev))
|
||||
return pieces;
|
||||
int band_prev = band_of(h_prev);
|
||||
Points3 current{ points.front() };
|
||||
std::vector<double> current_lengths;
|
||||
auto extend = [¤t, ¤t_lengths](const Point3 &p, double uncut_length) {
|
||||
if (p != current.back()) {
|
||||
current.push_back(p);
|
||||
current_lengths.push_back(uncut_length);
|
||||
}
|
||||
};
|
||||
for (size_t i = 1; i < points.size(); ++ i) {
|
||||
double h;
|
||||
this->belt_path_height(path, points[i], h);
|
||||
const int band_i = band_of(h);
|
||||
const double length = unscale<double>((points[i] - points[i - 1]).cast<double>().norm());
|
||||
// Cut at each edge the segment crosses. The belt is a plane, so the height is
|
||||
// linear along the segment.
|
||||
for (int k = band_prev; k != band_i; k += band_i > band_prev ? 1 : -1) {
|
||||
const double edge = band_top(band_i > band_prev ? k : k - 1);
|
||||
const double t = std::clamp((edge - h_prev) / (h - h_prev), 0., 1.);
|
||||
const Vec3d cut = points[i - 1].cast<double>() + t * (points[i] - points[i - 1]).cast<double>();
|
||||
const Point3 cut_point(cut.x(), cut.y(), cut.z());
|
||||
extend(cut_point, length);
|
||||
if (current.size() > 1) {
|
||||
pieces.emplace_back(Polyline3(current), path);
|
||||
uncut_line_lengths.emplace_back(std::move(current_lengths));
|
||||
}
|
||||
current = { cut_point };
|
||||
current_lengths.clear();
|
||||
}
|
||||
extend(points[i], length);
|
||||
h_prev = h;
|
||||
band_prev = band_i;
|
||||
}
|
||||
if (! pieces.empty() && current.size() > 1) {
|
||||
pieces.emplace_back(Polyline3(current), path);
|
||||
uncut_line_lengths.emplace_back(std::move(current_lengths));
|
||||
}
|
||||
return pieces;
|
||||
}
|
||||
|
||||
std::string GCode::_extrude_piece(const ExtrusionPath &path, const std::string &path_description, double speed)
|
||||
{
|
||||
std::string gcode;
|
||||
|
||||
@@ -9326,29 +9240,15 @@ std::string GCode::_extrude_piece(const ExtrusionPath &path, const std::string &
|
||||
// evaluator is inactive (non-belt printers, or belt printers without
|
||||
// a Z-axis shear) `path_on_first_layer` falls back to the legacy
|
||||
// layer-id check, so behavior is bit-identical to the pre-feature path.
|
||||
// A belt brim apron band has no Layer of its own, so it publishes its Z
|
||||
// through m_belt_brim_z instead; without that the plane would be probed at
|
||||
// Z=0 and the apron mis-classified for fan and speed.
|
||||
const Vec3d path_point_mm{
|
||||
unscale<double>(path.first_point().x()),
|
||||
unscale<double>(path.first_point().y()),
|
||||
m_layer ? m_layer->print_z : (m_belt_brim_z ? *m_belt_brim_z : 0.0)
|
||||
};
|
||||
bool path_on_first_layer = this->on_first_layer(path_point_mm);
|
||||
// On a belt a path is judged by how high above the belt all of it is: it is on the first
|
||||
// layer when all of it is, and takes the slow_down_layers step of its middle. A piece cut
|
||||
// at the edge of a band (see belt_cut_at_band_edges()) starts or ends on the edge, so
|
||||
// neither of its ends would do.
|
||||
int belt_layer = -1;
|
||||
if (m_config.belt_printer.value) {
|
||||
double lo = std::numeric_limits<double>::max(), hi = std::numeric_limits<double>::lowest(), h;
|
||||
for (const Point3 &p : path.polyline.points)
|
||||
if (this->belt_path_height(path, p, h)) {
|
||||
lo = std::min(lo, h);
|
||||
hi = std::max(hi, h);
|
||||
}
|
||||
if (lo <= hi) {
|
||||
path_on_first_layer = hi <= m_config.initial_layer_print_height.value + EPSILON;
|
||||
belt_layer = path_on_first_layer ? 0 : std::max(1, this->belt_band_index(0.5 * (lo + hi)));
|
||||
}
|
||||
}
|
||||
const bool path_on_first_layer = this->on_first_layer(path_point_mm);
|
||||
|
||||
const ExtrusionPathSloped* sloped = dynamic_cast<const ExtrusionPathSloped*>(&path);
|
||||
|
||||
@@ -9377,10 +9277,7 @@ std::string GCode::_extrude_piece(const ExtrusionPath &path, const std::string &
|
||||
z = unscale_(path.polyline.lines().begin()->a.z()) + m_nominal_z;
|
||||
}
|
||||
|
||||
// The writer's first-layer test judges the travel like the path it leads to.
|
||||
m_belt_travel_target = &path;
|
||||
gcode += this->travel_to(first_point, path.role(), "move to first " + description + " point", z);
|
||||
m_belt_travel_target = nullptr;
|
||||
|
||||
// Orca: ensure Z matches planned layer height
|
||||
if (!slope_need_z_travel && (_last_pos_undefined || m_need_change_layer_lift_z)) {
|
||||
@@ -9586,18 +9483,16 @@ std::string GCode::_extrude_piece(const ExtrusionPath &path, const std::string &
|
||||
// Use the belt-aware effective layer index when on a belt printer so
|
||||
// the speed fade tracks perpendicular distance from the plane on
|
||||
// belt printers; otherwise this falls back to the slicing layer id.
|
||||
const int _layer = belt_layer >= 0 ? belt_layer : this->effective_layer_index_for_point(path_point_mm);
|
||||
const int _layer = this->effective_layer_index_for_point(path_point_mm);
|
||||
// Belt printers: a tilted layer runs from the belt to the top of the part, so the
|
||||
// "first layers" the fan stays off for are a band along the belt. Mark where the
|
||||
// extrusion enters and leaves it, per segment, for the cooling buffer.
|
||||
const bool belt_band_tags = m_enable_cooling_markers && m_config.belt_printer.value;
|
||||
const int belt_band_layers = belt_band_tags ? m_config.close_fan_the_first_x_layers.get_at(m_writer.filament()->id()) : 0;
|
||||
auto tag_belt_band = [this, &gcode, &path, &path_point_mm, belt_band_tags, belt_band_layers](const Point3 &p) {
|
||||
auto tag_belt_band = [this, &gcode, belt_band_tags, belt_band_layers, z = path_point_mm.z()](coord_t x, coord_t y) {
|
||||
if (! belt_band_tags)
|
||||
return;
|
||||
double h;
|
||||
const int layer = this->belt_path_height(path, p, h) ? this->belt_band_index(h) : this->effective_layer_index_for_point(path_point_mm);
|
||||
const bool in_band = layer < belt_band_layers;
|
||||
const bool in_band = this->effective_layer_index_for_point(Vec3d(unscale<double>(x), unscale<double>(y), z)) < belt_band_layers;
|
||||
if (in_band != m_belt_in_band) {
|
||||
gcode += in_band ? ";_BELT_BAND_START\n" : ";_BELT_BAND_END\n";
|
||||
m_belt_in_band = in_band;
|
||||
@@ -9725,11 +9620,6 @@ std::string GCode::_extrude_piece(const ExtrusionPath &path, const std::string &
|
||||
fan_overlap_threshold = overhang_fan_overlap_threshold(FILAMENT_CONFIG(overhang_fan_threshold));
|
||||
|
||||
if (NOZZLE_CONFIG(slowdown_for_curled_perimeters)){
|
||||
const FloatOrPercent fully_unsupported_speed = path.role() == erBridgeInfill ?
|
||||
FloatOrPercent{NOZZLE_CONFIG(bridge_speed) * 100 / ref_speed, true} :
|
||||
(NOZZLE_CONFIG(overhang_4_4_speed).get_abs_value(ref_speed) < 0.5 ?
|
||||
FloatOrPercent{100, true} :
|
||||
FloatOrPercent{NOZZLE_CONFIG(overhang_4_4_speed).get_abs_value(ref_speed) * 100 / ref_speed, true});
|
||||
ConfigOptionFloatsOrPercents dynamic_overhang_speeds(
|
||||
{FloatOrPercent{100, true},
|
||||
(NOZZLE_CONFIG(overhang_1_4_speed).get_abs_value(ref_speed) < 0.5) ?
|
||||
@@ -9744,7 +9634,9 @@ std::string GCode::_extrude_piece(const ExtrusionPath &path, const std::string &
|
||||
(NOZZLE_CONFIG(overhang_4_4_speed).get_abs_value(ref_speed) < 0.5) ?
|
||||
FloatOrPercent{100, true} :
|
||||
FloatOrPercent{NOZZLE_CONFIG(overhang_4_4_speed).get_abs_value(ref_speed) * 100 / ref_speed, true},
|
||||
fully_unsupported_speed});
|
||||
(NOZZLE_CONFIG(overhang_4_4_speed).get_abs_value(ref_speed) < 0.5) ?
|
||||
FloatOrPercent{100, true} :
|
||||
FloatOrPercent{NOZZLE_CONFIG(overhang_4_4_speed).get_abs_value(ref_speed) * 100 / ref_speed, true}});
|
||||
|
||||
new_points = m_extrusion_quality_estimator.estimate_extrusion_quality(path, overhang_overlap_levels, dynamic_overhang_speeds,
|
||||
ref_speed, speed, NOZZLE_CONFIG(slowdown_for_curled_perimeters),
|
||||
@@ -10068,11 +9960,7 @@ std::string GCode::_extrude_piece(const ExtrusionPath &path, const std::string &
|
||||
double total_length = sloped == nullptr ? 0. : path.polyline.length() * SCALING_FACTOR;
|
||||
double saved_z = m_writer.get_position().z();
|
||||
|
||||
size_t line_idx = 0;
|
||||
for (const Line3& line : path.polyline.lines()) {
|
||||
// A line cut at a band edge above a belt is compensated as the line it was.
|
||||
const double uncut_length = m_belt_uncut_line_lengths != nullptr ? (*m_belt_uncut_line_lengths)[line_idx] : 0.;
|
||||
++ line_idx;
|
||||
std::string flow_description;
|
||||
const double line_length = line.length() * SCALING_FACTOR;
|
||||
if (line_length < EPSILON)
|
||||
@@ -10081,13 +9969,13 @@ std::string GCode::_extrude_piece(const ExtrusionPath &path, const std::string &
|
||||
auto dE = e_per_mm * line_length;
|
||||
if (_needSAFC(path)) {
|
||||
auto oldE = dE;
|
||||
dE = m_small_area_infill_flow_compensator->modify_flow(m_belt_uncut_line_lengths != nullptr ? uncut_length : line_length, dE, path.role());
|
||||
dE = m_small_area_infill_flow_compensator->modify_flow(line_length, dE, path.role());
|
||||
|
||||
if (m_config.gcode_comments && oldE > 0 && oldE != dE) {
|
||||
flow_description = description + Slic3r::format(" | Old Flow Value: %0.5f Length: %0.5f",oldE, line_length);
|
||||
}
|
||||
}
|
||||
tag_belt_band(line.midpoint());
|
||||
tag_belt_band((line.a.x() + line.b.x()) / 2, (line.a.y() + line.b.y()) / 2);
|
||||
if (path.z_contoured) {
|
||||
// ZAA: Z anti-aliased extrusion with variable Z per point
|
||||
Vec2d dest2d = this->point_to_gcode(line.b.to_point());
|
||||
@@ -10218,7 +10106,7 @@ std::string GCode::_extrude_piece(const ExtrusionPath &path, const std::string &
|
||||
const ProcessedPoint &processed_point = new_points[i];
|
||||
const ProcessedPoint &pre_processed_point = new_points[i-1];
|
||||
Vec3d p = this->point_to_gcode_quantized(processed_point.p);
|
||||
tag_belt_band(Point3((pre_processed_point.p + processed_point.p) / 2));
|
||||
tag_belt_band((pre_processed_point.p.x() + processed_point.p.x()) / 2, (pre_processed_point.p.y() + processed_point.p.y()) / 2);
|
||||
if (m_enable_cooling_markers) {
|
||||
if (enable_overhang_bridge_fan) {
|
||||
cur_fan_enabled = overhang_fan_active(processed_point.overlap, overhang_fan_threshold, path.role());
|
||||
@@ -10491,6 +10379,9 @@ std::string GCode::travel_to(const Point& point, ExtrusionRole role, std::string
|
||||
result.append(to_local_point(gcode_point));
|
||||
return result;
|
||||
};
|
||||
const auto nominal_writer_z = [this]() {
|
||||
return m_writer.get_position().z() - m_writer.get_zhop();
|
||||
};
|
||||
const auto route_around_exclusion_volumes = [&](
|
||||
Polyline &path,
|
||||
const std::optional<double> &start_z_override,
|
||||
@@ -10499,8 +10390,7 @@ std::string GCode::travel_to(const Point& point, ExtrusionRole role, std::string
|
||||
return false;
|
||||
|
||||
const double target_z = z == DBL_MAX ? m_nominal_z : z;
|
||||
// A lifted nozzle travels at its lifted height, so the route is checked from there.
|
||||
double route_start_z = start_z_override.value_or(m_writer.get_position().z());
|
||||
double route_start_z = start_z_override.value_or(nominal_writer_z());
|
||||
double route_end_z = target_z;
|
||||
if (include_planned_lift) {
|
||||
const Vec2d destination_xy = this->point_to_gcode(path.back());
|
||||
@@ -10649,15 +10539,13 @@ std::string GCode::travel_to(const Point& point, ExtrusionRole role, std::string
|
||||
gcode += m_writer.travel_to_xy(this->point_to_gcode(travel.points[i]), comment);
|
||||
}
|
||||
} else {
|
||||
const double target_z = z == DBL_MAX ? m_nominal_z : z;
|
||||
// A lifted nozzle keeps its height over the whole detour and descends only at the last
|
||||
// point, so it never sinks over the print.
|
||||
const bool stay_lifted = m_writer.get_zhop() > EPSILON && m_writer.get_position().z() > target_z + EPSILON;
|
||||
// A lift left pending by the retraction happens on the first leg, so that detour is lifted too.
|
||||
const Vec2d first2d = this->point_to_gcode(travel.points[1]);
|
||||
const bool lift_pending =
|
||||
m_writer.planned_travel_z(Vec3d(first2d.x(), first2d.y(), target_z), m_need_change_layer_lift_z).second > target_z + EPSILON;
|
||||
if (exclusion_volume_travel_rerouted && z != DBL_MAX && !stay_lifted && !lift_pending) {
|
||||
if (travel.size() == 2) {
|
||||
// No extra movements emitted by avoid_crossing_perimeters, simply move to the end point with z change
|
||||
const auto& dest2d = this->point_to_gcode(travel.points.back());
|
||||
Vec3d dest3d(dest2d(0), dest2d(1), z == DBL_MAX ? m_nominal_z : z);
|
||||
gcode += m_writer.travel_to_xyz(dest3d, comment, m_need_change_layer_lift_z);
|
||||
m_need_change_layer_lift_z = false;
|
||||
} else if (exclusion_volume_travel_rerouted && z != DBL_MAX) {
|
||||
// Preserve the original sloped-Z move over the longer detour.
|
||||
// The router activates every volume touched by the complete Z
|
||||
// range, so this interpolation remains conservative.
|
||||
@@ -10676,19 +10564,23 @@ std::string GCode::travel_to(const Point& point, ExtrusionRole role, std::string
|
||||
m_need_change_layer_lift_z = false;
|
||||
}
|
||||
} else {
|
||||
// Extra movements emitted by avoid_crossing_perimeters move to the layer height at the first point,
|
||||
// unless the nozzle stays lifted. The target Z is applied at the last point.
|
||||
const bool layer_z_first = travel.size() > 2 && !stay_lifted;
|
||||
// Extra movements emitted by avoid_crossing_perimeters, lift the z to normal height at the beginning, then apply the z
|
||||
// ratio at the last point
|
||||
for (size_t i = 1; i < travel.size(); ++i) {
|
||||
const Vec2d dest2d = this->point_to_gcode(travel.points[i]);
|
||||
if (i == 1 && layer_z_first) {
|
||||
gcode += m_writer.travel_to_xyz(Vec3d(dest2d.x(), dest2d.y(), m_nominal_z), comment, m_need_change_layer_lift_z);
|
||||
m_need_change_layer_lift_z = false;
|
||||
} else if (i == travel.size() - 1 && (z != DBL_MAX || !layer_z_first)) {
|
||||
gcode += m_writer.travel_to_xyz(Vec3d(dest2d.x(), dest2d.y(), target_z), comment, m_need_change_layer_lift_z);
|
||||
if (i == 1) {
|
||||
// Lift to normal z at beginning
|
||||
Vec2d dest2d = this->point_to_gcode(travel.points[i]);
|
||||
Vec3d dest3d(dest2d(0), dest2d(1), m_nominal_z);
|
||||
gcode += m_writer.travel_to_xyz(dest3d, comment, m_need_change_layer_lift_z);
|
||||
m_need_change_layer_lift_z = false;
|
||||
} else if (z != DBL_MAX && i == travel.size() - 1) {
|
||||
// Apply z_ratio for the very last point
|
||||
Vec2d dest2d = this->point_to_gcode(travel.points[i]);
|
||||
Vec3d dest3d(dest2d(0), dest2d(1), z);
|
||||
gcode += m_writer.travel_to_xyz(dest3d, comment);
|
||||
} else {
|
||||
gcode += m_writer.travel_to_xy(dest2d, comment);
|
||||
// For all points in between, no z change
|
||||
gcode += m_writer.travel_to_xy(this->point_to_gcode(travel.points[i]), comment);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11601,22 +11493,7 @@ int GCode::belt_layer_past_first_layer_band(const Layer *object_layer) const
|
||||
return min_height >= this->first_layer_band_mm() - EPSILON ? 1 : 0;
|
||||
}
|
||||
|
||||
bool GCode::belt_path_height(const ExtrusionPath &path, const Point3 &p, double &height_mm) const
|
||||
{
|
||||
// A belt brim apron band has no Layer of its own, so it publishes its Z through
|
||||
// m_belt_brim_z; without that the belt would be probed at Z=0 and the apron
|
||||
// misjudged for fan and speed.
|
||||
const double z = m_layer ? m_layer->print_z : (m_belt_brim_z ? *m_belt_brim_z : 0.0);
|
||||
const Vec3d point(unscale<double>(p.x()), unscale<double>(p.y()), path.z_contoured ? z + unscale<double>(p.z()) : z);
|
||||
if (! this->belt_height_above_floor(point, height_mm, path.width))
|
||||
return false;
|
||||
// The brim's lines are as wide as the bands are far apart, not as the bead they lay.
|
||||
if (path.role() == erBrim)
|
||||
height_mm = 0.;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GCode::belt_height_above_floor(const Vec3d &point_slicing_mm, double &height_mm, double width) const
|
||||
bool GCode::belt_height_above_floor(const Vec3d &point_slicing_mm, double &height_mm) const
|
||||
{
|
||||
// The owning object, which is what carries the belt description. During
|
||||
// object-brim and coincident-apron emission m_layer still points at whichever
|
||||
@@ -11640,7 +11517,7 @@ bool GCode::belt_height_above_floor(const Vec3d &point_slicing_mm, double &heigh
|
||||
// horizontal slabs in the sliced frame, so the slab holding the material that
|
||||
// rests on the belt at this point is the one within one layer height of it.
|
||||
// A perpendicular measure would shrink the band by 1/cos(tilt).
|
||||
height_mm = point_slicing_mm.z() - floor_z - 0.5 * width * std::abs(sp.belt_floor_shear_factor);
|
||||
height_mm = point_slicing_mm.z() - floor_z;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+15
-38
@@ -127,7 +127,8 @@ public:
|
||||
m_is_first_print(true),
|
||||
m_print_config(&print_config),
|
||||
m_last_wipe_tower_print_z(print_config.z_offset.value),
|
||||
m_sparse_layers_skipped(wipe_tower_sparse_layers_skipped(print_config))
|
||||
m_sparse_layers_skipped(wipe_tower_sparse_layers_skipped(print_config)),
|
||||
m_sparse_layers_combined(wipe_tower_sparse_layers_combined(print_config))
|
||||
{
|
||||
// Precomputed rather than accumulated while emitting, so that the clearance validator and
|
||||
// the emitter cannot disagree about where the compacted tower sits on any given layer.
|
||||
@@ -141,9 +142,7 @@ public:
|
||||
}
|
||||
|
||||
std::string prime(GCode &gcodegen);
|
||||
void next_layer() { ++ m_layer_idx; m_tool_change_idx = 0; m_layer_joined = false; }
|
||||
// The next object layer joined the current tower layer, so its purges print down at that layer's z.
|
||||
void join_layer() { m_layer_joined = true; }
|
||||
void next_layer() { ++ m_layer_idx; m_tool_change_idx = 0; }
|
||||
std::string tool_change(GCode &gcodegen, int extruder_id, bool finish_layer);
|
||||
bool is_empty_wipe_tower_gcode(GCode &gcodegen, int extruder_id, bool finish_layer);
|
||||
std::string finalize(GCode &gcodegen);
|
||||
@@ -160,12 +159,11 @@ public:
|
||||
private:
|
||||
WipeTowerIntegration& operator=(const WipeTowerIntegration&);
|
||||
std::string append_tcr(GCode &gcodegen, const WipeTower::ToolChangeResult &tcr, int new_extruder_id, double z = -1.) const;
|
||||
std::string tower_height_tag(GCode &gcodegen, const WipeTower::ToolChangeResult &tcr, const std::string &tcr_gcode) const;
|
||||
Polyline generate_path_to_wipe_tower(const Point &start_pos, const Point &end_pos, const BoundingBox &avoid_polygon, const Polygons &bed_polygons) const;
|
||||
std::string append_tcr2(GCode &gcodegen, const WipeTower::ToolChangeResult &tcr, int new_extruder_id, double z = -1.) const;
|
||||
std::string travel_to_tower_gap(GCode &gcodegen, const Point &route_start, const Point &start_wipe_pos) const;
|
||||
Vec2f transform_wt2_pt(const Vec2f &pt) const;
|
||||
// The current tower layer's z in the G-code frame, where a joined layer prints its purges.
|
||||
double joined_tower_z() const { return m_tool_changes[m_layer_idx].front().print_z + m_print_config->z_offset.value; }
|
||||
Polygons shared_printable_area(GCode &gcodegen) const;
|
||||
|
||||
// Postprocesses gcode: rotates and moves G1 extrusions and returns result
|
||||
@@ -185,7 +183,6 @@ private:
|
||||
int m_layer_idx;
|
||||
int m_tool_change_idx;
|
||||
double m_last_wipe_tower_print_z;
|
||||
bool m_layer_joined = false;
|
||||
|
||||
// BBS
|
||||
Vec3d m_plate_origin;
|
||||
@@ -200,6 +197,9 @@ private:
|
||||
// wipe_tower_no_sparse_layers, as answered by the shared compaction rule rather than by the raw
|
||||
// option: smooth timelapse and wrapping detection keep a tower on every layer regardless.
|
||||
const bool m_sparse_layers_skipped;
|
||||
// Combined tower layers are thicker than the object layer they sit on, the only case where the
|
||||
// tower's height is not the one process_layer already declared.
|
||||
const bool m_sparse_layers_combined;
|
||||
// Print z of the compacted tower per planned layer. Empty when the tower is not compacted.
|
||||
std::vector<float> m_compacted_tower_z;
|
||||
};
|
||||
@@ -962,12 +962,6 @@ protected:
|
||||
|
||||
// The last extrusion segment was inside the belt's first-layer fan band (see _extrude()).
|
||||
bool m_belt_in_band{false};
|
||||
// The path that the travel being emitted leads to, for the writer's first-layer test on a
|
||||
// belt; null for any other travel.
|
||||
const ExtrusionPath *m_belt_travel_target{nullptr};
|
||||
// For a path cut at the edges of the bands above a belt (see _extrude()), the length, mm,
|
||||
// of the uncut line each of its lines comes from; null for any other path.
|
||||
const std::vector<double> *m_belt_uncut_line_lengths{nullptr};
|
||||
|
||||
std::set<unsigned int> m_initial_layer_extruders;
|
||||
std::vector<std::vector<unsigned int>> m_sorted_layer_filaments;
|
||||
@@ -979,9 +973,6 @@ protected:
|
||||
|
||||
double calc_max_volumetric_speed(const double layer_height, const double line_width, const std::string co_str);
|
||||
std::string _extrude(const ExtrusionPath &path, const std::string &path_description = "", double speed = -1);
|
||||
ExtrusionPaths belt_cut_at_band_edges(const ExtrusionPath &path, std::vector<std::vector<double>> &uncut_line_lengths) const;
|
||||
// _extrude() of a path that stays in one band above the belt (see belt_cut_at_band_edges()).
|
||||
std::string _extrude_piece(const ExtrusionPath &path, const std::string &path_description, double speed);
|
||||
bool _needSAFC(const ExtrusionPath &path);
|
||||
void print_machine_envelope(GCodeOutputStream& file, Print& print);
|
||||
void _print_first_layer_bed_temperature(GCodeOutputStream &file, Print &print, const std::string &gcode, unsigned int first_printing_extruder_id, bool wait);
|
||||
@@ -992,12 +983,10 @@ protected:
|
||||
// Per-point first-layer test. On a belt printer the result depends on the
|
||||
// supplied slicing-frame point (its height above the belt); otherwise we
|
||||
// delegate to the legacy per-layer test. This is the entry point used by
|
||||
// per-path call sites in _extrude and by travels, which pass the width of the
|
||||
// extrusion they lead to (see belt_height_above_floor()). _extrude_piece()
|
||||
// judges a belt path by all of its points (see belt_path_height()).
|
||||
bool on_first_layer(const Vec3d &point_slicing_mm, double width = 0.) const {
|
||||
// per-path call sites in _extrude.
|
||||
bool on_first_layer(const Vec3d &point_slicing_mm) const {
|
||||
double h;
|
||||
if (this->belt_height_above_floor(point_slicing_mm, h, width))
|
||||
if (this->belt_height_above_floor(point_slicing_mm, h))
|
||||
return h <= m_config.initial_layer_print_height.value + EPSILON;
|
||||
return on_first_layer();
|
||||
}
|
||||
@@ -1006,14 +995,12 @@ protected:
|
||||
// first_layer_band_mm() units; otherwise it is the legacy slicing layer index.
|
||||
int effective_layer_index_for_point(const Vec3d &point_slicing_mm) const {
|
||||
double h;
|
||||
if (this->belt_height_above_floor(point_slicing_mm, h))
|
||||
return this->belt_band_index(h);
|
||||
if (this->belt_height_above_floor(point_slicing_mm, h)) {
|
||||
const double lh = this->first_layer_band_mm();
|
||||
return h <= 0. ? 0 : int(std::floor(h / lh));
|
||||
}
|
||||
return on_first_layer() ? 0 : layer_id();
|
||||
}
|
||||
// The effective layer index of a height above the belt.
|
||||
int belt_band_index(double height_mm) const {
|
||||
return height_mm <= 0. ? 0 : int(std::floor(height_mm / this->first_layer_band_mm()));
|
||||
}
|
||||
|
||||
// Band thickness for the *effective layer index*: one first layer height, so
|
||||
// "the first N layers" means the same height above the belt as on a flat bed.
|
||||
@@ -1029,17 +1016,7 @@ protected:
|
||||
// parameters (belt_floor_shear_factor / _from_axis / _z_shift) -- the same
|
||||
// description the support generator uses, independent of every remap and
|
||||
// back-transform.
|
||||
//
|
||||
// With `width`, the point is the nozzle over an extrusion that wide, and the height
|
||||
// is taken above the highest belt under the bead: the belt rises across it, so the
|
||||
// wall of a tilted layer that rests on the belt has its nozzle half a layer plus
|
||||
// half its width x tan(tilt) up, more than one first layer at 45 degrees.
|
||||
bool belt_height_above_floor(const Vec3d &point_slicing_mm, double &height_mm, double width = 0.) const;
|
||||
// Height above the belt of a point of `path` on the layer being emitted, with the nozzle
|
||||
// over the path's bead and the Z offset of a contoured path; false when this is not a belt
|
||||
// print. A brim line rests on the belt by construction, however narrow the spacing of the
|
||||
// bands makes its bead, so it is at 0.
|
||||
bool belt_path_height(const ExtrusionPath &path, const Point3 &p, double &height_mm) const;
|
||||
bool belt_height_above_floor(const Vec3d &point_slicing_mm, double &height_mm) const;
|
||||
// 1 / 0 / -1: the object layer is entirely past the first-layer band above the
|
||||
// belt / reaches into it / the belt surface is not known for it.
|
||||
int belt_layer_past_first_layer_band(const Layer *object_layer) const;
|
||||
|
||||
@@ -157,9 +157,7 @@ static unsigned int region_filament(const ExtrusionEntityCollection &extrusions,
|
||||
return config.bottom_surface_filament_id.value;
|
||||
return config.internal_solid_filament_id.value;
|
||||
}
|
||||
// Orca: Classic gap fill lies inside the outer wall. With one wall, the inner wall filament is not in use.
|
||||
if (extrusions.role() == erGapFill)
|
||||
return config.wall_loops.value > 1 ? config.inner_wall_filament_id.value : config.outer_wall_filament_id.value;
|
||||
// Walls, and the gap fill between them.
|
||||
const ExtrusionEntitiesPtr &walls = extrusions.entities;
|
||||
return !walls.empty() && std::all_of(walls.begin(), walls.end(), [](const ExtrusionEntity *ee) { return is_inner_wall(*ee); }) ?
|
||||
config.inner_wall_filament_id.value : config.outer_wall_filament_id.value;
|
||||
@@ -194,14 +192,6 @@ static double calc_max_layer_height(const PrintConfig &config, double max_object
|
||||
return std::max(max_layer_height, max_object_layer_height);
|
||||
}
|
||||
|
||||
static double calc_min_layer_height(const PrintConfig &config)
|
||||
{
|
||||
double min_layer_height = std::numeric_limits<double>::max();
|
||||
for (size_t i = 0; i < config.nozzle_diameter.values.size(); ++ i)
|
||||
min_layer_height = std::min(min_layer_height, config.min_layer_height.get_at(i));
|
||||
return config.nozzle_diameter.values.empty() ? 0. : min_layer_height;
|
||||
}
|
||||
|
||||
//calculate the flush weight (first value) and filament change count(second value)
|
||||
// Nozzle-aware flush-stat calculator. Resolves each
|
||||
// filament in the print sequence to its physical nozzle via the grouping result and tracks a
|
||||
@@ -1243,48 +1233,13 @@ void ToolOrdering::fill_wipe_tower_partitions(const PrintConfig &config, coordf_
|
||||
}
|
||||
}
|
||||
|
||||
// Calculate the wipe_tower_layer_height values. Precise Z height ends each object at its exact
|
||||
// top, so another object's layers can sit above these by less than the printer's minimum layer
|
||||
// height. A tower layer that thin cannot be printed, and a purge sized for it runs up to hundreds
|
||||
// of mm long, so it joins the tower layer below. The floor matches the towers' own WT_EPSILON
|
||||
// merge, which would otherwise size the joined tool changes with the sliver's height. The EPSILON
|
||||
// margin keeps layers sliced at exactly the minimum height, whose sums round below it, apart.
|
||||
const double min_tower_layer_height = std::max(calc_min_layer_height(config), 1e-3);
|
||||
coordf_t wipe_tower_print_z_last = 0.;
|
||||
// The layer that finishes the current tower layer, and whether any layer of it changes tools.
|
||||
LayerTools *tower_layer_end = nullptr;
|
||||
bool tower_layer_changes = false;
|
||||
unsigned int current_extruder = (unsigned int) -1;
|
||||
for (LayerTools < : m_layer_tools) {
|
||||
lt.wipe_tower_layer_ends = true;
|
||||
// The G-code takes one tower result per tool change, so a layer that changes tools always
|
||||
// takes one; a layer that does not takes one only when it finishes the tower layer.
|
||||
const bool changes = ! lt.extruders.empty() &&
|
||||
(current_extruder == (unsigned int) -1 || lt.extruders.size() > 1 || lt.extruders.front() != current_extruder);
|
||||
if (! lt.extruders.empty())
|
||||
current_extruder = lt.extruders.back();
|
||||
if (! lt.has_wipe_tower)
|
||||
continue;
|
||||
// Only a layer that prints joins, so the tower layer is always finished by a printing layer.
|
||||
if (tower_layer_end != nullptr && ! lt.extruders.empty() && lt.print_z - wipe_tower_print_z_last + EPSILON < min_tower_layer_height) {
|
||||
lt.wipe_tower_print_z = tower_layer_end->wipe_tower_print_z;
|
||||
lt.wipe_tower_layer_height = tower_layer_end->wipe_tower_layer_height;
|
||||
// The finish rides on the last tool change of the joined layers, as it does on its own
|
||||
// layer: one that takes over after the last result is gone has nothing left to print.
|
||||
if (changes || ! tower_layer_changes) {
|
||||
tower_layer_end->wipe_tower_layer_ends = false;
|
||||
tower_layer_end = <
|
||||
} else
|
||||
lt.wipe_tower_layer_ends = false;
|
||||
tower_layer_changes |= changes;
|
||||
} else {
|
||||
lt.wipe_tower_print_z = lt.print_z;
|
||||
// Calculate the wipe_tower_layer_height values.
|
||||
coordf_t wipe_tower_print_z_last = 0.;
|
||||
for (LayerTools < : m_layer_tools)
|
||||
if (lt.has_wipe_tower) {
|
||||
lt.wipe_tower_layer_height = lt.print_z - wipe_tower_print_z_last;
|
||||
wipe_tower_print_z_last = lt.print_z;
|
||||
tower_layer_end = <
|
||||
tower_layer_changes = changes;
|
||||
wipe_tower_print_z_last = lt.print_z;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ToolOrdering::collect_extruder_statistics(bool prime_multi_material)
|
||||
|
||||
@@ -187,13 +187,6 @@ public:
|
||||
// and to support the wipe tower partitions above this one.
|
||||
size_t wipe_tower_partitions = 0;
|
||||
coordf_t wipe_tower_layer_height = 0.;
|
||||
// print_z of the wipe tower layer this layer's tool changes print on. A layer too thin to be
|
||||
// its own tower layer joins the one below, keeping that layer's z and height.
|
||||
coordf_t wipe_tower_print_z = 0.;
|
||||
// Whether this layer finishes its wipe tower layer. Of a tower layer and the layers joined to
|
||||
// it, that is the last one changing tools, or the last one when none does.
|
||||
bool wipe_tower_layer_ends = true;
|
||||
bool joins_wipe_tower_layer_below() const { return has_wipe_tower && wipe_tower_print_z != print_z; }
|
||||
// Custom G-code (color change, extruder switch, pause) to be performed before this layer starts to print.
|
||||
const CustomGCode::Item *custom_gcode = nullptr;
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#include "WipePathHelpers.hpp"
|
||||
|
||||
#include "../AABBTreeLines.hpp"
|
||||
#include "libslic3r/BoundingBox.hpp"
|
||||
#include "libslic3r/ExtrusionEntity.hpp"
|
||||
#include "libslic3r/Line.hpp"
|
||||
#include "libslic3r/Point.hpp"
|
||||
@@ -34,7 +33,7 @@ void WipeInwardSupport::append(const ExtrusionEntity &entity)
|
||||
is_internal_perimeter(entity.role());
|
||||
const Lines lines = entity.as_polyline().lines();
|
||||
printed_lines.insert(printed_lines.end(), lines.begin(), lines.end());
|
||||
if (is_inner && ! inner_lines_complete)
|
||||
if (is_inner)
|
||||
inner_lines.insert(inner_lines.end(), lines.begin(), lines.end());
|
||||
}
|
||||
|
||||
@@ -514,11 +513,7 @@ static std::optional<Vec2d> support_offset_at_start(
|
||||
const Vec2d support_edge = (nearest_line.b - nearest_line.a).cast<double>();
|
||||
if (support_edge.norm() > SCALED_EPSILON) {
|
||||
const Vec2d support_tangent = support_edge.normalized();
|
||||
const Vec2d normal_offset = sampled_offset - support_tangent * sampled_offset.dot(support_tangent);
|
||||
// At a shared endpoint the selected edge may erase the entire
|
||||
// direction to the inner wall. Keep the endpoint vector in that case.
|
||||
if (normal_offset.norm() > SCALED_EPSILON)
|
||||
sampled_offset = normal_offset;
|
||||
sampled_offset -= support_tangent * sampled_offset.dot(support_tangent);
|
||||
}
|
||||
}
|
||||
if (sampled_offset.norm() <= SCALED_EPSILON)
|
||||
@@ -531,20 +526,10 @@ static std::optional<Vec2d> support_offset_at_start(
|
||||
// sampled point itself would add the distance already travelled along the
|
||||
// perimeter and turn a normal transition into a long diagonal move.
|
||||
const Vec2d sampled_direction = sampled_offset.normalized();
|
||||
// Use the same corner reach as support validation. A displacement measured
|
||||
// at the sample is not an available offset at the actual wall endpoint.
|
||||
const double max_local_distance = miter_limit * max_support_distance + 4. * SCALED_EPSILON;
|
||||
Point local_support;
|
||||
nearest_line.distance_to_squared(local_origin, &local_support);
|
||||
const Vec2d branch_offset = (local_support - local_origin).cast<double>();
|
||||
const double branch_distance = branch_offset.norm();
|
||||
std::optional<Vec2d> local_offset;
|
||||
// The sampled branch may end before the seam. Its local endpoint remains
|
||||
// usable even when the direction there differs from the sampled normal.
|
||||
if (branch_distance > SCALED_EPSILON && branch_distance <= max_local_distance)
|
||||
local_offset = branch_offset;
|
||||
Vec2d local_offset = sampled_offset;
|
||||
double best_local_score = std::numeric_limits<double>::infinity();
|
||||
for (size_t line_index : support_distancer.all_lines_in_radius(local_origin, max_local_distance)) {
|
||||
for (size_t line_index : support_distancer.all_lines_in_radius(
|
||||
local_origin, 2. * max_support_distance + 4. * SCALED_EPSILON)) {
|
||||
Point local_support;
|
||||
const Line &line = support_distancer.get_line(line_index);
|
||||
const double distance_squared = line.distance_to_squared(local_origin, &local_support);
|
||||
@@ -701,34 +686,14 @@ bool offset_wipe_path_toward_support(Polyline &polyline, Point seam_start, Point
|
||||
max_wipe_length <= SCALED_EPSILON || max_support_distance <= SCALED_EPSILON)
|
||||
return false;
|
||||
|
||||
// Orca: the executable path stays within the wipe length of its start, and
|
||||
// support and side queries reach at most twice the corner reach beyond it.
|
||||
// Keep only the printed walls in that area, so an island with many holes
|
||||
// does not build trees of its whole printed prefix for every external loop.
|
||||
BoundingBox seam_area(Points{seam_start, seam_end, wipe_start});
|
||||
seam_area.offset(max_wipe_length + 2. * miter_limit * max_support_distance);
|
||||
const auto lines_near_seam = [&seam_area](const Lines &lines) {
|
||||
Lines result;
|
||||
for (const Line &line : lines)
|
||||
if (std::max(line.a.x(), line.b.x()) >= seam_area.min.x() &&
|
||||
std::min(line.a.x(), line.b.x()) <= seam_area.max.x() &&
|
||||
std::max(line.a.y(), line.b.y()) >= seam_area.min.y() &&
|
||||
std::min(line.a.y(), line.b.y()) <= seam_area.max.y())
|
||||
result.push_back(line);
|
||||
return result;
|
||||
};
|
||||
const Lines target_lines = lines_near_seam(target_perimeter_lines);
|
||||
if (target_lines.empty())
|
||||
return false;
|
||||
|
||||
Lines material_support_lines;
|
||||
const Lines *candidate_support_lines = &target_lines;
|
||||
const Lines *candidate_support_lines = &target_perimeter_lines;
|
||||
if (seam_start == seam_end) {
|
||||
// Orca: another contour may have a geometrically closer inner wall on
|
||||
// this loop's air side. Restrict zero-gap support using the local seam
|
||||
// normals before choosing the nearest wall.
|
||||
material_support_lines = material_side_support_lines(
|
||||
polyline, seam_start, preferred_dir, target_lines);
|
||||
polyline, seam_start, preferred_dir, target_perimeter_lines);
|
||||
if (material_support_lines.empty())
|
||||
return false;
|
||||
candidate_support_lines = &material_support_lines;
|
||||
@@ -750,7 +715,7 @@ bool offset_wipe_path_toward_support(Polyline &polyline, Point seam_start, Point
|
||||
// Orca: every candidate is validated against the same generated geometry.
|
||||
// Build these AABB trees once per loop instead of rebuilding them for each
|
||||
// preferred, alternate, translated, direct, or reversed candidate.
|
||||
Lines all_support_lines = lines_near_seam(printed_perimeter_lines);
|
||||
Lines all_support_lines = printed_perimeter_lines;
|
||||
all_support_lines.insert(all_support_lines.end(), current_perimeter_lines.begin(), current_perimeter_lines.end());
|
||||
AABBTreeLines::LinesDistancer<Line> all_support_distancer(std::move(all_support_lines));
|
||||
AABBTreeLines::LinesDistancer<Line> current_perimeter_distancer(current_perimeter_lines);
|
||||
@@ -768,9 +733,10 @@ bool offset_wipe_path_toward_support(Polyline &polyline, Point seam_start, Point
|
||||
double path_length;
|
||||
};
|
||||
|
||||
// Check direction from the actual nozzle position, while retaining the
|
||||
// construction's wall endpoint for connector intersection checks.
|
||||
const auto validate_candidate = [&](Polyline path, Point path_start,
|
||||
// Direction and wall contact have different origins after a loop pre-move.
|
||||
// Keep the construction's wall endpoint for intersection checks even when
|
||||
// the candidate's direction must be checked from the current nozzle position.
|
||||
const auto validate_candidate = [&](Polyline path, Point path_start, Point direction_start,
|
||||
double path_contact_tolerance,
|
||||
const Vec2d &candidate_support_direction,
|
||||
double candidate_offset,
|
||||
@@ -783,7 +749,7 @@ bool offset_wipe_path_toward_support(Polyline &polyline, Point seam_start, Point
|
||||
// than the requested offset. Preserve the zero-gap clearance rule, but
|
||||
// check direction and local material side independently for every gap.
|
||||
const bool material_side = wipe_path_stays_on_material_side(
|
||||
path, wipe_start, candidate_support_direction,
|
||||
path, direction_start, candidate_support_direction,
|
||||
support_distancer, current_perimeter_distancer, candidate_offset,
|
||||
require_clearance && seam_start == seam_end);
|
||||
const bool connector_clear = initial_connector_is_clear(
|
||||
@@ -803,7 +769,7 @@ bool offset_wipe_path_toward_support(Polyline &polyline, Point seam_start, Point
|
||||
if (! offset_wipe_path(path, seam_start, seam_end, wipe_start, dir,
|
||||
effective_offset, max_wipe_length))
|
||||
return std::nullopt;
|
||||
return validate_candidate(std::move(path), seam_start,
|
||||
return validate_candidate(std::move(path), seam_start, seam_start,
|
||||
contact_tolerance, support_direction, effective_offset);
|
||||
};
|
||||
|
||||
@@ -824,7 +790,7 @@ bool offset_wipe_path_toward_support(Polyline &polyline, Point seam_start, Point
|
||||
candidate_translation, max_wipe_length))
|
||||
return std::nullopt;
|
||||
const double candidate_tolerance = wipe_tolerance(candidate_offset);
|
||||
return validate_candidate(std::move(source), source_start, candidate_tolerance,
|
||||
return validate_candidate(std::move(source), source_start, source_start, candidate_tolerance,
|
||||
candidate_support_offset / support_distance, candidate_offset);
|
||||
};
|
||||
|
||||
@@ -849,7 +815,7 @@ bool offset_wipe_path_toward_support(Polyline &polyline, Point seam_start, Point
|
||||
const double candidate_tolerance = wipe_tolerance(candidate_offset);
|
||||
// Check the executed direction from the nozzle after any loop pre-move,
|
||||
// but retain the wall origin for the connector's intersection checks.
|
||||
return validate_candidate(std::move(path), origin,
|
||||
return validate_candidate(std::move(path), origin, wipe_start,
|
||||
candidate_tolerance, direction, candidate_offset, false);
|
||||
};
|
||||
std::optional<Candidate> direct = direct_candidate(seam_end, toward_support);
|
||||
@@ -876,7 +842,7 @@ bool offset_wipe_path_toward_support(Polyline &polyline, Point seam_start, Point
|
||||
offset_wipe_path(reversed_source, seam_end, seam_start, wipe_start,
|
||||
-preferred_dir, reverse_offset, max_wipe_length)) {
|
||||
reversed_source.points.front() = seam_start;
|
||||
auto candidate = validate_candidate(std::move(reversed_source), seam_end,
|
||||
auto candidate = validate_candidate(std::move(reversed_source), seam_end, seam_end,
|
||||
wipe_tolerance(reverse_offset), reversed_support_offset->normalized(), reverse_offset);
|
||||
if (candidate && (! reversed ||
|
||||
(candidate->path_length > reversed->path_length + length_margin &&
|
||||
|
||||
@@ -11,13 +11,9 @@ namespace Slic3r {
|
||||
|
||||
// Printed prefix of one region's perimeter sequence. Append each entity only
|
||||
// after extrusion; later walls and other regions cannot support an inward wipe.
|
||||
// When the adjacent inner wall is printed after the external wall, all inner
|
||||
// walls are collected in advance as targets: they identify the inward side
|
||||
// and the local wall count, while only printed walls support the path.
|
||||
struct WipeInwardSupport {
|
||||
Lines printed_lines;
|
||||
Lines inner_lines;
|
||||
bool inner_lines_complete = false;
|
||||
void append(const ExtrusionEntity &entity);
|
||||
};
|
||||
|
||||
|
||||
@@ -746,6 +746,9 @@ public:
|
||||
m_enable_arc_fitting(enable_arc_fitting),
|
||||
m_filpar(filament_parameters)
|
||||
{
|
||||
// ORCA: This class is only used by BBL printers, so set the parameter appropriately.
|
||||
// This fixes an issue where the wipe tower was using BBL tags resulting in statistics for purging in the purge tower not being displayed.
|
||||
GCodeProcessor::s_IsBBLPrinter = true;
|
||||
// adds tag for analyzer:
|
||||
std::ostringstream str;
|
||||
str << ";" << GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Height) << Slic3r::float_to_string_decimal_point(m_layer_height, 6) << "\n"; // don't rely on GCodeAnalyzer knowing the layer height - it knows nothing at priming
|
||||
|
||||
@@ -353,6 +353,9 @@ public:
|
||||
m_gcode_flavor(flavor), m_filpar(filament_parameters)
|
||||
//m_enable_arc_fitting(enable_arc_fitting)
|
||||
{
|
||||
// ORCA: This class is only used by non BBL printers, so set the parameter appropriately.
|
||||
// This fixes an issue where the wipe tower was using BBL tags resulting in statistics for purging in the purge tower not being displayed.
|
||||
GCodeProcessor::s_IsBBLPrinter = false;
|
||||
// adds tag for analyzer:
|
||||
std::ostringstream str;
|
||||
str << ";" << GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Height) << m_layer_height << "\n"; // don't rely on GCodeAnalyzer knowing the layer height - it knows nothing at priming
|
||||
|
||||
@@ -1104,35 +1104,28 @@ std::string GCodeWriter::travel_to_xyz(const Vec3d &point, const std::string &co
|
||||
this->set_current_position_clear(true);
|
||||
return this->travel_to_xy(to_2d(point));
|
||||
}
|
||||
// A lifted nozzle that has to end lower travels at the lifted height and descends at the
|
||||
// target, so it never sinks while crossing the print.
|
||||
const bool descend_after_xy = m_lifted > EPSILON && point(2) < m_pos(2) - EPSILON && this->is_current_position_clear() &&
|
||||
(to_2d(point) - to_2d(m_pos)).norm() > EPSILON;
|
||||
/* In all the other cases, we move to the target Z and cancel the lift: in a single XYZ move,
|
||||
or XY first and then Z after a filament change or when coming down from a lift. */
|
||||
m_lifted = 0;
|
||||
else {
|
||||
/* In all the other cases, we perform an actual XYZ move and cancel
|
||||
the lift. */
|
||||
m_lifted = 0;
|
||||
}
|
||||
|
||||
//BBS: take plate offset into consider
|
||||
Vec3d point_on_plate = { dest_point(0) - m_x_offset, dest_point(1) - m_y_offset, dest_point(2) };
|
||||
std::string out_string;
|
||||
GCodeG1Formatter w(config.high_precision_gcode.value);
|
||||
if (has_axis_remap() && !descend_after_xy) {
|
||||
if (has_axis_remap()) {
|
||||
// Remap may couple XY with Z; emit full XYZ in machine coordinates.
|
||||
w.emit_xyz(apply_axis_remap(point_on_plate));
|
||||
w.emit_f(final_travel_speed * 60.0);
|
||||
w.emit_comment(GCodeWriter::full_gcode_comment, comment);
|
||||
out_string = w.string();
|
||||
} else if (!this->is_current_position_clear() || descend_after_xy)
|
||||
} else if (!this->is_current_position_clear())
|
||||
{
|
||||
//force to move xy first then z after filament change, or when coming down from a lift
|
||||
if (has_axis_remap())
|
||||
w.emit_xyz(apply_axis_remap(Vec3d(point_on_plate.x(), point_on_plate.y(), m_pos(2))));
|
||||
else
|
||||
w.emit_xy(Vec2d(point_on_plate.x(), point_on_plate.y()));
|
||||
//force to move xy first then z after filament change
|
||||
w.emit_xy(Vec2d(point_on_plate.x(), point_on_plate.y()));
|
||||
w.emit_f(final_travel_speed * 60.0);
|
||||
w.emit_comment(GCodeWriter::full_gcode_comment, comment);
|
||||
// The Z move happens at the target, so it is emitted and timed from there.
|
||||
m_pos = Vec3d(dest_point.x(), dest_point.y(), m_pos(2));
|
||||
out_string = w.string() + _travel_to_z(point_on_plate.z(), comment);
|
||||
} else {
|
||||
GCodeG1Formatter w(config.high_precision_gcode.value);
|
||||
|
||||
@@ -271,10 +271,6 @@ triangle_mesh_to_cgal(const std::vector<stl_vertex> &V,
|
||||
{
|
||||
std::unique_ptr<CGALMesh, CGALMeshDeleter> out(new CGALMesh{});
|
||||
triangle_mesh_to_cgal(V, F, out->m);
|
||||
// CGAL's volume predicate dereferences an incident halfedge for every vertex.
|
||||
// Remove isolated vertices and compact their indices for conversion back to an ITS.
|
||||
if (CGALProc::remove_isolated_vertices(out->m) != 0)
|
||||
out->m.collect_garbage();
|
||||
return out;
|
||||
}
|
||||
|
||||
|
||||
+8
-46
@@ -251,9 +251,7 @@ Model Model::read_from_step(const std::string&
|
||||
bool is_cb_cancel = false;
|
||||
Step::Step_Status status;
|
||||
Step step_file(input_file, stepFn);
|
||||
step_file.set_keep_original_names(options & LoadStrategy::KeepOriginalNames);
|
||||
// A geometry-import dialog can enable names after load, so collect them for that path too.
|
||||
status = step_file.load(step_file.keep_original_names() || (options & LoadStrategy::AssembleParts));
|
||||
status = step_file.load();
|
||||
if(status != Step::Step_Status::LOAD_SUCCESS) {
|
||||
goto _finished;
|
||||
}
|
||||
@@ -264,9 +262,7 @@ Model Model::read_from_step(const std::string&
|
||||
}
|
||||
}
|
||||
|
||||
// The callback may have changed the name preference after inspecting the CAD document.
|
||||
status = step_file.mesh(&model, is_cb_cancel, is_split_compound, linear_deflection, angle_deflection,
|
||||
step_file.keep_original_names());
|
||||
status = step_file.mesh(&model, is_cb_cancel, is_split_compound, linear_deflection, angle_deflection);
|
||||
|
||||
_finished:
|
||||
|
||||
@@ -467,7 +463,7 @@ Model Model::read_from_file(const std::string&
|
||||
result = load_drc(input_file.c_str(), &model);
|
||||
else if (boost::algorithm::iends_with(input_file, ".amf"))
|
||||
//BBS: is_xxx is used for is_inches when load amf
|
||||
result = load_amf(input_file.c_str(), config, config_substitutions, &model, is_xxx, options);
|
||||
result = load_amf(input_file.c_str(), config, config_substitutions, &model, is_xxx);
|
||||
else if (boost::algorithm::iends_with(input_file, ".3mf"))
|
||||
//BBS: add part plate related logic
|
||||
// BBS: backup & restore
|
||||
@@ -547,7 +543,7 @@ Model Model::read_from_archive(const std::string& input_file, DynamicPrintConfig
|
||||
}
|
||||
}
|
||||
else if (boost::algorithm::iends_with(input_file, ".zip.amf"))
|
||||
result = load_amf(input_file.c_str(), config, config_substitutions, &model, &is_bbl_3mf, options);
|
||||
result = load_amf(input_file.c_str(), config, config_substitutions, &model, &is_bbl_3mf);
|
||||
else
|
||||
throw Slic3r::RuntimeError(_L("Unknown file format: input file must have .3mf or .zip.amf extension."));
|
||||
|
||||
@@ -908,8 +904,7 @@ bool Model::looks_like_multipart_object() const
|
||||
if (obj->volumes.size() > 1 || obj->config.keys().size() > 1)
|
||||
return false;
|
||||
|
||||
// Objects the file does not place have no instance yet; they read zero, as min_z() did in Release builds.
|
||||
double zmin_this = obj->instances.empty() ? 0. : obj->min_z();
|
||||
double zmin_this = obj->min_z();
|
||||
if (zmin == std::numeric_limits<double>::max())
|
||||
zmin = zmin_this;
|
||||
else if (std::abs(zmin - zmin_this) > EPSILON)
|
||||
@@ -928,7 +923,7 @@ static inline int auto_extruder_id(unsigned int max_extruders, unsigned int &cnt
|
||||
return out;
|
||||
}
|
||||
|
||||
void Model::convert_multipart_object(unsigned int max_extruders, bool preserve_volume_names)
|
||||
void Model::convert_multipart_object(unsigned int max_extruders)
|
||||
{
|
||||
assert(this->objects.size() >= 2);
|
||||
if (this->objects.size() < 2)
|
||||
@@ -950,13 +945,9 @@ void Model::convert_multipart_object(unsigned int max_extruders, bool preserve_v
|
||||
// Revert the centering operation.
|
||||
trafo_volume.set_offset(trafo_volume.get_offset() - o->origin_translation);
|
||||
int counter = 1;
|
||||
auto copy_volume = [o, v, &counter, preserve_volume_names](ModelVolume *new_v) {
|
||||
auto copy_volume = [o, v, &counter](ModelVolume *new_v) {
|
||||
assert(new_v != nullptr);
|
||||
// Existing callers keep their naming; CAD import retains a concrete part name.
|
||||
if (preserve_volume_names)
|
||||
new_v->name = v->name.empty() ? o->name : v->name;
|
||||
else
|
||||
new_v->name = (counter > 1) ? o->name + "_" + std::to_string(counter++) : o->name;
|
||||
new_v->name = (counter > 1) ? o->name + "_" + std::to_string(counter++) : o->name;
|
||||
//BBS: Use extruder priority: volumn > object > default
|
||||
if (v->config.option("extruder"))
|
||||
new_v->config.set("extruder", v->config.extruder());
|
||||
@@ -1294,7 +1285,6 @@ ModelObject& ModelObject::assign_copy(const ModelObject &rhs)
|
||||
this->layer_height_profile = rhs.layer_height_profile;
|
||||
this->printable = rhs.printable;
|
||||
this->auto_drop = rhs.auto_drop;
|
||||
this->imported_parts_hidden = rhs.imported_parts_hidden;
|
||||
this->origin_translation = rhs.origin_translation;
|
||||
this->cut_id.copy(rhs.cut_id);
|
||||
this->copy_transformation_caches(rhs);
|
||||
@@ -1336,7 +1326,6 @@ ModelObject& ModelObject::assign_copy(ModelObject &&rhs)
|
||||
this->layer_height_profile = std::move(rhs.layer_height_profile);
|
||||
this->printable = std::move(rhs.printable);
|
||||
this->auto_drop = rhs.auto_drop;
|
||||
this->imported_parts_hidden = rhs.imported_parts_hidden;
|
||||
this->origin_translation = std::move(rhs.origin_translation);
|
||||
this->copy_transformation_caches(rhs);
|
||||
|
||||
@@ -1399,8 +1388,6 @@ bool ModelObject::make_boolean(ModelObject *cut_object, const std::string &boole
|
||||
|
||||
ModelVolume *ModelObject::add_volume(const TriangleMesh &mesh, bool modify_to_center_geometry)
|
||||
{
|
||||
// Newly added parts must remain visible even on a single-object import.
|
||||
imported_parts_hidden = false;
|
||||
ModelVolume* v = new ModelVolume(this, mesh);
|
||||
this->volumes.push_back(v);
|
||||
if (modify_to_center_geometry) {
|
||||
@@ -1414,7 +1401,6 @@ ModelVolume *ModelObject::add_volume(const TriangleMesh &mesh, bool modify_to_ce
|
||||
|
||||
ModelVolume *ModelObject::add_volume(TriangleMesh &&mesh, ModelVolumeType type /*= ModelVolumeType::MODEL_PART*/, bool modify_to_center_geometry)
|
||||
{
|
||||
imported_parts_hidden = false;
|
||||
ModelVolume* v = new ModelVolume(this, std::move(mesh), type);
|
||||
this->volumes.push_back(v);
|
||||
if (modify_to_center_geometry) {
|
||||
@@ -1428,7 +1414,6 @@ ModelVolume *ModelObject::add_volume(TriangleMesh &&mesh, ModelVolumeType type /
|
||||
|
||||
ModelVolume* ModelObject::add_volume(const ModelVolume &other, ModelVolumeType type /*= ModelVolumeType::INVALID*/)
|
||||
{
|
||||
imported_parts_hidden = false;
|
||||
ModelVolume* v = new ModelVolume(this, other);
|
||||
if (type != ModelVolumeType::INVALID && v->type() != type)
|
||||
v->set_type(type);
|
||||
@@ -1446,7 +1431,6 @@ ModelVolume* ModelObject::add_volume(const ModelVolume &other, ModelVolumeType t
|
||||
|
||||
ModelVolume* ModelObject::add_volume(const ModelVolume &other, TriangleMesh &&mesh)
|
||||
{
|
||||
imported_parts_hidden = false;
|
||||
ModelVolume* v = new ModelVolume(this, other, std::move(mesh));
|
||||
this->volumes.push_back(v);
|
||||
v->center_geometry_after_creation();
|
||||
@@ -1458,7 +1442,6 @@ ModelVolume* ModelObject::add_volume(const ModelVolume &other, TriangleMesh &&me
|
||||
|
||||
ModelVolume* ModelObject::add_volume_with_shared_mesh(const ModelVolume &other, ModelVolumeType type /*= ModelVolumeType::INVALID*/)
|
||||
{
|
||||
imported_parts_hidden = false;
|
||||
ModelVolume* v = new ModelVolume(this, other.m_mesh);
|
||||
if (type != ModelVolumeType::INVALID && v->type() != type)
|
||||
v->set_type(type);
|
||||
@@ -1528,27 +1511,6 @@ bool ModelObject::is_fuzzy_skin_painted() const
|
||||
return std::any_of(this->volumes.cbegin(), this->volumes.cend(), [](const ModelVolume *mv) { return mv->is_fuzzy_skin_painted(); });
|
||||
}
|
||||
|
||||
bool ModelObject::has_individual_part_settings() const
|
||||
{
|
||||
// Copying objects gives them filament 1, and merging copies it to their parts.
|
||||
const int object_extruder = this->config.has("extruder") && this->config.extruder() > 0 ? this->config.extruder() : 1;
|
||||
const bool part_settings = std::any_of(this->volumes.cbegin(), this->volumes.cend(), [object_extruder](const ModelVolume *mv) {
|
||||
if (!mv->is_model_part() || !mv->texture_displacement_layers.empty())
|
||||
return true;
|
||||
const size_t keys = mv->config.size();
|
||||
const bool same_filament = keys == 1 && mv->config.has("extruder") &&
|
||||
(mv->config.extruder() == 0 || mv->config.extruder() == object_extruder);
|
||||
return keys > 0 && !same_filament;
|
||||
});
|
||||
return part_settings || this->is_fdm_support_painted() || this->is_seam_painted() || this->is_mm_painted() ||
|
||||
this->is_fuzzy_skin_painted();
|
||||
}
|
||||
|
||||
bool ModelObject::hides_imported_parts() const
|
||||
{
|
||||
return this->imported_parts_hidden && this->volumes.size() > 1 && !this->has_individual_part_settings();
|
||||
}
|
||||
|
||||
void ModelObject::sort_volumes(bool full_sort)
|
||||
{
|
||||
// sort volumes inside the object to order "Model Part, Negative Volume, Modifier, Support Blocker and Support Enforcer. "
|
||||
|
||||
+7
-17
@@ -403,9 +403,6 @@ public:
|
||||
// Whether this object is snapped to the build plate after transformations.
|
||||
// Instance Z offsets are shared by all instances of an object.
|
||||
bool auto_drop { true };
|
||||
// Single-object import keeps named bodies internally until the user reveals its parts.
|
||||
// A stored choice: part settings or painting still show the parts, see hides_imported_parts().
|
||||
bool imported_parts_hidden { false };
|
||||
|
||||
// This vector holds position of selected support points for SLA. The data are
|
||||
// saved in mesh coordinates to allow using them for several instances.
|
||||
@@ -461,11 +458,6 @@ public:
|
||||
bool is_mm_painted() const;
|
||||
// Checks if any of object volume is painted using the fuzzy skin painting gizmo.
|
||||
bool is_fuzzy_skin_painted() const;
|
||||
// Whether a part has settings or painting of its own; a part that only repeats the object's filament has none.
|
||||
bool has_individual_part_settings() const;
|
||||
// Whether the object list shows a single-object import without its parts. Never true while
|
||||
// a part has its own settings or painting, so effective per-part controls stay visible.
|
||||
bool hides_imported_parts() const;
|
||||
// This object may have a varying layer height by painting or by a table.
|
||||
// Even if true is returned, the layer height profile may be "flat" with no difference to default layering.
|
||||
bool has_custom_layering() const
|
||||
@@ -717,7 +709,7 @@ private:
|
||||
Internal::StaticSerializationWrapper<ModelConfigObject const> config_wrapper(config);
|
||||
Internal::StaticSerializationWrapper<LayerHeightProfile const> layer_heigth_profile_wrapper(layer_height_profile);
|
||||
ar(name, module_name, input_file, instances, volumes, config_wrapper, layer_config_ranges, layer_heigth_profile_wrapper,
|
||||
sla_support_points, sla_points_status, sla_drain_holes, printable, auto_drop, imported_parts_hidden, origin_translation, brim_points,
|
||||
sla_support_points, sla_points_status, sla_drain_holes, printable, auto_drop, origin_translation, brim_points,
|
||||
m_bounding_box_approx, m_bounding_box_approx_valid,
|
||||
m_bounding_box_exact, m_bounding_box_exact_valid, m_min_max_z_valid,
|
||||
m_raw_bounding_box, m_raw_bounding_box_valid, m_raw_mesh_bounding_box, m_raw_mesh_bounding_box_valid,
|
||||
@@ -730,7 +722,7 @@ private:
|
||||
// BBS: add backup, check modify
|
||||
SaveObjectGaurd gaurd(*this);
|
||||
ar(name, module_name, input_file, instances, volumes, config_wrapper, layer_config_ranges, layer_heigth_profile_wrapper,
|
||||
sla_support_points, sla_points_status, sla_drain_holes, printable, auto_drop, imported_parts_hidden, origin_translation, brim_points,
|
||||
sla_support_points, sla_points_status, sla_drain_holes, printable, auto_drop, origin_translation, brim_points,
|
||||
m_bounding_box_approx, m_bounding_box_approx_valid,
|
||||
m_bounding_box_exact, m_bounding_box_exact_valid, m_min_max_z_valid,
|
||||
m_raw_bounding_box, m_raw_bounding_box_valid, m_raw_mesh_bounding_box, m_raw_mesh_bounding_box_valid,
|
||||
@@ -840,8 +832,6 @@ class ModelVolume final : public ObjectBase
|
||||
{
|
||||
public:
|
||||
std::string name;
|
||||
// Session-only tree position; snapshots preserve it without changing project file order.
|
||||
int import_display_order { -1 };
|
||||
// struct used by reload from disk command to recover data from disk
|
||||
struct Source
|
||||
{
|
||||
@@ -1263,7 +1253,7 @@ private:
|
||||
// Copying an existing volume, therefore this volume will get a copy of the ID assigned.
|
||||
ModelVolume(ModelObject *object, const ModelVolume &other) :
|
||||
ObjectBase(other),
|
||||
name(other.name), import_display_order(other.import_display_order), source(other.source), m_mesh(other.m_mesh), m_convex_hull(other.m_convex_hull),
|
||||
name(other.name), source(other.source), m_mesh(other.m_mesh), m_convex_hull(other.m_convex_hull),
|
||||
config(other.config), m_type(other.m_type), object(object), m_transformation(other.m_transformation),
|
||||
supported_facets(other.supported_facets), seam_facets(other.seam_facets), mmu_segmentation_facets(other.mmu_segmentation_facets),
|
||||
fuzzy_skin_facets(other.fuzzy_skin_facets),
|
||||
@@ -1296,7 +1286,7 @@ private:
|
||||
}
|
||||
// Providing a new mesh, therefore this volume will get a new unique ID assigned.
|
||||
ModelVolume(ModelObject *object, const ModelVolume &other, TriangleMesh &&mesh) :
|
||||
name(other.name), import_display_order(other.import_display_order), source(other.source), config(other.config), object(object), m_mesh(new TriangleMesh(std::move(mesh))), m_type(other.m_type), m_transformation(other.m_transformation),
|
||||
name(other.name), source(other.source), config(other.config), object(object), m_mesh(new TriangleMesh(std::move(mesh))), m_type(other.m_type), m_transformation(other.m_transformation),
|
||||
cut_info(other.cut_info), text_configuration(other.text_configuration), emboss_shape(other.emboss_shape)
|
||||
{
|
||||
assert(this->id().valid());
|
||||
@@ -1353,7 +1343,7 @@ private:
|
||||
// BBS: add backup, check modify
|
||||
bool mesh_changed = false;
|
||||
auto tr = m_transformation;
|
||||
ar(name, import_display_order, source, m_mesh, m_type, m_material_id, m_transformation, m_is_splittable, has_convex_hull, cut_info);
|
||||
ar(name, source, m_mesh, m_type, m_material_id, m_transformation, m_is_splittable, has_convex_hull, cut_info);
|
||||
mesh_changed |= !(tr == m_transformation);
|
||||
auto t = supported_facets.timestamp();
|
||||
cereal::load_by_value(ar, supported_facets);
|
||||
@@ -1389,7 +1379,7 @@ private:
|
||||
}
|
||||
template<class Archive> void save(Archive &ar) const {
|
||||
bool has_convex_hull = m_convex_hull.get() != nullptr;
|
||||
ar(name, import_display_order, source, m_mesh, m_type, m_material_id, m_transformation, m_is_splittable, has_convex_hull, cut_info);
|
||||
ar(name, source, m_mesh, m_type, m_material_id, m_transformation, m_is_splittable, has_convex_hull, cut_info);
|
||||
cereal::save_by_value(ar, supported_facets);
|
||||
cereal::save_by_value(ar, seam_facets);
|
||||
cereal::save_by_value(ar, mmu_segmentation_facets);
|
||||
@@ -1855,7 +1845,7 @@ public:
|
||||
void duplicate_objects_grid(size_t x, size_t y, coordf_t dist);
|
||||
|
||||
bool looks_like_multipart_object() const;
|
||||
void convert_multipart_object(unsigned int max_extruders, bool preserve_volume_names = false);
|
||||
void convert_multipart_object(unsigned int max_extruders);
|
||||
bool looks_like_imperial_units() const;
|
||||
void convert_from_imperial_units(bool only_small_volumes);
|
||||
bool looks_like_saved_in_meters() const;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#include "ParameterUtils.hpp"
|
||||
#include "PrintConfig.hpp"
|
||||
#include <boost/log/trivial.hpp>
|
||||
#include <cassert>
|
||||
#include <vector>
|
||||
#include <cstddef>
|
||||
@@ -12,26 +11,19 @@ namespace Slic3r {
|
||||
std::vector<LayerPrintSequence> get_other_layers_print_sequence(int sequence_nums, const std::vector<int> &sequence)
|
||||
{
|
||||
std::vector<LayerPrintSequence> res;
|
||||
if (sequence_nums <= 0 || sequence.empty())
|
||||
if (sequence_nums == 0 || sequence.empty())
|
||||
return res;
|
||||
|
||||
// The two keys are written together by the GUI, but a config edited by hand or
|
||||
// overridden on the command line can carry a count that does not divide the
|
||||
// values, or groups too short for a layer range and one extruder. Treat such a
|
||||
// pair as no custom sequence rather than reading past the groups.
|
||||
size_t item_nums = sequence.size() / size_t(sequence_nums);
|
||||
if (sequence.size() % size_t(sequence_nums) != 0 || item_nums < 3) {
|
||||
BOOST_LOG_TRIVIAL(warning) << "other_layers_print_sequence_nums " << sequence_nums << " does not fit the "
|
||||
<< sequence.size() << " values of other_layers_print_sequence, ignoring the custom sequence";
|
||||
return res;
|
||||
}
|
||||
assert(sequence.size() % sequence_nums == 0);
|
||||
|
||||
res.reserve(sequence_nums);
|
||||
size_t item_nums = sequence.size() / sequence_nums;
|
||||
|
||||
for (int i = 0; i < sequence_nums; ++i) {
|
||||
std::vector<int> item;
|
||||
item.assign(sequence.begin() + i * item_nums, sequence.begin() + ((i + 1) * item_nums));
|
||||
|
||||
assert(item.size() > 2);
|
||||
std::pair<std::pair<int, int>, std::vector<int>> res_item;
|
||||
res_item.first.first = item[0];
|
||||
res_item.first.second = item[1];
|
||||
|
||||
@@ -117,9 +117,10 @@ void CacheDictionary::load(cereal::BinaryInputArchive& ar)
|
||||
throw std::runtime_error("preset cache: dictionary is missing its unnamed-enum slot");
|
||||
// Resolved once per file: every option read after this is a vector index.
|
||||
m_defs.resize(m_keys.size());
|
||||
m_reported.assign(m_keys.size(), char(0));
|
||||
for (size_t i = 0; i < m_keys.size(); ++ i)
|
||||
m_defs[i] = print_config_def.get(m_keys[i]);
|
||||
for (size_t i = 0; i < m_keys.size(); ++ i) {
|
||||
const ConfigOptionDef* def = print_config_def.get(m_keys[i]);
|
||||
m_defs[i] = (def != nullptr && uint16_t(def->type) == m_types[i]) ? def : nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
// ---- one config -----------------------------------------------------------
|
||||
@@ -137,14 +138,10 @@ static void save_enum_option(cereal::BinaryOutputArchive& ar, const ConfigOption
|
||||
}
|
||||
}
|
||||
|
||||
// `config` may be null, in which case the option is read and dropped. With
|
||||
// `text` given, the value is also returned as the text a JSON profile would
|
||||
// carry — the names, comma-separated for a vector, with an int the writer
|
||||
// could not name as a number or "nil" — for read_config to place a key this
|
||||
// build types differently through handle_legacy.
|
||||
// `config` may be null, in which case the option is read and dropped.
|
||||
static void load_enum_option(cereal::BinaryInputArchive& ar, ConfigOptionType type,
|
||||
const ConfigOptionDef* def, DynamicPrintConfig* config,
|
||||
const CacheDictionary& dict, std::string* text = nullptr)
|
||||
const CacheDictionary& dict)
|
||||
{
|
||||
uint32_t cnt = 0;
|
||||
ar(cnt);
|
||||
@@ -154,38 +151,32 @@ static void load_enum_option(cereal::BinaryInputArchive& ar, ConfigOptionType ty
|
||||
// whatever follows this option still loads.
|
||||
bool usable = def != nullptr && config != nullptr;
|
||||
std::vector<int> values;
|
||||
if (usable)
|
||||
values.reserve(cnt);
|
||||
values.reserve(cnt);
|
||||
for (uint32_t i = 0; i < cnt; ++ i) {
|
||||
uint16_t idx = 0;
|
||||
ar(idx);
|
||||
if (! dict.valid_enum_index(idx))
|
||||
throw std::runtime_error("preset cache: enum value index past the end of the dictionary");
|
||||
// An int the writer could not name — a nil, or an option whose
|
||||
// definition carried no enum_keys_map — follows its index verbatim.
|
||||
int32_t raw = 0;
|
||||
if (idx == CacheDictionary::ENUM_UNNAMED)
|
||||
if (idx == CacheDictionary::ENUM_UNNAMED) {
|
||||
// An int the writer could not name — a nil, or an option whose
|
||||
// definition carried no enum_keys_map. It travels verbatim.
|
||||
int32_t raw = 0;
|
||||
ar(raw);
|
||||
if (usable) {
|
||||
if (idx == CacheDictionary::ENUM_UNNAMED) {
|
||||
values.push_back(int(raw));
|
||||
continue;
|
||||
}
|
||||
const auto it = def->enum_keys_map == nullptr ? def->enum_keys_map->end() : def->enum_keys_map->find(dict.enum_name_at(idx));
|
||||
if (def->enum_keys_map != nullptr && it != def->enum_keys_map->end()) {
|
||||
values.push_back(it->second);
|
||||
continue;
|
||||
}
|
||||
values.push_back(int(raw));
|
||||
continue;
|
||||
}
|
||||
if (! usable)
|
||||
continue; // the index above was this element's whole payload
|
||||
if (def->enum_keys_map == nullptr) {
|
||||
usable = false; // this build no longer maps this option's names
|
||||
continue;
|
||||
}
|
||||
const auto it = def->enum_keys_map->find(dict.enum_name_at(idx));
|
||||
if (it == def->enum_keys_map->end()) {
|
||||
usable = false; // a value this build dropped: the option goes with it
|
||||
continue;
|
||||
}
|
||||
if (text != nullptr) {
|
||||
if (! text->empty())
|
||||
*text += ',';
|
||||
if (idx != CacheDictionary::ENUM_UNNAMED)
|
||||
*text += dict.enum_name_at(idx);
|
||||
else
|
||||
*text += raw == ConfigOptionIntsNullable::nil_value() ? std::string("nil") : std::to_string(raw);
|
||||
}
|
||||
values.push_back(it->second);
|
||||
}
|
||||
if (! usable)
|
||||
return;
|
||||
@@ -218,41 +209,6 @@ void save_config(cereal::BinaryOutputArchive& ar, const DynamicPrintConfig& conf
|
||||
}
|
||||
}
|
||||
|
||||
// The nullable form of a vector type reads the same bytes as the plain form
|
||||
// and serializes a nil entry as "nil", which a nullable option parses back.
|
||||
static bool has_nullable_form(ConfigOptionType type)
|
||||
{
|
||||
return type == coFloats || type == coInts || type == coPercents || type == coBools || type == coFloatsOrPercents;
|
||||
}
|
||||
|
||||
// Place the value of a key this build types differently from the writer, the
|
||||
// way a JSON profile's text is placed: handle_legacy maps the old spelling (a
|
||||
// bool's 1 onto an enum's enabled) and a bool or enum that still does not
|
||||
// parse is substituted, silently as for a system preset. The parse goes
|
||||
// through a scratch config: set_deserialize_raw creates an option before
|
||||
// parsing into it, so a failed parse must leave nothing behind, and the
|
||||
// placing of one key must not take the whole cache down.
|
||||
static void set_from_text(DynamicPrintConfig& config, const CacheDictionary& dict, uint16_t idx,
|
||||
const std::string& text, ConfigSubstitutionContext& substitutions)
|
||||
{
|
||||
const std::string& key = dict.key_at(idx);
|
||||
DynamicPrintConfig parsed;
|
||||
bool placed = false;
|
||||
try {
|
||||
placed = parsed.set_deserialize_nothrow(key, text, substitutions);
|
||||
} catch (const std::exception&) {
|
||||
placed = false;
|
||||
}
|
||||
if (placed) {
|
||||
config.apply(parsed);
|
||||
return;
|
||||
}
|
||||
if (dict.first_report(idx))
|
||||
// The key and the types only: the value may be a G-code template.
|
||||
BOOST_LOG_TRIVIAL(warning) << "preset cache: dropped " << key << ", written as type " << int(dict.type_at(idx))
|
||||
<< ", which this build cannot read as type " << int(dict.def_at(idx)->type);
|
||||
}
|
||||
|
||||
// `config` null means: read everything, keep nothing.
|
||||
static void read_config(cereal::BinaryInputArchive& ar, DynamicPrintConfig* config, const CacheDictionary& dict)
|
||||
{
|
||||
@@ -260,42 +216,26 @@ static void read_config(cereal::BinaryInputArchive& ar, DynamicPrintConfig* conf
|
||||
ar(cnt);
|
||||
if (config != nullptr)
|
||||
config->clear();
|
||||
// Reused across the loop: constructing a ConfigOptionDef per option read by
|
||||
// the writer's type would allocate its strings and vectors for nothing.
|
||||
// Reused across the loop: constructing a ConfigOptionDef per dropped option
|
||||
// would allocate its strings and vectors for nothing.
|
||||
ConfigOptionDef scratch;
|
||||
ConfigSubstitutionContext substitutions(ForwardCompatibilitySubstitutionRule::EnableSilent);
|
||||
for (uint32_t i = 0; i < cnt; ++ i) {
|
||||
uint16_t idx = 0;
|
||||
ar(idx);
|
||||
if (! dict.valid_key_index(idx))
|
||||
throw std::runtime_error("preset cache: option index past the end of the dictionary");
|
||||
const ConfigOptionType type = dict.type_at(idx);
|
||||
const ConfigOptionDef* def = dict.def_at(idx);
|
||||
const bool as_written = def != nullptr && def->type == type;
|
||||
// Built from the bytes where this build defines the key as written.
|
||||
// Otherwise read by the type the writer recorded: dropped where this
|
||||
// build has no such key, the same outcome a JSON profile gets, and
|
||||
// placed from its text, as a JSON profile's value is, where it has the
|
||||
// key under another type.
|
||||
const bool retyped = def != nullptr && ! as_written && config != nullptr;
|
||||
std::string text;
|
||||
std::string* text_out = retyped ? &text : nullptr;
|
||||
const ConfigOptionType type = dict.type_at(idx);
|
||||
const ConfigOptionDef* def = dict.def_at(idx);
|
||||
if (type == coEnum || type == coEnums) {
|
||||
load_enum_option(ar, type, as_written ? def : nullptr, config, dict, text_out);
|
||||
if (! retyped)
|
||||
continue;
|
||||
} else if (as_written && config != nullptr) {
|
||||
load_enum_option(ar, type, def, config, dict);
|
||||
} else if (def != nullptr && config != nullptr) {
|
||||
config->set_key_value(def->opt_key, def->load_option_from_archive(ar));
|
||||
continue;
|
||||
} else {
|
||||
scratch.type = type;
|
||||
scratch.nullable = has_nullable_form(type);
|
||||
std::unique_ptr<ConfigOption> value(scratch.load_option_from_archive(ar));
|
||||
if (! retyped)
|
||||
continue;
|
||||
text = value->serialize();
|
||||
// Read by the type the writer recorded, then drop: the same outcome
|
||||
// a JSON profile gets for an option this build no longer has.
|
||||
scratch.type = type;
|
||||
std::unique_ptr<ConfigOption> discard(scratch.load_option_from_archive(ar));
|
||||
}
|
||||
set_from_text(*config, dict, idx, text, substitutions);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include <cereal/archives/binary.hpp>
|
||||
@@ -62,22 +61,17 @@ public:
|
||||
|
||||
// ---- reading ----
|
||||
|
||||
// The definition THIS build has for an index's key, or nullptr where the key
|
||||
// is unknown here. type_at(idx) is the type the writer recorded; the value
|
||||
// is read by that type whatever this build's is. With no definition it is
|
||||
// then dropped, which is what a JSON profile gets for an option this build
|
||||
// no longer has; with a definition of another type it is placed as a JSON
|
||||
// profile's text would be (see read_config), so the key is never left at
|
||||
// the collection default while a JSON profile would have mapped it.
|
||||
// The definition an index resolves to in THIS build, or nullptr where the
|
||||
// key is unknown here or is now defined with a different type. A nullptr
|
||||
// entry's value is still read — using type_at(idx), the type the writer
|
||||
// recorded — and then dropped, which is what a JSON profile gets for an
|
||||
// option this build no longer has.
|
||||
const ConfigOptionDef* def_at(uint16_t idx) const { return m_defs[idx]; }
|
||||
const std::string& key_at(uint16_t idx) const { return m_keys[idx]; }
|
||||
ConfigOptionType type_at(uint16_t idx) const { return ConfigOptionType(m_types[idx]); }
|
||||
const std::string& enum_name_at(uint16_t idx) const { return m_enum_values[idx]; }
|
||||
// m_defs, not m_keys: only load() sizes it, so this is false for every index
|
||||
// on a dictionary that was collected rather than read.
|
||||
bool valid_key_index(uint16_t idx) const { return size_t(idx) < m_defs.size(); }
|
||||
// True the first time it is asked for an index, false after.
|
||||
bool first_report(uint16_t idx) const { return ! std::exchange(m_reported[idx], char(1)); }
|
||||
bool valid_enum_index(uint16_t idx) const { return size_t(idx) < m_enum_values.size(); }
|
||||
|
||||
// The layout these two agree on is covered by CACHE_VERSION (PresetCacheFormat.cpp);
|
||||
@@ -105,10 +99,6 @@ private:
|
||||
std::unordered_map<std::string, uint16_t> m_enum_index;
|
||||
// Reading, resolved once by load().
|
||||
std::vector<const ConfigOptionDef*> m_defs;
|
||||
// Keys whose value read_config already reported dropping from this file,
|
||||
// so a key set by every preset is logged once, not once per preset. The
|
||||
// entries of one file are read in sequence, never concurrently.
|
||||
mutable std::vector<char> m_reported;
|
||||
};
|
||||
|
||||
// One config, keyed through `dict`. Options print_config_def does not know are
|
||||
|
||||
+73
-130
@@ -906,64 +906,6 @@ StringObjectException Print::sequential_print_clearance_valid(const Print &print
|
||||
Polygon hull_polygon;
|
||||
int object_index;
|
||||
double height;
|
||||
// Whether the instance reaches above extruder_clearance_height_to_rod, and the Y extent of it
|
||||
// the rod can hit while a later instance prints (see above_rod_y_range).
|
||||
bool has_above_rod = false;
|
||||
coord_t rod_min_y = 0;
|
||||
coord_t rod_max_y = 0;
|
||||
};
|
||||
// ORCA: Y extent of an instance's geometry above the rod height, in the same coordinates as the
|
||||
// bounding boxes below. Conservative: any triangle with a vertex above the rod contributes all
|
||||
// three of its vertices. Modifiers, blockers and negative volumes are not printed and are skipped.
|
||||
const double rod_height = print.config().extruder_clearance_height_to_rod.value;
|
||||
// A skirt is a wall around the whole footprint: a draft shield as tall as the object, otherwise
|
||||
// skirt_height layers tall. Once it can reach the rod, the rod can hit the whole footprint, not just
|
||||
// the geometry above the rod. A max_layer_height of 0 means 0.75 x nozzle diameter, as in Slicing.cpp.
|
||||
double max_layer_height = 0.;
|
||||
for (size_t i = 0; i < print.config().nozzle_diameter.size(); ++i) {
|
||||
const double h = print.config().max_layer_height.get_at(i);
|
||||
max_layer_height = std::max(max_layer_height, h > 0. ? h : 0.75 * print.config().nozzle_diameter.get_at(i));
|
||||
}
|
||||
const bool skirt_reaches_rod = print.has_infinite_skirt() ||
|
||||
(print.config().skirt_loops > 0 && print.config().skirt_height * max_layer_height > rod_height);
|
||||
auto above_rod_y_range = [rod_height](const PrintInstance &instance, coord_t &min_y, coord_t &max_y) -> bool {
|
||||
// A raft lifts the whole object by its thickness, so mesh Z this far below the rod prints above it.
|
||||
const double rod_z = rod_height - instance.print_object->slicing_parameters().object_print_z_min;
|
||||
// Skip the mesh walk for the common case of an object that doesn't reach the rod. Like the too-tall
|
||||
// check below, this compares the top without the raft, so an object only its raft lifts above the
|
||||
// rod keeps the footprint test.
|
||||
if (instance.print_object->max_z() <= scale_(rod_height))
|
||||
return false;
|
||||
double ymin = std::numeric_limits<double>::max();
|
||||
double ymax = std::numeric_limits<double>::lowest();
|
||||
bool any = false;
|
||||
const Transform3d inst_trafo = instance.model_instance->get_transformation().get_matrix();
|
||||
for (const ModelVolume *volume : instance.print_object->model_object()->volumes) {
|
||||
if (!volume->is_model_part())
|
||||
continue;
|
||||
const Transform3d trafo = inst_trafo * volume->get_transformation().get_matrix();
|
||||
const indexed_triangle_set &its = volume->mesh().its;
|
||||
std::vector<double> ys(its.vertices.size()), zs(its.vertices.size());
|
||||
for (size_t i = 0; i < its.vertices.size(); ++i) {
|
||||
const Vec3d p = trafo * its.vertices[i].cast<double>();
|
||||
ys[i] = p.y();
|
||||
zs[i] = p.z();
|
||||
}
|
||||
for (const auto &f : its.indices) {
|
||||
if (zs[f(0)] <= rod_z && zs[f(1)] <= rod_z && zs[f(2)] <= rod_z)
|
||||
continue;
|
||||
for (int j = 0; j < 3; ++j) {
|
||||
ymin = std::min(ymin, ys[f(j)]);
|
||||
ymax = std::max(ymax, ys[f(j)]);
|
||||
}
|
||||
any = true;
|
||||
}
|
||||
}
|
||||
if (any) {
|
||||
min_y = scaled<coord_t>(ymin);
|
||||
max_y = scaled<coord_t>(ymax);
|
||||
}
|
||||
return any;
|
||||
};
|
||||
auto find_object_index = [](const Model& model, const ModelObject* obj) {
|
||||
for (int index = 0; index < model.objects.size(); index++)
|
||||
@@ -1057,23 +999,6 @@ StringObjectException Print::sequential_print_clearance_valid(const Print &print
|
||||
struct print_instance_info print_info {&instance, convex_hull.bounding_box(), convex_hull};
|
||||
print_info.height = instance.print_object->height();
|
||||
print_info.object_index = find_object_index(print.model(), print_object->model_object());
|
||||
print_info.has_above_rod = above_rod_y_range(instance, print_info.rod_min_y, print_info.rod_max_y);
|
||||
const BoundingBox footprint = print_info.bounding_box.inflated(-scale_(0.5 * print.config().extruder_clearance_radius.value + object_skirt_offset));
|
||||
if (print_info.has_above_rod && !skirt_reaches_rod) {
|
||||
// The other instance's footprint is grown by half of extruder_clearance_radius, but the rod
|
||||
// can reach as far as extruder_clearance_dist_to_rod: widen this range by the difference, then
|
||||
// shrink it by the same 0.1 mm tolerance the footprint test uses. Never past the footprint
|
||||
// itself, so plates that pass the footprint test still validate.
|
||||
const coord_t extra = scaled<coord_t>(std::max(0., print.config().extruder_clearance_dist_to_rod.value - 0.5 * print.config().extruder_clearance_radius.value));
|
||||
print_info.rod_min_y = std::max(print_info.rod_min_y + scaled<coord_t>(0.1) - extra, footprint.min.y());
|
||||
print_info.rod_max_y = std::min(print_info.rod_max_y - scaled<coord_t>(0.1) + extra, footprint.max.y());
|
||||
} else {
|
||||
// Below the rod, or with a skirt that reaches it, test the footprint as before. On printers whose
|
||||
// lid clearance is lower than the rod's, overlapping a later instance is what lets an
|
||||
// object below the rod use the rod height instead of the lid height.
|
||||
print_info.rod_min_y = footprint.min.y();
|
||||
print_info.rod_max_y = footprint.max.y();
|
||||
}
|
||||
print_instance_with_bounding_box.push_back(std::move(print_info));
|
||||
convex_hulls_other.emplace_back(std::move(convex_hull));
|
||||
}
|
||||
@@ -1093,8 +1018,8 @@ StringObjectException Print::sequential_print_clearance_valid(const Print &print
|
||||
double hc2 = scale_(print.config().extruder_clearance_height_to_rod); // height to rod
|
||||
double printable_height = scale_(print.config().printable_height);
|
||||
|
||||
// Print each instance that reaches above hc2 after every instance that overlaps that part of it in Y, keeping list
|
||||
// order where possible. With no valid order, keep the list order so the check below reports the collision.
|
||||
// Print each instance taller than hc2 after every instance it overlaps in Y, keeping list order where possible.
|
||||
// With no valid order, keep the list order so the check below reports the collision.
|
||||
{
|
||||
const size_t n = print_instance_with_bounding_box.size();
|
||||
|
||||
@@ -1106,23 +1031,16 @@ StringObjectException Print::sequential_print_clearance_valid(const Print &print
|
||||
for (size_t i = 0; i < n; ++i) fallback_order[i] = i;
|
||||
std::stable_sort(fallback_order.begin(), fallback_order.end(), by_object_index);
|
||||
|
||||
// Every instance of an object shares its object_index, so order by place in the list instead,
|
||||
// which tells instances apart and keeps copies of one object in their list order.
|
||||
std::vector<size_t> list_position(n);
|
||||
for (size_t k = 0; k < n; ++k)
|
||||
list_position[fallback_order[k]] = k;
|
||||
auto by_list_position = [&list_position](size_t l, size_t r) { return list_position[l] < list_position[r]; };
|
||||
|
||||
// Mirrors the vertical-clearance check below: the part of the potentially-too-tall instance
|
||||
// the rod can hit (see rod_min_y) is tested against the other instance's inflated footprint,
|
||||
// i.e. everywhere the nozzle can be while that instance prints.
|
||||
// Mirrors the inflation the vertical-clearance check below applies: only the
|
||||
// potentially-too-tall instance's footprint is shrunk before testing Y overlap.
|
||||
// A structured binding can't be captured by a lambda before C++20, so copy it first.
|
||||
const float skirt_offset = object_skirt_offset;
|
||||
auto overlaps_in_y = [&](size_t tall_idx, size_t other_idx) {
|
||||
const auto &A = print_instance_with_bounding_box[tall_idx];
|
||||
if (!A.has_above_rod)
|
||||
return false;
|
||||
auto bbA = print_instance_with_bounding_box[tall_idx].bounding_box.inflated(
|
||||
-scale_(0.5 * print.config().extruder_clearance_radius.value + skirt_offset));
|
||||
auto &bbB = print_instance_with_bounding_box[other_idx].bounding_box;
|
||||
auto inter_min = std::max(A.rod_min_y, bbB.min.y());
|
||||
auto inter_max = std::min(A.rod_max_y, bbB.max.y());
|
||||
auto inter_min = std::max(bbA.min.y(), bbB.min.y());
|
||||
auto inter_max = std::min(bbA.max.y(), bbB.max.y());
|
||||
return inter_max - inter_min > 0;
|
||||
};
|
||||
|
||||
@@ -1143,7 +1061,7 @@ StringObjectException Print::sequential_print_clearance_valid(const Print &print
|
||||
bool infeasible = false;
|
||||
for (size_t a = 0; a < n && !infeasible; ++a) {
|
||||
if (a == last_idx) continue;
|
||||
if (!print_instance_with_bounding_box[a].has_above_rod) continue; // nothing reaches the rod: no constraint
|
||||
if (print_instance_with_bounding_box[a].height <= hc2) continue; // short enough: no constraint
|
||||
for (size_t b = 0; b < n; ++b) {
|
||||
if (b == a) continue;
|
||||
if (!overlaps_in_y(a, b)) continue;
|
||||
@@ -1160,13 +1078,13 @@ StringObjectException Print::sequential_print_clearance_valid(const Print &print
|
||||
}
|
||||
|
||||
if (!infeasible) {
|
||||
// Kahn's algorithm; ties are broken by place in the list so the result is
|
||||
// Kahn's algorithm; ties are broken by original object_index so the result is
|
||||
// the minimal perturbation of the incoming order, not an arbitrary one.
|
||||
std::vector<size_t> ready;
|
||||
for (size_t i = 0; i < n; ++i)
|
||||
if (i != last_idx && indegree[i] == 0)
|
||||
ready.push_back(i);
|
||||
std::sort(ready.begin(), ready.end(), by_list_position);
|
||||
std::sort(ready.begin(), ready.end(), by_object_index);
|
||||
|
||||
std::vector<size_t> order;
|
||||
order.reserve(n);
|
||||
@@ -1176,7 +1094,7 @@ StringObjectException Print::sequential_print_clearance_valid(const Print &print
|
||||
order.push_back(cur);
|
||||
for (size_t nxt : adj[cur]) {
|
||||
if (--indegree[nxt] == 0) {
|
||||
auto pos = std::upper_bound(ready.begin(), ready.end(), nxt, by_list_position);
|
||||
auto pos = std::upper_bound(ready.begin(), ready.end(), nxt, by_object_index);
|
||||
ready.insert(pos, nxt);
|
||||
}
|
||||
}
|
||||
@@ -1199,6 +1117,9 @@ StringObjectException Print::sequential_print_clearance_valid(const Print &print
|
||||
// differs from it, naming the instances held back to clear the rod: those printed later than
|
||||
// their place in the list. The first of them is the jump target.
|
||||
if (warning != nullptr && solved && solved_order != fallback_order) {
|
||||
std::vector<size_t> list_position(n);
|
||||
for (size_t k = 0; k < n; ++k)
|
||||
list_position[fallback_order[k]] = k;
|
||||
for (size_t k = 0; k < n; ++k) {
|
||||
if (k <= list_position[solved_order[k]])
|
||||
continue;
|
||||
@@ -1231,6 +1152,33 @@ StringObjectException Print::sequential_print_clearance_valid(const Print &print
|
||||
}
|
||||
// sequential_print_vertical_clearance_valid
|
||||
{
|
||||
// Ignore the last instance printed.
|
||||
//print_instance_with_bounding_box.pop_back();
|
||||
/*bool has_interlaced_objects = false;
|
||||
for (int k = 0; k < print_instance_count; k++)
|
||||
{
|
||||
auto inst = print_instance_with_bounding_box[k].print_instance;
|
||||
auto bbox = print_instance_with_bounding_box[k].bounding_box;
|
||||
auto iy1 = bbox.min.y();
|
||||
auto iy2 = bbox.max.y();
|
||||
|
||||
for (int i = 0; i < k; i++)
|
||||
{
|
||||
auto& p = print_instance_with_bounding_box[i].print_instance;
|
||||
auto bbox2 = print_instance_with_bounding_box[i].bounding_box;
|
||||
auto py1 = bbox2.min.y();
|
||||
auto py2 = bbox2.max.y();
|
||||
auto inter_min = std::max(iy1, py1); // min y of intersection
|
||||
auto inter_max = std::min(iy2, py2); // max y of intersection. length=max_y-min_y>0 means intersection exists
|
||||
if (inter_max - inter_min > 0) {
|
||||
has_interlaced_objects = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (has_interlaced_objects)
|
||||
break;
|
||||
}*/
|
||||
|
||||
// if objects are not overlapped on y-axis, they will not collide even if they are taller than extruder_clearance_height_to_rod
|
||||
int print_instance_count = print_instance_with_bounding_box.size();
|
||||
std::map<const PrintInstance*, std::pair<Polygon, float>> too_tall_instances;
|
||||
@@ -1239,12 +1187,21 @@ StringObjectException Print::sequential_print_clearance_valid(const Print &print
|
||||
auto inst = print_instance_with_bounding_box[k].print_instance;
|
||||
// 只需要考虑喷嘴到滑杆的偏移量,这个比整个工具头的碰撞半径要小得多
|
||||
// Only the offset from the nozzle to the slide bar needs to be considered, which is much smaller than the collision radius of the entire tool head.
|
||||
// ORCA: test only the part of this instance the rod can hit (see rod_min_y).
|
||||
const auto &info_k = print_instance_with_bounding_box[k];
|
||||
const coord_t iy1 = info_k.rod_min_y;
|
||||
const coord_t iy2 = info_k.rod_max_y;
|
||||
auto bbox = print_instance_with_bounding_box[k].bounding_box.inflated(-scale_(0.5 * print.config().extruder_clearance_radius.value + object_skirt_offset));
|
||||
auto iy1 = bbox.min.y();
|
||||
auto iy2 = bbox.max.y();
|
||||
(const_cast<ModelInstance*>(inst->model_instance))->arrange_order = k+1;
|
||||
double height = (k == (print_instance_count - 1))?printable_height:hc1;
|
||||
/*if (has_interlaced_objects) {
|
||||
if ((k < (print_instance_count - 1)) && (inst->print_object->height() > hc2)) {
|
||||
too_tall_instances[inst] = std::make_pair(print_instance_with_bounding_box[k].hull_polygon, unscaled<double>(hc2));
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ((k < (print_instance_count - 1)) && (inst->print_object->height() > hc1)) {
|
||||
too_tall_instances[inst] = std::make_pair(print_instance_with_bounding_box[k].hull_polygon, unscaled<double>(hc1));
|
||||
}
|
||||
}*/
|
||||
|
||||
for (int i = k+1; i < print_instance_count; i++)
|
||||
{
|
||||
@@ -2405,29 +2362,18 @@ StringObjectException Print::validate(std::vector<StringObjectException> *warnin
|
||||
// A mixed (virtual) filament always resolves to multiple physical components, which
|
||||
// spiral vase cannot print.
|
||||
const auto &is_mixed = m_config.filament_is_mixed.values;
|
||||
for (const PrintObject *object : m_objects) {
|
||||
const auto used_filament_ids = object->object_extruders();
|
||||
if (used_filament_ids.size() > 1 ||
|
||||
std::any_of(used_filament_ids.begin(), used_filament_ids.end(), [&is_mixed](unsigned int filament_id) {
|
||||
return filament_id < is_mixed.size() && is_mixed[filament_id];
|
||||
}))
|
||||
for (const PrintObject *object : m_objects)
|
||||
for (unsigned int ext : object->object_extruders())
|
||||
if (ext < is_mixed.size() && is_mixed[ext])
|
||||
return {L("Spiral (vase) mode does not work when an object contains more than one material."), nullptr, "spiral_mode"};
|
||||
assert(m_objects.size() == 1);
|
||||
const auto all_regions = m_objects.front()->all_regions();
|
||||
if (all_regions.size() > 1) {
|
||||
// Orca: make sure regions are not compatible
|
||||
if (std::any_of(all_regions.begin() + 1, all_regions.end(), [this, ra = all_regions.front()](const auto rb) {
|
||||
return !Layer::is_perimeter_compatible(*this, ra, rb);
|
||||
})) {
|
||||
return {L("Spiral (vase) mode does not work when an object contains more than one material."), nullptr, "spiral_mode"};
|
||||
// Enabling spiral vase mode in the GUI resets these keys in the global config only, so an object,
|
||||
// part or height range can still override them. Layers with infill or more than one wall are
|
||||
// printed without spiralizing.
|
||||
for (const PrintRegion ®ion : object->all_regions()) {
|
||||
const PrintRegionConfig &cfg = region.config();
|
||||
const char *opt_key = cfg.sparse_infill_density.value > 0. ? "sparse_infill_density" :
|
||||
cfg.wall_loops.value > 1 ? "wall_loops" :
|
||||
cfg.top_shell_layers.value > 0 ? "top_shell_layers" : nullptr;
|
||||
if (opt_key != nullptr) {
|
||||
// TRN %1% is the object name.
|
||||
warn(Slic3r::format(_u8L("Spiral vase mode needs no sparse infill, one wall loop and no top shell layers, "
|
||||
"but the object %1% uses other values, so it will not print as a continuous spiral."),
|
||||
object->model_object()->name),
|
||||
opt_key, object);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2494,7 +2440,7 @@ StringObjectException Print::validate(std::vector<StringObjectException> *warnin
|
||||
print_object.model_object(),
|
||||
""
|
||||
};
|
||||
} else if (compensated_max_z > this->config().printable_height + EPSILON) {
|
||||
} else if (effective_max_z > this->config().printable_height + EPSILON) {
|
||||
return StringObjectException{
|
||||
last_layer_below_max ?
|
||||
Slic3r::format(_u8L("While the object %1% itself fits the build volume, its last layer exceeds the maximum build volume height."), print_object.model_object()->name) +
|
||||
@@ -5327,9 +5273,6 @@ bool Print::enable_timelapse_print() const
|
||||
|
||||
void Print::_make_wipe_tower()
|
||||
{
|
||||
// Use the printer's G-code tag format so the processor can classify wipe tower filament usage.
|
||||
GCodeProcessor::s_IsBBLPrinter = is_BBL_printer();
|
||||
|
||||
m_wipe_tower_data.clear();
|
||||
|
||||
// BBS
|
||||
@@ -5465,7 +5408,7 @@ void Print::_make_wipe_tower()
|
||||
|
||||
if (!layer_tools.has_wipe_tower) continue;
|
||||
bool first_layer = &layer_tools == &m_wipe_tower_data.tool_ordering.front();
|
||||
wipe_tower.plan_toolchange((float)layer_tools.wipe_tower_print_z, (float)layer_tools.wipe_tower_layer_height, current_filament_id, current_filament_id);
|
||||
wipe_tower.plan_toolchange((float)layer_tools.print_z, (float)layer_tools.wipe_tower_layer_height, current_filament_id, current_filament_id);
|
||||
|
||||
used_filament_ids.insert(layer_tools.extruders.begin(), layer_tools.extruders.end());
|
||||
|
||||
@@ -5516,7 +5459,7 @@ void Print::_make_wipe_tower()
|
||||
wipe_volume_nc = 15.f;
|
||||
}
|
||||
|
||||
wipe_tower.plan_toolchange((float)layer_tools.wipe_tower_print_z, (float)layer_tools.wipe_tower_layer_height, current_filament_id, filament_id,
|
||||
wipe_tower.plan_toolchange((float)layer_tools.print_z, (float)layer_tools.wipe_tower_layer_height, current_filament_id, filament_id,
|
||||
wipe_volume_ec, wipe_volume_nc, volume_to_purge);
|
||||
current_filament_id = filament_id;
|
||||
}
|
||||
@@ -5623,7 +5566,7 @@ void Print::_make_wipe_tower()
|
||||
if (!layer_tools.has_wipe_tower)
|
||||
continue;
|
||||
bool first_layer = &layer_tools == &m_wipe_tower_data.tool_ordering.front();
|
||||
wipe_tower.plan_toolchange((float) layer_tools.wipe_tower_print_z, (float) layer_tools.wipe_tower_layer_height, current_extruder_id,
|
||||
wipe_tower.plan_toolchange((float) layer_tools.print_z, (float) layer_tools.wipe_tower_layer_height, current_extruder_id,
|
||||
current_extruder_id, false);
|
||||
for (const auto extruder_id : layer_tools.extruders) {
|
||||
if ((first_layer && extruder_id == m_wipe_tower_data.tool_ordering.all_extruders().back()) || extruder_id !=
|
||||
@@ -5644,7 +5587,7 @@ void Print::_make_wipe_tower()
|
||||
}
|
||||
|
||||
// request a toolchange at the wipe tower with at least volume_to_wipe purging amount
|
||||
wipe_tower.plan_toolchange((float) layer_tools.wipe_tower_print_z, (float) layer_tools.wipe_tower_layer_height,
|
||||
wipe_tower.plan_toolchange((float) layer_tools.print_z, (float) layer_tools.wipe_tower_layer_height,
|
||||
current_extruder_id, extruder_id, volume_to_wipe);
|
||||
current_extruder_id = extruder_id;
|
||||
}
|
||||
|
||||
+1
-10
@@ -1238,13 +1238,7 @@ public:
|
||||
const std::map<const PrintObject*, ToolOrdering>& sequential_dynamic_orderings() const { return m_sequential_dynamic_orderings; }
|
||||
|
||||
const std::vector<std::vector<DynamicPrintConfig>>& get_extruder_filament_info() const { return m_extruder_filament_info; }
|
||||
// Two-phase: the setter only stashes the payload, so Print::apply() can invalidate the grouping
|
||||
// steps once the inventory actually changed.
|
||||
void set_extruder_filament_info(const std::vector<std::vector<DynamicPrintConfig>>& filament_info)
|
||||
{
|
||||
m_pending_extruder_filament_info = filament_info;
|
||||
m_extruder_filament_info_pending = true;
|
||||
}
|
||||
void set_extruder_filament_info(const std::vector<std::vector<DynamicPrintConfig>>& filament_info) { m_extruder_filament_info = filament_info; }
|
||||
|
||||
void set_geometric_unprintable_filaments(const std::vector<std::set<int>> &unprintables_filament_ids) { m_geometric_unprintable_filaments = unprintables_filament_ids; }
|
||||
std::vector<std::set<int>> get_geometric_unprintable_filaments() const { return m_geometric_unprintable_filaments;}
|
||||
@@ -1544,9 +1538,6 @@ private:
|
||||
Points m_skirt_convex_hull;
|
||||
|
||||
std::vector<std::vector<DynamicPrintConfig>> m_extruder_filament_info;
|
||||
// Payload handed to set_extruder_filament_info(), installed by Print::apply(). See the setter.
|
||||
std::vector<std::vector<DynamicPrintConfig>> m_pending_extruder_filament_info;
|
||||
bool m_extruder_filament_info_pending { false };
|
||||
|
||||
// Logical (extruder, nozzle) grouping result, set by ToolOrdering during reorder.
|
||||
std::shared_ptr<MultiNozzleUtils::NozzleGroupResultBase> m_nozzle_group_result;
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
#include <unordered_set>
|
||||
#include <unordered_map>
|
||||
#include <mutex>
|
||||
#include "FilamentGroupUtils.hpp"
|
||||
#include "MultiNozzleUtils.hpp"
|
||||
#include "ObjectID.hpp"
|
||||
#include "PlaceholderParser.hpp"
|
||||
@@ -428,12 +427,10 @@ public:
|
||||
};
|
||||
|
||||
LayerRanges() = default;
|
||||
LayerRanges(const t_layer_config_ranges &in, double shrinkage_compensation_z) { this->assign(in, shrinkage_compensation_z); }
|
||||
LayerRanges(const t_layer_config_ranges &in) { this->assign(in); }
|
||||
|
||||
// Convert input config ranges into continuous non-overlapping sorted vector of intervals and their configs.
|
||||
// The input ranges are uncompensated print heights, the intervals are scaled by the Z shrinkage compensation
|
||||
// like the PrintObject trafo the regions are generated in.
|
||||
void assign(const t_layer_config_ranges &in, double shrinkage_compensation_z) {
|
||||
void assign(const t_layer_config_ranges &in) {
|
||||
m_ranges.clear();
|
||||
m_ranges.reserve(in.size());
|
||||
// Input ranges are sorted lexicographically. First range trims the other ranges.
|
||||
@@ -457,11 +454,6 @@ public:
|
||||
m_ranges.back().layer_height_range.second = DBL_MAX;
|
||||
else
|
||||
m_ranges.push_back({ t_layer_height_range(m_ranges.back().layer_height_range.second, DBL_MAX) });
|
||||
for (LayerRange &range : m_ranges) {
|
||||
range.layer_height_range.first *= shrinkage_compensation_z;
|
||||
if (range.layer_height_range.second != DBL_MAX)
|
||||
range.layer_height_range.second *= shrinkage_compensation_z;
|
||||
}
|
||||
}
|
||||
|
||||
const DynamicPrintConfig* config(const t_layer_height_range &range) const {
|
||||
@@ -1071,12 +1063,6 @@ static PrintObjectRegions* generate_print_object_regions(
|
||||
all_regions.clear();
|
||||
|
||||
bool reuse_old = print_object_regions_old && !print_object_regions_old->layer_ranges.empty();
|
||||
if (reuse_old && ! std::equal(model_layer_ranges.begin(), model_layer_ranges.end(), layer_ranges_regions.begin(), layer_ranges_regions.end(),
|
||||
[](const LayerRanges::LayerRange &range, const PrintObjectRegions::LayerRangeRegions &r) { return range.layer_height_range == r.layer_height_range; })) {
|
||||
// The ranges carry the Z shrinkage compensation, which may have changed together with the volumes.
|
||||
out->clear();
|
||||
reuse_old = false;
|
||||
}
|
||||
|
||||
if (reuse_old) {
|
||||
// Reuse old bounding boxes of some ModelVolumes and their ranges.
|
||||
@@ -1655,21 +1641,6 @@ Print::ApplyStatus Print::apply(const Model &model, DynamicPrintConfig new_full_
|
||||
// Grab the lock for the Print / PrintObject milestones.
|
||||
std::scoped_lock<std::mutex> lock(this->state_mutex());
|
||||
|
||||
// The device-owned AMS inventory only feeds filament grouping, so a changed payload invalidates
|
||||
// the grouping steps.
|
||||
if (m_extruder_filament_info_pending) {
|
||||
if (FilamentGroupUtils::machine_filaments_changed(m_extruder_filament_info, m_pending_extruder_filament_info)) {
|
||||
// Both steps are attempted on purpose, and the status escalates only when one was actually
|
||||
// taken back, so a print that is already invalid stays UNCHANGED.
|
||||
const bool wipe_tower_invalidated = this->invalidate_step(psWipeTower);
|
||||
const bool skirt_brim_invalidated = this->invalidate_step(psSkirtBrim);
|
||||
if (wipe_tower_invalidated || skirt_brim_invalidated)
|
||||
update_apply_status(true);
|
||||
}
|
||||
m_extruder_filament_info = std::move(m_pending_extruder_filament_info);
|
||||
m_extruder_filament_info_pending = false;
|
||||
}
|
||||
|
||||
// The following call may stop the background processing.
|
||||
if (! print_diff.empty())
|
||||
update_apply_status(this->invalidate_state_by_config_options(new_full_config, print_diff));
|
||||
@@ -2191,12 +2162,10 @@ Print::ApplyStatus Print::apply(const Model &model, DynamicPrintConfig new_full_
|
||||
if (print_object_regions == nullptr || model_object_status.print_object_regions_status != ModelObjectStatus::PrintObjectRegionsStatus::Valid) {
|
||||
// Layer ranges with their associated configurations. Remove overlaps between the ranges
|
||||
// and create the regions from scratch.
|
||||
// A belt printer slices in the rotated frame, which the ranges do not follow (see slices_to_regions()),
|
||||
// so they stay as they are there.
|
||||
print_object_regions = generate_print_object_regions(
|
||||
print_object_regions,
|
||||
print_object.model_object()->volumes,
|
||||
LayerRanges(print_object.model_object()->layer_config_ranges, m_config.belt_printer.value ? 1. : this->shrinkage_compensation().z()),
|
||||
LayerRanges(print_object.model_object()->layer_config_ranges),
|
||||
m_default_region_config,
|
||||
model_object_status.print_instances.front().trafo,
|
||||
num_extruders ,
|
||||
|
||||
@@ -6670,11 +6670,12 @@ void PrintConfigDef::init_fff_params()
|
||||
def = this->add("wipe_inward", coBool);
|
||||
def->label = L("Wipe inward");
|
||||
def->category = L("Quality");
|
||||
def->tooltip = L("Applies only to external walls, including hole boundaries. Moves the hot nozzle toward the "
|
||||
def->tooltip = L("Applies only to external walls, including hole boundaries. Moves the hot nozzle toward printed "
|
||||
"inner walls during wiping to reduce reheating of freshly printed plastic and seam marks.\n\n"
|
||||
"Especially useful at layer heights below 0.1 mm, where wipe marks are more visible.\n\n"
|
||||
"Uses the regular wipe where the outer wall has no adjacent inner wall, such as in single-wall "
|
||||
"areas, or if no supported inward path can be found, for example at tight corners or seam gaps.");
|
||||
"Uses the regular wipe if no adjacent inner wall is already printed (single-wall areas or "
|
||||
"Outer/Inner wall order), or if no supported inward path can be found, for example at tight "
|
||||
"corners or seam gaps.");
|
||||
def->mode = comExpert;
|
||||
def->set_default_value(new ConfigOptionBool(false));
|
||||
|
||||
@@ -6687,10 +6688,7 @@ void PrintConfigDef::init_fff_params()
|
||||
"For example, 50% shifts the path by half of the outer-wall width. The effective offset is limited "
|
||||
"by both the actual outer-wall width and the available spacing to the adjacent wall, so values "
|
||||
"above 100% or an equivalent absolute distance have no additional effect. "
|
||||
"Set to 0 to disable the offset.\n\n"
|
||||
"With Outer/Inner or Inner/Outer/Inner wall order, the offset is limited to 50% of the actual "
|
||||
"outer-wall width because the adjacent inner wall is printed after the outer wall. "
|
||||
"This also applies to equivalent distances specified in millimeters.");
|
||||
"Set to 0 to disable the offset.");
|
||||
def->sidetext = L("mm or %");
|
||||
def->ratio_over = "outer_wall_line_width";
|
||||
def->min = 0;
|
||||
|
||||
@@ -4467,7 +4467,6 @@ void PrintObject::update_slicing_parameters()
|
||||
coordf_t object_height = this->model_object()->max_z();
|
||||
BeltTransformPipeline::BeltFloorParams belt_floor;
|
||||
const auto &pcfg = this->print()->config();
|
||||
const Vec3d shrinkage_compensation = this->print()->shrinkage_compensation();
|
||||
if (pcfg.belt_printer.value) {
|
||||
// The box of the mesh in the frame it is sliced in: XY centred and Z as
|
||||
// placed on the bed (trafo_centered()). raw_bounding_box() has the
|
||||
@@ -4480,14 +4479,12 @@ void PrintObject::update_slicing_parameters()
|
||||
for (const ModelVolume *v : this->model_object()->volumes)
|
||||
if (v->is_model_part())
|
||||
bb.merge(v->mesh().transformed_bounding_box(trafo * v->get_matrix()));
|
||||
// trafo() already carries the shrinkage compensation, so the belt height is
|
||||
// compensated, while create_from_config() expects object_height without it.
|
||||
auto hr = BeltTransformPipeline::compute_belt_height_and_floor(pcfg, bb, object_height * shrinkage_compensation.z());
|
||||
object_height = hr.object_height / shrinkage_compensation.z();
|
||||
auto hr = BeltTransformPipeline::compute_belt_height_and_floor(pcfg, bb, object_height);
|
||||
object_height = hr.object_height;
|
||||
belt_floor = hr.floor_params;
|
||||
}
|
||||
m_slicing_params = SlicingParameters::create_from_config(pcfg, m_config, object_height,
|
||||
this->object_extruders(), shrinkage_compensation);
|
||||
this->object_extruders(), this->print()->shrinkage_compensation());
|
||||
// Populate belt floor parameters into slicing params for support clipping.
|
||||
m_slicing_params.belt_floor_shear_factor = belt_floor.shear_factor;
|
||||
m_slicing_params.belt_floor_from_axis = belt_floor.from_axis;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user