Updated Wiki content

OrcaSlicerBot
2026-01-19 12:58:25 +00:00
parent 22a05cad31
commit 6ae62712ac
31 changed files with 82 additions and 85 deletions

@@ -133,7 +133,8 @@ if ($DownloadSvg) {
} }
} }
} }
} else { }
else {
Write-Host "Skipping SVG icon download (use --download-svg or -d to enable)" Write-Host "Skipping SVG icon download (use --download-svg or -d to enable)"
} }
@@ -144,7 +145,7 @@ Get-ChildItem -Path docs -Filter *.md -Recurse | ForEach-Object {
$docsFull = (Get-Item -Path docs -Force).FullName $docsFull = (Get-Item -Path docs -Force).FullName
# Calculate relative path from docs to current file (as string) # Calculate relative path from docs to current file (as string)
$relPathFromDocs = $mdFile.Substring($docsFull.Length).TrimStart('\','/') $relPathFromDocs = $mdFile.Substring($docsFull.Length).TrimStart('\', '/')
# Count how many directory levels deep we are (number of \ or /) # Count how many directory levels deep we are (number of \ or /)
$depth = ($relPathFromDocs -split '[\\/]').Count - 1 # -1 because file itself doesn't count as level $depth = ($relPathFromDocs -split '[\\/]').Count - 1 # -1 because file itself doesn't count as level
@@ -174,7 +175,7 @@ Get-ChildItem -Path wiki -Filter *.html -Recurse | Where-Object { $_.Name -ne 'i
$wikiFull = (Get-Item -Path wiki -Force).FullName $wikiFull = (Get-Item -Path wiki -Force).FullName
# Calculate relative path from wiki/ to the current HTML file # Calculate relative path from wiki/ to the current HTML file
$relPath = $htmlFile.Substring($wikiFull.Length).TrimStart('\','/') $relPath = $htmlFile.Substring($wikiFull.Length).TrimStart('\', '/')
# Normalize path separators to forward slashes for URLs # Normalize path separators to forward slashes for URLs
$relPath = $relPath -replace '\\', '/' $relPath = $relPath -replace '\\', '/'
@@ -234,7 +235,8 @@ New-Item -ItemType Directory -Path "wiki\assets\javascripts" -Force | Out-Null
if (Test-Path "web_extras\extra.css") { if (Test-Path "web_extras\extra.css") {
Copy-Item "web_extras\extra.css" "wiki\assets\stylesheets\extra.css" -Force Copy-Item "web_extras\extra.css" "wiki\assets\stylesheets\extra.css" -Force
Write-Host "Copied extra.css" Write-Host "Copied extra.css"
} else { }
else {
Write-Host "Warning: web_extras\extra.css not found - skipping" -ForegroundColor Yellow Write-Host "Warning: web_extras\extra.css not found - skipping" -ForegroundColor Yellow
} }
@@ -242,28 +244,32 @@ if (Test-Path "web_extras\extra.css") {
if (Test-Path "web_extras\OrcaSlicer.ico") { if (Test-Path "web_extras\OrcaSlicer.ico") {
Copy-Item "web_extras\OrcaSlicer.ico" "wiki\assets\images\OrcaSlicer.ico" -Force Copy-Item "web_extras\OrcaSlicer.ico" "wiki\assets\images\OrcaSlicer.ico" -Force
Write-Host "Copied OrcaSlicer.ico" Write-Host "Copied OrcaSlicer.ico"
} else { }
else {
Write-Host "Warning: web_extras\OrcaSlicer.ico not found - skipping" -ForegroundColor Yellow Write-Host "Warning: web_extras\OrcaSlicer.ico not found - skipping" -ForegroundColor Yellow
} }
if (Test-Path "web_extras\OrcaSlicer.png") { if (Test-Path "web_extras\OrcaSlicer.png") {
Copy-Item "web_extras\OrcaSlicer.png" "wiki\assets\images\OrcaSlicer.png" -Force Copy-Item "web_extras\OrcaSlicer.png" "wiki\assets\images\OrcaSlicer.png" -Force
Write-Host "Copied OrcaSlicer.png" Write-Host "Copied OrcaSlicer.png"
} else { }
else {
Write-Host "Warning: web_extras\OrcaSlicer.png not found - skipping" -ForegroundColor Yellow Write-Host "Warning: web_extras\OrcaSlicer.png not found - skipping" -ForegroundColor Yellow
} }
if (Test-Path "web_extras\icon-theme.js") { if (Test-Path "web_extras\icon-theme.js") {
Copy-Item "web_extras\icon-theme.js" "wiki\assets\javascripts\icon-theme.js" -Force Copy-Item "web_extras\icon-theme.js" "wiki\assets\javascripts\icon-theme.js" -Force
Write-Host "Copied icon-theme.js" Write-Host "Copied icon-theme.js"
} else { }
else {
Write-Host "Warning: web_extras\icon-theme.js not found - skipping" -ForegroundColor Yellow Write-Host "Warning: web_extras\icon-theme.js not found - skipping" -ForegroundColor Yellow
} }
if (Test-Path "web_extras\katex.js") { if (Test-Path "web_extras\katex.js") {
Copy-Item "web_extras\katex.js" "wiki\assets\javascripts\katex.js" -Force Copy-Item "web_extras\katex.js" "wiki\assets\javascripts\katex.js" -Force
Write-Host "Copied katex.js" Write-Host "Copied katex.js"
} else { }
else {
Write-Host "Warning: web_extras\katex.js not found - skipping" -ForegroundColor Yellow Write-Host "Warning: web_extras\katex.js not found - skipping" -ForegroundColor Yellow
} }
@@ -271,7 +277,8 @@ if (Test-Path "web_extras") {
New-Item -ItemType Directory -Path "wiki\web_extras" -Force | Out-Null New-Item -ItemType Directory -Path "wiki\web_extras" -Force | Out-Null
Copy-Item -Path "web_extras\*" -Destination "wiki\web_extras" -Recurse -Force -ErrorAction SilentlyContinue Copy-Item -Path "web_extras\*" -Destination "wiki\web_extras" -Recurse -Force -ErrorAction SilentlyContinue
Write-Host "Copied web_extras directory" Write-Host "Copied web_extras directory"
} else { }
else {
Write-Host "Warning: web_extras directory not found - skipping" -ForegroundColor Yellow Write-Host "Warning: web_extras directory not found - skipping" -ForegroundColor Yellow
} }

@@ -235,17 +235,7 @@ def update_mkdocs_yml(mkdocs_path: Path, nav_yaml: str) -> None:
# Validate YAML before writing (basic check - try importing yaml if available) # Validate YAML before writing (basic check - try importing yaml if available)
try: try:
import yaml import yaml
yaml.safe_load(new_content)
class _MkDocsSafeLoader(yaml.SafeLoader):
"""SafeLoader that tolerates mkdocs Python tags."""
# Allow !!python/name:... tags used by MkDocs/pymdownx without executing code
_MkDocsSafeLoader.add_constructor(
'tag:yaml.org,2002:python/name',
lambda loader, node: loader.construct_scalar(node)
)
yaml.load(new_content, Loader=_MkDocsSafeLoader)
except ImportError: except ImportError:
# yaml module not available, skip validation # yaml module not available, skip validation
pass pass

@@ -51,7 +51,7 @@ $$
\frac{\text{Perimeter Length}}{2\pi} \leq \text{Threshold} \frac{\text{Perimeter Length}}{2\pi} \leq \text{Threshold}
$$ $$
For example, if the threshold is set to 5 mm, then the perimeter length must be less than or equal to 31.4 mm (2 * π * 5 mm) to be considered a small perimeter. For example, if the threshold is set to 5 mm, then the perimeter length must be less than or equal to 31.4 mm `(2 * π * 5 mm)` to be considered a small perimeter.
- A Circle with a diameter of 10 mm will have a perimeter length of approximately 31.4 mm, which is equal to the threshold, so it will be considered a small perimeter. - A Circle with a diameter of 10 mm will have a perimeter length of approximately 31.4 mm, which is equal to the threshold, so it will be considered a small perimeter.
- A Cube of 10mm x 10mm will have a perimeter length of 40 mm, which is greater than the threshold, so it will not be considered a small perimeter. - A Cube of 10mm x 10mm will have a perimeter length of 40 mm, which is greater than the threshold, so it will not be considered a small perimeter.