mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-24 21:55:14 +00:00
Updated Wiki content
@@ -139,8 +139,10 @@ G-code command: `M106 P3 S(0-255)`
|
|||||||
|
|
||||||
#### During print
|
#### During print
|
||||||
|
|
||||||
|
[Variables](built_in_placeholders_variables): `activate_air_filtration_during_print`, `during_print_exhaust_fan_speed`.
|
||||||
Speed of exhaust fan during printing. This speed will override the speed in filament custom G-code.
|
Speed of exhaust fan during printing. This speed will override the speed in filament custom G-code.
|
||||||
|
|
||||||
#### Complete print
|
#### Complete print
|
||||||
|
|
||||||
|
[Variables](built_in_placeholders_variables): `activate_air_filtration_on_completion`, `complete_print_exhaust_fan_speed`.
|
||||||
Speed of exhaust fan after printing completes.
|
Speed of exhaust fan after printing completes.
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ Always refer to the filament manufacturer's recommendations and [calibrations](t
|
|||||||
|
|
||||||
## Nozzle
|
## Nozzle
|
||||||
|
|
||||||
|
[Variables](built_in_placeholders_variables): `nozzle_temperature_initial_layer`, `nozzle_temperature`.
|
||||||
One of the most critical settings for successful 3D printing is the nozzle temperature.
|
One of the most critical settings for successful 3D printing is the nozzle temperature.
|
||||||
The correct nozzle temperature ensures proper melting and extrusion of the filament, leading to good layer adhesion and overall print quality.
|
The correct nozzle temperature ensures proper melting and extrusion of the filament, leading to good layer adhesion and overall print quality.
|
||||||
You can set a higher temperature for the first layer to improve bed adhesion but be cautious with deformations as [elephant foot](quality_settings_precision#elephant-foot-compensation).
|
You can set a higher temperature for the first layer to improve bed adhesion but be cautious with deformations as [elephant foot](quality_settings_precision#elephant-foot-compensation).
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ Other flow ratios, such as ratios for the first layer (does not affect brims and
|
|||||||
|
|
||||||
## Only one wall
|
## Only one wall
|
||||||
|
|
||||||
[Variables](built_in_placeholders_variables): `only_one_wall_top`, `only_one_wall_first_layer`.
|
[Variables](built_in_placeholders_variables): `only_one_wall_first_layer`, `only_one_wall_top`.
|
||||||
Use only one wall on flat surfaces, to give more space to the [top infill pattern](strength_settings_top_bottom_shells#surface-pattern).
|
Use only one wall on flat surfaces, to give more space to the [top infill pattern](strength_settings_top_bottom_shells#surface-pattern).
|
||||||
Specially useful in small features, like letters, where the top surface is very small and [concentric pattern](strength_settings_patterns#concentric) from walls would not cover it properly.
|
Specially useful in small features, like letters, where the top surface is very small and [concentric pattern](strength_settings_patterns#concentric) from walls would not cover it properly.
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ This will cap the speed set by the process if it exceeds these values.
|
|||||||
|
|
||||||
## Acceleration limitation
|
## Acceleration limitation
|
||||||
|
|
||||||
[Variables](built_in_placeholders_variables): `machine_max_acceleration_x`, `machine_max_acceleration_y`, `machine_max_acceleration_z`, `machine_max_acceleration_e`, `machine_max_acceleration_extruding`, `machine_max_acceleration_retracting`, `machine_max_acceleration_travel`.
|
[Variables](built_in_placeholders_variables): `machine_max_acceleration_x`, `machine_max_acceleration_y`, `machine_max_acceleration_e`, `machine_max_acceleration_z`, `machine_max_acceleration_extruding`, `machine_max_acceleration_retracting`, `machine_max_acceleration_travel`.
|
||||||
Safeguard maximum accelerations for all axes.
|
Safeguard maximum accelerations for all axes.
|
||||||
This will cap the acceleration set by the process if it exceeds these values.
|
This will cap the acceleration set by the process if it exceeds these values.
|
||||||
|
|
||||||
@@ -49,7 +49,7 @@ Safeguard maximum jerks for all axes.
|
|||||||
|
|
||||||
### Maximum Jerk
|
### Maximum Jerk
|
||||||
|
|
||||||
[Variables](built_in_placeholders_variables): `machine_max_jerk_z`, `machine_max_jerk_x`, `machine_max_jerk_y`, `machine_max_jerk_e`.
|
[Variables](built_in_placeholders_variables): `machine_max_jerk_y`, `machine_max_jerk_x`, `machine_max_jerk_z`, `machine_max_jerk_e`.
|
||||||
Maximum [jerk](speed_settings_jerk_xy) for each axis (M205 X, Y, Z, E, only apply if JD = 0 for Marlin 2 Firmware)
|
Maximum [jerk](speed_settings_jerk_xy) for each axis (M205 X, Y, Z, E, only apply if JD = 0 for Marlin 2 Firmware)
|
||||||
|
|
||||||
### Maximum Junction Deviation
|
### Maximum Junction Deviation
|
||||||
|
|||||||
@@ -88,20 +88,68 @@ function Get-StringVectors {
|
|||||||
return $result
|
return $result
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$syncProgressActivity = "sync-tab-options-to-wiki.ps1"
|
||||||
|
$syncStageTotal = 7
|
||||||
|
|
||||||
|
function Set-SyncStage {
|
||||||
|
param(
|
||||||
|
[int]$Step,
|
||||||
|
[string]$Status
|
||||||
|
)
|
||||||
|
|
||||||
|
$percent = if ($syncStageTotal -gt 0) {
|
||||||
|
[Math]::Max(0, [Math]::Min(100, [int](($Step / [double]$syncStageTotal) * 100)))
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
0
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Progress -Id 1 -Activity $syncProgressActivity -Status $Status -PercentComplete $percent
|
||||||
|
}
|
||||||
|
|
||||||
|
function Set-SyncDetail {
|
||||||
|
param(
|
||||||
|
[string]$Status,
|
||||||
|
[int]$Current,
|
||||||
|
[int]$Total
|
||||||
|
)
|
||||||
|
|
||||||
|
$percent = if ($Total -gt 0) {
|
||||||
|
[Math]::Max(0, [Math]::Min(100, [int](($Current / [double]$Total) * 100)))
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
0
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Progress -Id 2 -ParentId 1 -Activity "Processing markdown mappings" -Status $Status -PercentComplete $percent
|
||||||
|
}
|
||||||
|
|
||||||
|
function Complete-SyncProgress {
|
||||||
|
Write-Progress -Id 2 -Activity "Processing markdown mappings" -Completed
|
||||||
|
Write-Progress -Id 1 -Activity $syncProgressActivity -Completed
|
||||||
|
}
|
||||||
|
|
||||||
|
Set-SyncStage -Step 0 -Status "Validating input paths"
|
||||||
|
|
||||||
if (-not (Test-Path -LiteralPath $WikiRoot)) {
|
if (-not (Test-Path -LiteralPath $WikiRoot)) {
|
||||||
|
Complete-SyncProgress
|
||||||
throw "Wiki root not found: $WikiRoot"
|
throw "Wiki root not found: $WikiRoot"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Set-SyncStage -Step 1 -Status "Loading Tab.cpp content"
|
||||||
$tabContent = Get-TabCppContent -Source $TabCppPath
|
$tabContent = Get-TabCppContent -Source $TabCppPath
|
||||||
|
|
||||||
|
Set-SyncStage -Step 2 -Status "Parsing option mappings from Tab.cpp"
|
||||||
$patternSingle = 'append_single_option_line\(\s*"(?<variable>[^"]+)"\s*,\s*"(?<ref>[^"]+)"(?:\s*,\s*(?<indexer>[^\)]+))?\s*\)'
|
$patternSingle = 'append_single_option_line\(\s*"(?<variable>[^"]+)"\s*,\s*"(?<ref>[^"]+)"(?:\s*,\s*(?<indexer>[^\)]+))?\s*\)'
|
||||||
$patternOption = 'append_option_line\(\s*[^,]+\s*,\s*"(?<variable>[^"]+)"\s*,\s*"(?<ref>[^"]+)"(?:\s*,\s*(?<indexer>[^\)]+))?\s*\)'
|
$patternOption = 'append_option_line\(\s*[^,]+\s*,\s*"(?<variable>[^"]+)"\s*,\s*"(?<ref>[^"]+)"(?:\s*,\s*(?<indexer>[^\)]+))?\s*\)'
|
||||||
$patternAppendLineBlock = '(?s)(?<obj>\w+)\.label_path\s*=\s*"(?<ref>[^"]+)"\s*;(?<body>.*?)(?:\w+->)?append_line\(\s*\k<obj>\s*\)\s*;'
|
$patternAppendLineBlock = '(?s)(?<obj>\w+)\.label_path\s*=\s*"(?<ref>[^"]+)"\s*;(?<body>.*?)(?:\w+->)?append_line\(\s*\k<obj>\s*\)\s*;'
|
||||||
|
$patternAppendLineAssignedBlock = '(?s)(?<obj>\w+)\s*=\s*\{.*?\}\s*;(?<body>.*?)(?:\w+->)?append_line\(\s*\k<obj>\s*\)\s*;'
|
||||||
$patternForBlock = '(?s)for\s*\(\s*const\s+std::string\s*&\s*(?<iter>\w+)\s*:\s*(?<collection>\w+)\s*\)\s*\{(?<body>.*?)\}'
|
$patternForBlock = '(?s)for\s*\(\s*const\s+std::string\s*&\s*(?<iter>\w+)\s*:\s*(?<collection>\w+)\s*\)\s*\{(?<body>.*?)\}'
|
||||||
|
|
||||||
$singleMatches = [regex]::Matches($tabContent, $patternSingle)
|
$singleMatches = [regex]::Matches($tabContent, $patternSingle)
|
||||||
$optionMatches = [regex]::Matches($tabContent, $patternOption)
|
$optionMatches = [regex]::Matches($tabContent, $patternOption)
|
||||||
$appendLineMatches = [regex]::Matches($tabContent, $patternAppendLineBlock)
|
$appendLineMatches = [regex]::Matches($tabContent, $patternAppendLineBlock)
|
||||||
|
$appendLineAssignedMatches = [regex]::Matches($tabContent, $patternAppendLineAssignedBlock)
|
||||||
$forMatches = [regex]::Matches($tabContent, $patternForBlock)
|
$forMatches = [regex]::Matches($tabContent, $patternForBlock)
|
||||||
$stringVectors = Get-StringVectors -Content $tabContent
|
$stringVectors = Get-StringVectors -Content $tabContent
|
||||||
|
|
||||||
@@ -139,12 +187,47 @@ foreach ($m in $appendLineMatches) {
|
|||||||
$obj = $m.Groups['obj'].Value
|
$obj = $m.Groups['obj'].Value
|
||||||
$ref = $m.Groups['ref'].Value.Trim()
|
$ref = $m.Groups['ref'].Value.Trim()
|
||||||
$body = $m.Groups['body'].Value
|
$body = $m.Groups['body'].Value
|
||||||
$optPattern = [regex]::Escape($obj) + '\.append_option\(\s*optgroup->get_option\("(?<variable>[^"]+)"\)\s*\)\s*;'
|
$optPattern = '(?s)' + [regex]::Escape($obj) + '\.append_option\(\s*.*?get_option\("(?<variable>[^"]+)"(?:\s*,\s*(?<indexer>[^\)]+))?\)\s*\)\s*;'
|
||||||
$optMatches = [regex]::Matches($body, $optPattern)
|
$optMatches = [regex]::Matches($body, $optPattern)
|
||||||
|
|
||||||
foreach ($om in $optMatches) {
|
foreach ($om in $optMatches) {
|
||||||
|
$variable = $om.Groups['variable'].Value.Trim()
|
||||||
|
$indexer = $om.Groups['indexer'].Value.Trim()
|
||||||
|
if (-not [string]::IsNullOrWhiteSpace($indexer) -and $indexer -match '^[A-Za-z_]\w*$') {
|
||||||
|
$variable = "${variable}[$indexer]"
|
||||||
|
}
|
||||||
|
|
||||||
$rawEntries.Add([PSCustomObject]@{
|
$rawEntries.Add([PSCustomObject]@{
|
||||||
Variable = $om.Groups['variable'].Value.Trim()
|
Variable = $variable
|
||||||
|
Ref = $ref
|
||||||
|
Index = [int]($m.Index + $om.Index)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($m in $appendLineAssignedMatches) {
|
||||||
|
$obj = $m.Groups['obj'].Value
|
||||||
|
$body = $m.Groups['body'].Value
|
||||||
|
|
||||||
|
$labelPattern = [regex]::Escape($obj) + '\.label_path\s*=\s*"(?<ref>[^"]+)"\s*;'
|
||||||
|
$labelMatch = [regex]::Match($body, $labelPattern)
|
||||||
|
if (-not $labelMatch.Success) {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
$ref = $labelMatch.Groups['ref'].Value.Trim()
|
||||||
|
$optPattern = '(?s)' + [regex]::Escape($obj) + '\.append_option\(\s*.*?get_option\("(?<variable>[^"]+)"(?:\s*,\s*(?<indexer>[^\)]+))?\)\s*\)\s*;'
|
||||||
|
$optMatches = [regex]::Matches($body, $optPattern)
|
||||||
|
|
||||||
|
foreach ($om in $optMatches) {
|
||||||
|
$variable = $om.Groups['variable'].Value.Trim()
|
||||||
|
$indexer = $om.Groups['indexer'].Value.Trim()
|
||||||
|
if (-not [string]::IsNullOrWhiteSpace($indexer) -and $indexer -match '^[A-Za-z_]\w*$') {
|
||||||
|
$variable = "${variable}[$indexer]"
|
||||||
|
}
|
||||||
|
|
||||||
|
$rawEntries.Add([PSCustomObject]@{
|
||||||
|
Variable = $variable
|
||||||
Ref = $ref
|
Ref = $ref
|
||||||
Index = [int]($m.Index + $om.Index)
|
Index = [int]($m.Index + $om.Index)
|
||||||
})
|
})
|
||||||
@@ -193,13 +276,16 @@ foreach ($fm in $forMatches) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$matches = @($rawEntries | Sort-Object -Property Index)
|
|
||||||
|
|
||||||
if ($matches.Count -eq 0) {
|
$parsedMatches = @($rawEntries | Sort-Object -Property Index)
|
||||||
|
|
||||||
|
if ($parsedMatches.Count -eq 0) {
|
||||||
Write-Host "No supported option-to-doc mappings were found." -ForegroundColor Yellow
|
Write-Host "No supported option-to-doc mappings were found." -ForegroundColor Yellow
|
||||||
|
Complete-SyncProgress
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Set-SyncStage -Step 3 -Status "Scanning markdown files"
|
||||||
$mdFiles = Get-ChildItem -LiteralPath $WikiRoot -Recurse -File -Filter '*.md' |
|
$mdFiles = Get-ChildItem -LiteralPath $WikiRoot -Recurse -File -Filter '*.md' |
|
||||||
Where-Object { $_.FullName -notmatch '[\\/]wiki[\\/]' }
|
Where-Object { $_.FullName -notmatch '[\\/]wiki[\\/]' }
|
||||||
|
|
||||||
@@ -212,8 +298,9 @@ foreach ($file in $mdFiles) {
|
|||||||
$mdByName[$key].Add($file.FullName)
|
$mdByName[$key].Add($file.FullName)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Set-SyncStage -Step 4 -Status "Building file and anchor entries"
|
||||||
$entries = New-Object System.Collections.Generic.List[object]
|
$entries = New-Object System.Collections.Generic.List[object]
|
||||||
foreach ($m in $matches) {
|
foreach ($m in $parsedMatches) {
|
||||||
$variable = $m.Variable
|
$variable = $m.Variable
|
||||||
$ref = $m.Ref
|
$ref = $m.Ref
|
||||||
|
|
||||||
@@ -239,6 +326,7 @@ foreach ($m in $matches) {
|
|||||||
|
|
||||||
if ($entries.Count -eq 0) {
|
if ($entries.Count -eq 0) {
|
||||||
Write-Host "No entries with file#anchor format were found." -ForegroundColor Yellow
|
Write-Host "No entries with file#anchor format were found." -ForegroundColor Yellow
|
||||||
|
Complete-SyncProgress
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -249,9 +337,15 @@ $alreadyPresent = 0
|
|||||||
$normalizedSections = 0
|
$normalizedSections = 0
|
||||||
|
|
||||||
$groupedByFile = $entries | Group-Object -Property FileKey
|
$groupedByFile = $entries | Group-Object -Property FileKey
|
||||||
|
$totalFileGroups = $groupedByFile.Count
|
||||||
|
$fileNumber = 0
|
||||||
|
|
||||||
|
Set-SyncStage -Step 5 -Status "Applying mappings to markdown files ($totalFileGroups files)"
|
||||||
|
|
||||||
foreach ($group in $groupedByFile) {
|
foreach ($group in $groupedByFile) {
|
||||||
|
$fileNumber++
|
||||||
$fileKey = $group.Name
|
$fileKey = $group.Name
|
||||||
|
Set-SyncDetail -Status "File $fileNumber/$($totalFileGroups): $fileKey" -Current $fileNumber -Total $totalFileGroups
|
||||||
|
|
||||||
if (-not $mdByName.ContainsKey($fileKey)) {
|
if (-not $mdByName.ContainsKey($fileKey)) {
|
||||||
Write-Host "[WARN] Markdown file not found for '$fileKey'" -ForegroundColor Yellow
|
Write-Host "[WARN] Markdown file not found for '$fileKey'" -ForegroundColor Yellow
|
||||||
@@ -272,8 +366,12 @@ foreach ($group in $groupedByFile) {
|
|||||||
$fileChanged = $false
|
$fileChanged = $false
|
||||||
|
|
||||||
$groupedByAnchor = $group.Group | Group-Object -Property Anchor
|
$groupedByAnchor = $group.Group | Group-Object -Property Anchor
|
||||||
|
$anchorCount = $groupedByAnchor.Count
|
||||||
|
$anchorNumber = 0
|
||||||
|
|
||||||
foreach ($anchorGroup in $groupedByAnchor) {
|
foreach ($anchorGroup in $groupedByAnchor) {
|
||||||
|
$anchorNumber++
|
||||||
|
Set-SyncDetail -Status "File $fileNumber/$($totalFileGroups): $fileKey | Anchor $anchorNumber/$($anchorCount): $($anchorGroup.Name)" -Current $fileNumber -Total $totalFileGroups
|
||||||
$anchor = $anchorGroup.Name
|
$anchor = $anchorGroup.Name
|
||||||
|
|
||||||
$vars = New-Object System.Collections.Generic.List[string]
|
$vars = New-Object System.Collections.Generic.List[string]
|
||||||
@@ -359,6 +457,7 @@ foreach ($group in $groupedByFile) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Set-SyncStage -Step 6 -Status "Finalizing summary"
|
||||||
Write-Host "Processed: $($entries.Count) entries"
|
Write-Host "Processed: $($entries.Count) entries"
|
||||||
Write-Host "Inserted: $changes"
|
Write-Host "Inserted: $changes"
|
||||||
Write-Host "Skipped (already present): $alreadyPresent"
|
Write-Host "Skipped (already present): $alreadyPresent"
|
||||||
@@ -369,3 +468,6 @@ Write-Host "Missing heading anchors: $missingHeadings"
|
|||||||
if ($DryRun) {
|
if ($DryRun) {
|
||||||
Write-Host "Dry run only. No files were modified." -ForegroundColor Cyan
|
Write-Host "Dry run only. No files were modified." -ForegroundColor Cyan
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Set-SyncStage -Step 7 -Status "Completed"
|
||||||
|
Complete-SyncProgress
|
||||||
|
|||||||
Reference in New Issue
Block a user