mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-22 14:13:57 -06:00
Techs DISABLE_ALLOW_NEGATIVE_Z_FOR_SLA and ENABLE_ALLOW_NEGATIVE_Z set as default
This commit is contained in:
parent
5bffed394b
commit
65b3be92fe
13 changed files with 7 additions and 260 deletions
|
@ -23,9 +23,7 @@
|
|||
#include "libslic3r/Format/STL.hpp"
|
||||
#include "libslic3r/Utils.hpp"
|
||||
#include "libslic3r/AppConfig.hpp"
|
||||
#if DISABLE_ALLOW_NEGATIVE_Z_FOR_SLA
|
||||
#include "libslic3r/PresetBundle.hpp"
|
||||
#endif // DISABLE_ALLOW_NEGATIVE_Z_FOR_SLA
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -342,16 +340,10 @@ void GLVolume::set_render_color(const std::array<float, 4>& rgba)
|
|||
|
||||
void GLVolume::set_render_color()
|
||||
{
|
||||
#if ENABLE_ALLOW_NEGATIVE_Z
|
||||
bool outside = is_outside || is_below_printbed();
|
||||
#endif // ENABLE_ALLOW_NEGATIVE_Z
|
||||
|
||||
if (force_native_color || force_neutral_color) {
|
||||
#if ENABLE_ALLOW_NEGATIVE_Z
|
||||
if (outside && shader_outside_printer_detection_enabled)
|
||||
#else
|
||||
if (is_outside && shader_outside_printer_detection_enabled)
|
||||
#endif // ENABLE_ALLOW_NEGATIVE_Z
|
||||
set_render_color(OUTSIDE_COLOR);
|
||||
else {
|
||||
if (force_native_color)
|
||||
|
@ -366,18 +358,10 @@ void GLVolume::set_render_color()
|
|||
else if (hover == HS_Deselect)
|
||||
set_render_color(HOVER_DESELECT_COLOR);
|
||||
else if (selected)
|
||||
#if ENABLE_ALLOW_NEGATIVE_Z
|
||||
set_render_color(outside ? SELECTED_OUTSIDE_COLOR : SELECTED_COLOR);
|
||||
#else
|
||||
set_render_color(is_outside ? SELECTED_OUTSIDE_COLOR : SELECTED_COLOR);
|
||||
#endif // ENABLE_ALLOW_NEGATIVE_Z
|
||||
else if (disabled)
|
||||
set_render_color(DISABLED_COLOR);
|
||||
#if ENABLE_ALLOW_NEGATIVE_Z
|
||||
else if (outside && shader_outside_printer_detection_enabled)
|
||||
#else
|
||||
else if (is_outside && shader_outside_printer_detection_enabled)
|
||||
#endif // ENABLE_ALLOW_NEGATIVE_Z
|
||||
set_render_color(OUTSIDE_COLOR);
|
||||
else
|
||||
set_render_color(color);
|
||||
|
@ -520,14 +504,9 @@ void GLVolume::render() const
|
|||
bool GLVolume::is_sla_support() const { return this->composite_id.volume_id == -int(slaposSupportTree); }
|
||||
bool GLVolume::is_sla_pad() const { return this->composite_id.volume_id == -int(slaposPad); }
|
||||
|
||||
#if ENABLE_ALLOW_NEGATIVE_Z
|
||||
bool GLVolume::is_sinking() const
|
||||
{
|
||||
#if DISABLE_ALLOW_NEGATIVE_Z_FOR_SLA
|
||||
if (is_modifier || GUI::wxGetApp().preset_bundle->printers.get_edited_preset().printer_technology() == ptSLA)
|
||||
#else
|
||||
if (is_modifier)
|
||||
#endif // DISABLE_ALLOW_NEGATIVE_Z_FOR_SLA
|
||||
return false;
|
||||
const BoundingBoxf3& box = transformed_convex_hull_bounding_box();
|
||||
return box.min.z() < SINKING_Z_THRESHOLD && box.max.z() >= SINKING_Z_THRESHOLD;
|
||||
|
@ -537,7 +516,6 @@ bool GLVolume::is_below_printbed() const
|
|||
{
|
||||
return transformed_convex_hull_bounding_box().max(2) < 0.0;
|
||||
}
|
||||
#endif // ENABLE_ALLOW_NEGATIVE_Z
|
||||
|
||||
std::vector<int> GLVolumeCollection::load_object(
|
||||
const ModelObject *model_object,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue