Skip to content

Commit

Permalink
Merge branch 'dev' into nightly_dev
Browse files Browse the repository at this point in the history
  • Loading branch information
supermerill committed Jul 8, 2023
2 parents a0ec413 + 3dd92fc commit f1642d3
Show file tree
Hide file tree
Showing 29 changed files with 512 additions and 128 deletions.
18 changes: 14 additions & 4 deletions BuildMacOS.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ then
exit -1
fi

while getopts ":iaxbh" opt; do
while getopts ":iaxbhc" opt; do
case ${opt} in
i )
export BUILD_IMAGE="1"
Expand All @@ -26,11 +26,15 @@ while getopts ":iaxbh" opt; do
b )
export BUILD_DEBUG="1"
;;
c)
export BUILD_XCODE="1"
;;
h ) echo "Usage: ./BuildMacOS.sh [-i]"
echo " -i: Generate DMG image (optional)"
echo " -a: Build for arm64 (Apple Silicon)"
echo " -x: Build for x86_64 (Intel)"
echo " -b: Build with debug symbols"
echo " -c: Build for XCode"
exit 0
;;
esac
Expand Down Expand Up @@ -157,18 +161,24 @@ echo -n "[7/9] Configuring Slic3r..."
then
BUILD_ARGS="-DCMAKE_BUILD_TYPE=Debug ${BUILD_ARGS}"
fi
if [[ -n "$BUILD_XCODE" ]]
then
BUILD_ARGS="-GXcode ${BUILD_ARGS}"
fi
# cmake
pushd build
echo "Cmake command: cmake .. -DCMAKE_PREFIX_PATH=\"$PWD/../deps/build/destdir/usr/local\" -DCMAKE_OSX_DEPLOYMENT_TARGET=\"10.14\" -DSLIC3R_STATIC=1 ${BUILD_ARGS}"
echo "Slic3r Cmake command: cmake .. -DCMAKE_PREFIX_PATH=\"$PWD/../deps/build/destdir/usr/local\" -DCMAKE_OSX_DEPLOYMENT_TARGET=\"10.14\" -DSLIC3R_STATIC=1 ${BUILD_ARGS}"
cmake .. -DCMAKE_PREFIX_PATH="$PWD/../deps/build/destdir/usr/local" -DCMAKE_OSX_DEPLOYMENT_TARGET="10.14" -DSLIC3R_STATIC=1 ${BUILD_ARGS}
} #&> $ROOT/build/Build.log # Capture all command output
echo "done"

echo -n "[8/9] Building Slic3r..."
{
# make Slic3r
make -j$NCORES Slic3r

if [[ -z "$BUILD_XCODE" ]]
then
make -j$NCORES Slic3r
fi
# make .mo
make gettext_po_to_mo
} #&> $ROOT/build/Build.log # Capture all command output
Expand Down
9 changes: 9 additions & 0 deletions deps/Qhull/Qhull.cmake
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
include(GNUInstallDirs)

set(_patch_step "")
if (APPLE)
set(_patch_step PATCH_COMMAND ${PATCH_CMD} ${CMAKE_CURRENT_LIST_DIR}/Qhull.patch)
endif ()


prusaslicer_add_cmake_project(Qhull
URL "https://github.com/qhull/qhull/archive/v8.0.1.zip"
URL_HASH SHA256=5287f5edd6a0372588f5d6640799086a4033d89d19711023ef8229dd9301d69b
"${_patch_step}"
CMAKE_ARGS
-DINCLUDE_INSTALL_DIR=${CMAKE_INSTALL_INCLUDEDIR}
)


if (MSVC)
add_debug_dep(dep_Qhull)
endif ()
33 changes: 33 additions & 0 deletions deps/Qhull/Qhull.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
--- CMakeLists.txt 2020-08-04 20:37:02.000000000 -0700
+++ CMakeLists.txt 2022-08-14 12:02:28.000000000 -0700
@@ -339,21 +339,21 @@

include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src)

-if(CMAKE_BUILD_TYPE MATCHES "[dD]ebug")
- set(qhull_CPP qhullcpp_d)
- set(qhull_SHARED qhull_d)
- set(qhull_SHAREDP qhull_pd)
- set(qhull_SHAREDR qhull_rd)
- set(qhull_STATIC qhullstatic_d)
- set(qhull_STATICR qhullstatic_rd)
-else()
+#if(CMAKE_BUILD_TYPE MATCHES "[dD]ebug")
+# set(qhull_CPP qhullcpp_d)
+# set(qhull_SHARED qhull_d)
+# set(qhull_SHAREDP qhull_pd)
+# set(qhull_SHAREDR qhull_rd)
+# set(qhull_STATIC qhullstatic_d)
+# set(qhull_STATICR qhullstatic_rd)
+#else()
set(qhull_CPP qhullcpp)
set(qhull_SHARED libqhull) # Temporarily avoid name conflict with qhull executable
set(qhull_SHAREDP qhull_p)
set(qhull_SHAREDR qhull_r)
set(qhull_STATIC qhullstatic)
set(qhull_STATICR qhullstatic_r)
-endif()
+#endif()

set(
qhull_TARGETS_INSTALL
4 changes: 2 additions & 2 deletions resources/calibration/retraction/fr_retraction.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ <h3>Temp&eacute;rature de d&eacute;part et &eacute;tape de diminution de la temp
<p>Ici, vous voulez commencer &agrave; la temp&eacute;rature la plus &eacute;lev&eacute;e acceptable. Si vous l'avez d&eacute;j&agrave; d&eacute;finie dans la temp&eacute;rature de votre filament, vous pouvez conserver "actuelle" comme param&egrave;tre de la temp&eacute;rature de d&eacute;part. Si vous ne l'avez pas encore d&eacute;fini, s&eacute;lectionnez la temp&eacute;rature maximale dans le champ 'Temp&eacute;rature de d&eacute;part'.</p>
<p>Apr&egrave;s cela, choisissez une option dans le champ "Dim. Temp&eacute;rature" qui ne r&eacute;duira pas la temp&eacute;rature trop bas. "3x10" signifie qu'il imprimera trois tests, le premier &agrave; la temp&eacute;rature maximale et les autres avec une temp&eacute;rature inf&eacute;rieure de 10C.</p>
<h3>Supprimer le ralentissement du filament</h3>
Ce bouton modifiera vos param&egrave;tres dans filament/cooling pour d&eacute;sactiver toutes les fonctions qui se d&eacute;clenchent lorsqu'une couche est trop petite pour pouvoir se refroidir &agrave; temps. Avec ces algorithmes d&eacute;sactiv&eacute;s, votre impression sera plus difficile en termes de r&eacute;traction, c'est donc un bon test de stress. Pour les r&eacute;activer, supprimez toutes les modifications de l'onglet filament (la petite "fl&egrave;che arri&egrave;re" orange).
Ce bouton modifiera vos param&egrave;tres dans filament/cooling pour d&eacute;sactiver toutes les fonctions qui se d&eacute;clenchent lorsqu'une couche est trop petite pour pouvoir se refroidir &agrave; temps. Avec ces algorithmes d&eacute;sactiv&eacute;s, votre impression sera plus difficile en termes de r&eacute;traction, c'est donc un bon test de stress. Pour les r&eacute;activer, supprimez toutes les modifications de l'onglet filament (la petite "fl&egrave;che arri&egrave;re" bleue).
<h3>R&eacute;sultats</h3>
<p>Lorsque les pi&egrave;ces d'essai sont imprim&eacute;es, vous pouvez compter le millim&egrave;tre gr&acirc;ce aux stries situ&eacute;es sur les cot&eacute;s des tours d'impression. Je les compte avec mon ongle. Quand vous &ecirc;tes &agrave; la hauteur o&ugrave; il n'y a plus de cordes, vous pouvez noter le nombre de millim&egrave;tres. Multipliez-le par votre param&egrave;tre de pas (0,1, 0,2, 0,5 ou 1) et vous avez votre nombre de longueur de r&eacute;traction. Vous pouvez ajouter 20% de longueur suppl&eacute;mentaire pour avoir une petite marge.</p>
<p>Si vous disposez de plusieurs tirages &agrave; des temp&eacute;ratures diff&eacute;rentes, vous devez choisir le meilleur tirage, celui qui pr&eacute;sente le moins de fil, &agrave; moins que la diminution du filage ne soit pas assez importante pour justifier la baisse de temp&eacute;rature.
Expand All @@ -52,4 +52,4 @@ <h2>Notes</h2>
<p>La vitesse de r&eacute;traction doit &ecirc;tre r&eacute;gl&eacute;e &agrave; la valeur maximale que votre extrudeuse, vos pilotes et votre firmware peuvent supporter de mani&egrave;re fiable, avec une marge de s&eacute;curit&eacute;. 50mm/s pour la r&eacute;traction et 20mm/s pour la d&eacute;traction est un bon d&eacute;but pour le PLA.</p>
<p>Licence pour les mod&egrave;les utilis&eacute;s pour cet essai de calibration: CC BY-SA 3.0</p>
</body>
</html>
</html>
4 changes: 2 additions & 2 deletions resources/calibration/retraction/retraction.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ <h3>Start temp & Decrease temp step</h3>
<p>Here, you want to start at the highest temperature acceptable. If you already set it into your filament temperature, you can keep "current" as the Start temp parameter. If you haven't set it yet, select the maximum temperature in the "Start temp" combo box field.</p>
<p>After that, choose an option in the "Temp decr" field that won't reduce the temperature too low. "3x10" means that it will print three tests, with the first one at the max temp and each other ones with 10C less temperature.</p>
<h3>Remove filament slowdown</h3>
This button will change your settings in filament/cooling to disable all features that trigger when a layer is too small to be able to cool down in time. With these algorithms disabled, your print will be more challenging in terms of retraction, so it's a good stress test. To re-enable them, remove all modifications from the filament tab (the little orange 'back arrow").
This button will change your settings in filament/cooling to disable all features that trigger when a layer is too small to be able to cool down in time. With these algorithms disabled, your print will be more challenging in terms of retraction, so it's a good stress test. To re-enable them, remove all modifications from the filament tab (the little blue 'back arrow").
<h3>Results</h3>
<p>When the test pieces are printed, you can count the millimetre with the ridges on the sides of the print towers. I count them with my nail. When you're at the height where there are no more strings, you can write down the millimetre number. Multiply it by your step parameter (0.1, 0.2, 0.5 or 1) and you have your retraction length number. You can add 20% more length to have a little margin.</p>
<p>If you have multiple prints with different temperatures, you need to choose the best print, the one with the least amount of stringing, unless the decrease in stringing isn't big enough to warrant the decrease in temperature.
Expand All @@ -56,4 +56,4 @@ <h2>Notes</h2>
<p>The retraction speed should be set to the maximum value your extruder/drivers/firmware can reliably support, with a safety margin. 50mm/s for retraction and 20mm/s for unretraction is a good start for PLA.</p>
<p>Licence for models used for this calibration test: CC BY-SA 3.0</p>
</body>
</html>
</html>
7 changes: 7 additions & 0 deletions resources/ui_layout/default/print.ui
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,8 @@ group:label_width$8:sidetext_width$7:Speed for print moves
line:Other speed
setting:width$4:thin_walls_speed
setting:width$4:ironing_speed
setting:wipe_tower_speed
setting:wipe_tower_wipe_starting_speed
group:Speed for non-print moves
line:Travel speed
setting:label$xy:travel_speed
Expand Down Expand Up @@ -397,18 +399,22 @@ group:Extrusion width
line:perimeter
setting:sidetext_width$10:label$width:perimeter_extrusion_width
setting:sidetext_width$10:label_width$15:label$spacing:perimeter_extrusion_spacing
setting:sidetext_width$10:label_width$15:label$odd layers:perimeter_extrusion_change_odd_layers
end_line
line:external perimeter
setting:sidetext_width$10:label$width:external_perimeter_extrusion_width
setting:sidetext_width$10:label_width$15:label$width&spacing combo:external_perimeter_extrusion_spacing
setting:sidetext_width$10:label_width$15:label$odd layers:external_perimeter_extrusion_change_odd_layers
end_line
line:infill
setting:sidetext_width$10:label$width:infill_extrusion_width
setting:sidetext_width$10:label_width$15:label$spacing:infill_extrusion_spacing
setting:sidetext_width$10:label_width$15:label$odd layers:infill_extrusion_change_odd_layers
end_line
line:solid infill
setting:sidetext_width$10:label$width:solid_infill_extrusion_width
setting:sidetext_width$10:label_width$15:label$spacing:solid_infill_extrusion_spacing
setting:sidetext_width$10:label_width$15:label$odd layers:solid_infill_extrusion_change_odd_layers
end_line
line:top infill
setting:sidetext_width$10:label$width:top_infill_extrusion_width
Expand Down Expand Up @@ -476,6 +482,7 @@ group:Plater
setting:duplicate_distance
group:Sequential printing
setting:tags$Advanced$Expert$Prusa:complete_objects
setting:parallel_objects_step
setting:complete_objects_one_skirt
setting:complete_objects_sort
line:Extruder clearance (mm)
Expand Down
5 changes: 5 additions & 0 deletions resources/ui_layout/example/print.ui
Original file line number Diff line number Diff line change
Expand Up @@ -393,18 +393,22 @@ group:Extrusion width
line:perimeter
setting:sidetext_width$10:label$width:perimeter_extrusion_width
setting:sidetext_width$10:label_width$15:label$spacing:perimeter_extrusion_spacing
setting:sidetext_width$10:label_width$15:label$odd layers:perimeter_extrusion_change_odd_layers
end_line
line:external perimeter
setting:sidetext_width$10:label$width:external_perimeter_extrusion_width
setting:sidetext_width$10:label_width$15:label$width&spacing combo:external_perimeter_extrusion_spacing
setting:sidetext_width$10:label_width$15:label$odd layers:external_perimeter_extrusion_change_odd_layers
end_line
line:infill
setting:sidetext_width$10:label$width:infill_extrusion_width
setting:sidetext_width$10:label_width$15:label$spacing:infill_extrusion_spacing
setting:sidetext_width$10:label_width$15:label$odd layers:infill_extrusion_change_odd_layers
end_line
line:solid infill
setting:sidetext_width$10:label$width:solid_infill_extrusion_width
setting:sidetext_width$10:label_width$15:label$spacing:solid_infill_extrusion_spacing
setting:sidetext_width$10:label_width$15:label$odd layers:solid_infill_extrusion_change_odd_layers
end_line
line:top infill
setting:sidetext_width$10:label$width:top_infill_extrusion_width
Expand Down Expand Up @@ -472,6 +476,7 @@ group:Plater
setting:duplicate_distance
group:Sequential printing
setting:tags$Advanced$Expert$Prusa:complete_objects
setting:parallel_objects_step
setting:complete_objects_one_skirt
setting:complete_objects_sort
line:Extruder clearance (mm)
Expand Down
1 change: 1 addition & 0 deletions src/imgui/imgui_widgets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2919,6 +2919,7 @@ bool ImGui::SliderBehavior(const ImRect& bb, ImGuiID id, ImGuiDataType data_type

// Note: p_data, p_min and p_max are _pointers_ to a memory address holding the data. For a slider, they are all required.
// Read code of e.g. SliderFloat(), SliderInt() etc. or examples in 'Demo->Widgets->Data Types' to understand how to use this function directly.
// TODO: step parameter
bool ImGui::SliderScalar(const char* label, ImGuiDataType data_type, void* p_data, const void* p_min, const void* p_max, const char* format, ImGuiSliderFlags flags)
{
ImGuiWindow* window = GetCurrentWindow();
Expand Down
6 changes: 3 additions & 3 deletions src/libslic3r/Fill/Fill.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ std::vector<SurfaceFill> group_fills(const Layer &layer)
*layer.object(),
extrusion_role,
(surface.thickness == -1) ? layer.height : surface.thickness, // extrusion height
layer.id() == 0 // first layer?
layer.id()
);
}

Expand All @@ -245,7 +245,7 @@ std::vector<SurfaceFill> group_fills(const Layer &layer)
*layer.object(),
frInfill,
layer.object()->config().layer_height.value, // TODO: handle infill_every_layers?
false // no first layer
layer.id()
).spacing();

// Anchor a sparse infill to inner perimeters with the following anchor length:
Expand Down Expand Up @@ -376,7 +376,7 @@ std::vector<SurfaceFill> group_fills(const Layer &layer)
*layer.object(),
frSolidInfill,
layer.height, // extrusion height
layer.id() == 0 // first layer?
layer.id()
);
params.spacing = params.flow.spacing();
surface_fills.emplace_back(params);
Expand Down
Loading

0 comments on commit f1642d3

Please sign in to comment.