mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-20 20:03:47 +00:00
Merge branch 'main' into dev/bbl-network-upd
This commit is contained in:
@@ -84,6 +84,10 @@ then
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# cmake 4.x compatibility workaround
|
||||||
|
export CMAKE_POLICY_VERSION_MINIMUM=3.5
|
||||||
|
|
||||||
DISTRIBUTION=$(awk -F= '/^ID=/ {print $2}' /etc/os-release | tr -d '"')
|
DISTRIBUTION=$(awk -F= '/^ID=/ {print $2}' /etc/os-release | tr -d '"')
|
||||||
DISTRIBUTION_LIKE=$(awk -F= '/^ID_LIKE=/ {print $2}' /etc/os-release | tr -d '"')
|
DISTRIBUTION_LIKE=$(awk -F= '/^ID_LIKE=/ {print $2}' /etc/os-release | tr -d '"')
|
||||||
# Check for direct distribution match to Ubuntu/Debian
|
# Check for direct distribution match to Ubuntu/Debian
|
||||||
@@ -92,6 +96,8 @@ if [ "${DISTRIBUTION}" == "ubuntu" ] || [ "${DISTRIBUTION}" == "linuxmint" ]; th
|
|||||||
# Check if distribution is Debian/Ubuntu-like based on ID_LIKE
|
# Check if distribution is Debian/Ubuntu-like based on ID_LIKE
|
||||||
elif [[ "${DISTRIBUTION_LIKE}" == *"debian"* ]] || [[ "${DISTRIBUTION_LIKE}" == *"ubuntu"* ]]; then
|
elif [[ "${DISTRIBUTION_LIKE}" == *"debian"* ]] || [[ "${DISTRIBUTION_LIKE}" == *"ubuntu"* ]]; then
|
||||||
DISTRIBUTION="debian"
|
DISTRIBUTION="debian"
|
||||||
|
elif [[ "${DISTRIBUTION_LIKE}" == *"arch"* ]]; then
|
||||||
|
DISTRIBUTION="arch"
|
||||||
fi
|
fi
|
||||||
if [ ! -f ./linux.d/${DISTRIBUTION} ]
|
if [ ! -f ./linux.d/${DISTRIBUTION} ]
|
||||||
then
|
then
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
cmake_minimum_required(VERSION 3.13)
|
cmake_minimum_required(VERSION 3.13)
|
||||||
|
|
||||||
# Verify that your CMake version is exactly 3.31.x series or lower on windows
|
# Verify that your CMake version is exactly 3.31.x series or lower on windows
|
||||||
if(${CMAKE_VERSION} VERSION_LESS "3.13" OR ${CMAKE_VERSION} VERSION_GREATER_EQUAL "4.0")
|
if ( ((MSVC) OR (WIN32)) AND (${CMAKE_VERSION} VERSION_GREATER_EQUAL "4.0") )
|
||||||
message(FATAL_ERROR "Only CMake versions between 3.13.x and 3.31.x is supported. Detected version: ${CMAKE_VERSION}")
|
message(FATAL_ERROR "Only cmake versions between 3.13.x and 3.31.x is supported on windows. Detected version: ${CMAKE_VERSION}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"type": "filament",
|
"type": "filament",
|
||||||
"name": "AliZ PETG-CF @base",
|
"name": "AliZ PETG-CF @base",
|
||||||
"inherits": "AliZ PETG @base",
|
"inherits": "AliZ PETG @base",
|
||||||
"filament_id": "AliZ001-1",
|
"filament_id": "AZ01-1",
|
||||||
"from": "system",
|
"from": "system",
|
||||||
"instantiation": "false",
|
"instantiation": "false",
|
||||||
"fan_cooling_layer_time": [
|
"fan_cooling_layer_time": [
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"type": "filament",
|
"type": "filament",
|
||||||
"name": "AliZ PETG-Metal @base",
|
"name": "AliZ PETG-Metal @base",
|
||||||
"inherits": "AliZ PETG @base",
|
"inherits": "AliZ PETG @base",
|
||||||
"filament_id": "AliZ001-2",
|
"filament_id": "AZ01-2",
|
||||||
"from": "system",
|
"from": "system",
|
||||||
"instantiation": "false",
|
"instantiation": "false",
|
||||||
"fan_cooling_layer_time": [
|
"fan_cooling_layer_time": [
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
"inherits": "fdm_filament_common",
|
"inherits": "fdm_filament_common",
|
||||||
"from": "system",
|
"from": "system",
|
||||||
"instantiation": "false",
|
"instantiation": "false",
|
||||||
"filament_id": "OGFLSBS99",
|
"filament_id": "OFLSBS99",
|
||||||
"fan_cooling_layer_time": [
|
"fan_cooling_layer_time": [
|
||||||
"100"
|
"100"
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
"extruder_clearance_height_to_rod": "33",
|
"extruder_clearance_height_to_rod": "33",
|
||||||
"extruder_clearance_radius": "75",
|
"extruder_clearance_radius": "75",
|
||||||
"from": "system",
|
"from": "system",
|
||||||
|
"printer_structure": "corexy",
|
||||||
"gcode_flavor": "marlin2",
|
"gcode_flavor": "marlin2",
|
||||||
"host_type": "prusalink",
|
"host_type": "prusalink",
|
||||||
"inherits": "fdm_machine_common",
|
"inherits": "fdm_machine_common",
|
||||||
|
|||||||
@@ -232,6 +232,44 @@ def check_filament_name_consistency(profiles_dir, vendor_name):
|
|||||||
|
|
||||||
return error_count
|
return error_count
|
||||||
|
|
||||||
|
def check_filament_id(vendor, vendor_folder):
|
||||||
|
"""
|
||||||
|
Make sure filament_id is not longer than 8 characters, otherwise AMS won't work properly
|
||||||
|
"""
|
||||||
|
if vendor not in ('BBL', 'OrcaFilamentLibrary'):
|
||||||
|
return 0
|
||||||
|
|
||||||
|
error = 0
|
||||||
|
vendor_path = Path(vendor_folder)
|
||||||
|
if not vendor_path.exists():
|
||||||
|
return 0
|
||||||
|
|
||||||
|
# Use rglob to recursively find .json files.
|
||||||
|
for file_path in vendor_path.rglob("*.json"):
|
||||||
|
try:
|
||||||
|
with open(file_path, 'r', encoding='UTF-8') as fp:
|
||||||
|
# Use custom hook to detect duplicates.
|
||||||
|
data = json.load(fp, object_pairs_hook=no_duplicates_object_pairs_hook)
|
||||||
|
except ValueError as ve:
|
||||||
|
print(f"Duplicate key error in {file_path}: {ve}")
|
||||||
|
error += 1
|
||||||
|
continue
|
||||||
|
except Exception as e:
|
||||||
|
print(f"Error processing {file_path}: {e}")
|
||||||
|
error += 1
|
||||||
|
continue
|
||||||
|
|
||||||
|
if 'filament_id' not in data:
|
||||||
|
continue
|
||||||
|
|
||||||
|
filament_id = data['filament_id']
|
||||||
|
|
||||||
|
if len(filament_id) > 8:
|
||||||
|
error += 1
|
||||||
|
print(f"Filament id too long \"{filament_id}\": {file_path}")
|
||||||
|
|
||||||
|
return error
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
print("Checking profiles ...")
|
print("Checking profiles ...")
|
||||||
parser = argparse.ArgumentParser(description="Check profiles for issues")
|
parser = argparse.ArgumentParser(description="Check profiles for issues")
|
||||||
@@ -251,12 +289,14 @@ def main():
|
|||||||
if args.check_materials:
|
if args.check_materials:
|
||||||
errors_found += check_machine_default_materials(profiles_dir, args.vendor)
|
errors_found += check_machine_default_materials(profiles_dir, args.vendor)
|
||||||
errors_found += check_filament_name_consistency(profiles_dir, args.vendor)
|
errors_found += check_filament_name_consistency(profiles_dir, args.vendor)
|
||||||
|
errors_found += check_filament_id(args.vendor, profiles_dir / args.vendor / "filament")
|
||||||
checked_vendor_count += 1
|
checked_vendor_count += 1
|
||||||
else:
|
else:
|
||||||
for vendor_dir in profiles_dir.iterdir():
|
for vendor_dir in profiles_dir.iterdir():
|
||||||
if not vendor_dir.is_dir():
|
if not vendor_dir.is_dir():
|
||||||
continue
|
continue
|
||||||
errors_found += check_filament_name_consistency(profiles_dir, vendor_dir.name)
|
errors_found += check_filament_name_consistency(profiles_dir, vendor_dir.name)
|
||||||
|
errors_found += check_filament_id(vendor_dir.name, vendor_dir / "filament")
|
||||||
# skip "OrcaFilamentLibrary" folder
|
# skip "OrcaFilamentLibrary" folder
|
||||||
if vendor_dir.name == "OrcaFilamentLibrary":
|
if vendor_dir.name == "OrcaFilamentLibrary":
|
||||||
continue
|
continue
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ void PrinterWebView::load_url(wxString& url, wxString apikey)
|
|||||||
m_apikey_sent = false;
|
m_apikey_sent = false;
|
||||||
|
|
||||||
if (this->IsShown()) {
|
if (this->IsShown()) {
|
||||||
m_url_deferred = *wxEmptyString;
|
m_url_deferred.clear();
|
||||||
m_browser->LoadURL(url);
|
m_browser->LoadURL(url);
|
||||||
} else {
|
} else {
|
||||||
m_url_deferred = url;
|
m_url_deferred = url;
|
||||||
@@ -92,7 +92,7 @@ bool PrinterWebView::Show(bool show)
|
|||||||
{
|
{
|
||||||
if (show && !m_url_deferred.empty()) {
|
if (show && !m_url_deferred.empty()) {
|
||||||
m_browser->LoadURL(m_url_deferred);
|
m_browser->LoadURL(m_url_deferred);
|
||||||
m_url_deferred = *wxEmptyString;
|
m_url_deferred.clear();
|
||||||
}
|
}
|
||||||
return wxPanel::Show(show);
|
return wxPanel::Show(show);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user