mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-13 09:47:58 -06:00
Added a low layer slider into the 3D preview window.
This is to limit the preview to a span of layers.
This commit is contained in:
parent
b7af7276c9
commit
ae2bae137a
2 changed files with 78 additions and 28 deletions
|
@ -8,7 +8,8 @@
|
|||
# for efficient building of vertex arrays for OpenGL rendering.
|
||||
#
|
||||
# Slic3r::GUI::Plater::3D derives from Slic3r::GUI::3DScene,
|
||||
# Slic3r::GUI::Plater::3DPreview, Slic3r::GUI::Plater::ObjectCutDialog and Slic3r::GUI::Plater::ObjectPartsPanel
|
||||
# Slic3r::GUI::Plater::3DPreview, Slic3r::GUI::Plater::3DToolpaths,
|
||||
# Slic3r::GUI::Plater::ObjectCutDialog and Slic3r::GUI::Plater::ObjectPartsPanel
|
||||
# own $self->{canvas} of the Slic3r::GUI::3DScene type.
|
||||
#
|
||||
# Therefore the 3DScene supports renderng of STLs, extrusions and cutting planes,
|
||||
|
@ -944,9 +945,13 @@ sub draw_volumes {
|
|||
}
|
||||
# This shall not happen.
|
||||
next if ($i == @{$volume->offsets});
|
||||
# Remember start of the layer.
|
||||
if ($i >= 3) {
|
||||
# Get end of the preceding layer, which is the start of the current layer.
|
||||
$qverts_begin = $volume->offsets->[$i-2];
|
||||
$tverts_begin = $volume->offsets->[$i-1];
|
||||
}
|
||||
# Some layers are above $min_z. Which?
|
||||
$qverts_begin = $volume->offsets->[$i+1];
|
||||
$tverts_begin = $volume->offsets->[$i+2];
|
||||
while ($i < @{$volume->offsets} && $volume->offsets->[$i] <= $max_z) {
|
||||
$i += 3;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue