Delete old variables

This commit is contained in:
Ian Bassi
2026-05-04 11:34:20 -03:00
parent 0c559249ef
commit 22a2dca167
4 changed files with 135 additions and 8 deletions

View File

@@ -91,9 +91,8 @@ This function is used to adjust sizes slightly when the objects have assembling
## Elephant foot compensation
[Modes](option_mode):
`Advanced` [Variables](built_in_placeholders_variables): `elefant_foot_compensation`, `elefant_foot_compensation_layers`.
`Expert` [Variable](built_in_placeholders_variables): `elefant_foot_layers_density`.
[Mode](option_mode): `Advanced`.
[Variables](built_in_placeholders_variables): `elefant_foot_compensation`, `elefant_foot_compensation_layers`.
This feature compensates for the "elephant foot" effect, which occurs when the first few layers of a print are wider than the rest due:
- Weight of the material above them.

View File

@@ -100,7 +100,7 @@ Controls the gap in mm or as a percentage of the nozzle size between the two end
[Modes](option_mode):
`Advanced` [Variables](built_in_placeholders_variables): `seam_slope_type`, `seam_slope_conditional`, `scarf_angle_threshold`, `scarf_overhang_threshold`, `scarf_joint_speed`, `seam_slope_start_height`, `seam_slope_entire_loop`, `seam_slope_min_length`, `seam_slope_steps`, `seam_slope_inner_walls`.
`Developer` [Variable](built_in_placeholders_variables): `scarf_joint_flow_ratio`.
`Expert` [Variable](built_in_placeholders_variables): `scarf_joint_flow_ratio`.
Adjusts the extrusion flow rate at seam points to create a smooth overlap between the start and end of each loop, minimizing visible defects.
![scarf-joint-seam](https://github.com/OrcaSlicer/OrcaSlicer_WIKI/blob/main/images/seam/scarf-joint-seam.png?raw=true)

View File

@@ -22,9 +22,6 @@ This method does not vary extrusion width and is ideal for fast, predictable sli
## Arachne
[Modes](option_mode):
`Advanced` [Variables](built_in_placeholders_variables): `wall_transition_angle`, `wall_transition_filter_deviation`, `wall_transition_length`, `wall_distribution_count`, `initial_layer_min_bead_width`, `min_bead_width`, `min_feature_size`, `min_length_factor`.
`Expert` [Variables](built_in_placeholders_variables): `wall_maximum_resolution`, `wall_maximum_deviation`.
The Arachne wall generator dynamically adjusts extrusion width to follow the shape of the model more closely. This allows better handling of thin features and smooth transitions between wall counts.
![wallgenerator-arachne](https://github.com/OrcaSlicer/OrcaSlicer_WIKI/blob/main/images/WallGenerator/wallgenerator-arachne.png?raw=true)
@@ -34,10 +31,14 @@ The Arachne wall generator dynamically adjusts extrusion width to follow the sha
### Wall transitioning threshhold angle
[Mode](option_mode): `Advanced`.
[Variable](built_in_placeholders_variables): `wall_transition_angle`.
Defines the minimum angle (in degrees) required for the algorithm to create a transition between an even and odd number of walls. If a wedge shape exceeds this angle, no extra center wall will be added. Lowering this value reduces center walls but may cause under- or over-extrusion in sharp corners.
### Wall transitioning filter margin
[Mode](option_mode): `Advanced`.
[Variable](built_in_placeholders_variables): `wall_transition_filter_deviation`.
Prevents rapid switching between more or fewer walls by defining a tolerance range around the minimum wall width. The extrusion width will stay within the range:
$$
@@ -48,26 +49,38 @@ Higher values reduce transitions, travel moves, and extrusion starts/stops, but
### Wall transitioning length
[Mode](option_mode): `Advanced`.
[Variable](built_in_placeholders_variables): `wall_transition_length`.
Controls how far into the model the transition between wall counts extends. A lower value shortens or removes center walls, improving print time but potentially reducing coverage in tight areas.
### Wall distribution count
[Mode](option_mode): `Advanced`.
[Variable](built_in_placeholders_variables): `wall_distribution_count`.
Sets how many walls (counted inward from the outer wall) are allowed to vary in width. Lower values constrain variation to inner walls, keeping outer walls consistent for best surface quality.
### Minimum wall width
[Mode](option_mode): `Advanced`.
[Variable](built_in_placeholders_variables): `min_bead_width`.
Defines the narrowest wall that can be printed to represent thin features. If the feature is thinner than this value, the wall will match its width. Expressed as a percentage of nozzle diameter.
#### First layer minimum wall width
[Mode](option_mode): `Advanced`.
[Variable](built_in_placeholders_variables): `initial_layer_min_bead_width`.
Specifies the minimum wall width for the first layer. It is recommended to match the nozzle diameter to improve adhesion and ensure stable base walls.
### Minimum feature size
[Mode](option_mode): `Advanced`.
[Variable](built_in_placeholders_variables): `min_feature_size`.
Minimum width required for a model feature to be printed. Features below this value are skipped; features above it are widened to match the [Minimum Wall Width](#minimum-wall-width). Expressed as a percentage of nozzle diameter.
### Minimum wall length
[Mode](option_mode): `Advanced`.
[Variable](built_in_placeholders_variables): `min_length_factor`.
Avoids very short or isolated wall segments that add unnecessary time.
Increasing this value removes short unconnected walls, **improving efficiency**.

View File

@@ -133,6 +133,69 @@ function Convert-ConfigOptionModeToLabel {
}
}
function Remove-StaleSectionMetadata {
param(
[System.Collections.Generic.List[string]]$Buffer,
[hashtable]$ExpectedAnchors,
[string]$MetadataLinePattern
)
$sectionsPruned = 0
$headings = New-Object System.Collections.Generic.List[object]
for ($i = 0; $i -lt $Buffer.Count; $i++) {
$line = $Buffer[$i]
if ($line -match '^(#{1,6})\s+(.+?)\s*$') {
$headingText = $Matches[2].Trim()
$headingText = $headingText -replace '\s+#+$', ''
$slug = ConvertTo-AnchorSlug -Heading $headingText
if (-not [string]::IsNullOrWhiteSpace($slug)) {
$headings.Add([PSCustomObject]@{
Index = $i
Anchor = $slug
})
}
}
}
if ($headings.Count -eq 0) {
return 0
}
for ($h = $headings.Count - 1; $h -ge 0; $h--) {
$sectionStart = $headings[$h].Index
$sectionAnchor = $headings[$h].Anchor
if ($ExpectedAnchors.ContainsKey($sectionAnchor)) {
continue
}
$sectionEnd = if ($h -lt ($headings.Count - 1)) { $headings[$h + 1].Index - 1 } else { $Buffer.Count - 1 }
if ($sectionEnd -le $sectionStart) {
continue
}
$metadataIndexes = New-Object System.Collections.Generic.List[int]
for ($k = $sectionStart + 1; $k -le $sectionEnd; $k++) {
if ($Buffer[$k] -match $MetadataLinePattern) {
$metadataIndexes.Add($k)
}
}
if ($metadataIndexes.Count -eq 0) {
continue
}
for ($r = $metadataIndexes.Count - 1; $r -ge 0; $r--) {
$Buffer.RemoveAt($metadataIndexes[$r])
}
$sectionsPruned++
}
return $sectionsPruned
}
$syncProgressActivity = "sync-tab-options-to-wiki.ps1"
$syncStageTotal = 8
@@ -400,6 +463,21 @@ $missingHeadings = 0
$alreadyPresent = 0
$normalizedSections = 0
$entriesWithMode = @($entries | Where-Object { -not [string]::IsNullOrWhiteSpace($_.Mode) }).Count
$metadataLinePattern = '^\s*(?:\[(?:Variable|Variables|Mode|Modes)\]\([^\)]+\)|`[^`]+`\s+\[(?:Variable|Variables)\]\([^\)]+\)|Variables?|Modes?)\s*:\s*'
$managedTargetPaths = @{}
foreach ($fileKey in $mdByName.Keys) {
$candidates = $mdByName[$fileKey]
$managedPath = $candidates[0]
if ($candidates.Count -gt 1) {
$managedPath = ($candidates | Sort-Object Length | Select-Object -First 1)
}
$managedTargetPaths[$managedPath] = $true
}
$expectedAnchorsByPath = @{}
$processedTargetPaths = @{}
$groupedByFile = $entries | Group-Object -Property FileKey
$totalFileGroups = $groupedByFile.Count
@@ -425,6 +503,11 @@ foreach ($group in $groupedByFile) {
Write-Host "[WARN] Multiple files matched '$fileKey'. Using: $targetPath" -ForegroundColor Yellow
}
$processedTargetPaths[$targetPath] = $true
if (-not $expectedAnchorsByPath.ContainsKey($targetPath)) {
$expectedAnchorsByPath[$targetPath] = @{}
}
$lines = Get-Content -LiteralPath $targetPath
$buffer = New-Object System.Collections.Generic.List[string]
$buffer.AddRange([string[]]$lines)
@@ -438,6 +521,7 @@ foreach ($group in $groupedByFile) {
$anchorNumber++
Set-SyncDetail -Status "File $fileNumber/$($totalFileGroups): $fileKey | Anchor $anchorNumber/$($anchorCount): $($anchorGroup.Name)" -Current $fileNumber -Total $totalFileGroups
$anchor = $anchorGroup.Name
$expectedAnchorsByPath[$targetPath][$anchor] = $true
$vars = New-Object System.Collections.Generic.List[string]
$seenVars = @{}
@@ -529,7 +613,7 @@ foreach ($group in $groupedByFile) {
$metadataLineIndexes = New-Object System.Collections.Generic.List[int]
for ($k = $idx + 1; $k -le $sectionEnd; $k++) {
if ($buffer[$k] -match '^\s*(?:\[(?:Variable|Variables|Mode|Modes)\]\([^\)]+\)|`[^`]+`\s+\[(?:Variable|Variables)\]\([^\)]+\)|Variables?|Modes?)\s*:\s*') {
if ($buffer[$k] -match $metadataLinePattern) {
$metadataLineIndexes.Add($k)
}
}
@@ -583,11 +667,42 @@ foreach ($group in $groupedByFile) {
$fileChanged = $true
}
$staleSectionsPruned = Remove-StaleSectionMetadata -Buffer $buffer -ExpectedAnchors $expectedAnchorsByPath[$targetPath] -MetadataLinePattern $metadataLinePattern
if ($staleSectionsPruned -gt 0) {
$normalizedSections += $staleSectionsPruned
$fileChanged = $true
}
if ($fileChanged -and -not $DryRun) {
Set-Content -LiteralPath $targetPath -Value $buffer -Encoding UTF8
}
}
foreach ($managedTargetPath in $managedTargetPaths.Keys) {
if ($processedTargetPaths.ContainsKey($managedTargetPath)) {
continue
}
$lines = Get-Content -LiteralPath $managedTargetPath
$buffer = New-Object System.Collections.Generic.List[string]
$buffer.AddRange([string[]]$lines)
$expectedAnchors = @{}
if ($expectedAnchorsByPath.ContainsKey($managedTargetPath)) {
$expectedAnchors = $expectedAnchorsByPath[$managedTargetPath]
}
$staleSectionsPruned = Remove-StaleSectionMetadata -Buffer $buffer -ExpectedAnchors $expectedAnchors -MetadataLinePattern $metadataLinePattern
if ($staleSectionsPruned -le 0) {
continue
}
$normalizedSections += $staleSectionsPruned
if (-not $DryRun) {
Set-Content -LiteralPath $managedTargetPath -Value $buffer -Encoding UTF8
}
}
Set-SyncStage -Step 7 -Status "Finalizing summary"
Write-Host "Processed: $($entries.Count) entries"
Write-Host "Entries with option mode: $entriesWithMode"